From 4db567b6af28fe6d75366580ad74bea1059c031e Mon Sep 17 00:00:00 2001 From: Daniel <dmtaub@gmail.com> Date: Sun, 31 Jan 2021 22:22:39 -0500 Subject: [PATCH] Object visibility needs parsed string, too Layer and ObjectGroup are parsing "visible" string, but not object. TMX docs indicate expected to be "0" or "1" https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#object --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3d466ed..8f7043b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -907,7 +907,7 @@ impl Object { ("type", obj_type, |v:String| v.parse().ok()), ("width", width, |v:String| v.parse().ok()), ("height", height, |v:String| v.parse().ok()), - ("visible", visible, |v:String| v.parse().ok()), + ("visible", visible, |v:String| v.parse().ok().map(|x:i32| x == 1)), ("rotation", rotation, |v:String| v.parse().ok()), ], required: [ -- GitLab