Make use hammers and item positions slightly more logical

This commit is contained in:
2022-07-07 08:27:56 +01:00
parent c2e7fcc897
commit 3759434d92
16 changed files with 48 additions and 48 deletions
+4 -2
View File
@@ -195,7 +195,7 @@ movementSideEff cr w
(randAng,_) = randomR (0,2*pi) $ _randGen w
useUpdate :: ItemUse -> ItemUse
useUpdate = (useHammer . hammerPosition %~ moveHammerUp)
useUpdate = (useHammer' %~ moveHammerUp)
. (useDelay . warmTime %~ decreaseToZero)
. (useDelay . rateTime %~ decreaseToZero)
@@ -220,7 +220,9 @@ itemUpdate cr i
| i == crSel cr = baseupdate True
| otherwise = baseupdate False
where
baseupdate bool = updateAutoRecharge . (itUse %~ useUpdate) . (itInvPos ?~ i) . (itIsHeld .~ bool)
baseupdate bool = updateAutoRecharge . (itUse %~ useUpdate)
. (itPos .~ InInv (_crID cr) i)
. (itIsHeld .~ bool)
updateAutoRecharge :: Item -> Item
updateAutoRecharge it = case _itConsumption it of
AutoRecharging l m t p