summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/Properties.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index e746401..4e8c7d9 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -409,9 +409,9 @@ checkTileLayerProperty p@(Property name _value) = case name of
requireProperty "playAudio"
"openWebsiteTrigger" -> do
isString p
- requireProperty "openWebsite"
+ requireOneOf ["openWebsite", "openTab"]
unlessHasProperty "openWebsiteTriggerMessage"
- $ suggest "set \"openWebsiteTriggerMessage\" to a custom message to\
+ $ suggest "set \"openWebsiteTriggerMessage\" to a custom message to \
\overwrite the default \"press SPACE to open Website\"."
"openWebsiteTriggerMessage" -> do
isString p
@@ -496,6 +496,12 @@ checkTileLayerProperty p@(Property name _value) = case name of
warnUnknown p knownTileLayerProperites
where
requireProperty req = propertyRequiredBy req name
+ requireOneOf names = do
+ context <- askContext
+ when (all (not . containsProperty context) names)
+ $ complain $ "property " <> prettyprint name <> " requires one of "
+ <> prettyprint names
+
isUnsupported = warn $ "property " <> name <> " is not (yet) supported by walint."
deprecatedUseInstead instead =
warn $ "property \"" <> name <> "\" is deprecated. Use \"" <> instead <> "\" instead."