diff options
author | stuebinm | 2021-09-18 01:59:00 +0200 |
---|---|---|
committer | stuebinm | 2021-09-18 01:59:00 +0200 |
commit | 1c82540aeea7636a6cfd25acfdd28c1029f5669f (patch) | |
tree | afdf9cdf8f33dfeffc2478b3e1e069748497b687 /lib/Properties.hs | |
parent | 77d1f4ce4eb3ba40d884cc4ed7fa693e16538c8d (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.hs | 14 |
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" -> |