using Godot; public partial class InventoryController : Control { [Export] public Inventory Inventory; public override void _Ready() { var inventorySlots = GetTree().GetNodesInGroup("inventory_slots_cs"); for (int i = 0; i < inventorySlots.Count; i++) { var slot = (InventorySlot)inventorySlots[i]; slot.InitializeSlot(i, Inventory); } } }