summaryrefslogtreecommitdiff
path: root/scripts/entities/actors/Inventory.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
commitc6bbb834f7758027c0df338f1520f34fad3befea (patch)
tree1818cd23c24be16fbe19b16dd0a510874d440d83 /scripts/entities/actors/Inventory.cs
parentf1b51bed52ffbd90b5b7cc8dcfc6f0484bbbeb3c (diff)
Organização
Diffstat (limited to 'scripts/entities/actors/Inventory.cs')
-rw-r--r--scripts/entities/actors/Inventory.cs39
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