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

tile_pos_to_int_grid_with_grid_tiles_tile_maker checks grid_tiles #228

Closed
wants to merge 2 commits into from

Conversation

MScottMcBee
Copy link
Contributor

A possible solution to #227, this PR changes tile_pos_to_tile_if_int_grid_nonzero_maker to take in an grid_tiles array as an argument and checks against it to see if an invisible tile should be made or not.

@@ -524,6 +524,7 @@ pub fn spawn_level(
tile_pos_to_tile_if_int_grid_nonzero_maker(
tile_pos_to_invisible_tile,
&layer_instance.int_grid_csv,
&grid_tiles,
Copy link
Owner

Choose a reason for hiding this comment

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

So I'm a little confused by this actually - the issue is for grid_tiles overflow, right? I thought that could only happen on AutoTile layers (and intgrid+autotile layers). However, this change only affects non-autotile intgrid layers. The match tileset_definition { ... } this is inside of is Some on autotile intgrids, and None on non-autotile intgrids.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going back and looking at my LDTK file, the intgrid I'm using has the auto-layer tileset field set, so I guess it's intgrid+autotile. Maybe since the map is using that vs an autotile layer that points to an intgrid it's different? I'll try to get a small repro example set up since I'm admittedly not very familiar with LDTK.

@Trouv
Copy link
Owner

Trouv commented Sep 14, 2023

Thanks for the detailed issue, and the contribution!

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