From c9c03b3b353e7cebeef163741580773ba81d8b9a Mon Sep 17 00:00:00 2001 From: Damien Ostler Date: Fri, 12 Jan 2024 00:49:05 -0500 Subject: [PATCH] chore: added flag for item being stackable, changed name of 0 to default from none, and renamed enum from EnumItemActions to EnumItemFlags --- Code/Items/Enums/{EnumItemActions.cs => EnumItemFlags.cs} | 7 ++++--- Code/Items/Item.cs | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) rename Code/Items/Enums/{EnumItemActions.cs => EnumItemFlags.cs} (66%) diff --git a/Code/Items/Enums/EnumItemActions.cs b/Code/Items/Enums/EnumItemFlags.cs similarity index 66% rename from Code/Items/Enums/EnumItemActions.cs rename to Code/Items/Enums/EnumItemFlags.cs index 8124a78..bbfc087 100644 --- a/Code/Items/Enums/EnumItemActions.cs +++ b/Code/Items/Enums/EnumItemFlags.cs @@ -3,13 +3,14 @@ using System; namespace GodotGridInventory.Code.Items.Enums; [Flags] -public enum EnumItemActions +public enum EnumItemFlags { - None = 0, + Default = 0, Examine = 1 << 1, Equip = 1 << 2, Use = 1 << 3, Open = 1 << 4, Drop = 1 << 5, - Destroy = 1 << 6 + Destroy = 1 << 6, + Stackable = 1 << 7 } \ No newline at end of file diff --git a/Code/Items/Item.cs b/Code/Items/Item.cs index 256bcec..5e91890 100644 --- a/Code/Items/Item.cs +++ b/Code/Items/Item.cs @@ -10,6 +10,7 @@ public partial class Item : Resource [Export] public string Description { get; set; } [Export] public Vector2 Size { 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[] Tags { get; set; } }