Move weapon muzzles up a record
This commit is contained in:
@@ -124,7 +124,7 @@ heldEffectMuzzles t cr w =
|
||||
uncurry (applyCME (_ldtValue t) cr) cmew
|
||||
& doWeaponRepetitions upitm cr
|
||||
where
|
||||
muzzles = t ^. ldtValue . itUse . heldAim . aimMuzzles
|
||||
muzzles = t ^. ldtValue . itUse . heldMuzzles
|
||||
(upitm, loadedmuzzles) = mapAccumR loadMuzzle t muzzles
|
||||
cmew = foldl' (useLoadedAmmo t cr) (CME 0 0 False, w) $ zip [0 ..] loadedmuzzles
|
||||
|
||||
@@ -135,7 +135,7 @@ doHeldUseEffect t cr w = case t ^? ldtValue . itUse . heldUseEffect of
|
||||
let g = w ^. randGen
|
||||
(is, g') = runState (shuffle [0 .. x -1]) g
|
||||
return $
|
||||
w & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i . itUse . heldAim . aimMuzzles %~ zipWith (\j mz -> mz & mzFrame .~ j) is
|
||||
w & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i . itUse . heldMuzzles %~ zipWith (\j mz -> mz & mzFrame .~ j) is
|
||||
& randGen .~ g'
|
||||
Just SwitchAlteRifle -> fromMaybe w $ do
|
||||
i <- t ^? ldtValue . itLocation . ilInvID
|
||||
@@ -143,8 +143,7 @@ doHeldUseEffect t cr w = case t ^? ldtValue . itUse . heldUseEffect of
|
||||
w
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i
|
||||
. itUse
|
||||
. heldAim
|
||||
. aimMuzzles
|
||||
. heldMuzzles
|
||||
. ix 0
|
||||
. mzAmmoSlot
|
||||
%~ ((`mod` 2) . (+ 1))
|
||||
@@ -488,8 +487,7 @@ walkNozzle mzid mz itm cr w = fromMaybe w $ do
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crInv
|
||||
. ix invid
|
||||
. itUse
|
||||
. heldAim
|
||||
. aimMuzzles
|
||||
. heldMuzzles
|
||||
. ix mzid
|
||||
. mzEffect
|
||||
. nzCurrentWalkAngle
|
||||
|
||||
Reference in New Issue
Block a user