chore: added flag for item being stackable, changed name of 0 to default from none, and renamed enum from EnumItemActions to EnumItemFlags

This commit is contained in:
Damien Ostler 2024-01-12 00:49:05 -05:00
parent d8da370026
commit c9c03b3b35
2 changed files with 6 additions and 4 deletions

View File

@ -3,13 +3,14 @@ using System;
namespace GodotGridInventory.Code.Items.Enums; namespace GodotGridInventory.Code.Items.Enums;
[Flags] [Flags]
public enum EnumItemActions public enum EnumItemFlags
{ {
None = 0, Default = 0,
Examine = 1 << 1, Examine = 1 << 1,
Equip = 1 << 2, Equip = 1 << 2,
Use = 1 << 3, Use = 1 << 3,
Open = 1 << 4, Open = 1 << 4,
Drop = 1 << 5, Drop = 1 << 5,
Destroy = 1 << 6 Destroy = 1 << 6,
Stackable = 1 << 7
} }

View File

@ -10,6 +10,7 @@ public partial class Item : Resource
[Export] public string Description { get; set; } [Export] public string Description { get; set; }
[Export] public Vector2 Size { get; set; } [Export] public Vector2 Size { get; set; }
[Export] public Texture2D Texture { get; set; } [Export] public Texture2D Texture { get; set; }
[Export] public EnumItemActions Actions { get; set; } [Export] public EnumItemFlags Flags { get; set; }
[Export] public string[] Slots { get; set; } [Export] public string[] Slots { get; set; }
[Export] public string[] Tags { get; set; }
} }