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
+10 -10
View File
@@ -13,7 +13,7 @@ use std::collections::BTreeMap;
use bevy_ecs::{schedule::Schedule, world::World};
use settled_reach_server::{
content::template::{
simulation::triangle::{
apply_resolve_triangle, tick_triangle_escalation, ResolveTriangleCommand,
ResolveTriangleQueue, TemplateId, TriangleClassification, TriangleCrisisEventQueue,
TriangleDef, TriangleId, TrianglePhase, TriangleState,
@@ -56,7 +56,7 @@ fn spawn_triangle(
tension: u8,
tension_rate: u8,
phase: TrianglePhase,
role_assignments: BTreeMap<settled_reach_server::content::template::RoleId, StableId>,
role_assignments: BTreeMap<settled_reach_server::simulation::triangle::RoleId, StableId>,
) -> bevy_ecs::entity::Entity {
world
.spawn((
@@ -135,7 +135,7 @@ fn simmering_transitions_to_active_at_expected_minute() {
let npc_b = spawn_npc_with_threshold(&mut world, 2, 25); // lowest
let npc_c = spawn_npc_with_threshold(&mut world, 3, 60);
use settled_reach_server::content::template::RoleId;
use settled_reach_server::simulation::triangle::RoleId;
let mut assignments = BTreeMap::new();
assignments.insert(RoleId::new("role-a"), npc_a);
assignments.insert(RoleId::new("role-b"), npc_b);
@@ -185,7 +185,7 @@ fn d087_seed_dependent_escalation_timing() {
let npc = spawn_npc_with_threshold(&mut world, 1, 30);
use settled_reach_server::content::template::RoleId;
use settled_reach_server::simulation::triangle::RoleId;
let mut assignments = BTreeMap::new();
assignments.insert(RoleId::new("r"), npc);
@@ -222,7 +222,7 @@ fn crisis_event_trigger_npc_is_lowest_threshold() {
let npc_high = spawn_npc_with_threshold(&mut world, 1, 50); // high tolerance
let npc_low = spawn_npc_with_threshold(&mut world, 2, 10); // low tolerance — trigger
use settled_reach_server::content::template::RoleId;
use settled_reach_server::simulation::triangle::RoleId;
let mut assignments = BTreeMap::new();
assignments.insert(RoleId::new("r-high"), npc_high);
assignments.insert(RoleId::new("r-low"), npc_low);
@@ -249,7 +249,7 @@ fn no_crisis_event_below_threshold() {
let mut world = make_escalation_world();
let npc = spawn_npc_with_threshold(&mut world, 1, 100); // high threshold
use settled_reach_server::content::template::RoleId;
use settled_reach_server::simulation::triangle::RoleId;
let mut assignments = BTreeMap::new();
assignments.insert(RoleId::new("r"), npc);
@@ -521,7 +521,7 @@ fn crisis_events_accumulate_until_drained() {
let npc = spawn_npc_with_threshold(&mut world, 1, 5);
use settled_reach_server::content::template::RoleId;
use settled_reach_server::simulation::triangle::RoleId;
let mut assignments = BTreeMap::new();
assignments.insert(RoleId::new("r"), npc);
@@ -548,7 +548,7 @@ fn crisis_queue_drain_clears_events() {
let npc = spawn_npc_with_threshold(&mut world, 1, 5);
use settled_reach_server::content::template::RoleId;
use settled_reach_server::simulation::triangle::RoleId;
let mut assignments = BTreeMap::new();
assignments.insert(RoleId::new("r"), npc);
@@ -575,7 +575,7 @@ fn crisis_queue_drain_clears_events() {
/// (D-087) and those defs produce escalatable TriangleState instances.
#[test]
fn d087_all_v01_conflict_types_produce_escalatable_states() {
use settled_reach_server::content::template::{ConflictType, NpcAxis, RoleId};
use settled_reach_server::simulation::triangle::{ConflictType, NpcAxis, RoleId};
let defs = [
("kael-davan", "smuggler", "ring-contact", ConflictType::ResourceCompetition),
@@ -587,7 +587,7 @@ fn d087_all_v01_conflict_types_produce_escalatable_states() {
for (r0, r1, r2, conflict) in &defs {
let roles = [RoleId::new(r0), RoleId::new(r1), RoleId::new(r2)];
let tid = settled_reach_server::content::template::TriangleId::from_seed_and_roles(42, &roles);
let tid = settled_reach_server::simulation::triangle::TriangleId::from_seed_and_roles(42, &roles);
let def = TriangleDef {
triangle_id: tid,
roles: roles.clone(),