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

@@ -127,6 +127,9 @@ func try_move(move_to : Vector2):
func pick_item(item : Item) -> Item:
play_sfx("pick")
if inventory.is_full():
drop_item()
var available_slot_ind = inventory.get_best_available_slot_ind()
if available_slot_ind == inventory.current_item_ind && inventory.items[available_slot_ind] != null:
var current_item : Item = inventory.get_item()