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:
@@ -13,6 +13,7 @@ use std::fmt;
|
||||
use std::str::FromStr;
|
||||
|
||||
use bevy_ecs::prelude::*;
|
||||
use tracing::trace;
|
||||
|
||||
use crate::simulation::knowledge_grant::{KnowledgeGrant, Prerequisites};
|
||||
|
||||
@@ -363,6 +364,14 @@ impl LinePoolIndex {
|
||||
active_situations: &[Situation],
|
||||
player_trust: TrustTier,
|
||||
) -> Vec<&IndexedDialogueLine> {
|
||||
if active_situations.is_empty() {
|
||||
trace!(
|
||||
location,
|
||||
role,
|
||||
"query_dialogue: active_situations is empty — Layer 2 will filter all lines"
|
||||
);
|
||||
}
|
||||
|
||||
let key = (location.to_string(), role.to_string());
|
||||
let Some(pool) = self.dialogue.get(&key) else {
|
||||
return Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user