Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Various bug fixes for 0.9 #997

Merged
merged 5 commits into from Oct 12, 2018
Merged

Various bug fixes for 0.9 #997

merged 5 commits into from Oct 12, 2018

Conversation

AnneKitsune
Copy link
Contributor

@AnneKitsune AnneKitsune commented Oct 4, 2018

Fixes #828
Fixes #945

@AnneKitsune AnneKitsune added pri: low Minor issue or cosmetic issue. Most users would not even notice. status: working labels Oct 4, 2018
@AnneKitsune AnneKitsune added this to the 0.9 milestone Oct 4, 2018
Copy link
Member

@azriel91 azriel91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nitpick!

### Getting entities that have some components, but not others

There is a special type of `Storage` in specs called `AntiStorage`.
You can invoke it using the "!" symbol when borrowing a normal `Storage`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about,

You can invoke it using the `!` operator when borrowing a normal `Storage`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh, invoke sounds a bit odd here. Maybe something like "the not operator (!) turns a Storage into its AntiStorage"?

### Getting entities that have some components, but not others

There is a special type of `Storage` in specs called `AntiStorage`.
You can invoke it using the "!" symbol when borrowing a normal `Storage`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh, invoke sounds a bit odd here. Maybe something like "the not operator (!) turns a Storage into its AntiStorage"?

);

fn run(&mut self, (mut transforms, falling): Self::SystemData) {
for (mut transform, _) in (&mut transforms, !&falling).join() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not iterate over them unconditionally given the conditional write below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure I understood what you meant

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@torkleyy I don't believe there is a conditional write there.

@torkleyy torkleyy added type: bug Something is not working as it should. type: improvement An improvement or change to an existing feature. team: documentation status: review comments and removed pri: low Minor issue or cosmetic issue. Most users would not even notice. labels Oct 5, 2018
Copy link
Member

@Moxinilian Moxinilian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi


There is a special type of `Storage` in specs called `AntiStorage`.
The not operator (!) turns a Storage into its AntiStorage counterpart.
It is used like this:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a rewording:
"Sometimes, you may want to iterate over all the entities that do not have a specific component.
You can do this by joining over the AntiStorage of your component: the joining will now happen on all entities that do not have the component.
To obtain an AntiStorage, simply apply the not operator (!) on your component's normal storage, like so:"


fn run(&mut self, (mut transforms, falling): Self::SystemData) {
for (mut transform, _) in (&mut transforms, !&falling).join() {
// If they don't fall, why not make them go up!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

life pro tip

@AnneKitsune AnneKitsune changed the title [WIP] Various bug fixes for 0.9 Various bug fixes for 0.9 Oct 12, 2018
Copy link
Member

@Xaeroxe Xaeroxe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AnneKitsune
Copy link
Contributor Author

bors r+ yeet

bors bot added a commit that referenced this pull request Oct 12, 2018
997: Various bug fixes for 0.9 r=jojolepro a=jojolepro

Fixes #828 
Fixes #945 


Co-authored-by: Joël Lupien (Jojolepro) <jojolepromain@gmail.com>
@bors
Copy link
Contributor

bors bot commented Oct 12, 2018

Build succeeded

@bors bors bot merged commit c047ac7 into amethyst:master Oct 12, 2018
@AnneKitsune AnneKitsune deleted the bugfixes branch October 12, 2018 23:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team: documentation type: bug Something is not working as it should. type: improvement An improvement or change to an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants