фыв
This commit is contained in:
@@ -19,49 +19,40 @@ public enum ItemRarity
|
||||
Legendary
|
||||
}
|
||||
|
||||
[GameResource("Base Item Definition", "inv", "", Category = "Sasalka", Icon = "inventory_2")]
|
||||
[GameResource( "Base Item Definition", "inv", "", Category = "Sasalka", Icon = "inventory_2" )]
|
||||
public class BaseItemDefinition : GameResource
|
||||
{
|
||||
[Property, Title("Basic Info")]
|
||||
public string Name { get; set; } = "Unknown Item";
|
||||
[Property, Title( "Basic Info" )] public string Name { get; set; } = "Unknown Item";
|
||||
|
||||
[Property]
|
||||
public string Description { get; set; } = "";
|
||||
[Property] public string Description { get; set; } = "";
|
||||
|
||||
[Property, Category("Visual")]
|
||||
[ResourceType("prefab")]
|
||||
public GameObject Prefab { get; set; } = GameObject.GetPrefab("prefabs/item_parcel.prefab");
|
||||
[Property, Category( "Visual" )]
|
||||
[ResourceType( "prefab" )]
|
||||
public GameObject Prefab { get; set; } = GameObject.GetPrefab( "prefabs/item_parcel.prefab" );
|
||||
|
||||
[Property, Category("Visual")]
|
||||
public Texture ImageTexture { get; set; }
|
||||
[Property, Category( "Visual" )] public Texture ImageTexture { get; set; }
|
||||
|
||||
[Property, Category("Visual")]
|
||||
public string ImageUrl { get; set; }
|
||||
[Property, Category( "Visual" )] public string ImageUrl { get; set; }
|
||||
|
||||
[Property, Category("Properties")]
|
||||
[Range(1, 1000)]
|
||||
[Property, Category( "Properties" )]
|
||||
[Range( 1, 1000 )]
|
||||
public int MaxCount { get; set; } = 1;
|
||||
|
||||
[Property, Category("Properties")]
|
||||
public virtual ItemCategory Category { get; set; } = ItemCategory.Misc;
|
||||
[Property, Category( "Properties" )] public virtual ItemCategory Category { get; set; } = ItemCategory.Misc;
|
||||
|
||||
[Property, Category("Properties")]
|
||||
public ItemRarity Rarity { get; set; } = ItemRarity.Common;
|
||||
[Property, Category( "Properties" )] public ItemRarity Rarity { get; set; } = ItemRarity.Common;
|
||||
|
||||
[Property, Category("Properties")]
|
||||
public float Weight { get; set; } = 1.0f;
|
||||
[Property, Category( "Properties" )] public float Weight { get; set; } = 1.0f;
|
||||
|
||||
[Property, Category("Properties")]
|
||||
public bool IsStackable => MaxCount > 1;
|
||||
[Property, Category( "Properties" )] public bool IsStackable = false;
|
||||
|
||||
[Property, Category("Properties")]
|
||||
public bool IsEquipable => this is IEquipable;
|
||||
[Property, Category( "Properties" )] public bool IsEquipable => this is IEquipable;
|
||||
|
||||
public virtual Inventar.InventorySlot? GetSlot() => null;
|
||||
|
||||
public virtual bool CanUse() => false;
|
||||
|
||||
public virtual void OnUse(InventoryItem item) { }
|
||||
public virtual void OnUse( InventoryItem item ) { }
|
||||
|
||||
public string GetRarityColor()
|
||||
{
|
||||
|
||||
@@ -15,8 +15,8 @@ public class ClothingItemDefinition : BaseItemDefinition, IEquipable
|
||||
[Property, Category( "Clothing Properties" )]
|
||||
public bool IsVisible { get; set; } = true;
|
||||
|
||||
[Property, Category( "Clothing Properties" )]
|
||||
public string BodyPart { get; set; } = "";
|
||||
// [Property, Category( "Clothing Properties" )]
|
||||
// public string BodyPart { get; set; } = "";
|
||||
|
||||
public override Inventar.InventorySlot? GetSlot() => Slot;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user