diff --git a/src/reskit/level/converter.rs b/src/reskit/level/converter.rs index b7e2809..c8ea933 100644 --- a/src/reskit/level/converter.rs +++ b/src/reskit/level/converter.rs @@ -118,7 +118,7 @@ fn get_tiles( tileset: Node ) -> Result> { 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" {