diff options
author | stuebinm | 2021-12-23 23:23:23 +0100 |
---|---|---|
committer | stuebinm | 2021-12-23 23:25:01 +0100 |
commit | 1260829bd6cd513fa3f20467ced370480ac71842 (patch) | |
tree | d2bc17b7874624e864a8f3de018638d58e59e4aa /lib | |
parent | 7b76badabaaef215618ae67a84c4ff33c4b8b450 (diff) |
some people define tilesets without images???
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Properties.hs | 4 | ||||
-rw-r--r-- | lib/Tiled.hs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs index 2b59a6b..daedabc 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -157,7 +157,9 @@ checkMapProperty p@(Property name _) = case name of checkTileset :: LintWriter Tileset checkTileset = do tileset <- askContext - unwrapPath (tilesetImage tileset) (dependsOn . Local) + case tilesetImage tileset of + Just str -> unwrapPath str (dependsOn . Local) + Nothing -> complain "Tileset does not refer to an image." refuseDoubledNames (getProperties tileset) diff --git a/lib/Tiled.hs b/lib/Tiled.hs index c5abb21..bca5f1a 100644 --- a/lib/Tiled.hs +++ b/lib/Tiled.hs @@ -289,7 +289,7 @@ instance ToJSON Tile where data Tileset = Tileset { tilesetFirstgid :: GlobalId -- ^ GID corresponding to the first tile in the set - , tilesetImage :: Text + , tilesetImage :: Maybe Text -- ^ Image used for tiles in this set , tilesetName :: Text -- ^ Name given to this tileset |