Fix muzzle flare
This commit is contained in:
+43
-41
@@ -1,7 +1,5 @@
|
||||
module Dodge.HeldUse where
|
||||
|
||||
import Dodge.Wall.Move
|
||||
import Dodge.Wall.ForceField
|
||||
import Color
|
||||
import Data.Maybe
|
||||
import Data.Traversable
|
||||
@@ -18,6 +16,8 @@ import Dodge.Item.Weapon.TriggerType
|
||||
import Dodge.Projectile.Create
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Tesla.Arc
|
||||
import Dodge.Wall.ForceField
|
||||
import Dodge.Wall.Move
|
||||
import Dodge.WorldEvent.Flash
|
||||
import Geometry
|
||||
import qualified IntMapHelp as IM
|
||||
@@ -52,8 +52,8 @@ useMod hm = case hm of
|
||||
]
|
||||
FlameThrowerMod ->
|
||||
[ withSidePushAfterI 20
|
||||
--, withTempLight 1 100 (V3 1 0 0)
|
||||
, withSidePushI 5
|
||||
, --, withTempLight 1 100 (V3 1 0 0)
|
||||
withSidePushI 5
|
||||
, useAmmoAmount 1
|
||||
, ammoCheckI
|
||||
]
|
||||
@@ -81,9 +81,12 @@ useMod hm = case hm of
|
||||
]
|
||||
LasWideMod n ->
|
||||
[ useAmmoAmount 1
|
||||
, withItem $ \it -> duplicateNumBarrels (min
|
||||
(it ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded)
|
||||
(it ^?! itParams . lasCycle `div` lasWideRate))
|
||||
, withItem $ \it ->
|
||||
duplicateNumBarrels
|
||||
( min
|
||||
(it ^?! itUse . heldConsumption . laSource . _InternalSource . iaLoaded)
|
||||
(it ^?! itParams . lasCycle `div` lasWideRate)
|
||||
)
|
||||
, withItem $ \it -> withCrPos $ flareCircleAt (_lasColor $ _itParams it) 0.8
|
||||
, withItem $ \it -> withTempLight 1 100 (xyzV4 (_lasColor $ _itParams it))
|
||||
, withSoundForI tone440sawtoothquietS 2
|
||||
@@ -114,13 +117,13 @@ useMod hm = case hm of
|
||||
]
|
||||
ShatterMod ->
|
||||
[ useAmmoAmount 1
|
||||
-- , withSoundStart tap3S
|
||||
, useTimeCheck
|
||||
, -- , withSoundStart tap3S
|
||||
useTimeCheck
|
||||
, ammoCheckI
|
||||
, blCheck
|
||||
]
|
||||
AmmoCheckMod -> [ammoCheckI]
|
||||
AmmoUseCheckMod -> [useAmmoAmount 1,useTimeCheck, ammoCheckI]
|
||||
AmmoUseCheckMod -> [useAmmoAmount 1, useTimeCheck, ammoCheckI]
|
||||
AmmoHammerTimeUseOneMod ->
|
||||
[ useAmmoAmount 1
|
||||
, useTimeCheck
|
||||
@@ -128,7 +131,7 @@ useMod hm = case hm of
|
||||
, blCheck
|
||||
]
|
||||
BangCaneMod ->
|
||||
[ withMuzFlareI
|
||||
[ withFlare
|
||||
, withSmoke 1 black 20 200 5
|
||||
, withRecoil
|
||||
, duplicateLoadedBarrels
|
||||
@@ -141,7 +144,7 @@ useMod hm = case hm of
|
||||
]
|
||||
VolleyGunMod ->
|
||||
[ withRecoil
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, duplicateLoadedBarrels
|
||||
, withTorqueAfter
|
||||
, useAllAmmo
|
||||
@@ -152,7 +155,7 @@ useMod hm = case hm of
|
||||
]
|
||||
AutoRifleMod ->
|
||||
-- note this is the same as BangCanemMod with the first changed
|
||||
[ withMuzFlareI
|
||||
[ withFlare
|
||||
, withSmoke 1 black 20 200 5
|
||||
, withRecoil
|
||||
, duplicateLoadedBarrels
|
||||
@@ -164,7 +167,7 @@ useMod hm = case hm of
|
||||
]
|
||||
BangRodMod ->
|
||||
[ withRecoil
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, withThickSmokeI
|
||||
, duplicateLoadedBarrels
|
||||
, withTorqueAfter
|
||||
@@ -176,7 +179,7 @@ useMod hm = case hm of
|
||||
]
|
||||
ElephantGunMod ->
|
||||
[ withRecoil
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, withThickSmokeI
|
||||
, duplicateLoadedBarrels
|
||||
, withTorqueAfter
|
||||
@@ -188,7 +191,7 @@ useMod hm = case hm of
|
||||
]
|
||||
AutoAmrMod ->
|
||||
[ withRecoil
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, withThickSmokeI
|
||||
, duplicateLoadedBarrels
|
||||
, withTorqueAfter
|
||||
@@ -198,7 +201,7 @@ useMod hm = case hm of
|
||||
, ammoCheckI -- cf ElephantGun
|
||||
]
|
||||
MachineGunMod ->
|
||||
[ withMuzFlareI
|
||||
[ withFlare
|
||||
, withThinSmokeI
|
||||
, withSoundStart bangEchoS
|
||||
, rateIncAB (torqueBeforeAtLeast 0.1 0.1) withTorqueAfter
|
||||
@@ -212,7 +215,7 @@ useMod hm = case hm of
|
||||
, withSoundItemChoiceStart bangStickSoundChoice
|
||||
, duplicateLoadedBarrels
|
||||
, withTorqueAfter
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, useTimeCheck
|
||||
, ammoCheckI
|
||||
, blCheck
|
||||
@@ -220,7 +223,7 @@ useMod hm = case hm of
|
||||
PistolMod ->
|
||||
[ withSidePushI 50
|
||||
, withRecoil
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, withTorqueAfter
|
||||
, duplicateLoadedBarrels
|
||||
, withSoundStart tap3S
|
||||
@@ -230,7 +233,7 @@ useMod hm = case hm of
|
||||
, blCheck
|
||||
]
|
||||
AutoPistolMod ->
|
||||
[ withMuzFlareI
|
||||
[ withFlare
|
||||
, withSidePushI 50
|
||||
, withRecoil
|
||||
, withTorqueAfter
|
||||
@@ -241,7 +244,7 @@ useMod hm = case hm of
|
||||
, ammoCheckI
|
||||
]
|
||||
MachinePistolMod ->
|
||||
[ withMuzFlareI
|
||||
[ withFlare
|
||||
, withRecoil
|
||||
, withSidePushI 50
|
||||
, withTorqueAfter
|
||||
@@ -253,7 +256,7 @@ useMod hm = case hm of
|
||||
]
|
||||
BurstRifleMod ->
|
||||
[ withRecoil
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, duplicateLoadedBarrels
|
||||
, useAmmoAmount 1
|
||||
, withSoundStart tap3S
|
||||
@@ -266,7 +269,7 @@ useMod hm = case hm of
|
||||
]
|
||||
BurstRifleRepeatMod ->
|
||||
[ withRecoil
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, duplicateLoadedBarrels
|
||||
, useAmmoAmount 1
|
||||
, withSoundStart tap3S
|
||||
@@ -274,23 +277,23 @@ useMod hm = case hm of
|
||||
, ammoCheckI
|
||||
]
|
||||
MiniGunMod i ->
|
||||
reverse [ trigDoAlso' (moddelay x) (modcrpos x) useAmmoParams
|
||||
| x <- map ((/ fromIntegral i) . fromIntegral) [1 .. i -1]
|
||||
]
|
||||
<>
|
||||
[ afterRecoil (fromIntegral i * 5)
|
||||
[ duplicateNumBarrels 1
|
||||
, repeatTransformed
|
||||
[ (moddelay x, modcrpos x)
|
||||
| x <- map ((/ (fromIntegral i - 1)) . fromIntegral) [0 .. i -1]
|
||||
]
|
||||
, afterRecoil (fromIntegral i * 5)
|
||||
, torqueBefore (fromIntegral i * 0.05)
|
||||
, withSidePushI (fromIntegral i * 50)
|
||||
, withSidePushI (fromIntegral i * 25)
|
||||
, withMuzFlare
|
||||
, withSmoke 1 black 20 200 5
|
||||
, useAmmoAmount i
|
||||
, withMuzFlareI
|
||||
, withSmoke 1 black 20 200 5
|
||||
--, withThinSmokeI
|
||||
, withSoundForI mini1S 2
|
||||
, withWarmUp crankSlowS
|
||||
, ammoCheckI
|
||||
]
|
||||
SmgMod ->
|
||||
[ withMuzFlareI
|
||||
[ withFlare
|
||||
, withSidePushI 30
|
||||
, withRecoil
|
||||
, withTorqueAfter
|
||||
@@ -303,26 +306,25 @@ useMod hm = case hm of
|
||||
RevolverXMod ->
|
||||
[ withRecoil
|
||||
, withTorqueAfter
|
||||
-- , spreadLoaded
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, duplicateLoadedBarrels
|
||||
, useAmmoUpTo 1
|
||||
, withSoundStart tap3S
|
||||
, repeatOnFrames [2, 4, 6, 8, 10] RevolverXRepeatMod
|
||||
, lockInvFor 10
|
||||
-- rather than locking the inventory, a better solution may be to check
|
||||
, lockInvFor 10
|
||||
, -- 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
|
||||
useTimeCheck
|
||||
, ammoCheckI
|
||||
, blCheck
|
||||
]
|
||||
RevolverXRepeatMod ->
|
||||
[ withRecoil
|
||||
, withTorqueAfter
|
||||
, withMuzFlareI
|
||||
, withFlare
|
||||
, duplicateLoadedBarrels
|
||||
, useAmmoUpTo 1
|
||||
, withSoundStart tap3S
|
||||
, withSoundStart tap3S
|
||||
, ammoCheckI
|
||||
]
|
||||
BangConeMod ->
|
||||
@@ -331,7 +333,7 @@ useMod hm = case hm of
|
||||
, withRandomOffset
|
||||
, duplicateLoadedBarrels
|
||||
, duplicateLoaded
|
||||
, withMuzFlareI
|
||||
, withMuzFlare
|
||||
, withRecoil
|
||||
, withTorqueAfter
|
||||
, useAllAmmo
|
||||
|
||||
Reference in New Issue
Block a user