Refactor, try to limit dependencies
This commit is contained in:
+8
-10
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user