Partial refactor of bullet weapon effect chain
This commit is contained in:
@@ -30,13 +30,13 @@ teslaGun =
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
-- & itUse . heldAim . aimMuzPos .~ 4
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 4 0) 0 0 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 4 0) 0 0 0 DefaultFlareType]
|
||||
& itType . iyBase .~ HELD TESLAGUN
|
||||
|
||||
lasGun :: Item
|
||||
lasGun =
|
||||
defaultAutoBatteryGun
|
||||
& itUse . heldAmmoTypes .~ [ElectricalAmmo]
|
||||
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
||||
& itParams
|
||||
.~ Refracting
|
||||
{ _phaseV = 1
|
||||
@@ -59,7 +59,7 @@ lasGun =
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
-- & itUse . heldAim . aimMuzPos .~ 30
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0 0 DefaultFlareType]
|
||||
& itType . iyBase .~ HELD LASGUN
|
||||
|
||||
lasGunTweak :: TweakParam
|
||||
@@ -84,7 +84,7 @@ tractorGun =
|
||||
& itUse . heldMods .~ TractorMod
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0 0 DefaultFlareType]
|
||||
& itType . iyBase .~ HELD TRACTORGUN
|
||||
|
||||
tractorGunTweak :: TweakParam
|
||||
@@ -102,7 +102,7 @@ lasWide n =
|
||||
& itParams . lasColor .~ yellow
|
||||
& itParams . lasDamage .~ 2
|
||||
& itUse . heldMods .~ LasWideMod n
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 y) 0 0 0 | y <- spreadFromCenter n 1]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 y) 0 0 0 DefaultFlareType | y <- spreadFromCenter n 1]
|
||||
|
||||
defaultBatteryGun :: Item
|
||||
defaultBatteryGun =
|
||||
@@ -137,7 +137,7 @@ dualBeam :: Item
|
||||
dualBeam =
|
||||
lasGun
|
||||
& itType . iyBase .~ HELD DUALBEAM
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0 0 DefaultFlareType]
|
||||
& itParams
|
||||
.~ DualBeam
|
||||
{ _phaseV = 1
|
||||
|
||||
@@ -8,6 +8,7 @@ module Dodge.Item.Held.Cane (
|
||||
miniGunX,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Dodge.Base
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default
|
||||
@@ -25,6 +26,8 @@ defaultBangCane =
|
||||
, _recoil = 50
|
||||
, _torqueAfter = 0.1
|
||||
, _randomOffset = 0
|
||||
, _sidePush = 0
|
||||
, _bulGunSound = tap3S
|
||||
}
|
||||
& itDimension . dimRad .~ 8
|
||||
& itDimension . dimCenter .~ V3 5 0 0
|
||||
@@ -32,7 +35,7 @@ defaultBangCane =
|
||||
& itUse . heldMods .~ BangCaneMod
|
||||
& itUse . heldAim . aimStance .~ OneHand
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0 DefaultFlareType]
|
||||
|
||||
volleyGun :: Int -> Item
|
||||
volleyGun i =
|
||||
@@ -43,7 +46,7 @@ volleyGun i =
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& itUse . heldAim . aimMuzzles .~
|
||||
([Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] <*> [0..])
|
||||
([Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] <*> [0..] <*> repeat DefaultFlareType)
|
||||
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||
& itType . iyBase .~ HELD (VOLLEYGUN i)
|
||||
|
||||
@@ -56,7 +59,7 @@ multiGun i =
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& itUse . heldAim . aimMuzzles .~
|
||||
([Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] <*> [0..])
|
||||
([Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] <*> [0..] <*> repeat DefaultFlareType)
|
||||
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||
& itType . iyBase .~ HELD (MULTIGUN i)
|
||||
|
||||
@@ -68,7 +71,7 @@ rifle =
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 25 0) 0 0.01 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 25 0) 0 0.01 0 DefaultFlareType]
|
||||
& itType . iyModules . at ModHeldAttach ?~ EMPTYMODULE
|
||||
|
||||
repeater :: Item
|
||||
@@ -103,14 +106,14 @@ miniGunUse i =
|
||||
& heldAim . aimRange .~ 1
|
||||
& heldAim . aimStance .~ TwoHandUnder
|
||||
& heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& heldAmmoTypes .~ [BeltBulletAmmo]
|
||||
& heldAmmoTypes .~ singleAmmo BeltBulletAmmo
|
||||
|
||||
miniGunX :: Int -> Item
|
||||
miniGunX i =
|
||||
autoRifle
|
||||
& itUse .~ miniGunUse i
|
||||
& itUse . heldAim . aimTurnSpeed .~ 0.5
|
||||
& itUse . heldAim . aimMuzzles .~ replicate i (Muzzle (V2 30 0) 0 0.05 0)
|
||||
& itUse . heldAim . aimMuzzles .~ replicate i (Muzzle (V2 30 0) 0 0.05 0 DefaultFlareType)
|
||||
& itUse . heldParams . recoil .~ 10
|
||||
& itUse . heldParams . torqueAfter .~ 0.01
|
||||
& itUse . heldParams . randomOffset .~ 10
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module Dodge.Item.Held.Cone where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Control.Lens
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default.Item
|
||||
@@ -15,13 +16,15 @@ bangCone =
|
||||
& itUse . heldDelay . rateMax .~ 20
|
||||
& itUse . heldMods .~ BangConeMod
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.5 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.5 0 DefaultFlareType]
|
||||
& itUse . heldParams .~ BulletShooterParams
|
||||
{ _muzVel = 0.7
|
||||
, _rifling = 0.8
|
||||
, _recoil = 150
|
||||
, _torqueAfter = 0.1
|
||||
, _randomOffset = 12
|
||||
, _sidePush = 0
|
||||
, _bulGunSound = bangEchoS
|
||||
}
|
||||
& itType . iyBase .~ HELD BANGCONE
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ launcher =
|
||||
& itUse . heldAim . aimStance .~ TwoHandOver
|
||||
-- & itUse . heldAim . aimHandlePos .~ V2 3 0
|
||||
-- & itUse . heldAim . aimMuzPos .~ 20
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0 0]
|
||||
& itUse . heldAmmoTypes .~ [ProjectileAmmo]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0 0 DefaultFlareType]
|
||||
& itUse . heldAmmoTypes .~ singleAmmo ProjectileAmmo
|
||||
& itType . iyBase .~ HELD LAUNCHER
|
||||
& itType . iyModules . at ModLauncherHoming ?~ EMPTYMODULE
|
||||
|
||||
@@ -42,7 +42,7 @@ launcherX i =
|
||||
& itType . iyBase .~ HELD (LAUNCHERX i)
|
||||
-- & itUse . heldUse .~ HeldPJCreationX i
|
||||
& itUse . heldMods .~ LauncherXMod i
|
||||
& itUse . heldAim . aimMuzzles .~ ([Muzzle (V2 20 0) a 0 | a <- angles] <*> [0..])
|
||||
& itUse . heldAim . aimMuzzles .~ ([Muzzle (V2 20 0) a 0 | a <- angles] <*> [0..] <*> [DefaultFlareType])
|
||||
where
|
||||
angles = take i [0,2*pi/ fromIntegral i ..]
|
||||
--angles = take i [1,2 ..]
|
||||
|
||||
@@ -7,6 +7,7 @@ module Dodge.Item.Held.Rod (
|
||||
machineGun,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default
|
||||
--import Dodge.Item.Weapon.Bullet
|
||||
@@ -24,6 +25,8 @@ bangRod =
|
||||
, _recoil = 50
|
||||
, _torqueAfter = 0.3
|
||||
, _randomOffset = 0
|
||||
, _sidePush = 0
|
||||
, _bulGunSound = bangEchoS
|
||||
}
|
||||
& itUse . heldDelay . rateMax .~ 12
|
||||
& itUse . heldMods .~ BangRodMod
|
||||
@@ -35,7 +38,7 @@ bangRod =
|
||||
& itUse . heldAim . aimStance .~ OneHand
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0.1 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0.1 0 DefaultFlareType]
|
||||
-- & itUse . heldConsumption . laAmmoType .~ hvBulletAmmo
|
||||
|
||||
elephantGun :: Item
|
||||
|
||||
@@ -17,7 +17,7 @@ poisonSprayer :: Item
|
||||
poisonSprayer =
|
||||
flameThrower
|
||||
& itType . iyBase .~ HELD POISONSPRAYER
|
||||
& itUse . heldAmmoTypes .~ [GasAmmo]
|
||||
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
|
||||
& itUse . heldParams .~ GasSprayParams CreatePoisonGas --aGasCloud
|
||||
& itUse . heldMods .~ PoisonSprayerMod
|
||||
|
||||
@@ -88,7 +88,7 @@ flameThrower =
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5}
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
-- & itUse . heldAim . aimHandlePos .~ 0
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0 0]
|
||||
& itUse . heldAmmoTypes .~ [GasAmmo]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0 0 DefaultFlareType]
|
||||
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
|
||||
& itType . iyBase .~ HELD FLAMETHROWER
|
||||
& itUse . heldParams .~ GasSprayParams CreateFlame --aGasCloud
|
||||
|
||||
@@ -6,6 +6,7 @@ module Dodge.Item.Held.Stick (
|
||||
smg,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Dodge.Base
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default.Item
|
||||
@@ -23,6 +24,8 @@ bangStick i =
|
||||
, _recoil = 25
|
||||
, _torqueAfter = 0.18 + 0.02 * fromIntegral i
|
||||
, _randomOffset = 0
|
||||
, _sidePush = 0
|
||||
, _bulGunSound = tap3S
|
||||
}
|
||||
& itType . iyBase .~ HELD (BANGSTICK i)
|
||||
& itInvSize .~ fromIntegral i / 3
|
||||
@@ -30,7 +33,8 @@ bangStick i =
|
||||
& itDimension . dimCenter .~ V3 5 0 0
|
||||
& itUse . heldDelay . rateMax .~ 8
|
||||
& itUse . heldMods .~ BangStickMod
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 10 0) a 0.01 0 | a <- spreadAroundCenter i baseStickSpread]
|
||||
& itUse . heldAim . aimMuzzles
|
||||
.~ [Muzzle (V2 10 0) a 0.01 0 DefaultFlareType | a <- spreadAroundCenter i baseStickSpread]
|
||||
|
||||
baseStickSpread :: Float
|
||||
baseStickSpread = 0.2
|
||||
@@ -38,15 +42,16 @@ baseStickSpread = 0.2
|
||||
pistol :: Item
|
||||
pistol =
|
||||
bangStick 1
|
||||
& itUse . heldAmmoTypes .~ [BulletAmmo]
|
||||
-- & itUse . heldAmmoTypes .~ [BulletAmmo]
|
||||
& itUse . heldDelay . rateMax .~ 6
|
||||
& itUse . heldMods .~ PistolMod
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 10 0) 0 0.05 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 10 0) 0 0.05 0 DefaultFlareType]
|
||||
& itUse . heldParams
|
||||
%~ ( (muzVel .~ 0.8)
|
||||
. (rifling .~ 0.8)
|
||||
. (recoil .~ 10)
|
||||
. (torqueAfter .~ 0.2)
|
||||
. (sidePush .~ 50)
|
||||
)
|
||||
& itType . iyBase .~ HELD PISTOL
|
||||
|
||||
@@ -72,6 +77,6 @@ smg =
|
||||
& itUse . heldMods .~ SmgMod --(ammoCheckI : smgAfterHamMods)
|
||||
& itType . iyBase .~ HELD SMG
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0 0]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0 0 DefaultFlareType]
|
||||
-- & itUse . heldAim . aimHandlePos .~ 2
|
||||
& itUse . heldParams . torqueAfter .~ 0.05
|
||||
|
||||
@@ -44,7 +44,7 @@ forceFieldGun =
|
||||
-- than the list below
|
||||
--[ hammerCheckI , ammoCheckI , useAmmoAmount 1]
|
||||
& itType . iyBase .~ HELD FORCEFIELDGUN
|
||||
& itUse . heldAmmoTypes .~ [ElectricalAmmo]
|
||||
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
|
||||
|
||||
{- |
|
||||
Sends out pulses that display walls.
|
||||
|
||||
Reference in New Issue
Block a user