diff options
author | stuebinm | 2021-10-17 20:39:55 +0200 |
---|---|---|
committer | stuebinm | 2021-10-30 15:44:25 +0200 |
commit | 216c2b6cfcef0038823f45c2bc43d297dcff43be (patch) | |
tree | c0d8a86b04863e70807ec8f3443830f65db598ff | |
parent | 09ac7d3d0364b0f0a7fbbeebc880a3c421061a94 (diff) |
add warning for very large tileset images
-rw-r--r-- | lib/Properties.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs index 877afe1..241a076 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -76,9 +76,10 @@ checkTileset tileset = do -- reject tilesets unsuitable for workadventure unless (tilesetTilewidth tileset == 32 && tilesetTileheight tileset == 32) - $ complain $ "Tileset " <> tilesetName tileset <> " must have tile size 32 by 32" - + $ complain $ "Tileset " <> tilesetName tileset <> " must have tile size 32×32" + unless (tilesetImageheight tileset < 4096 && tilesetImagewidth tileset < 4096) + $ warn $ "Tileset " <> tilesetName tileset <> " should not be larger than 4096×4096 pixels in total" -- | Checks a single (custom) property of a layer |