merge: integrate remote player quest slices

This commit is contained in:
Rijad Zuzo
2026-08-16 16:53:30 +02:00
55 changed files with 3640 additions and 54 deletions
+35 -1
View File
@@ -87,6 +87,8 @@ func _on_village_changed(village: SimVillage) -> void:
wood_rate = " (%.0f/d)" % rates["wood_per_day"]
var opportunity_text := _build_active_opportunity_display()
var season_text := "Cold" if simulation_manager.is_cold_season() else "Warm"
var standing_text := _build_standing_display()
var player_needs_text := _build_player_needs_display()
village_stats_label.text = (
"""
Village [%s]
@@ -101,7 +103,7 @@ func _on_village_changed(village: SimVillage) -> void:
Food Mod: %.2f
Safety Mod: %.2f
Knowledge Mod: %.2f
%s%s
%s%s%s%s
"""
% [
speed_text,
@@ -116,12 +118,44 @@ func _on_village_changed(village: SimVillage) -> void:
village.food_modifier,
village.safety_modifier,
village.knowledge_modifier,
player_needs_text,
standing_text,
opportunity_text,
event_text,
]
)
func _build_player_needs_display() -> String:
if not simulation_manager.has_method("get_player_state"):
return ""
var state: PlayerStateRecord = simulation_manager.get_player_state()
if state == null:
return ""
var status := "dead" if state.is_dead() else ("starving" if state.is_starving() else "ok")
return (
"\n\nYou\nHunger: %.0f Energy: %.0f (%s)"
% [state.get_hunger(), state.get_energy(), status]
)
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()