From 6d8f2356572fdeb83979990708796488295bcd7a Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Thu, 19 May 2022 09:25:26 -0500 Subject: [PATCH] Eliminate extra stage for sound icons and exploration. --- src/exploration.rs | 5 +---- src/sound.rs | 14 ++++---------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/exploration.rs b/src/exploration.rs index 78797dc..d4cda04 100644 --- a/src/exploration.rs +++ b/src/exploration.rs @@ -465,10 +465,7 @@ where app.register_type::() .register_type::() .register_type::() - .add_system_to_stage( - CoreStage::PostUpdate, - exploration_changed_announcement::.chain(error_handler), - ); + .add_system(exploration_changed_announcement::.chain(error_handler)); if config.exploration_control_states.is_empty() { app.add_system(exploration_focus::) .add_system(exploration_type_focus::.chain(error_handler)) diff --git a/src/sound.rs b/src/sound.rs index 6f3ef96..0b2fb4a 100644 --- a/src/sound.rs +++ b/src/sound.rs @@ -297,7 +297,6 @@ where if !app.world.contains_resource::>() { app.insert_resource(SoundConfig::::default()); } - const SOUND_ICON_AND_EXPLORATION_STAGE: &str = "sound_icon_and_exploration"; let core_config = *app.world.get_resource::().unwrap(); if let Some(context) = app.world.get_resource::() { context @@ -315,18 +314,13 @@ where CoreStage::PostUpdate, sound_icon::.after(TransformSystem::TransformPropagate), ) - .add_stage_after( + .add_system_to_stage( CoreStage::PostUpdate, - SOUND_ICON_AND_EXPLORATION_STAGE, - SystemStage::parallel(), + sound_icon_exploration_focus_changed.after(sound_icon::), ) .add_system_to_stage( - SOUND_ICON_AND_EXPLORATION_STAGE, - sound_icon_exploration_focus_changed, - ) - .add_system_to_stage( - SOUND_ICON_AND_EXPLORATION_STAGE, - sound_icon_exploration_focus_removed, + CoreStage::PostUpdate, + sound_icon_exploration_focus_removed.after(sound_icon_exploration_focus_changed), ) .add_system(scale_sounds); }