Continue weapon effect chain refactor
This commit is contained in:
@@ -170,7 +170,7 @@ heldItemSPic ht it = case ht of
|
||||
VOLLEYGUN i -> noPic $ volleyGunShape i -- <> addBullets it
|
||||
MULTIGUN i -> noPic $ volleyGunShape i -- <> addBullets it
|
||||
RIFLE -> noPic $ baseRifleShape -- <> addBullets it
|
||||
REPEATER -> noPic $ baseRifleShape <> addTinClip it
|
||||
-- REPEATER -> noPic $ baseRifleShape <> addTinClip it
|
||||
AUTORIFLE -> noPic $ baseRifleShape <> addTinClip it
|
||||
BURSTRIFLE -> noPic $ baseRifleShape <> addTinClip it
|
||||
BANGROD -> noPic $ baseRodShape -- <> addBullets it
|
||||
|
||||
@@ -39,7 +39,7 @@ itemFromHeldType ht = case ht of
|
||||
VOLLEYGUN i -> volleyGun i
|
||||
MULTIGUN i -> multiGun i
|
||||
RIFLE -> rifle
|
||||
REPEATER -> repeater
|
||||
-- REPEATER -> repeater
|
||||
AUTORIFLE -> autoRifle
|
||||
BURSTRIFLE -> burstRifle
|
||||
BANGROD -> bangRod
|
||||
|
||||
+16
-14
@@ -1,7 +1,6 @@
|
||||
module Dodge.Item.Held.Cane (
|
||||
volleyGun,
|
||||
multiGun,
|
||||
repeater,
|
||||
rifle,
|
||||
autoRifle,
|
||||
burstRifle,
|
||||
@@ -12,6 +11,7 @@ import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Dodge.Base
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
--import Dodge.Reloading.Action
|
||||
import Geometry.Data
|
||||
import LensHelp
|
||||
@@ -32,23 +32,24 @@ defaultBangCane =
|
||||
& itDimension . dimRad .~ 8
|
||||
& itDimension . dimCenter .~ V3 5 0 0
|
||||
& itUse . heldDelay . rateMax .~ 6
|
||||
& itUse . heldMods .~ BangCaneMod
|
||||
-- & itUse . heldMods .~ BangCaneMod
|
||||
& itUse . heldAim . aimStance .~ OneHand
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0 DefaultFlareType]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01 0 PistolFlare]
|
||||
|
||||
volleyGun :: Int -> Item
|
||||
volleyGun i =
|
||||
defaultBangCane
|
||||
& itUse . heldMods .~ VolleyGunMod
|
||||
-- & itUse . heldMods .~ VolleyGunMod
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& 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..] <*> repeat DefaultFlareType)
|
||||
take i ([Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3] <*> [0..] <*> repeat PistolFlare)
|
||||
& itUse . heldParams . torqueAfter .~ 0.15 + 0.05 * fromIntegral i
|
||||
& itType . iyBase .~ HELD (VOLLEYGUN i)
|
||||
& itUse . heldAmmoTypes .~ IM.fromList (zip [0..i-1] $ repeat BulletAmmo)
|
||||
|
||||
multiGun :: Int -> Item
|
||||
multiGun i =
|
||||
@@ -71,26 +72,27 @@ 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 DefaultFlareType]
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 25 0) 0 0.01 0 PistolFlare]
|
||||
& itType . iyModules . at ModHeldAttach ?~ EMPTYMODULE
|
||||
|
||||
repeater :: Item
|
||||
repeater =
|
||||
rifle
|
||||
& itType . iyModules . at ModRifleMag ?~ EMPTYMODULE
|
||||
& itType . iyBase .~ HELD REPEATER
|
||||
--repeater :: Item
|
||||
--repeater =
|
||||
-- rifle
|
||||
-- & itType . iyModules . at ModRifleMag ?~ EMPTYMODULE
|
||||
-- & itType . iyBase .~ HELD REPEATER
|
||||
|
||||
autoRifle :: Item
|
||||
autoRifle =
|
||||
repeater
|
||||
rifle
|
||||
& itType . iyBase .~ HELD AUTORIFLE
|
||||
& itUse . heldMods .~ AutoRifleMod
|
||||
& itUse . heldTriggerType .~ AutoTrigger
|
||||
-- & itUse . heldMods .~ AutoRifleMod
|
||||
& itType . iyModules . at ModAutoMag ?~ EMPTYMODULE
|
||||
|
||||
-- & itUse . useDelay . rateMax .~ 6
|
||||
burstRifle :: Item
|
||||
burstRifle =
|
||||
repeater
|
||||
rifle
|
||||
& itType . iyBase .~ HELD BURSTRIFLE
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
||||
& itUse . heldDelay . rateMax .~ 18
|
||||
|
||||
@@ -45,7 +45,9 @@ pistol =
|
||||
-- & itUse . heldAmmoTypes .~ [BulletAmmo]
|
||||
& itUse . heldDelay . rateMax .~ 6
|
||||
& itUse . heldMods .~ PistolMod
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 10 0) 0 0.05 0 DefaultFlareType]
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos %~ const (V2 10 0)
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy %~ const 0.05
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType %~ const PistolFlare
|
||||
& itUse . heldParams
|
||||
%~ ( (muzVel .~ 0.8)
|
||||
. (rifling .~ 0.8)
|
||||
@@ -58,7 +60,9 @@ pistol =
|
||||
autoPistol :: Item
|
||||
autoPistol =
|
||||
pistol
|
||||
& itUse . heldMods .~ AutoPistolMod
|
||||
& itUse . heldMods .~ PistolMod
|
||||
& itUse . heldTriggerType .~ AutoTrigger
|
||||
& itUse . heldParams . bulGunSound .~ tap1S
|
||||
& itType . iyBase .~ HELD AUTOPISTOL
|
||||
& itType . iyModules . at ModAutoMag ?~ EMPTYMODULE
|
||||
|
||||
@@ -66,7 +70,7 @@ machinePistol :: Item
|
||||
machinePistol =
|
||||
autoPistol
|
||||
& itUse . heldDelay . rateMax .~ 2
|
||||
& itUse . heldMods .~ MachinePistolMod -- (ammoCheckI : machinePistolAfterHamMods)
|
||||
& itUse . heldMods .~ PistolMod -- (ammoCheckI : machinePistolAfterHamMods)
|
||||
& itType . iyBase .~ HELD MACHINEPISTOL
|
||||
& itType . iyModules . at ModAutoMag .~ Nothing
|
||||
& itUse . heldParams . recoil .~ 20
|
||||
@@ -74,9 +78,11 @@ machinePistol =
|
||||
smg :: Item
|
||||
smg =
|
||||
autoPistol -- & some parameter affecting stability
|
||||
& itUse . heldMods .~ SmgMod --(ammoCheckI : smgAfterHamMods)
|
||||
& itUse . heldMods .~ PistolMod --(ammoCheckI : smgAfterHamMods)
|
||||
& itType . iyBase .~ HELD SMG
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0 0 DefaultFlareType]
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
-- & itUse . heldAim . aimHandlePos .~ 2
|
||||
& itUse . heldParams . torqueAfter .~ 0.05
|
||||
& itUse . heldParams . sidePush .~ 30
|
||||
|
||||
@@ -74,7 +74,7 @@ heldInfo hit = case hit of
|
||||
VOLLEYGUN i -> over _head toUpper (showInt i) ++ " gun barrels lined up to be roughly parallel. Draws bullets from a single magazine. All loaded barrels discharge simultaneously."
|
||||
MULTIGUN i -> over _head toUpper (showInt i) ++ " gun barrels lined up to be roughly parallel. Each barrel requires a separate magazine. All barrels must be loaded to fire."
|
||||
RIFLE -> "A firearm with a mid length barrel that requires reloading after each shot."
|
||||
REPEATER -> "A firearm fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
||||
-- REPEATER -> "A firearm fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
||||
AUTORIFLE -> "A firearm automatically fed by a magazine. The entire magazine must be replaced when reloading the weapon."
|
||||
BURSTRIFLE -> "A firearm that rapidly fires three projectiles from its magazine. The entire magazine must be replaced when reloading the weapon."
|
||||
BANGROD -> "A firearm with a long barrel that requires reloading after each shot."
|
||||
|
||||
@@ -38,7 +38,7 @@ heldBounds hit = case hit of
|
||||
VOLLEYGUN _ -> undefined
|
||||
MULTIGUN _ -> undefined
|
||||
RIFLE -> rs
|
||||
REPEATER -> rs
|
||||
-- REPEATER -> rs
|
||||
AUTORIFLE -> rs
|
||||
BURSTRIFLE -> rs
|
||||
BANGROD -> amrs
|
||||
|
||||
Reference in New Issue
Block a user