Small overhaul

This commit is contained in:
2026-03-09 21:36:35 -04:00
parent 7d33eddd08
commit 3684517d1b
9 changed files with 182 additions and 29 deletions
+7 -1
View File
@@ -143,4 +143,10 @@ func heal(amount: float) -> void:
current_health = minf(current_health + amount, max_health)
func _on_part_equipped(_part: Resource, _slot: String) -> void:
recalculate()
var old_max := max_health
recalculate()
# If max_health increased, grant the extra HP immediately
if max_health > old_max:
current_health += (max_health - old_max)
# Update UI
EventBus.player_health_changed.emit(current_health, max_health)