lots of changeru

This commit is contained in:
2026-01-25 16:27:19 +01:00
parent a95e22d2fa
commit 7abadb92a9
14 changed files with 855 additions and 106 deletions

View File

@@ -366,6 +366,12 @@ func _deal_explosion_damage():
body.rpc_take_damage.rpc(final_damage, attacker_pos, false, false, false)
print("Bomb hit enemy: ", body.name, " for ", final_damage, " damage!")
# Deal damage to interactable objects (pots, boxes, etc.)
elif body.has_method("can_be_destroyed") and body.can_be_destroyed() and body.has_method("take_damage"):
var attacker_pos = player_owner.global_position if player_owner else global_position
body.take_damage(final_damage, attacker_pos)
print("Bomb hit interactable: ", body.name, " for ", final_damage, " damage!")
func _spawn_explosion_tile_particles():
var game_world = get_tree().get_first_node_in_group("game_world")