amethyst / specs

Specs - Parallel ECS
https://amethyst.github.io/specs/
Apache License 2.0
2.49k stars 219 forks source link

DispatcherBuilder::contains #736

Closed schell closed 2 years ago

schell commented 3 years ago

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.

schell commented 2 years ago

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

So long, and thanks for all the fish entities!

❤️ 🙇