diff options
author | stuebinm | 2022-03-19 16:50:37 +0100 |
---|---|---|
committer | stuebinm | 2022-03-19 20:00:54 +0100 |
commit | 8a0a463f1e45c990fb417c3d08f9f8e7e5643212 (patch) | |
tree | 09764dafd444c70fb4be0c365e040152387cc71f /lib | |
parent | b6b284cc66ed1737619d51b8dec290e807d5ae31 (diff) |
linter: remove bbb-simulating code
Diffstat (limited to '')
-rw-r--r-- | lib/Properties.hs | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs index 3100b3a..63cea1f 100644 --- a/lib/Properties.hs +++ b/lib/Properties.hs @@ -63,8 +63,8 @@ knownObjectProperties = V.fromList knownTileLayerProperites :: Vector Text knownTileLayerProperites = V.fromList - [ "jitsiRoom", "jitsiTrigger", "jitsiTriggerMessage", "jitsiWidth", "bbbRoom" - , "bbbTrigger", "bbbTriggerMessage", "playAudio", "audioLoop", "audioVolumne" + [ "jitsiRoom", "jitsiTrigger", "jitsiTriggerMessage", "jitsiWidth" + , "playAudio", "audioLoop", "audioVolumne" , "openWebsite", "openWebsiteTrigger", "openWebsiteTriggerMessage", "openTag" , "exitUrl", "startLayer", "silent", "getBadge", "zone", "name", "doorVariable" , "bindVariable", "bellVariable", "code", "openTriggerMessage" @@ -146,7 +146,7 @@ checkMapProperty p@(Property name _) = case name of not ( "%" `isInfixOf` str) && not ( "@" `isInfixOf` str)) $ forbid "only scripts hosted on static.rc3.world are allowed." - | name `elem` ["jitsiRoom", "bbbRoom", "playAudio", "openWebsite" + | name `elem` ["jitsiRoom", "playAudio", "openWebsite" , "url", "exitUrl", "silent", "getBadge"] -> complain $ "property " <> name <> " should be set on layers, not the map directly" @@ -375,34 +375,6 @@ checkTileThing removeExits p@(Property name _value) = case name of requireProperty "jitsiTrigger" "jitsiWidth" -> isIntInRange 0 100 p - "bbbRoom" -> do - removeProperty "bbbRoom" - unwrapString p $ \str -> case parseUri str of - Just ("bbb",assembly_slug, room_slug) - | "/" `isPrefixOf` room_slug - && T.length room_slug >= 2 -> do - let link = "https://rc3.world/2021/room"<>room_slug - dependsOn (Link link) - setProperty "openTab" link - setProperty "silent" (BoolProp True) - setProperty "openWebsitePolicy" - ("fullscreen;camera;microphone;display-capture" :: Text) - _ -> complain "the \"bbbRoom\" property must take a link of the form bbb://assembly_slug/room_slug." - "bbbTrigger" -> do - removeProperty "bbbTrigger" - requireProperty "bbbRoom" - unwrapString p - (setProperty "openWebsiteTrigger") - unlessHasProperty "bbbTriggerMessage" $ do - setProperty "openWebsiteTriggerMessage" - ("press SPACE to enter bbb room in a new tab" :: Text) - suggest "set \"bbbTriggerMessage\" to a custom message to overwrite the\ - \default \"press SPACE to enter the bbb room\"" - "bbbTriggerMessage" -> do - removeProperty "bbbTriggerMessage" - requireProperty "bbbRoom" - unwrapString p - (setProperty "openWebsiteTriggerMessage") "playAudio" -> do uselessEmptyLayer unwrapURI (Proxy @"audio") p |