Untested PickupableItem

This commit is contained in:
Alexey 2025-07-31 15:33:31 +03:00
commit 63e87e86d5
19 changed files with 200 additions and 17 deletions

View file

@ -27,3 +27,13 @@ func select_slot(index: int):
current_slot = slots[index]
current_weapon = current_slot.weapon
slot_selected.emit()
func first_free_slot() -> WeaponSlot:
for slot in slots:
if not slot.has_weapon:
return slot
return null
func refresh_current_slot() -> void:
var index = slots.find(current_slot)
select_slot(index)