Move towards allowing equipable targeting items

This commit is contained in:
2023-01-06 11:01:32 +00:00
parent bf479ca080
commit 612ee85579
23 changed files with 152 additions and 145 deletions
+1 -5
View File
@@ -1,6 +1,5 @@
module Dodge.Item.Weapon.Targeting (
useTargetPos,
removeItTarget,
) where
import Control.Lens
@@ -12,9 +11,6 @@ useTargetPos ::
Creature ->
World ->
World
useTargetPos f cr w = case cr ^? crInv . ix (crSel cr) . itUse . heldTargeting . tgPos of
useTargetPos f cr w = case cr ^? crTargeting . ctPos of
Nothing -> w
Just p -> f p cr w
removeItTarget :: Item -> Item
removeItTarget = itUse . heldTargeting . tgPos .~ Nothing