From c62573e1ed7b2098ce174476e15af21d1b9d0b43 Mon Sep 17 00:00:00 2001 From: ashley Date: Wed, 13 Sep 2023 23:18:52 -0400 Subject: [PATCH] Fix small bug in get_tiles --- src/reskit/level/converter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" {