Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+8 -10
View File
@@ -1,11 +1,10 @@
module Dodge.WorldBool
where
import Dodge.CreatureEffect
import Dodge.Creature.Test
import Dodge.Data
import Data.Maybe
import Control.Lens
module Dodge.WorldBool where
import Control.Lens
import Data.Maybe
import Dodge.Creature.Test
import Dodge.CreatureEffect
import Dodge.Data.World
import qualified IntMapHelp as IM
doWdBl :: WdBl -> World -> Bool
@@ -16,7 +15,6 @@ doWdBl wb w = case wb of
dr <- w ^? cWorld . doors . ix i
return (DoorHalfway == _drStatus dr)
WdBlCrFilterNearPoint r p t -> any (crNearPoint r p) (IM.filter (doCrBl t) (_creatures (_cWorld w)))
WdBlBtOn btid -> _btState (_buttons (_cWorld w) IM.! btid) == BtOn -- unsafe
WdBlBtNotOff btid -> _btState (_buttons (_cWorld w) IM.! btid) /= BtOff -- unsafe
WdBlBtOn btid -> _btState (_buttons (_cWorld w) IM.! btid) == BtOn -- unsafe
WdBlBtNotOff btid -> _btState (_buttons (_cWorld w) IM.! btid) /= BtOff -- unsafe
WdBlNegate x -> not $ doWdBl x w