Mystery item implementation
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user