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

Fix add_rollback command extension #60

Merged
merged 2 commits into from
Jul 6, 2023

Conversation

johanhelsing
Copy link
Collaborator

I think I just made a mistake in my comment here: #58 (comment)

We should just do the same as what .insert does.

This makes the following work:

        commands
            .entity(tilemap_entity)
            .insert(
                TilemapBundle {
                    grid_size,
                    map_type,
                    size: tilemap_size,
                    storage: tile_storage,
                    texture: TilemapTexture::Single(sprites.white_pixel.clone()),
                    tile_size,
                    transform: tilemap_transform.with_z(SHIP_BACKGROUND_LAYER_DEPTH),
                    ..default()
                }
            )
            .add_rollback();

It now mirrors entitycommands.insert etc.
@johanhelsing
Copy link
Collaborator Author

@bushrat011899 fyi

@gschup gschup merged commit 03cf19d into gschup:main Jul 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants