Revamped equipment init

This commit is contained in:
Marco 2025-04-07 15:58:43 +02:00
commit 2a016fd30c
16 changed files with 76 additions and 81 deletions

View file

@ -67,6 +67,11 @@ public partial class InventoryManager : Node2D
return _itemsDict.TryGetValue(itemKey, out var itm) ? itm.Count : 0;
}
public int RemoveItem(LootItem item)
{
return RemoveItem(item.ItemKey, 9999);
}
public int RemoveItem(string itemKey, int amount)
{
if (!_itemsDict.TryGetValue(itemKey, out var itm)) return 0;