fix(simulation): address PR #37 re-review — stale strings, test coverage, confrontation symmetry
Hoshe re-review (3 items): - content_scaling.rs:185: doc "StableId 0-51" → references constant - content_scaling.rs:256: assertion message "id<=51" → "id <= max_baseline_id" - input.rs: teleport test now asserts WalkAwayRequest + ConfrontationDelivered are cleared (was only checking TalkRequest + ActiveDialogue) Tyre re-review (2 items): - input.rs: same teleport test coverage (overlaps Hoshe #3) - dialogue.rs: process_confrontation_response now inserts RoutineDeviation with DeviationTrigger::Confrontation — symmetric with walk-away path. Test updated to verify deviation is recorded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -614,9 +614,14 @@ pub fn process_confrontation_response(
|
||||
let target = confrontation.target;
|
||||
|
||||
// Effect 1: Shift target NPC to Tier 2 animation (D-047)
|
||||
commands
|
||||
.entity(target)
|
||||
.insert(crate::npc::AnimationTier::Tier2);
|
||||
// + record routine deviation (symmetric with walk-away path)
|
||||
commands.entity(target).insert((
|
||||
crate::npc::AnimationTier::Tier2,
|
||||
crate::npc::RoutineDeviation {
|
||||
trigger: crate::npc::DeviationTrigger::Confrontation,
|
||||
tick: time.tick,
|
||||
},
|
||||
));
|
||||
|
||||
// Effect 2: Decrement observer's relationship with the target (D-033 color fade)
|
||||
if let Some(target_sid) = registry.to_stable(target) {
|
||||
@@ -1651,6 +1656,15 @@ mod tests {
|
||||
Some(&crate::npc::AnimationTier::Tier2),
|
||||
"NPC should shift to Tier2 after confrontation"
|
||||
);
|
||||
|
||||
// RoutineDeviation should be recorded (symmetric with walk-away)
|
||||
let deviation = world.get::<crate::npc::RoutineDeviation>(npc);
|
||||
assert!(deviation.is_some(), "NPC should get RoutineDeviation after confrontation");
|
||||
assert_eq!(
|
||||
deviation.unwrap().trigger,
|
||||
crate::npc::DeviationTrigger::Confrontation,
|
||||
"Deviation trigger should be Confrontation"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user