When reading a tileset with terrain types, the xml file has entries like
<tile id="1" terrain="1,2,1,0"/>, which defines the terrain type for each corner of each tile.
If a corner has no terrain type set, it is omitted like this:
<tile id="1" terrain=",,,0"/>, on which the current implementation of TiledReader throws a javax.xml.stream.XMLStreamException: (line 8, column 31): Value of <tile> tag's terrain attribute (,,,0) contains a non-integer value.
This PR fixes this, so that the file is read without exception and empty terrain types are represented by null in the TiledTile's terrainTypes array.
When reading a tileset with terrain types, the xml file has entries like
<tile id="1" terrain="1,2,1,0"/>
, which defines the terrain type for each corner of each tile. If a corner has no terrain type set, it is omitted like this:<tile id="1" terrain=",,,0"/>
, on which the current implementation of TiledReader throws ajavax.xml.stream.XMLStreamException: (line 8, column 31): Value of <tile> tag's terrain attribute (,,,0) contains a non-integer value
.This PR fixes this, so that the file is read without exception and empty terrain types are represented by
null
in theTiledTile
'sterrainTypes
array.