From 07e73ef74152c459d4d0bf1a51a7015a91174ce0 Mon Sep 17 00:00:00 2001 From: Bryce Date: Sun, 26 Apr 2026 22:21:54 -0700 Subject: [PATCH] fix: add slot to grid before calling set_item so @onready nodes exist --- inventory/inventory_overlay/InventoryOverlay.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/inventory_overlay/InventoryOverlay.gd b/inventory/inventory_overlay/InventoryOverlay.gd index f31ef2d..7e515a4 100644 --- a/inventory/inventory_overlay/InventoryOverlay.gd +++ b/inventory/inventory_overlay/InventoryOverlay.gd @@ -85,12 +85,12 @@ func _refresh_grid() -> void: var slot_scene = load("res://inventory/inventory_overlay/InventorySlot.tscn") var slot: InventorySlot = slot_scene.instantiate() + grid.add_child(slot) slot.set_item(def) slot.clicked.connect(_on_slot_clicked) slot.right_clicked.connect(_on_slot_right_clicked) slot.hovered.connect(_on_slot_hovered) slot.unhovered.connect(_on_slot_unhovered) - grid.add_child(slot) grid.columns = SLOTS_PER_ROW