Simplify and correct hammer check for held weapons

This commit is contained in:
2023-05-19 20:00:11 +01:00
parent 17c79e7cee
commit 297b4e0b3c
3 changed files with 29 additions and 32 deletions
+23 -13
View File
@@ -62,7 +62,7 @@ useMod hm = case hm of
, withSoundStart tap4S
, useTimeCheck
, ammoCheckI
, hammerCheckI
, blCheck
]
TeslaMod ->
[ useAmmoAmount 1
@@ -109,20 +109,22 @@ useMod hm = case hm of
, withSoundStart tap4S
, useTimeCheck
, ammoCheckI
, hammerCheckI
, blCheck
]
ShatterMod ->
[ useAmmoAmount 1
-- , withSoundStart tap3S
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
AmmoCheckMod -> [ammoCheckI]
AmmoUseCheckMod -> [useAmmoAmount 1,useTimeCheck, ammoCheckI]
AmmoHammerTimeUseOneMod ->
[ useAmmoAmount 1
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
BangCaneMod ->
[ withMuzFlareI
@@ -133,7 +135,8 @@ useMod hm = case hm of
, useAmmoAmount 1
, withSoundStart tap3S
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
VolleyGunMod ->
[ withRecoil
@@ -144,7 +147,8 @@ useMod hm = case hm of
, useAllAmmo
, withSoundItemChoiceStart caneStickSoundChoice
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
AutoRifleMod ->
-- note this is the same as BangCanemMod with the first changed
@@ -167,7 +171,8 @@ useMod hm = case hm of
, useAmmoAmount 1
, withSoundStart bangEchoS
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
ElephantGunMod ->
[ withRecoil
@@ -178,7 +183,8 @@ useMod hm = case hm of
, useAmmoAmount 1
, withSoundStart bangEchoS
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
AutoAmrMod ->
[ withRecoil
@@ -209,7 +215,8 @@ useMod hm = case hm of
, useAllAmmo
, withSoundItemChoiceStart bangStickSoundChoice
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
PistolMod ->
[ withMuzFlareI
@@ -220,7 +227,8 @@ useMod hm = case hm of
, withSoundStart tap3S
, useAmmoAmount 1
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
AutoPistolMod ->
[ withMuzFlareI
@@ -254,7 +262,8 @@ useMod hm = case hm of
, lockInvFor 7
, sideEffectOnFrame 7 (\_ cr -> TorqueCr 0.2 (_crID cr)) --(torqueSideEffect 0.2)
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
BurstRifleRepeatMod ->
[ withRecoil
@@ -305,7 +314,8 @@ useMod hm = case hm of
-- rather than locking the inventory, a better solution may be to check
-- that the weapon is still in your hands in the repeated frames
, useTimeCheck
, ammoHammerCheck
, ammoCheckI
, blCheck
]
RevolverXRepeatMod ->
[ withRecoil
@@ -328,8 +338,8 @@ useMod hm = case hm of
, useAllAmmo
, withSoundStart bangEchoS
, useTimeCheck
, hammerCheckI
, ammoCheckI
, blCheck
]
where
f = do