From 1c82540aeea7636a6cfd25acfdd28c1029f5669f Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sat, 18 Sep 2021 01:59:00 +0200 Subject: 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) --- lib/Properties.hs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/Properties.hs') 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" -> -- cgit v1.2.3