Cleanup launchers
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
module Dodge.Reloading where
|
||||
module Dodge.Reloading
|
||||
( stepReloading
|
||||
, startReloadingWeapon
|
||||
, crStopReloading
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.Base
|
||||
--import qualified Data.IntMap.Strict as IM
|
||||
@@ -6,7 +10,6 @@ import Dodge.Base
|
||||
--import Data.Maybe
|
||||
import Control.Lens
|
||||
|
||||
|
||||
startReloadingWeapon :: Creature -> World -> Maybe World
|
||||
startReloadingWeapon cr = (creatures . ix (_crID cr) . crInv . ix (_crInvSel cr))
|
||||
icTryStartReloading
|
||||
@@ -23,9 +26,6 @@ icTryStartReloading it
|
||||
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 %~ doload
|
||||
|
||||
Reference in New Issue
Block a user