Skip to content

Commit e135f22

Browse files
committed
reintroduce but deprecate some functions
1 parent 3982de5 commit e135f22

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

crates/bevy_ecs/src/schedule/schedule.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use thiserror::Error;
2323
#[cfg(feature = "trace")]
2424
use tracing::info_span;
2525

26-
use crate::{change_detection::CheckChangeTicks, system::System};
26+
use crate::{change_detection::CheckChangeTicks, component::Component, system::System};
2727
use crate::{resource::Resource, schedule::*, system::ScheduleSystem, world::World};
2828

2929
pub use stepping::Stepping;
@@ -126,6 +126,24 @@ impl Schedules {
126126
}
127127
}
128128

129+
/// Ignore system order ambiguities caused by conflicts on [`Component`]s of type `T`.
130+
#[deprecated(
131+
since = "0.18.0",
132+
note = "Use `World::allow_ambiguous_component` instead"
133+
)]
134+
pub fn allow_ambiguous_component<T: Component>(&mut self, world: &mut World) {
135+
world.allow_ambiguous_component::<T>();
136+
}
137+
138+
/// Ignore system order ambiguities caused by conflicts on [`Resource`]s of type `T`.
139+
#[deprecated(
140+
since = "0.18.0",
141+
note = "Use `World::allow_ambiguous_resource` instead"
142+
)]
143+
pub fn allow_ambiguous_resource<T: Resource>(&mut self, world: &mut World) {
144+
world.allow_ambiguous_resource::<T>();
145+
}
146+
129147
/// Adds one or more systems to the [`Schedule`] matching the provided [`ScheduleLabel`].
130148
pub fn add_systems<M>(
131149
&mut self,

release-content/migration-guides/schedule_cleanup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pull_requests: [21608, 21817]
2323
- `simple_cycles_in_component` has been changed from a free function into a method on `DiGraph`.
2424
- `DiGraph::try_into`/`UnGraph::try_into` was renamed to `DiGraph::try_convert`/`UnGraph::try_convert` to prevent overlap with the `TryInto` trait, and now makes use of `TryInto` instead of `TryFrom` for conversions.
2525
- Removed `Schedules::ignored_scheduling_ambiguities`: access the same info via the new `IgnoredAmbiguities` resource instead.
26-
- Removed `Schedules::allow_ambiguous_component` and `Schedules::allow_ambiguous_resource`: use the equivalent functions on `World` instead.
26+
- Deprecated `Schedules::allow_ambiguous_component` and `Schedules::allow_ambiguous_resource`: use the equivalent functions on `World` instead.
2727
- Removed `Schedules::iter_ignored_ambiguities`: use `IgnoredAmbiguities::iter` via Deref instead.
2828
- Removed `Schedules::print_ignored_ambiguities`: print the string returned by `IgnoredAmbiguities::to_string` yourself.
2929
- Removed the `ignored_ambiguities` parameter from `Schedule::build_schedule`, it is now fetched internally from the new `IgnoredAmbiguities` resource.

0 commit comments

Comments
 (0)