-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[Merged by Bors] - Add distributive_run_if to IntoSystemConfigs
#7724
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
Conversation
joseph-gio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good change, this should be uncontroversial.
This needs to be included in one of our examples, but it doesn't have to be done in this PR.
alice-i-cecile
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to pull this out. Agreed: I think we have consensus on this bit.
|
bors r+ |
# Objective - Fixes #7659. ## Solution - This PR extracted the `distributive_run_if` part of #7676, because it does not require the controversial introduction of anonymous system sets. - The distinctive name should make the user aware about the differences between `IntoSystemConfig::run_if` and `IntoSystemConfigs::distributive_run_if`. - The documentation explains in detail the consequences of using the API and possible pit falls when using it. - A test demonstrates the possibility of changing the condition result, resulting in some of the systems not being run. --- ## Changelog ### Added - Add `distributive_run_if` to `IntoSystemConfigs` to enable adding a run condition to each system when using `add_systems`.
|
Pull request successfully merged into main. Build succeeded:
|
distributive_run_if to IntoSystemConfigsdistributive_run_if to IntoSystemConfigs
# Objective - Fixes bevyengine#7659. ## Solution - This PR extracted the `distributive_run_if` part of bevyengine#7676, because it does not require the controversial introduction of anonymous system sets. - The distinctive name should make the user aware about the differences between `IntoSystemConfig::run_if` and `IntoSystemConfigs::distributive_run_if`. - The documentation explains in detail the consequences of using the API and possible pit falls when using it. - A test demonstrates the possibility of changing the condition result, resulting in some of the systems not being run. --- ## Changelog ### Added - Add `distributive_run_if` to `IntoSystemConfigs` to enable adding a run condition to each system when using `add_systems`.
Objective
run_iffor SystemConfigs #7659.Solution
distributive_run_ifpart ofrun_ifforSystemConfigsvia anonymous system sets #7676, because it does not require the controversial introduction of anonymous system sets.IntoSystemConfig::run_ifandIntoSystemConfigs::distributive_run_if.Changelog
Added
distributive_run_iftoIntoSystemConfigsto enable adding a run condition to each system when usingadd_systems.