mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Revamped equipment init
This commit is contained in:
parent
5719738be9
commit
2a016fd30c
16 changed files with 76 additions and 81 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue