[Merged by Bors] - Add distributive_run_if to IntoSystemConfigs#7724
Closed
geieredgar wants to merge 1 commit intobevyengine:mainfrom
Closed
[Merged by Bors] - Add distributive_run_if to IntoSystemConfigs#7724geieredgar wants to merge 1 commit intobevyengine:mainfrom
distributive_run_if to IntoSystemConfigs#7724geieredgar wants to merge 1 commit intobevyengine:mainfrom
Conversation
joseph-gio
approved these changes
Feb 17, 2023
Member
joseph-gio
left a comment
There was a problem hiding this comment.
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
approved these changes
Feb 17, 2023
alice-i-cecile
approved these changes
Feb 17, 2023
Member
alice-i-cecile
left a comment
There was a problem hiding this comment.
Nice to pull this out. Agreed: I think we have consensus on this bit.
cart
approved these changes
Feb 18, 2023
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Feb 18, 2023
# 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`.
Contributor
|
Pull request successfully merged into main. Build succeeded:
|
distributive_run_if to IntoSystemConfigsdistributive_run_if to IntoSystemConfigs
myreprise1
pushed a commit
to myreprise1/bevy
that referenced
this pull request
Feb 20, 2023
# 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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.