upd
This commit is contained in:
12
Code/Inventory/Definitions/BaseItemDefinition.cs
Normal file
12
Code/Inventory/Definitions/BaseItemDefinition.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Sasalka;
|
||||
|
||||
[GameResource( "Base Item Definition", "inv", "", Category = "Sasalka", Icon = "inventory_2" )]
|
||||
public class BaseItemDefinition : GameResource
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
[ResourceType( "prefab" )] public GameObject Prefab { get; set; }
|
||||
public Texture ImageTexture { get; set; }
|
||||
public string ImageUrl { get; set; }
|
||||
}
|
||||
8
Code/Inventory/Definitions/ClothingItemDefinition.cs
Normal file
8
Code/Inventory/Definitions/ClothingItemDefinition.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Sasalka;
|
||||
|
||||
[GameResource( "Clothing Item Definition", "clitem", "", Category = "Sasalka", Icon = "inventory_2" )]
|
||||
public class ClothingItemDefinition : BaseItemDefinition, IEquipable
|
||||
{
|
||||
[Property] public string ClothUrl { get; set; }
|
||||
public Inventar.InventorySlot Slot { get; set; }
|
||||
}
|
||||
6
Code/Inventory/Definitions/IEquipable.cs
Normal file
6
Code/Inventory/Definitions/IEquipable.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Sasalka;
|
||||
|
||||
public interface IEquipable
|
||||
{
|
||||
Inventar.InventorySlot Slot { get; }
|
||||
}
|
||||
18
Code/Inventory/Definitions/WeaponItemDefinition.cs
Normal file
18
Code/Inventory/Definitions/WeaponItemDefinition.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Sandbox.Citizen;
|
||||
|
||||
namespace Sasalka;
|
||||
|
||||
[GameResource( "Weapon Item Definition", "weapon", "", Category = "Sasalka", Icon = "inventory_2" )]
|
||||
public class WeaponItemDefinition : BaseItemDefinition, IEquipable
|
||||
{
|
||||
public Inventar.InventorySlot Slot { get; set; }
|
||||
public CitizenAnimationHelper.HoldTypes HoldType { get; set; } = CitizenAnimationHelper.HoldTypes.None;
|
||||
[InlineEditor, Space] public WeaponDefinition WeaponDefinition { get; set; }
|
||||
}
|
||||
|
||||
public struct WeaponDefinition
|
||||
{
|
||||
// public CitizenAnimationHelper.Hand Hand { get; set; }
|
||||
public Vector3 Position { get; set; }
|
||||
public Rotation Rotation { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user