Fix critical bugs from code review
- room.gd: Add signal tracking and explicit cleanup in _exit_tree - room.gd: Guard _on_enemy_died against race condition after room freed - player.gd: Set _shield_ready = false on shield activation - player.gd: Fix coolant zone lambda syntax error - player.gd: Add apply_knockback() method for Hivemind pulse - player.gd: Fix coolant zone memory leak (use Timer child) - hud.gd: Remove deprecated boss bar code
This commit is contained in:
@@ -15,11 +15,10 @@ func _draw() -> void:
|
||||
func _on_body_entered(body: Node) -> void:
|
||||
if not body.is_in_group("player") or item == null:
|
||||
return
|
||||
RunManager.collect_item(item)
|
||||
RunManager.collect_item(item) # Triggers item_collected signal -> player_stats recalculates
|
||||
if item.heal_on_pickup > 0.0:
|
||||
body.stats.heal(item.heal_on_pickup)
|
||||
body.stats.recalculate()
|
||||
EventBus.player_health_changed.emit(body.stats.current_health, body.stats.max_health)
|
||||
EventBus.player_health_changed.emit(body.stats.current_health, body.stats.max_health)
|
||||
_show_pickup_label()
|
||||
queue_free()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user