Cleanup targeting

This commit is contained in:
2023-01-05 11:01:12 +00:00
parent c48a553967
commit 0302685053
24 changed files with 66 additions and 95 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ targetLaserUpdate _ cr w t
, _lpDir = _crDir cr
, _lpPos = sp
, _lpColor = col
, _lpType = TargetLaser
, _lpType = TargetingLaser
}
--wpammo = _itConsumption it
-- reloadFrac
+2 -2
View File
@@ -12,9 +12,9 @@ useTargetPos ::
Creature ->
World ->
World
useTargetPos f cr w = case cr ^? crInv . ix (crSel cr) . itTargeting . tgPos of
useTargetPos f cr w = case cr ^? crInv . ix (crSel cr) . itUse . heldTargeting . tgPos of
Nothing -> w
Just p -> f p cr w
removeItTarget :: Item -> Item
removeItTarget = itTargeting . tgPos .~ Nothing
removeItTarget = itUse . heldTargeting . tgPos .~ Nothing