summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-12-16 03:00:12 +0100
committerstuebinm2021-12-16 03:00:12 +0100
commit41d5441c3d1974a84f14b7eb702aa240338ac9fa (patch)
treeab3dab4e8c57320bda7aece5e2e0456670dd2722
parent988b8fd7fdba5eee0b100401351199af918bc9e0 (diff)
lint if tileset properties are set on the map instead
(this seems to be a common mistake so far)
-rw-r--r--lib/Properties.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 0049d4e..2992e2c 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -116,6 +116,10 @@ checkMapProperty p@(Property name _) = case name of
unwrapString p $ \str ->
unless ("https://static.rc3.world/scripts" `isPrefixOf` str)
$ forbid "only scripts hosted on static.rc3.world are allowed."
+ | name `elem` ["jitsiRoom", "bbbRoom", "playAudio", "openWebsite"
+ , "url", "exitUrl", "silent", "getBadge"]
+ -> complain $ "property " <> name
+ <> " should be set on layers, not the map directly"
| otherwise
-> complain $ "unknown map property " <> prettyprint name
@@ -342,7 +346,7 @@ checkTileLayerProperty p@(Property name _value) = case name of
if | isOldStyle path ->
complain "Old-Style inter-repository links (using {<placeholder>}) \
\cannot be used at rC3 2021; please use world:// instead \
- \(cf. howto.rc3.world)."
+ \(see howto.rc3.world)."
| ext == "tmx" ->
complain "Cannot use .tmx map format; use Tiled's json export instead."
| ext /= "json" ->