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

DispatcherBuilder::contains #736

Closed
schell opened this issue Aug 23, 2021 · 1 comment
Closed

DispatcherBuilder::contains #736

schell opened this issue Aug 23, 2021 · 1 comment

Comments

@schell
Copy link

schell commented Aug 23, 2021

Description

DispatcherBuilder should be able to tell us if a system has already been added:

pub fn contains(&self, name: &str) -> bool {
    self.map.contains_key(name)
}

Motivation

This would allow callsites to conditionally add systems, avoiding panics.

Drawbacks

None - it is not a breaking change and has no performance implications.


I can work on this feature.

bors bot added a commit to amethyst/shred that referenced this issue Oct 18, 2021
211: Added DispatcherBuilder::contains r=torkleyy a=schell

Adds a `contains` method to `DispatcherBuilder` that allows the caller to determine if a system with the given name has already been added.

This supports amethyst/specs#736. 

Co-authored-by: Schell Carl Scivally <efsubenovex@gmail.com>
bors bot added a commit to amethyst/shred that referenced this issue Oct 18, 2021
211: Added DispatcherBuilder::contains r=torkleyy a=schell

Adds a `contains` method to `DispatcherBuilder` that allows the caller to determine if a system with the given name has already been added.

This supports amethyst/specs#736. 

Co-authored-by: Schell Carl Scivally <efsubenovex@gmail.com>
@schell
Copy link
Author

schell commented May 4, 2022

Nevermind, I've switched to my own ECS apecs.

So long, and thanks for all the fish entities!

❤️ 🙇

@schell schell closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant