Skip to content
Snippets Groups Projects
Commit 41d5441c authored by stuebinm's avatar stuebinm
Browse files

lint if tileset properties are set on the map instead

(this seems to be a common mistake so far)
parent 988b8fd7
No related branches found
No related tags found
No related merge requests found
......@@ -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" ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment