Eliminate extra stage for sound icons and exploration.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nolan Darilek 2022-05-19 09:25:26 -05:00
parent 270d44bfa7
commit 6d8f235657
2 changed files with 5 additions and 14 deletions

View File

@ -465,10 +465,7 @@ where
app.register_type::<ExplorationFocused>() app.register_type::<ExplorationFocused>()
.register_type::<ExplorationType>() .register_type::<ExplorationType>()
.register_type::<Mappable>() .register_type::<Mappable>()
.add_system_to_stage( .add_system(exploration_changed_announcement::<D>.chain(error_handler));
CoreStage::PostUpdate,
exploration_changed_announcement::<D>.chain(error_handler),
);
if config.exploration_control_states.is_empty() { if config.exploration_control_states.is_empty() {
app.add_system(exploration_focus::<S, A, D>) app.add_system(exploration_focus::<S, A, D>)
.add_system(exploration_type_focus::<S, A>.chain(error_handler)) .add_system(exploration_type_focus::<S, A>.chain(error_handler))

View File

@ -297,7 +297,6 @@ where
if !app.world.contains_resource::<SoundConfig<S>>() { if !app.world.contains_resource::<SoundConfig<S>>() {
app.insert_resource(SoundConfig::<S>::default()); app.insert_resource(SoundConfig::<S>::default());
} }
const SOUND_ICON_AND_EXPLORATION_STAGE: &str = "sound_icon_and_exploration";
let core_config = *app.world.get_resource::<CoreConfig>().unwrap(); let core_config = *app.world.get_resource::<CoreConfig>().unwrap();
if let Some(context) = app.world.get_resource::<Context>() { if let Some(context) = app.world.get_resource::<Context>() {
context context
@ -315,18 +314,13 @@ where
CoreStage::PostUpdate, CoreStage::PostUpdate,
sound_icon::<S>.after(TransformSystem::TransformPropagate), sound_icon::<S>.after(TransformSystem::TransformPropagate),
) )
.add_stage_after( .add_system_to_stage(
CoreStage::PostUpdate, CoreStage::PostUpdate,
SOUND_ICON_AND_EXPLORATION_STAGE, sound_icon_exploration_focus_changed.after(sound_icon::<S>),
SystemStage::parallel(),
) )
.add_system_to_stage( .add_system_to_stage(
SOUND_ICON_AND_EXPLORATION_STAGE, CoreStage::PostUpdate,
sound_icon_exploration_focus_changed, sound_icon_exploration_focus_removed.after(sound_icon_exploration_focus_changed),
)
.add_system_to_stage(
SOUND_ICON_AND_EXPLORATION_STAGE,
sound_icon_exploration_focus_removed,
) )
.add_system(scale_sounds); .add_system(scale_sounds);
} }