Add stackable items

This commit is contained in:
2025-03-11 16:00:46 -07:00
parent 192f2eb316
commit f060229b5e
17 changed files with 151 additions and 57 deletions

View File

@@ -320,8 +320,12 @@ public partial class Game : Node3D, IGame
Player.HealVT(throwableItem.HealVTAmount);
}
await ToSignal(GetTree().CreateTimer(1f), "timeout");
GameRepo.RemoveItemFromInventory(item);
await ToSignal(GetTree().CreateTimer(0.3f), "timeout");
if (item is IStackable stackableItem && stackableItem.Count > 1)
stackableItem.SetCount(stackableItem.Count - 1);
else
GameRepo.RemoveItemFromInventory(item);
}
public void DropItem(InventoryItem item)