résolution du bug de swap d'item #94

This commit is contained in:
2025-10-17 10:56:58 +02:00
parent 63485078bd
commit 15175921c4
3 changed files with 10 additions and 11 deletions

View File

@@ -86,8 +86,7 @@ func pop_item(ind: int = current_item_ind) -> Item:
emit_signal("inventory_changed", self)
return item_removed
func swap_items(item_to_add: Item, ind_to_get: int = current_item_ind) -> Item:
var item_to_get := items[ind_to_get]
items[ind_to_get] = item_to_add
emit_signal("inventory_changed", self)
return item_to_get
func is_full():
for i in items:
if i == null : return false
return true