Continue refactoring reloading
This commit is contained in:
@@ -230,11 +230,9 @@ doItemTargeting invid cr w = case cr ^? crInv . ix invid . itTargeting of
|
||||
in w' & creatures . ix (_crID cr) . crInv . ix invid . itTargeting .~ t'
|
||||
|
||||
weaponReloadSounds :: Creature -> World -> World
|
||||
weaponReloadSounds cr w = case cr ^? crInv . ix (_crInvSel cr) . itConsumption of
|
||||
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
|
||||
weaponReloadSounds cr w = case cr ^? crInvSelAction of
|
||||
Just ReloadAction{} -> soundContinue (CrReloadSound cid) (_crPos cr) reloadS (Just 1) w
|
||||
_ -> w
|
||||
-- PassiveReload stype | Just (_laReloadTime am) == am ^? laTransfer . transferTime
|
||||
-- -> soundContinue (CrReloadSound 0) (_crPos cr) stype Nothing w
|
||||
-- PassiveReload _ -> w
|
||||
@@ -244,10 +242,10 @@ weaponReloadSounds cr w = case cr ^? crInv . ix (_crInvSel cr) . itConsumption o
|
||||
-- ActivePartial{} | am ^? laTransfer . transferTime == Just 0 -> stopSoundFrom (CrReloadSound cid) w
|
||||
-- ActivePartial{} | _laTransfer am == NoTransfer -> w
|
||||
-- ActivePartial{} -> soundContinue (CrReloadSound cid) (_crPos cr) reloadS (Just 1) w
|
||||
Just ChargeableAmmo {} -> w
|
||||
Just NoConsumption {} -> w
|
||||
Just ItemItselfConsumable {} -> w
|
||||
Nothing -> w
|
||||
-- Just ChargeableAmmo {} -> w
|
||||
-- Just NoConsumption {} -> w
|
||||
-- Just ItemItselfConsumable {} -> w
|
||||
-- Nothing -> w
|
||||
where
|
||||
cid = _crID cr
|
||||
|
||||
|
||||
Reference in New Issue
Block a user