Tied inventory to robot count

This commit is contained in:
2026-05-09 16:15:51 +02:00
parent 362cc0442f
commit 8b15027ac1
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ public class Inventory
{
public List<Item> items = new List<Item>();
public int maxInventorySize = 8;
public int maxInventorySize = 16;
public event EventHandler OnInventoryUpdate;
public bool AddItem(Item item, int amount)
@@ -18,7 +18,7 @@ public class Inventory
return true;
}
if (items.Count < maxInventorySize)
if (items.Count < maxInventorySize * GameData.maxRobotCount)
{
items.Add(item);
items[items.Count - 1].currentAmount += amount;
+1 -1
View File
@@ -30,7 +30,7 @@ public partial class InventoryDisplay : PanelContainer
private void UpdateInventorySpace()
{
inventorySpace.Text = $"Used space: {GameData.inventory.items.Count}/{GameData.inventory.maxInventorySize}";
inventorySpace.Text = $"Used space: {GameData.inventory.items.Count}/{GameData.inventory.maxInventorySize * GameData.maxRobotCount}";
}
public void ReloadItems()