fix(simulation): address PR review items for #655 content removal

- line_pool.rs: add trace! when active_situations is empty (Layer 2
  will silently filter all lines — important for content debugging)
- knowledge_grant.rs: document serde(untagged) ambiguity hazard; add
  KnowledgeGrant::validate() for load-time field validation
- monologue.rs: annotate trigger_monologue as schedule ordering anchor;
  fix stale "periodic trigger cooldown tracking" doc reference in
  trigger_event_monologue (COOLDOWN_TICKS removed in #655)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 09:32:48 +01:00
co-authored by Claude Sonnet 4.6
parent e317a66ac6
commit b37583ddfc
3 changed files with 48 additions and 10 deletions
+8 -10
View File
@@ -410,8 +410,8 @@ fn sound_range_tiles(range: &crate::knowledge::types::SoundRange) -> u32 {
///
/// Checks observation events, sound events, overheard conversations, and
/// completed dialogues for monologue-worthy triggers. Fires at most one
/// monologue per tick. Bypasses cooldown (event-driven),
/// but updates last_fired_tick for periodic trigger cooldown tracking.
/// monologue per tick. Event-driven — no cooldown gate. Updates
/// `last_fired_tick` so v0.2 periodic triggers can respect the recency window.
///
/// Priority order (first match wins):
/// 1. observe_npc (new entity spotted — uses previous-tick observation events)
@@ -577,14 +577,12 @@ fn has_hear_sound_event(
})
}
/// Monologue trigger system.
/// Monologue trigger system — **stub**.
///
/// Runs each tick. Checks trigger conditions against loaded content pools
/// and writes a MonologueEvent to MonologueBuffer when a line should fire.
///
/// v0.1 triggers:
/// - `enter_location`: fires once on first tick (session start)
/// - `time_idle`: fires after idle threshold of no player movement
/// v0.1 content pool triggers were removed (#655). This system remains
/// registered in the schedule as a sequencing anchor: `trigger_recognition_monologue`
/// and `process_sprint_anomaly_monologue` are ordered `.after(trigger_monologue)`.
/// Remove this stub when those systems' ordering constraints are refactored.
pub fn trigger_monologue(
_time: Res<SimulationTime>,
_rng: ResMut<SimRng>,
@@ -593,7 +591,7 @@ pub fn trigger_monologue(
With<PlayerCharacter>,
>,
) {
// v0.2: content pool removed; line selection deferred to generator pipeline
// Intentional no-op — kept as schedule ordering anchor. See doc comment.
}
// ---------------------------------------------------------------------------