Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace IntoSystemSetConfig with IntoSystemSetConfigs #9247

Merged
merged 11 commits into from Sep 5, 2023
13 changes: 3 additions & 10 deletions crates/bevy_app/src/app.rs
Expand Up @@ -393,21 +393,14 @@ impl App {
}

/// Configures a system set in the default schedule, adding the set if it does not exist.
#[deprecated(since = "0.12.0", note = "Please use `configure_sets` instead.")]
#[track_caller]
pub fn configure_set(
&mut self,
schedule: impl ScheduleLabel,
set: impl IntoSystemSetConfig,
set: impl IntoSystemSetConfigs,
) -> &mut Self {
let mut schedules = self.world.resource_mut::<Schedules>();
if let Some(schedule) = schedules.get_mut(&schedule) {
schedule.configure_set(set);
} else {
let mut new_schedule = Schedule::new(schedule);
new_schedule.configure_set(set);
schedules.insert(new_schedule);
}
self
self.configure_sets(schedule, set)
}

/// Configures a collection of system sets in the default schedule, adding any sets that do not exist.
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_audio/src/lib.rs
Expand Up @@ -71,7 +71,7 @@ pub struct AudioPlugin {
impl Plugin for AudioPlugin {
fn build(&self, app: &mut App) {
app.insert_resource(self.global_volume)
.configure_set(PostUpdate, AudioPlaySet.run_if(audio_output_available))
.configure_sets(PostUpdate, AudioPlaySet.run_if(audio_output_available))
.init_resource::<AudioOutput>();

#[cfg(any(feature = "mp3", feature = "flac", feature = "wav", feature = "vorbis"))]
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/lib.rs
Expand Up @@ -45,8 +45,8 @@ pub mod prelude {
removal_detection::RemovedComponents,
schedule::{
apply_deferred, apply_state_transition, common_conditions::*, Condition,
IntoSystemConfigs, IntoSystemSet, IntoSystemSetConfig, IntoSystemSetConfigs, NextState,
OnEnter, OnExit, OnTransition, Schedule, Schedules, State, States, SystemSet,
IntoSystemConfigs, IntoSystemSet, IntoSystemSetConfigs, NextState, OnEnter, OnExit,
OnTransition, Schedule, Schedules, State, States, SystemSet,
},
system::{
Commands, Deferred, In, IntoSystem, Local, NonSend, NonSendMut, ParallelCommands,
Expand Down