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:
@@ -73,11 +73,10 @@ func _attempt_purchase() -> void:
|
||||
if player == null:
|
||||
return
|
||||
|
||||
RunManager.collect_item(item)
|
||||
RunManager.collect_item(item) # Triggers item_collected signal -> player_stats recalculates
|
||||
if item.heal_on_pickup > 0.0:
|
||||
player.stats.heal(item.heal_on_pickup)
|
||||
player.stats.recalculate()
|
||||
EventBus.player_health_changed.emit(player.stats.current_health, player.stats.max_health)
|
||||
EventBus.player_health_changed.emit(player.stats.current_health, player.stats.max_health)
|
||||
|
||||
_sold = true
|
||||
_player_in_range = false
|
||||
|
||||
Reference in New Issue
Block a user