summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstuebinm2021-10-17 20:39:55 +0200
committerstuebinm2021-10-30 15:44:25 +0200
commit216c2b6cfcef0038823f45c2bc43d297dcff43be (patch)
treec0d8a86b04863e70807ec8f3443830f65db598ff /lib
parent09ac7d3d0364b0f0a7fbbeebc880a3c421061a94 (diff)
add warning for very large tileset images
Diffstat (limited to 'lib')
-rw-r--r--lib/Properties.hs5
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