Refactor targeting

This commit is contained in:
2022-07-21 00:10:05 +01:00
parent a89b0c784f
commit 39117b4dfe
8 changed files with 116 additions and 77 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
module Dodge.Render.ShapePicture
( worldSPic
) where
import Dodge.Targeting.Draw
import Dodge.RadarSweep.Draw
import Dodge.Projectile.Draw
import Dodge.Item.Draw.SPic
@@ -72,7 +73,7 @@ anyTargeting :: Configuration -> World -> SPic
anyTargeting cfig w = (mempty,pictures $ IM.elems $ IM.mapMaybe f $ _crInv cr)
where
cr = you w
f it = fmap (\g -> g it cr cfig w) (it ^? itTargeting . tgDraw)
f it = fmap (\g -> drawTargeting g it cr cfig w) (it ^? itTargeting . tgDraw)
drawCreature :: Creature -> SPic
drawCreature cr = case _crType cr of