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

[Merged by Bors] - Cleanup some outdated parts of ecs_guide #4342

Closed
wants to merge 1 commit into from

Conversation

DJMcNab
Copy link
Member

@DJMcNab DJMcNab commented Mar 26, 2022

Objective

  • Locals can no longer be accessed outside of their creating system, but these docs say they can be.
  • There's also little reason to have a pure wrapper type for Locals; they can just use the real type. The parameter name should be sufficiently documenting.

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Mar 26, 2022
@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples and removed S-Needs-Triage This issue needs to be labelled labels Mar 26, 2022
// For any type which is `Default`, like `u32` in this example, `FromWorld` creates the default value.
fn print_at_end_round(mut counter: Local<u32>) {
*counter += 1;
println!("In stage 'Last' for the {}th time", *counter);
Copy link
Member Author

Choose a reason for hiding this comment

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

Ideally this would use the correct suffix, but that should probably be part of an external crate. We don't currently depend on (MPL 2.0)ordinal or an equivalent, as far as I know.

@alice-i-cecile
Copy link
Member

I'm ready to merge once CI passes and I have a second approval :)

@DJMcNab
Copy link
Member Author

DJMcNab commented Mar 26, 2022

CI failure appears to be spurious

@alice-i-cecile
Copy link
Member

bors try

bors bot added a commit that referenced this pull request Mar 26, 2022
@bors
Copy link
Contributor

bors bot commented Mar 26, 2022

try

Build failed:

@DJMcNab
Copy link
Member Author

DJMcNab commented Mar 27, 2022

bors try

bors bot added a commit that referenced this pull request Mar 27, 2022
@alice-i-cecile
Copy link
Member

@bevyengine/docs-team This is ready to go but I need another review.

@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Apr 4, 2022
# Objective

- `Local`s can no longer be accessed outside of their creating system, but these docs say they can be.
- There's also little reason to have a pure wrapper type for `Local`s; they can just use the real type. The parameter name should be sufficiently documenting.
@bors bors bot changed the title Cleanup some outdated parts of ecs_guide [Merged by Bors] - Cleanup some outdated parts of ecs_guide Apr 4, 2022
@bors bors bot closed this Apr 4, 2022
@DJMcNab DJMcNab deleted the self-documenting branch April 5, 2022 05:39
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Objective

- `Local`s can no longer be accessed outside of their creating system, but these docs say they can be.
- There's also little reason to have a pure wrapper type for `Local`s; they can just use the real type. The parameter name should be sufficiently documenting.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

- `Local`s can no longer be accessed outside of their creating system, but these docs say they can be.
- There's also little reason to have a pure wrapper type for `Local`s; they can just use the real type. The parameter name should be sufficiently documenting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Examples An addition or correction to our examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants