Fix small bug in get_tiles
parent
1163ee2752
commit
c62573e1ed
|
@ -118,7 +118,7 @@ fn get_tiles( tileset: Node ) -> Result<TiledTileset, Box<dyn Error>> {
|
|||
for defined_tile in defined_tiles {
|
||||
let tile_id: usize = defined_tile.attribute( "id" ).ok_or( "invalid file: id attribute not defined on a tile" )?.parse()?;
|
||||
let properties = defined_tile.descendants().find( | node | node.tag_name() == "properties".into() ).ok_or( "invalid file: no properties descendant in tileset" )?;
|
||||
let property = properties.descendants().find( | node | node.tag_name() == "property".into() && node.attribute( "reskit-palette" ).is_some() );
|
||||
let property = properties.descendants().find( | node | node.tag_name() == "property".into() && node.attribute( "name" ).unwrap_or( "" ) == "reskit-palette" );
|
||||
if let Some( property ) = property {
|
||||
let property_type = property.attribute( "type" ).unwrap_or( "string" );
|
||||
if property_type == "int" {
|
||||
|
|
Loading…
Reference in New Issue