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:
@@ -20,18 +20,24 @@ pub struct PerceptionPlugin;
|
||||
|
||||
impl Plugin for PerceptionPlugin {
|
||||
fn build(&self, app: &mut App) {
|
||||
use crate::simulation::time::sim_not_paused;
|
||||
use crate::tick_phases::TickPhase;
|
||||
|
||||
app.init_resource::<interpretation::ObservationEventQueue>()
|
||||
.init_resource::<query::VisibilityGeometry>()
|
||||
.init_resource::<query::ActivePerceptionMode>()
|
||||
// Simulation: anomaly detection (feeds monologue recognition chain)
|
||||
// Simulation: anomaly detection (feeds monologue recognition chain).
|
||||
// T-970: TickPhase::Simulation is not set-gated (see
|
||||
// social_plugin.rs's collect_sound_events exemption) — anomaly
|
||||
// detection is genuine world-advancing analysis, so this tuple
|
||||
// gates safely on its own.
|
||||
.add_systems(
|
||||
Update,
|
||||
(
|
||||
anomaly::clear_anomaly_markers,
|
||||
anomaly::detect_anomalies.after(anomaly::clear_anomaly_markers),
|
||||
)
|
||||
.run_if(sim_not_paused)
|
||||
.in_set(TickPhase::Simulation),
|
||||
)
|
||||
// Knowledge: cognitive delay + observation interpretation
|
||||
|
||||
Reference in New Issue
Block a user