Continue weapon refactor, gas combinations

This commit is contained in:
2024-09-19 09:49:56 +01:00
parent 6f972bb316
commit bb18831393
21 changed files with 489 additions and 379 deletions
+14
View File
@@ -87,6 +87,20 @@ battery =
}
}
chemFuelPouch :: Item
chemFuelPouch =
defaultHeldItem & itType . iyBase .~ AMMOMAG CHEMFUELPOUCH
& itUse
.~ AmmoMagUse
{ _amagParams = GasParams ChemFuel
, _amagType = GasAmmo
, _amagLoadStatus =
ReloadStatus
{ _iaMax = 1000
, _iaLoaded = 1000
}
}
bulletSynthesizer :: Item
bulletSynthesizer = defaultHeldItem
& itType . iyBase .~ ATTACH BULLETSYNTHESIZER
+3 -3
View File
@@ -22,7 +22,7 @@ sparkGun =
teslaGun :: Item
teslaGun =
defaultBatteryGun
& itUse . heldParams .~ BeamShooterParams (elecCrackleS,2)
& itUse . heldParams .~ BeamShooterParams (Just (elecCrackleS,2))
& itDimension . dimRad .~ 9
& itDimension . dimCenter .~ V3 4 0 0
& itParams .~ teslaParams
@@ -42,7 +42,7 @@ lasGun =
defaultHeldItem
& itType . iyModules .~ batteryModules
& itUse . heldMods .~ PistolMod
& itUse . heldParams .~ BeamShooterParams (tone440sawtoothquietS,2)
& itUse . heldParams .~ BeamShooterParams (Just (tone440sawtoothquietS,2))
& itUse . heldAmmoTypes .~ singleAmmo ElectricalAmmo
& itUse . heldDelay .~ NoDelay
& itUse . heldTriggerType .~ AutoTrigger
@@ -88,7 +88,7 @@ tractorGun =
-- & itUse . heldUse .~ HeldTractor --aTractorBeam
& itUse . heldDelay .~ NoDelay
-- & itUse . heldMods .~ AmmoCheckMod
& itUse . heldMods .~ TractorMod
-- & itUse . heldMods .~ TractorMod
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0 0 DefaultFlareType MuzzleTractor]
+1 -1
View File
@@ -94,7 +94,7 @@ miniGunX i =
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
& itUse . heldAmmoTypes .~ singleAmmo BeltBulletAmmo
& itUse . heldParams . bulGunSound .~ (mini1S,2)
& itUse . heldParams . bulGunSound ?~ (mini1S,2)
& itUse . heldAim . aimTurnSpeed .~ 0.5
& itUse . heldAim . aimMuzzles
.~ replicate i (Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet)
+1 -1
View File
@@ -23,7 +23,7 @@ bangCone =
& itUse . heldParams . recoil .~ 150
& itUse . heldParams . torqueAfter .~ 0.1
& itUse . heldParams . randomOffset .~ 12
& itUse . heldParams . bulGunSound .~ (bangEchoS,0)
& itUse . heldParams . bulGunSound ?~ (bangEchoS,0)
& itType . iyBase .~ HELD BANGCONE
blunderbuss :: Item
+1 -1
View File
@@ -42,7 +42,7 @@ launcher =
& itUse . heldParams . rifling .~ ConstFloat 0
& itUse . heldParams . recoil .~ 0
& itUse . heldParams . torqueAfter .~ 0
& itUse . heldParams . bulGunSound .~ (tap4S, 0)
& itUse . heldParams . bulGunSound ?~ (tap4S, 0)
launcherX :: Int -> Item
launcherX i =
+1 -1
View File
@@ -21,7 +21,7 @@ bangRod =
& itUse . heldParams . rifling .~ ConstFloat 1
& itUse . heldParams . recoil .~ 50
& itUse . heldParams . torqueAfter .~ 0.3
& itUse . heldParams . bulGunSound .~ (bangEchoS,0)
& itUse . heldParams . bulGunSound ?~ (bangEchoS,0)
& itUse . heldDelay . rateMax .~ 12
& itDimension . dimRad .~ 12
& itDimension . dimCenter .~ V3 5 0 0
+47 -37
View File
@@ -7,6 +7,7 @@ module Dodge.Item.Held.SprayGuns (
flameWall,
) where
import Dodge.SoundLogic.ExternallyGeneratedSounds
import Dodge.Data.Item
import Dodge.Default.Item
--import Dodge.Reloading.Action
@@ -18,14 +19,19 @@ poisonSprayer =
flameThrower
& itType . iyBase .~ HELD POISONSPRAYER
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
& itUse . heldParams .~ GasSprayParams CreatePoisonGas --aGasCloud
& itUse . heldMods .~ PoisonSprayerMod
-- & itUse . heldMods .~ PoisonSprayerMod
& itUse . heldParams . gasCreation .~ CreatePoisonGas --aGasCloud
& itUse . heldParams . recoil .~ 0
& itUse . heldParams . torqueAfter .~ 0
& itUse . heldParams . randomOffset .~ 0
& itUse . heldParams . sidePush .~ 0
& itUse . heldParams . bulGunSound ?~ (foamSprayLoopS,5)
flameSpitter :: Item
flameSpitter =
flameThrower
& itType . iyBase .~ HELD FLAMESPITTER
& itParams . sprayNozzles . ix 0 . nzPressure .~ 4
-- & itParams . sprayNozzles . ix 0 . nzPressure .~ 4
& itUse . heldAim . aimStance .~ OneHand
& itUse . heldDelay .~ FixedRate{_rateMax = 12, _rateTime = 0}
& itUse . heldMods .~ FlameSpitterMod
@@ -35,11 +41,11 @@ flameTorrent =
flameThrower
& itType . iyBase .~ HELD FLAMETORRENT
& itUse . heldAim . aimZoom .~ defaultItZoom
& itParams . sprayNozzles . ix 0
%~ ( (nzPressure .~ 10)
. (nzMaxWalkAngle .~ 1.5)
. (nzWalkSpeed .~ 0.05)
)
-- & itParams . sprayNozzles . ix 0
-- %~ ( (nzPressure .~ 10)
-- . (nzMaxWalkAngle .~ 1.5)
-- . (nzWalkSpeed .~ 0.05)
-- )
blowTorch :: Item
blowTorch =
@@ -50,45 +56,49 @@ flameWall :: Item
flameWall =
flameThrower
& itType . iyBase .~ HELD FLAMEWALL
& itParams . sprayNozzles .~ zipWith makeNozzle [0, 0.6, -0.6] [2, 2.5, 2.5]
where
makeNozzle dir pres =
Nozzle
{ _nzPressure = pres
, _nzDir = dir
, _nzMaxWalkAngle = 0
, _nzWalkSpeed = 0
, _nzCurrentWalkAngle = 0
, _nzLength = 20
}
-- & itParams . sprayNozzles .~ zipWith makeNozzle [0, 0.6, -0.6] [2, 2.5, 2.5]
-- where
-- makeNozzle dir pres =
-- Nozzle
-- { _nzPressure = pres
-- , _nzDir = dir
-- , _nzMaxWalkAngle = 0
-- , _nzWalkSpeed = 0
-- , _nzCurrentWalkAngle = 0
-- , _nzLength = 20
-- }
flameThrower :: Item
flameThrower =
defaultHeldItem
{ _itParams =
Sprayer
{ _sprayNozzles =
[ Nozzle
{ _nzPressure = 4
, _nzDir = 0
, _nzMaxWalkAngle = 0.2
, _nzWalkSpeed = 0.01
, _nzCurrentWalkAngle = 0
, _nzLength = 10
}
]
}
}
& itParams .~ NoParams
& itDimension . dimRad .~ 7
& itDimension . dimCenter .~ V3 9 0 0
-- & itUse . heldUse .~ HeldOverNozzlesUseGasParams -- overNozzles useGasParams
& itUse . heldDelay .~ NoDelay
& itUse . heldMods .~ FlameThrowerMod
-- & itUse . heldMods .~ FlameThrowerMod
& itUse . heldMods .~ PistolMod
& itUse . heldAim . aimWeight .~ 5
& 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 DefaultFlareType MuzzleFlame]
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0 0 DefaultFlareType
MuzzleNozzle
{ _nzPressure = ConstFloat 4
, _nzMaxWalkAngle = 0.2
, _nzWalkSpeed = 0.01
, _nzCurrentWalkAngle = 0
}
]
& itUse . heldAmmoTypes .~ singleAmmo GasAmmo
& itType . iyBase .~ HELD FLAMETHROWER
& itUse . heldParams .~ GasSprayParams CreateFlame --aGasCloud
& itUse . heldParams .~ GasSprayParams
{_gasCreation = CreateFlame
, _recoil = 0
, _torqueAfter = 0
, _randomOffset = 0
, _sidePush = 25
, _bulGunSound = Nothing
, _weaponInvLock = 0
, _weaponRepeat = mempty
}
& itUse . heldTriggerType .~ AutoTrigger
+1 -1
View File
@@ -55,7 +55,7 @@ autoPistol =
pistol
& itUse . heldMods .~ PistolMod
& itUse . heldTriggerType .~ AutoTrigger
& itUse . heldParams . bulGunSound .~ (tap1S,0)
& itUse . heldParams . bulGunSound ?~ (tap1S,0)
& itType . iyBase .~ HELD AUTOPISTOL
& itType . iyModules . at ModAutoMag ?~ EMPTYMODULE