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 properties are only loaded for first tileset #54

Closed
Laguna1989 opened this issue Feb 27, 2022 · 2 comments · Fixed by #58
Closed

Tile properties are only loaded for first tileset #54

Laguna1989 opened this issue Feb 27, 2022 · 2 comments · Fixed by #58
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Laguna1989
Copy link
Contributor

Laguna1989 commented Feb 27, 2022

Hi,

It seems that tile properties are only parsed for the first tileset and ignored for all following tilesets. The data is correctly written by Tiled and present in the json.
However tileson does not seem to parse the property information correctly for the second tileset.

I will attach a minimal working example json in the next comment. Please find the screenshot of the debugging information of the map here:

tested on the current master, commit id a1ec661

image

@Laguna1989
Copy link
Contributor Author

{ "compressionlevel":-1,
 "height":1,
 "infinite":false,
 "layers":[
        {
         "data":[1, 2],
         "height":1,
         "id":1,
         "name":"Kachelebene 1",
         "opacity":1,
         "type":"tilelayer",
         "visible":true,
         "width":2,
         "x":0,
         "y":0
        }],
 "nextlayerid":2,
 "nextobjectid":1,
 "orientation":"orthogonal",
 "renderorder":"right-down",
 "tiledversion":"1.7.2",
 "tileheight":16,
 "tilesets":[
        {
         "columns":1,
         "firstgid":1,
         "image":"tilesetA.png",
         "imageheight":16,
         "imagewidth":16,
         "margin":0,
         "name":"tilesetA",
         "spacing":0,
         "tilecount":1,
         "tileheight":16,
         "tiles":[
                {
                 "id":0,
                 "properties":[
                        {
                         "name":"property1",
                         "type":"string",
                         "value":"A1"
                        }, 
                        {
                         "name":"property2",
                         "type":"string",
                         "value":"A2"
                        }]
                }],
         "tilewidth":16
        }, 
        {
         "columns":1,
         "firstgid":2,
         "image":"tilesetB.png",
         "imageheight":16,
         "imagewidth":16,
         "margin":0,
         "name":"tilesetB",
         "spacing":0,
         "tilecount":1,
         "tileheight":16,
         "tiles":[
                {
                 "id":0,
                 "properties":[
                        {
                         "name":"property1",
                         "type":"string",
                         "value":"B1"
                        }, 
                        {
                         "name":"property2",
                         "type":"string",
                         "value":"B2"
                        }]
                }],
         "tilewidth":16
        }],
 "tilewidth":16,
 "type":"map",
 "version":"1.6",
 "width":2
}

@SSBMTonberry
Copy link
Owner

Thank you very much for a detailed and well described issue! This sounds strange, but at the same time I don't remember how much information I put into the properties of the second tileset used in my own testing. This may have been a flaw that has gone unnoticed for a long time due to missing data in my tests...

I will look into this as soon as possible. I'll also have to update Tileson to support the latest Tiled version, and there are a few other bugs I would like to fix in the process :) This shouldn't be a complicated issue, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants