Add whirdown for machine pistol

This commit is contained in:
2025-06-26 02:09:22 +01:00
parent 7830b0e2c1
commit 193bc481d2
7 changed files with 277 additions and 240 deletions
+10 -1
View File
@@ -111,6 +111,15 @@ useTimeCheck f item cr w = case useDelay $ item ^. ldtValue of
& soundContinue (CrWeaponSound cid 0) (_crPos cr) (warmupSound $ item ^. ldtValue . itType) (Just 2)
& cWorld . lWorld . creatures . ix cid . crInv . ix itRef . itParams . wTime +~ 1
WarmUpNoDelay {} -> f item cr w & setwarming
WarmUpCoolDown ws _ _
| _wTime (_itParams $ _ldtValue item) < ws ->
w & setwarming
& soundContinue (CrWeaponSound cid 0) (_crPos cr) (warmupSound $ item ^. ldtValue . itType) (Just 2)
& cWorld . lWorld . creatures . ix cid . crInv . ix itRef . itParams . wTime +~ 1
WarmUpCoolDown _ cs _
| _wTime (_itParams $ _ldtValue item) < cs -> f item cr w & setwarming
& cWorld . lWorld . creatures . ix cid . crInv . ix itRef . itParams . wTime +~ 1
WarmUpCoolDown {} -> w & setwarming
NoDelay -> f item cr w
where
lastused = item ^. ldtValue . itTimeLastUsed
@@ -165,7 +174,7 @@ heldItemMuzzles = \case
& ix (i `div` 2) . mzFlareType .~ BasicFlare
& ix (i -1) . mzFlareType .~ NoLightFlare
PISTOL -> [Muzzle (V2 10 0) 0 0.05 0 BasicFlare MuzzleShootBullet (UseExactly 1)]
MACHINEPISTOL -> [Muzzle (V2 10 0) 0 0.15 0 MiniGunFlare MuzzleShootBullet (UseExactly 1)]
MACHINEPISTOL -> [Muzzle (V2 10 0) 0 0.3 0 MiniGunFlare MuzzleShootBullet (UseExactly 1)]
AUTOPISTOL -> [Muzzle (V2 10 0) 0 0 0 BasicFlare MuzzleShootBullet (UseExactly 1)]
SMG -> [Muzzle (V2 20 0) 0 0.05 0 BasicFlare MuzzleShootBullet (UseExactly 1)]
RIFLE -> dbwMuzzles & ix 0 . mzPos .~ V2 25 0