feat(simulation): auto-pause sim on implant-fullscreen — inspection substrate (T-970)

D-226 layer 1. World-advancing phases gated on pause: Movement/Storyteller/Knowledge/TickAdvance set-gated via sim_not_paused; Simulation + Economy gated per-system at their registration sites — collect_sound_events and serve_econ_state_query stay unconditioned (transient-buffer clear + paused-allowed query; set-gating Simulation leaked a stale tick-7 footstep into frozen snapshots — caught by golden_suite, fixed without touching the fixture; regression test encodes the bug shape). New PlayerAction::AutoPause/AutoResume + AutoPauseState resource implement Option A reconciliation: auto-resume only fires if auto-pause caused the pause; manual pause and Half rate survive implant open/close. PauseParams SystemParam bundle keeps process_player_input under the 16-param ceiling (BookmarkInputParams precedent). Client: HudGroups.gameplay_occluded now sends AutoPause/AutoResume via send_named_action; 5 gdUnit tests + 7 Rust tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 15:44:56 +02:00
co-authored by Claude Fable 5
parent 672a583e64
commit 6bda9f1697
12 changed files with 844 additions and 11 deletions
+6 -1
View File
@@ -24,7 +24,7 @@ use std::collections::BTreeMap;
use crate::knowledge::types::{FactId, KnowledgeConfidence, StableId};
use crate::simulation::movement::TilePosition;
use crate::simulation::time::DayPhase;
use crate::simulation::time::{sim_not_paused, DayPhase};
/// NPC plugin: initializes NPC-related resources and systems.
pub struct NpcPlugin;
@@ -80,6 +80,11 @@ impl Plugin for NpcPlugin {
disclosure::process_unprompted_disclosure
.after(disclosure::derive_disclosure_candidates),
)
// T-970: TickPhase::Simulation is not set-gated (see
// social_plugin.rs's collect_sound_events exemption) —
// every system here is genuine NPC-behavior world
// advancement, so this whole tuple gates safely.
.run_if(sim_not_paused)
.in_set(TickPhase::Simulation),
)
// Storyteller: tell state derivation (reads mood + routine deviation)