Tile properties are only loaded for first tileset
Laguna1989 opened this issue · 2 comments
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
{ "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
}
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.