Added Save and load support to the inventory

This commit is contained in:
2025-11-19 15:18:33 +01:00
parent 72079044bd
commit 2a4425b9db
2 changed files with 23 additions and 5 deletions
@@ -23,7 +23,7 @@ public partial class InventoryManager : Node
}
}
public InventoryInstance playerInventory = new InventoryInstance();
public InventoryInstance? playerInventory;
private int _currentSelectedSlotIndex = 0;
@@ -34,7 +34,9 @@ public partial class InventoryManager : Node
public override void _Ready()
{
playerInventory = new InventoryInstance();
playerInventory.SlotAmount = 37;
AddChild(playerInventory);
}
public InventoryActionResult CreateItem(