summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorstuebinm2021-11-30 00:19:48 +0100
committerstuebinm2021-11-30 00:19:48 +0100
commitf1c6de8f74c2a410e7ac06df30293060d72fc8a0 (patch)
tree0c399efeea22f6440398522e5712c99d328c733b /lib
parent72d66169ecef657eae7833c19e80b5e115d4a4b1 (diff)
allow unknown properties
since the scripting API can define new properties and we (for now) do not know what the script may or may not be able to do, the linter would otherwise reject potentially valid maps.
Diffstat (limited to '')
-rw-r--r--lib/Properties.hs13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 35cc155..5720f42 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -252,17 +252,8 @@ checkLayerProperty p@(Property name _value) = case name of
False -> warn "property \"collides\" set to 'false' is useless."
"name" -> isUnsupported
-- all properties relating to scripting are handled the same
- _ | name `elem` [ "default"
- , "readableBy"
- , "writableBy"
- , "persist"
- , "jsonSchema"
- , "zone" ] ->
- do
- warn "the workadventure scripting API and variables are not (yet?) supported."
- removeProperty name
- | otherwise ->
- complain $ "unknown property type " <> prettyprint name
+ _ ->
+ warn $ "unknown property type " <> prettyprint name
where
isForbidden = forbidProperty name
requireProperty req = propertyRequiredBy req name