summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven G. Brönstrup2021-12-22 20:58:11 +0100
committerSven G. Brönstrup2021-12-22 20:58:11 +0100
commitc82e15aebf3c9d88116be75082d938be8c4d635e (patch)
tree987dd1291c07a606229f727b4b3d145a8d8799b6
parentf3d0f937f8b5ae09a5a175daf72fda253627a116 (diff)
Fixed types of extended scripts properties
-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" ]