feat: surface player standing and quest journal in the village HUD

This commit is contained in:
2026-08-08 17:48:13 +02:00
parent 9e6a6afcf5
commit 089fef9968
6 changed files with 419 additions and 1 deletions
+20 -1
View File
@@ -86,6 +86,7 @@ func _on_village_changed(village: SimVillage) -> void:
if rates["wood_per_day"] > 0.01:
wood_rate = " (%.0f/d)" % rates["wood_per_day"]
var opportunity_text := _build_active_opportunity_display()
var standing_text := _build_standing_display()
village_stats_label.text = (
"""
Village [%s]
@@ -99,7 +100,7 @@ func _on_village_changed(village: SimVillage) -> void:
Food Mod: %.2f
Safety Mod: %.2f
Knowledge Mod: %.2f
%s%s
%s%s%s
"""
% [
speed_text,
@@ -113,12 +114,30 @@ func _on_village_changed(village: SimVillage) -> void:
village.food_modifier,
village.safety_modifier,
village.knowledge_modifier,
standing_text,
opportunity_text,
event_text,
]
)
func _build_standing_display() -> String:
if not simulation_manager.has_method("get_player_standing"):
return ""
var standing: PlayerStandingRecord = simulation_manager.get_player_standing()
if standing == null:
return ""
return (
"\n\nStanding\n%s · %.0f/100 · %d need%s met"
% [
standing.get_tier_name(),
standing.get_standing(),
standing.get_resolved_needs(),
"" if standing.get_resolved_needs() == 1 else "s",
]
)
func _on_npc_decision_recorded(_npc: SimNPC, _decision: ActionSelectionResult) -> void:
_refresh_npc_inspector()