diff --git a/lib/Properties.hs b/lib/Properties.hs index 35c4ce45fedc249d055061c3491daaceb96f3e91..31823e61229982bce492580d2d67648b7e6ad158 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -497,7 +497,14 @@ checkTileThing removeExits p@(Property name _value) = case name of -> forbidProperty name -- the openWebsite Api can only be allowed if the website is on static.rc3.world | T.toLower name == "openwebsiteallowapi" - -> forbid "\"openWebsiteAllowApi\" is disallowed." + -> do + properties <- askContext <&> getProperties + unless (all (\(Property name value) -> case value of + StrProp str -> name /= "openWebsite" || "https://static.rc3.world/" `isPrefixOf` str + _ -> True + ) properties) + $ complain "\"openWebsiteAllowApi\" can only be used with websites hosted \ + \on https://static.rc3.world" | name `elem` [ "openWebsite", "openTab" ] -> do uselessEmptyLayer suggestProperty $ Property "openWebsiteTrigger" (StrProp "onaction")