fix(simulation): address PR #42 review — 8 items from Hoshe and Tyre

1. Sound producers: document empty v0.1 pipeline explicitly (critical)
2. Routine tests: add ActiveSim to 3 tests that passed trivially
3. Rename _observer_pos → observer_pos (used at line 191)
4. Add FactionOnly positive test case (matching faction_id)
5. Fix stale doc comment "Current: 9" → 10 in ObserverSnapshot
6. Remove orphaned SimulationTier/LastInteraction/ScopeTag types
7. Add tracing::warn on FactionOnly non-numeric parse failure
8. Document Medium-range occlusion gap as TODO in audible_at
9. Insert SoundEventQueue in observer test setup_world

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 15:08:32 +01:00
co-authored by Claude Opus 4.6
parent 8e00db2b2d
commit 03c44bebaf
7 changed files with 51 additions and 115 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ pub fn compute_observer_snapshot(
) {
let Ok((
observer_entity,
_observer_pos,
observer_pos,
facing_opt,
observer_kg,
mut interaction_buffer,
@@ -188,7 +188,7 @@ pub fn compute_observer_snapshot(
// Collect sound events audible to the observer (D-038, #124).
// Filter by D-018 range: only events the player can hear based on distance.
let sound_events = if let Some(ref queue) = sound_queue {
queue.audible_at(_observer_pos).cloned().collect()
queue.audible_at(observer_pos).cloned().collect()
} else {
Vec::new()
};
+1
View File
@@ -15,6 +15,7 @@ fn setup_world(width: i32, height: i32) -> World {
world.init_resource::<EntityRegistry>();
world.init_resource::<VisibilityGeometry>();
world.init_resource::<ActivePerceptionMode>();
world.init_resource::<crate::simulation::sound::SoundEventQueue>();
world
}