Change weapon fixed rate delay not to require update every tick
This commit is contained in:
@@ -159,7 +159,7 @@ applyPastDamages cr w
|
||||
-- a map updating all inventory items
|
||||
updateInv :: Creature -> World -> World
|
||||
updateInv cr = cWorld . lWorld . creatures . ix (_crID cr) . crInv . each
|
||||
. itUse %~ useUpdate
|
||||
. itUse . heldDelay %~ useDelayUpdate
|
||||
|
||||
-- a loop going over all inventory items
|
||||
invSideEff :: Creature -> World -> World
|
||||
@@ -426,10 +426,8 @@ setRBCreatureTargeting cr w ituse
|
||||
cpos <- w ^? cWorld . lWorld . creatures . ix cid . crPos
|
||||
Just $ hasLOS cpos (_crPos cr) w
|
||||
|
||||
useUpdate :: ItemUse -> ItemUse
|
||||
useUpdate =
|
||||
(heldDelay . warmTime %~ decreaseToZero)
|
||||
. (heldDelay . rateTime %~ decreaseToZero)
|
||||
useDelayUpdate :: UseDelay -> UseDelay
|
||||
useDelayUpdate = ( warmTime %~ decreaseToZero)
|
||||
|
||||
--updateAutoRecharge :: Item -> Item
|
||||
--updateAutoRecharge it = case it ^? itUse . leftConsumption of
|
||||
|
||||
Reference in New Issue
Block a user