Partial removal of reloading

This commit is contained in:
2024-09-08 10:21:35 +01:00
parent 581d2494dc
commit e03c8dd830
16 changed files with 256 additions and 187 deletions
+14 -14
View File
@@ -145,7 +145,7 @@ internalHammerUpdate :: Creature -> World -> World
internalHammerUpdate cr =
cWorld . lWorld . creatures . ix (_crID cr)
%~ ( (crHammerPosition %~ moveHammerUp)
. stepReloading
-- . stepReloading
. updateMovement
)
@@ -233,7 +233,7 @@ equipmentEffects cr = flip (foldl' $ flip $ useEquipment cr) (IM.keys $ _crInvEq
invSideEff :: Creature -> World -> World
invSideEff cr w =
updateTargeting (crGetTargeting cr) cr $
weaponReloadSounds cr $
-- weaponReloadSounds cr $
IM.foldl' f w (_crInv cr)
where
-- be careful with side effects that affect creature targeting
@@ -288,18 +288,18 @@ crGetTargeting cr = do
guard (canAttachTargeting tt itm)
return tt
weaponReloadSounds :: Creature -> World -> World
weaponReloadSounds cr w = case cr ^? crManipulation . manObject . inInventory . iselAction of
Just ReloadAction{_reloadAction = la} ->
soundContinue
(CrReloadSound cid)
(_crPos cr)
(_actionSound la)
(Just 1)
w
_ -> w
where
cid = _crID cr
--weaponReloadSounds :: Creature -> World -> World
--weaponReloadSounds cr w = case cr ^? crManipulation . manObject . inInventory . iselAction of
-- Just ReloadAction{_reloadAction = la} ->
-- soundContinue
-- (CrReloadSound cid)
-- (_crPos cr)
-- (_actionSound la)
-- (Just 1)
-- w
-- _ -> w
-- where
-- cid = _crID cr
updateMovement :: Creature -> Creature
updateMovement cr