summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Properties.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index 6f53c48..1b6cab8 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -261,10 +261,14 @@ checkObjectProperty p@(Property name _) = do
$ complain "property \"soundRadius\" can only be set on objects with \
\either property \"bell\" or \"door\" also set."
- _ | name `elem` [ "default", "persist", "openLayer", "closeLayer" ] -> do
+ _ | name `elem` [ "default", "persist" ] -> do
isBool p
suggestPropertyName' "door"
-- extended API for doors and bells
+ | name `elem` [ "openLayer", "closeLayer" ] -> do
+ isString p
+ suggestPropertyName' "door"
+ -- extended API for doors and bells
| name `elem` ["door", "bell"] -> do
isBool p
unless (objectType obj == "variable") $
@@ -441,9 +445,10 @@ checkTileLayerProperty p@(Property name _value) = case name of
"name" -> isUnsupported
_ | name `elem` [ "doorVariable", "bindVariable", "bellVariable" ]
-> do { isString p; requireProperty "zone" }
- | name `elem` [ "autoOpen", "autoClose", "code"
- , "openTriggerMessage", "closeTriggerMessage"]
+ | name `elem` [ "code", "openTriggerMessage", "closeTriggerMessage"]
-> do { isString p; requireProperty "doorVariable" }
+ | name `elem` [ "autoOpen", "autoClose"]
+ -> do { isBool p; requireProperty "doorVariable" }
| name `elem` [ "bellButtonText", "bellPopup" ]
-> do { isString p; requireProperty "bellVariable" }
| name `elem` [ "enterValue", "leaveValue" ]