sfx de minage et récolte fonctionnels #164

This commit is contained in:
2026-02-26 14:20:39 +01:00
parent ebe6df5d4d
commit 8b07d5df47

View File

@@ -33,7 +33,7 @@ func can_use(_player : Player, zone : Player.ActionZone) -> bool:
return false
func use(player : Player, zone : Player.ActionZone) -> bool:
AudioManager.play_sfx("Dig")
for area in zone.get_affected_areas():
if area and area is Plant:
harvest(area, player)
@@ -45,5 +45,7 @@ func use(player : Player, zone : Player.ActionZone) -> bool:
var rock_layer : RockLayer = bodies[rock_layer_id]
rock_layer.dig_rocks(zone.get_tiles())
AudioManager.play_sfx("Mining")
else : AudioManager.play_sfx("Harvest")
return true