Tile collections
Works as expected.
In this screenshot, the blue regions are tiles from a tile collection, and the red regions are tiles from a batch sheet

Linked issues: https://github.com/karai17/Simple-Tiled-Implementation/issues/214 https://github.com/karai17/Simple-Tiled-Implementation/issues/173
I definitely appreciate the plugin but I feel like it's written in a bit of a strange way that could be simplified. Instead of adding a field called loadStyle, why not just check the loaded table to see if it has a __call function, and if so, execute it? In the same vain, instead of having a hook function, just assign it directly to __call. Tilesets don't really have any functionality, they are just data, so they don't need to have metatables, you can just process them directly. And finally, I don't think you need to create a new table for tilesets since you're just looping through them and assigning data as you go; you can use the same table that loaded in with the map.
I'll refactor it later and update the PR.
Regarding reusing the tilesets table that loads with the map, what do you have in mind? Inserting elements into a table while iterator over it is sometimes unsafe, and I also don't know if the order of the tilesets needs to be preserved.
that particular one doesn't bother me so much, of it makes the most sense to use a new table, that's fine
On Sat., Jun. 20, 2020, 07:27 Luca-spopo, [email protected] wrote:
I'll refactor it later and update the PR. Regarding reusing the tilesets table that loads with the map, what do you have in mind? Inserting elements into a table while iterator over it is sometimes unsafe, and I also don't know if the order of the tilesets needs to be preserved.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/karai17/Simple-Tiled-Implementation/pull/236#issuecomment-646973908, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQD7BJMKCQRPFHSDZ5HNDRXSFKVANCNFSM4OCTJVJQ .
Any progress on this?