diff options
Diffstat (limited to 'scripts/entities/actors/Inventory.cs')
| -rw-r--r-- | scripts/entities/actors/Inventory.cs | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/scripts/entities/actors/Inventory.cs b/scripts/entities/actors/Inventory.cs deleted file mode 100644 index f1cff2a..0000000 --- a/scripts/entities/actors/Inventory.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Godot; - -public partial class Inventory : Node { - private Player player; - - public Godot.Collections.Array<ConsumableItem> Items { get; private set; } = []; - - public int Capacity { get; private set; } - - public Inventory(int capacity) { - Capacity = capacity; - } - - public override void _Ready() { - base._Ready(); - player = GetParent<Player>(); - } - - public void Drop(ConsumableItem item) { - Items.Remove(item); - MapData data = player.Map_Data; - data.InsertEntity(item); - data.EmitSignal(MapData.SignalName.EntityPlaced, item); - item.Map_Data = data; - item.GridPosition = player.GridPosition; - - MessageLogData.Instance.AddMessage($"VocĂȘ descarta {item.DisplayName}."); - } - - public void Add(ConsumableItem item) { - if (Items.Count >= Capacity) return; - - Items.Add(item); - } - - public void RemoveItem(ConsumableItem item) { - Items.Remove(item); - } -}
\ No newline at end of file |
