TheBoneJarmer / TiledCS

TiledCS is a dotnet library for loading Tiled tilesets and maps
MIT License
142 stars 51 forks source link

Added support for Polylines and tileset polygons (#31) #34

Closed iUltimateLP closed 2 years ago

iUltimateLP commented 2 years ago

This PR adds support for polylines (drawn with the polygon tool but it's not a closed polygon so Tiled calls this a "polyline"). It also adds support for the polygons drawn inside the tileset as mentioned in issue #31.

Cheers!

c2727c commented 2 years ago

Great add-in! it's exactly what we need for our game.

Even if it's not exactly needed for tileset polygons, It's a bit unexpected that you didn't parse width and height for tileset objects and leave them zero. After adding 2 lines for this tileset rectangles can also be parsed.

iUltimateLP commented 2 years ago

You're right. I've hacked this together quickly to suit the needs I had, but I'm definitely willing to close this PR if you make a new one that fixes that.

ghost commented 2 years ago

Hi

I was wondering if this will be fixed? I really want this feature too

TheBoneJarmer commented 2 years ago

Hey guys

I am sorry for the late reply. I have been awfully busy last year with new projects coming up. Will have a look at this and every other remaining issues soon! Also need to pull in the latest Tiled once more and make sure TiledCS is compatible. So stay tuned.

With kind regards, TheBoneJarmer

ghost commented 2 years ago

Thx!!!

TheBoneJarmer commented 2 years ago

Hey

I cannot allow merging changes directly into the main branch as the main branch is my stable and production branch. The develop branch is being used for continuous development. So in the future please target that one. That said, your changes look really good!

However, for the sake of easiness I am not going to ask you to re-create the pull request as you also used to main branch of your fork as source branch. So I copied your changes instead. I had to make some modifications to fit the style here and there but you'll notice it is mostly the same.

Anyways, thanks again for the great input! I will release a new version soon that supports Tiled 1.8.4 so stay tuned. Will close the pull request.

With kind regards, TheBoneJarmer