Use a creature to "use" the weapon of a turret
This commit is contained in:
@@ -20,6 +20,9 @@ icTryStartReloading am
|
||||
crStopReloading :: Creature -> Creature
|
||||
crStopReloading cr = cr & crInv . ix (_crInvSel cr) . itConsumption . reloadState .~ Nothing'
|
||||
|
||||
crUpCrUp :: (Creature -> Creature) -> Creature -> World -> World
|
||||
crUpCrUp f cr = creatures . ix (_crID cr) %~ f
|
||||
|
||||
stepReloading :: Creature -> Creature
|
||||
stepReloading cr = case cr ^? crInv . ix isel . itConsumption . reloadState . _Just' of
|
||||
Just 0 -> cr & crInv . ix isel . itConsumption %~ doload
|
||||
|
||||
Reference in New Issue
Block a user