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:
@@ -1860,7 +1860,8 @@ mod tests {
|
||||
#[cfg(feature = "gauntlet")]
|
||||
#[test]
|
||||
fn teleport_to_hub_clears_dialogue_markers() {
|
||||
// #491: TeleportToHub removes ActiveDialogue and TalkRequest.
|
||||
// #491: TeleportToHub removes ActiveDialogue, TalkRequest,
|
||||
// WalkAwayRequest, and ConfrontationDelivered.
|
||||
let mut world = bevy_ecs::world::World::new();
|
||||
world.insert_resource(InputQueue::default());
|
||||
world.insert_resource(SimulationTime::default());
|
||||
@@ -1869,7 +1870,7 @@ mod tests {
|
||||
// Spawn a fake NPC target
|
||||
let npc = world.spawn(TilePosition::new(10, 10, 0)).id();
|
||||
|
||||
// Spawn player with active dialogue state
|
||||
// Spawn player with active dialogue state + mid-confrontation marker
|
||||
let player = world
|
||||
.spawn((
|
||||
PlayerCharacter,
|
||||
@@ -1880,6 +1881,8 @@ mod tests {
|
||||
interaction_type: crate::knowledge::events::InteractionType::Talk,
|
||||
started_tick: 0,
|
||||
},
|
||||
crate::simulation::dialogue::WalkAwayRequest,
|
||||
crate::simulation::dialogue::ConfrontationDelivered { target: npc },
|
||||
))
|
||||
.id();
|
||||
|
||||
@@ -1904,6 +1907,18 @@ mod tests {
|
||||
.is_none(),
|
||||
"ActiveDialogue cleared after teleport"
|
||||
);
|
||||
assert!(
|
||||
world
|
||||
.get::<crate::simulation::dialogue::WalkAwayRequest>(player)
|
||||
.is_none(),
|
||||
"WalkAwayRequest cleared after teleport"
|
||||
);
|
||||
assert!(
|
||||
world
|
||||
.get::<crate::simulation::dialogue::ConfrontationDelivered>(player)
|
||||
.is_none(),
|
||||
"ConfrontationDelivered cleared after teleport"
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "gauntlet")]
|
||||
|
||||
Reference in New Issue
Block a user