Mystery item implementation

This commit is contained in:
2025-03-26 23:13:01 -07:00
parent 114ff35630
commit 9d3621dd2c
58 changed files with 860 additions and 309 deletions

View File

@@ -34,6 +34,15 @@ public partial class Inventory : Node, IInventory
return true;
}
public bool TryInsert(InventoryItem inventoryItem, int index)
{
if (Items.Count >= _maxInventorySize || index >= _maxInventorySize || index < 0)
return false;
Items.Insert(index, inventoryItem);
return true;
}
public void Remove(InventoryItem inventoryItem) => Items.Remove(inventoryItem);