From f97fc0405eab537d6bd943e1b644e183e0e5b23a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 20:22:07 +0000 Subject: [PATCH] chore(BaseEnemy): apply_damage passes null as attacker, losing log context - Updated scripts/entities/base_enemy.gd:apply_damage to accept an optional attacker parameter. - Updated scripts/entities/keeper.gd:apply_damage to accept an optional attacker parameter. - Passed the attacker parameter to EntityLifecycle.apply_damage instead of hardcoded null. Co-authored-by: niyazmft <9331133+niyazmft@users.noreply.github.com> --- scripts/entities/base_enemy.gd | 4 ++-- scripts/entities/keeper.gd | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/entities/base_enemy.gd b/scripts/entities/base_enemy.gd index ce51afc8..bdb81809 100644 --- a/scripts/entities/base_enemy.gd +++ b/scripts/entities/base_enemy.gd @@ -256,11 +256,11 @@ func _handle_attack(action: Dictionary) -> void: ## Damage API -func apply_damage(damage: int) -> void: +func apply_damage(damage: int, attacker: Entity = null) -> void: ## Apply damage through EntityLifecycle via AutoloadHelper var lifecycle: _EntityLifecycle = AutoloadHelper.entity_lifecycle() if lifecycle: - lifecycle.apply_damage(null, entity, damage) + lifecycle.apply_damage(attacker, entity, damage) else: entity.apply_damage(damage) diff --git a/scripts/entities/keeper.gd b/scripts/entities/keeper.gd index e9ecd122..33c64796 100644 --- a/scripts/entities/keeper.gd +++ b/scripts/entities/keeper.gd @@ -59,12 +59,12 @@ func trigger_damage_effect() -> void: ## Apply damage to the Keeper entity and trigger recoil on the apparition. ## Delegates to EntityLifecycle for canonical state transitions. -func apply_damage(damage: int) -> void: +func apply_damage(damage: int, attacker: Entity = null) -> void: if entity == null: return var lifecycle: _EntityLifecycle = AutoloadHelper.entity_lifecycle() if lifecycle: - lifecycle.apply_damage(null, entity, damage) + lifecycle.apply_damage(attacker, entity, damage) else: entity.apply_damage(damage)