summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Properties.hs34
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