diff options
author | stuebinm | 2021-09-20 01:26:27 +0200 |
---|---|---|
committer | stuebinm | 2021-09-20 01:26:27 +0200 |
commit | 968038c403e71b98a8f55a4d79e64beca8349ab3 (patch) | |
tree | 4a53190972b3f5a7c12a9a463856d7d4600fe75f /lib/Tiled2.hs | |
parent | 33d2b0c5da01c48c8106876665e646e1d2f560e9 (diff) |
lint general map properties
Diffstat (limited to 'lib/Tiled2.hs')
-rw-r--r-- | lib/Tiled2.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Tiled2.hs b/lib/Tiled2.hs index 8220bfb..79033f0 100644 --- a/lib/Tiled2.hs +++ b/lib/Tiled2.hs @@ -398,7 +398,7 @@ data Tiledmap = Tiledmap { tiledmapVersion :: Float -- ^ Hex-formatted color (#RRGGBB or #AARRGGBB) (optional) , tiledmapRenderorder :: String -- ^ Rendering direction (orthogonal maps only) - , tiledmapProperties :: Map Text Text + , tiledmapProperties :: [Property] -- ^ String key-value pairs , tiledmapNextobjectid :: Int -- ^ Auto-increments for each placed object @@ -416,7 +416,7 @@ instance FromJSON Tiledmap where <*> o .: "tilesets" <*> (o .: "backgroundcolor" <|> pure Nothing) <*> o .: "renderorder" - <*> (o .: "properties" <|> pure mempty) + <*> (o .:? "properties" <&> fromMaybe []) <*> o .: "nextobjectid" parseJSON invalid = typeMismatch "Tiledmap" invalid |