Just made a quick fix for an issue I was having where if you try to use different tilesets in Tiled that contain tiles with identical IDs the latter tile gets skipped.
Note I made the changes assuming that replacing the manually tracked _atlas_source_counter can be replaced with the return value of TileSet.add_source() where it gets the next source id itself.
I'm not too sure if this is something ya want to add but it fixed an issue for me so thought I'd put up a pr :) Feel free to change it if you like
Just made a quick fix for an issue I was having where if you try to use different tilesets in Tiled that contain tiles with identical IDs the latter tile gets skipped.
Note I made the changes assuming that replacing the manually tracked
_atlas_source_counter
can be replaced with the return value ofTileSet.add_source()
where it gets the next source id itself. I'm not too sure if this is something ya want to add but it fixed an issue for me so thought I'd put up a pr :) Feel free to change it if you likeExample
In Tiled Editor
Godot scene result before changes
Godot scene result after changes
Related Godot console errors
https://github.com/godotengine/godot/blob/2f73a059cefadcd944b6874f2557ec82e46a562d/scene/resources/tile_set.cpp#L475