feat: add validated quicksave persistence
This commit is contained in:
@@ -41,6 +41,10 @@ func initialize_world_view() -> void:
|
||||
push_error(
|
||||
"WorldViewManager: SimulationManager has no npc_inventory_changed signal"
|
||||
)
|
||||
if simulation_manager.has_signal("state_restored"):
|
||||
simulation_manager.state_restored.connect(_on_simulation_state_restored)
|
||||
else:
|
||||
push_error("WorldViewManager: SimulationManager has no state_restored signal")
|
||||
spawn_initial_npcs()
|
||||
|
||||
func spawn_initial_npcs() -> void:
|
||||
@@ -180,3 +184,9 @@ func _on_npc_inventory_changed(
|
||||
push_error(
|
||||
"WorldViewManager: NPCVisual has no set_carried_food_visible method"
|
||||
)
|
||||
|
||||
func _on_simulation_state_restored() -> void:
|
||||
for visual in active_npc_visuals.values():
|
||||
visual.queue_free()
|
||||
active_npc_visuals.clear()
|
||||
spawn_initial_npcs()
|
||||
|
||||
Reference in New Issue
Block a user