From f1c6de8f74c2a410e7ac06df30293060d72fc8a0 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 30 Nov 2021 00:19:48 +0100 Subject: 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. --- lib/Properties.hs | 13 ++----------- 1 file 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 -- cgit v1.2.3