Refactor reloading to use list of required steps
This commit is contained in:
@@ -231,8 +231,8 @@ doItemTargeting invid cr w = case cr ^? crInv . ix invid . itTargeting of
|
||||
|
||||
weaponReloadSounds :: Creature -> World -> World
|
||||
weaponReloadSounds cr w = case cr ^? crInv . ix (_crInvSel cr) . itConsumption of
|
||||
Just am@LoadableAmmo{} -> case am ^? laLoadType . loadProgress of
|
||||
Just NoTransfer -> w -- stopSoundFrom (CrReloadSound cid) w
|
||||
Just am@LoadableAmmo{} -> case am ^? laProgress of
|
||||
Just FinishedLoading -> w -- stopSoundFrom (CrReloadSound cid) w
|
||||
Just _ -> soundContinue (CrReloadSound cid) (_crPos cr) reloadS (Just 1) w
|
||||
Nothing -> w
|
||||
-- PassiveReload stype | Just (_laReloadTime am) == am ^? laTransfer . transferTime
|
||||
|
||||
Reference in New Issue
Block a user