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

@@ -24,7 +24,7 @@ func _ready():
object_sprite.apply_texture_to_sprite(item.icon, ITEM_SPRITE_SIZE)
object_sprite.generate_particles(item.get_particles())
func pointer_text():
func pointer_text() -> String:
var name_suffix = ""
if item is Seed:
@@ -41,12 +41,9 @@ func inspector_info() -> Inspector.Info:
return item.inspector_info()
func interact(player : Player) -> bool:
var swapped_item = player.pick_item(item)
player.pick_item(item)
if swapped_item:
item = swapped_item
else :
pickup_animation(player)
pickup_animation(player)
return true