Continue streaming refactor
This commit is contained in:
@@ -25,6 +25,7 @@ import LensHelp
|
||||
|
||||
import Data.Foldable
|
||||
import Data.Tuple
|
||||
import qualified Streaming.Prelude as S
|
||||
aFlameParticle
|
||||
:: Int -- ^ Timer
|
||||
-> Point2 -- ^ Position
|
||||
@@ -206,7 +207,13 @@ damageInArea crt wlt pt w = damwls damcrs
|
||||
where
|
||||
p = _ptPos pt
|
||||
damcrs = foldl' (flip $ \cr -> fst . hiteff [(p,Left cr)]) w $ IM.filter crt $ _creatures w
|
||||
damwls w' = foldl' (flip $ \wl -> fst . hiteff [(p,Right wl)]) w' $ filter wlt $ wallsNearPoint' p w
|
||||
damwls w' = runIdentity
|
||||
. S.fold_
|
||||
(flip $ \wl -> fst . hiteff [(p,Right wl)])
|
||||
w'
|
||||
id
|
||||
. S.filter wlt
|
||||
$ wallsNearPoint p w'
|
||||
hiteff = _ptHitEff pt pt
|
||||
|
||||
-- | At writing the radius is half the size of the effect area
|
||||
|
||||
Reference in New Issue
Block a user