summaryrefslogtreecommitdiff
path: root/lib/Properties.hs
diff options
context:
space:
mode:
authorstuebinm2021-09-18 01:59:00 +0200
committerstuebinm2021-09-18 01:59:00 +0200
commit1c82540aeea7636a6cfd25acfdd28c1029f5669f (patch)
treeafdf9cdf8f33dfeffc2478b3e1e069748497b687 /lib/Properties.hs
parent77d1f4ce4eb3ba40d884cc4ed7fa693e16538c8d (diff)
can collect dependencies!
There's now a Lint type, which may be either a "true lint" (which is a Hint, which contains some message and level of severity), or a Depends, which indicates that this map depends on some ressource or other (and is otherwise treated as a special info Hint in all other cases)
Diffstat (limited to 'lib/Properties.hs')
-rw-r--r--lib/Properties.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Properties.hs b/lib/Properties.hs
index f48d62e..7d6fc4a 100644
--- a/lib/Properties.hs
+++ b/lib/Properties.hs
@@ -5,13 +5,14 @@
module Properties (checkProperty) where
-import Control.Monad (unless)
-import Data.Text (Text)
-import Tiled2 (Layer (layerProperties), Property, propertyName, propertyValue)
-import Util (prettyprint)
+import Control.Monad (unless)
+import Data.Text (Text)
+import Tiled2 (Layer (layerProperties), Property, propertyName,
+ propertyValue)
+import Util (prettyprint)
-import LintWriter (LintWriter, complain, forbid, info,
- suggest, warn, Dep(..), require)
+import LintWriter (LintWriter, complain, forbid, info, require,
+ suggest, warn)
-- | the point of this module
--
@@ -45,6 +46,7 @@ checkProperty layer prop = case propName of
requireProperty "playAudio"
"openWebsite" -> do
suggestPropertyValue "openWebsiteTrigger" "onaction"
+ require $ propertyValue prop
"openWebsiteTrigger" ->
requireProperty "openWebsite"
"openWebsitePolicy" ->