Add Gauntlet test world with 3 rooms (Inventory Warehouse, Occlusion Corridor, Pause Chamber) + Central Hub, room constants module, room reset trigger mechanism, Layer 3 subprocess integration test, golden file comparison engine and test suite, and content runtime validation. Tickets: #482, #484, #485, #487, #488, #489, #490 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
1.4 KiB
Rust
41 lines
1.4 KiB
Rust
//! Central Hub — Room 0 (24x24)
|
|
//!
|
|
//! Connector room with 4 directional sign markers. No test entities.
|
|
//! Hub spawn point: (12, 12) relative = (50, 58) absolute.
|
|
//!
|
|
//! Entities (StableId 1-4):
|
|
//! sign_north (50, 48) — "Fog Theater"
|
|
//! sign_east (60, 58) — "Occlusion Corridor"
|
|
//! sign_south (50, 68) — "Pause Chamber"
|
|
//! sign_west (40, 58) — "Inventory Warehouse"
|
|
|
|
use bevy_app::prelude::*;
|
|
|
|
use crate::knowledge::registry::{EntityRegistry, StableEntityId};
|
|
use crate::simulation::interaction::Interactable;
|
|
use crate::simulation::movement::TilePosition;
|
|
|
|
/// Room origin (top-left corner including walls).
|
|
const ORIGIN_X: i32 = 38;
|
|
const ORIGIN_Y: i32 = 46;
|
|
|
|
/// Sign positions as relative offsets from room origin.
|
|
const SIGNS: &[(&str, i32, i32)] = &[
|
|
("sign_north", 12, 2), // North marker
|
|
("sign_east", 22, 12), // East marker
|
|
("sign_south", 12, 22), // South marker
|
|
("sign_west", 2, 12), // West marker
|
|
];
|
|
|
|
/// Spawn hub sign entities in canonical order (StableId 1-4).
|
|
pub fn spawn_entities(app: &mut App, registry: &mut EntityRegistry) {
|
|
for &(_name, rx, ry) in SIGNS {
|
|
let pos = TilePosition::new(ORIGIN_X + rx, ORIGIN_Y + ry, 0);
|
|
let entity = app.world_mut().spawn((Interactable, pos)).id();
|
|
let sid = registry.register(entity);
|
|
app.world_mut()
|
|
.entity_mut(entity)
|
|
.insert(StableEntityId(sid));
|
|
}
|
|
}
|