Formatting-only changes across server source and test files. No logic changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
1.5 KiB
Rust
42 lines
1.5 KiB
Rust
// Perception module - Information boundary system
|
|
// Implements D-010 principle 2: every piece of state is tagged with who knows it
|
|
// Generates ObserverSnapshot for client rendering
|
|
|
|
use bevy_app::prelude::*;
|
|
use bevy_ecs::schedule::IntoScheduleConfigs;
|
|
|
|
pub mod anomaly;
|
|
pub mod cognitive_delay;
|
|
pub mod interpretation;
|
|
pub mod observation;
|
|
pub mod observer;
|
|
pub mod query;
|
|
pub mod shadowcast;
|
|
pub mod vision_cone;
|
|
|
|
/// Perception system plugin
|
|
/// Manages information boundaries and observer snapshots
|
|
pub struct PerceptionPlugin;
|
|
|
|
impl Plugin for PerceptionPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.init_resource::<interpretation::ObservationEventQueue>()
|
|
.init_resource::<query::VisibilityGeometry>()
|
|
.init_resource::<query::ActivePerceptionMode>()
|
|
.add_systems(
|
|
Update,
|
|
(
|
|
anomaly::clear_anomaly_markers.before(anomaly::detect_anomalies),
|
|
anomaly::detect_anomalies.before(observation::emit_observation_events),
|
|
cognitive_delay::process_cognitive_delay
|
|
.after(observation::emit_observation_events)
|
|
.before(crate::knowledge::events::process_knowledge_events),
|
|
interpretation::generate_observation_events
|
|
.after(observation::emit_observation_events)
|
|
.before(crate::knowledge::events::process_knowledge_events),
|
|
),
|
|
);
|
|
tracing::debug!("PerceptionPlugin initialized");
|
|
}
|
|
}
|