fix(simulation): register interaction systems and persist door state (#246)
Follow-up to b6a9b78: register TerminalInteractedQueue resource and
door/terminal interaction systems in SimulationPlugin; add door state
save/load in save_io (open doors round-trip through SaveStateV1);
make WalkabilityMap param optional in process_door_interaction so
plugin-only tests work without a loaded map; fix information_boundaries
test missing open_doors field.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -407,7 +407,7 @@ pub struct TerminalInteractRequest {
|
||||
/// Ordering: after `process_player_input`, before movement validation.
|
||||
pub fn process_door_interaction(
|
||||
mut commands: Commands,
|
||||
mut walkability: ResMut<WalkabilityMap>,
|
||||
walkability: Option<ResMut<WalkabilityMap>>,
|
||||
player_query: Query<(Entity, &DoorInteractRequest), With<PlayerCharacter>>,
|
||||
mut door_query: Query<&mut DoorState>,
|
||||
) {
|
||||
@@ -428,7 +428,9 @@ pub fn process_door_interaction(
|
||||
let walkable = door.is_open;
|
||||
let tile = door.blocking_tile;
|
||||
|
||||
walkability.set_walkable(&tile, walkable);
|
||||
if let Some(mut walkability) = walkability {
|
||||
walkability.set_walkable(&tile, walkable);
|
||||
}
|
||||
|
||||
tracing::info!(
|
||||
?tile,
|
||||
|
||||
Reference in New Issue
Block a user