From 41d5441c3d1974a84f14b7eb702aa240338ac9fa Mon Sep 17 00:00:00 2001 From: stuebinm Date: Thu, 16 Dec 2021 03:00:12 +0100 Subject: lint if tileset properties are set on the map instead (this seems to be a common mistake so far) --- lib/Properties.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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 {}) \ \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" -> -- cgit v1.2.3