pythonarcade / pytiled_parser

Python Library for parsing Tiled Map Editor maps.
MIT License
32 stars 21 forks source link

Sorting in group layers sometimes incorrect #78

Open eruvanos opened 5 days ago

eruvanos commented 5 days ago

I have issues with a tilemap with the following structure:

Due to this code: https://github.com/pythonarcade/pytiled_parser/blob/c8e7bbd45ed544fd3cc6d0d5bd21b35f07705c6c/pytiled_parser/parsers/tmx/layer.py#L318 layers within GroupLayers are not parsed in their order, but layers first and other group layers last.

That changes the order and creates issues, when drawing on screen.

(Do you need a example map?)

Cleptomania commented 4 days ago

Makes sense, I should be able to make a test map for it pretty easy. Will add a test case for this and get a fix in