From 08704357665caaee96beb8411f947417b97a8207 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Tue, 20 Feb 2024 19:02:20 +0100 Subject: [PATCH] Apply suggestions from PR - Open and save the test map so we know for certain it's in line with Tiled output - If we can't find a property type on a class property, default to an empty string instead of "class" --- assets/tiled_class_property.tmx | 4 ++-- src/properties.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/tiled_class_property.tmx b/assets/tiled_class_property.tmx index 9a31472..000ff53 100644 --- a/assets/tiled_class_property.tmx +++ b/assets/tiled_class_property.tmx @@ -1,5 +1,5 @@ - + 0,0, @@ -11,7 +11,7 @@ - + diff --git a/src/properties.rs b/src/properties.rs index 6bb41c2..fb2b033 100644 --- a/src/properties.rs +++ b/src/properties.rs @@ -163,7 +163,7 @@ pub(crate) fn parse_properties( HashMap::new() }; p.insert(k, PropertyValue::ClassValue { - property_type: p_t.unwrap_or_else(|| "class".to_owned()), + property_type: p_t.unwrap_or_default(), properties, }); return Ok(());