refactor(simulation): remove v0.1 content loading system (#655)

Delete the hand-authored YAML content pipeline (server/src/content/) superseded
by the v0.2 generator-first approach (D-122, D-128). Runtime ECS types that were
co-located with content loading have been extracted to dedicated simulation modules:

- simulation/triangle.rs: TriangleState, TriangleCrisisEventQueue, tick/resolve systems
- simulation/line_pool.rs: LinePoolIndex, AccessTier, TrustTier, Mood, LinePoolIndexResource
- simulation/knowledge_grant.rs: KnowledgeGrant, Prerequisites

Monologue systems (trigger_monologue, trigger_recognition_monologue,
trigger_event_monologue) now use hardcoded fallback lines only; the
ContentStoreResource branch and select_pool_line function are removed.

Deleted: content/{loader,types,line_pool,hot_reload,spawn,instantiation,entanglement,mod}.rs
Deleted: tests/{content_loading,content_runtime,content_scaling,template_instantiation,template_schema}.rs
Deleted: bin/line_preview.rs (v0.1 tool)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 09:07:57 +01:00
co-authored by Claude Sonnet 4.6
parent b979cab41e
commit ce0df2f320
39 changed files with 721 additions and 8943 deletions
+22 -4
View File
@@ -14,6 +14,8 @@ pub mod generator;
pub mod input;
pub mod interaction;
pub mod inventory;
pub mod knowledge_grant;
pub mod line_pool;
pub mod listening;
pub mod modification;
pub mod monologue;
@@ -33,6 +35,7 @@ pub mod stance;
pub mod tier;
pub mod time;
pub mod ticker;
pub mod triangle;
pub mod zone;
/// Core simulation plugin
@@ -58,8 +61,8 @@ impl Plugin for SimulationPlugin {
.init_resource::<monologue::PostConversationQueue>()
.init_resource::<poi_discovery::PoiDiscoveryEventQueue>()
// Triangle escalation resources (#250)
.init_resource::<crate::content::template::TriangleCrisisEventQueue>()
.init_resource::<crate::content::template::ResolveTriangleQueue>()
.init_resource::<crate::simulation::triangle::TriangleCrisisEventQueue>()
.init_resource::<crate::simulation::triangle::ResolveTriangleQueue>()
// discover_pois reads VisibilityGeometry (also populated by PerceptionPlugin).
// Init here so SimulationPlugin works standalone in tests without PerceptionPlugin.
.init_resource::<crate::perception::query::VisibilityGeometry>()
@@ -116,11 +119,11 @@ impl Plugin for SimulationPlugin {
.after(crate::npc::awareness::detect_player_awareness)
.before(crate::perception::observer::compute_observer_snapshot),
// Triangle escalation (#250) — runs on game-minute boundaries (every 10 ticks)
crate::content::template::tick_triangle_escalation
crate::simulation::triangle::tick_triangle_escalation
.after(crate::npc::tolerance::check_tolerance_threshold)
.before(crate::perception::observer::compute_observer_snapshot),
// Triangle resolution (#250, D-089) — apply player resolve commands
crate::content::template::apply_resolve_triangle
crate::simulation::triangle::apply_resolve_triangle
.after(input::process_player_input)
.before(crate::perception::observer::compute_observer_snapshot),
time::advance_tick.after(path_follow::cleanup_path_blocked),
@@ -145,6 +148,21 @@ impl Plugin for SimulationPlugin {
.before(crate::perception::observer::compute_observer_snapshot),
);
// Voice enrichment (D-138, Phase 3) — rewrite NPC text with voiced
// variants from cache before the observer snapshot is assembled.
// No-op when VoiceCacheResource is absent (voice pipeline disabled).
app.add_systems(
Update,
(
crate::voice::integration::voice_enrich_dialogue_response
.after(crate::simulation::dialogue::process_talk_interaction)
.before(crate::perception::observer::compute_observer_snapshot),
crate::voice::integration::voice_enrich_conversation_events
.after(conversation::run_npc_conversations)
.before(crate::perception::observer::compute_observer_snapshot),
),
);
// Initialize TickerPool with empty default; populated by ContentPlugin at Startup.
app.init_resource::<ticker::TickerPool>();