Make aimStance record into function
This commit is contained in:
@@ -23,7 +23,6 @@ teslaGun =
|
||||
& itParams .~ teslaParams
|
||||
& itUse . heldDelay .~ NoDelay
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 10 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
||||
@@ -61,7 +60,6 @@ laser =
|
||||
}
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itType .~ HELD LASER
|
||||
|
||||
-- previous attractionPower values: 1, -1, -10, 0
|
||||
@@ -75,7 +73,6 @@ tractorGun =
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ NoFlare
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor
|
||||
& itType .~ HELD TRACTORGUN
|
||||
|
||||
@@ -25,7 +25,6 @@ defaultBangCane =
|
||||
& itUse . heldParams . torqueAfter .~ 0.1
|
||||
& itUse . heldDelay . rateMax .~ 6
|
||||
-- & itUse . heldMods .~ BangCaneMod
|
||||
& itUse . heldAim . aimStance .~ OneHand
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
|
||||
volleyGun :: Int -> Item
|
||||
@@ -33,7 +32,6 @@ volleyGun i =
|
||||
defaultBangCane
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& itUse . heldAim . aimMuzzles .~ getZipList
|
||||
(ZipList [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 6]
|
||||
@@ -54,7 +52,6 @@ volleyGun i =
|
||||
rifle :: Item
|
||||
rifle =
|
||||
defaultBangCane
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itType .~ HELD RIFLE
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
@@ -100,7 +97,7 @@ miniGunX i =
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
& itAmmoSlots .~ singleAmmo BeltBulletAmmo
|
||||
& itUse . heldParams . bulGunSound ?~ (mini1S,2)
|
||||
-- & itUse . heldParams . bulGunSound ?~ (mini1S,2)
|
||||
& itUse . heldAim . aimTurnSpeed .~ 0.5
|
||||
& itUse . heldAim . aimMuzzles
|
||||
.~ replicate i
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
module Dodge.Item.Held.Cone where
|
||||
module Dodge.Item.Held.Cone (
|
||||
bangCone,
|
||||
blunderbuss,
|
||||
grapeCannon,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Control.Lens
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default.Item
|
||||
--import Dodge.Reloading.Action
|
||||
import Geometry.Data
|
||||
import Linear
|
||||
|
||||
@@ -12,22 +14,20 @@ bangCone :: Item
|
||||
bangCone =
|
||||
defaultBulletWeapon
|
||||
& itUse . heldDelay . rateMax .~ 20
|
||||
& itUse . heldAim . aimMuzzles
|
||||
.~ replicate 15
|
||||
(Muzzle (V2 15 0) 0 0.5 0 NoFlare MuzzleShootBullet (UseExactly 1) 0)
|
||||
& itUse . heldAim . aimMuzzles
|
||||
.~ replicate
|
||||
15
|
||||
(Muzzle (V2 15 0) 0 0.5 0 NoFlare MuzzleShootBullet (UseExactly 1) 0)
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ BasicFlare
|
||||
& itUse . heldParams . muzVel .~ UniRandFloat 0.5 0.8
|
||||
& itUse . heldParams . rifling .~ UniRandFloat 0.3 0.8
|
||||
-- & itUse . heldParams . recoil .~ 150
|
||||
& itUse . heldParams . torqueAfter .~ 0.1
|
||||
& itUse . heldParams . randomOffset .~ 12
|
||||
& itUse . heldParams . bulGunSound ?~ (bangEchoS,0)
|
||||
& itType .~ HELD BANGCONE
|
||||
|
||||
blunderbuss :: Item
|
||||
blunderbuss =
|
||||
bangCone
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimWeight .~ 6
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 30
|
||||
@@ -37,6 +37,5 @@ grapeCannon :: Int -> Item
|
||||
grapeCannon i =
|
||||
blunderbuss
|
||||
& itType .~ HELD (GRAPECANNON i)
|
||||
-- & itUse . heldParams . recoil .~ (150 + fromIntegral i * 50)
|
||||
& itUse . heldParams . torqueAfter .~ (0.1 + 0.2 * fromIntegral i)
|
||||
& itUse . heldParams . randomOffset .~ (12 + 4 * fromIntegral i)
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
module Dodge.Item.Held.Launcher where
|
||||
module Dodge.Item.Held.Launcher (
|
||||
rLauncher,
|
||||
rLauncherX,
|
||||
gLauncher,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Control.Applicative
|
||||
import Dodge.Default.Item
|
||||
--import Dodge.Reloading.Action
|
||||
import Control.Lens
|
||||
import Dodge.Data.Item
|
||||
import qualified IntMapHelp as IM
|
||||
import Dodge.Default.Item
|
||||
import Geometry.Data
|
||||
import qualified IntMapHelp as IM
|
||||
|
||||
rLauncher :: Item
|
||||
rLauncher =
|
||||
@@ -15,7 +17,6 @@ rLauncher =
|
||||
& itUse . heldDelay . rateMax .~ 20
|
||||
& itUse . heldAim . aimWeight .~ 8
|
||||
& itUse . heldAim . aimRange .~ 0.5
|
||||
& itUse . heldAim . aimStance .~ TwoHandOver
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleRLauncher
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
|
||||
@@ -23,12 +24,14 @@ rLauncher =
|
||||
& itType .~ HELD RLAUNCHER
|
||||
& itUse . heldParams . muzVel .~ ConstFloat 0
|
||||
& itUse . heldParams . rifling .~ ConstFloat 0
|
||||
-- & itUse . heldParams . recoil .~ 0
|
||||
-- & itUse . heldParams . recoil .~ 0
|
||||
& itUse . heldParams . torqueAfter .~ 0
|
||||
& itUse . heldParams . bulGunSound ?~ (tap4S, 0)
|
||||
|
||||
-- & itUse . heldParams . bulGunSound ?~ (tap4S, 0)
|
||||
|
||||
gLauncher :: Item
|
||||
gLauncher = rLauncher
|
||||
gLauncher =
|
||||
rLauncher
|
||||
& itType .~ HELD GLAUNCHER
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleGLauncher
|
||||
|
||||
@@ -36,14 +39,15 @@ rLauncherX :: Int -> Item
|
||||
rLauncherX i =
|
||||
rLauncher
|
||||
& itType .~ HELD (RLAUNCHERX i)
|
||||
& itUse . heldAim . aimMuzzles .~ getZipList
|
||||
(ZipList [Muzzle (V2 20 0) a 0 | a <- angles]
|
||||
<*> ZipList [0..]
|
||||
<*> pure NoFlare
|
||||
<*> pure MuzzleRLauncher
|
||||
<*> pure (UseExactly 1)
|
||||
<*> pure 0
|
||||
)
|
||||
& itAmmoSlots .~ IM.fromList [(j,LauncherAmmo) | j <- [0..i-1]]
|
||||
& itUse . heldAim . aimMuzzles
|
||||
.~ getZipList
|
||||
( ZipList [Muzzle (V2 20 0) a 0 | a <- angles]
|
||||
<*> ZipList [0 ..]
|
||||
<*> pure NoFlare
|
||||
<*> pure MuzzleRLauncher
|
||||
<*> pure (UseExactly 1)
|
||||
<*> pure 0
|
||||
)
|
||||
& itAmmoSlots .~ IM.fromList [(j, LauncherAmmo) | j <- [0 .. i -1]]
|
||||
where
|
||||
angles = take i [0,2*pi/ fromIntegral i ..]
|
||||
angles = take i [0, 2 * pi / fromIntegral i ..]
|
||||
|
||||
@@ -7,7 +7,7 @@ module Dodge.Item.Held.Rod (
|
||||
-- machineGun,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
--import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default
|
||||
--import Dodge.Item.Weapon.Bullet
|
||||
@@ -21,12 +21,11 @@ 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
|
||||
& itType .~ HELD BANGROD
|
||||
& itUse . heldAim . aimWeight .~ 8
|
||||
& itUse . heldAim . aimRange .~ 1
|
||||
& itUse . heldAim . aimStance .~ OneHand
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||
@@ -37,7 +36,6 @@ elephantGun :: Item
|
||||
elephantGun =
|
||||
bangRod
|
||||
& itType .~ HELD ELEPHANTGUN
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
||||
-- & itUse . heldParams . recoil .~ 50
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ module Dodge.Item.Held.SprayGuns (
|
||||
flameWall,
|
||||
) where
|
||||
|
||||
import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
--import Dodge.SoundLogic.ExternallyGeneratedSounds
|
||||
import Dodge.Data.Item
|
||||
import Dodge.Default.Item
|
||||
--import Dodge.Reloading.Action
|
||||
@@ -24,13 +24,12 @@ poisonSprayer =
|
||||
& itUse . heldParams . torqueAfter .~ 0
|
||||
& itUse . heldParams . randomOffset .~ 0
|
||||
& itUse . heldParams . sidePush .~ 0
|
||||
& itUse . heldParams . bulGunSound ?~ (foamSprayLoopS,5)
|
||||
-- & itUse . heldParams . bulGunSound ?~ (foamSprayLoopS,5)
|
||||
|
||||
flameSpitter :: Item
|
||||
flameSpitter =
|
||||
flameThrower
|
||||
& itType .~ HELD FLAMESPITTER
|
||||
& itUse . heldAim . aimStance .~ OneHand
|
||||
& itUse . heldDelay .~ FixedRate{_rateMax = 3, _rateTimeLastUsed = 0}
|
||||
& itUse . heldParams . weaponInvLock .~ 10
|
||||
& itUse . heldParams . weaponRepeat .~ [1..9]
|
||||
@@ -76,7 +75,6 @@ flameThrower =
|
||||
& itUse . heldDelay .~ NoDelay
|
||||
& itUse . heldAim . aimWeight .~ 5
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5}
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0 0 NoFlare
|
||||
MuzzleNozzle
|
||||
{ _nzPressure = ConstFloat 4
|
||||
@@ -95,7 +93,7 @@ flameThrower =
|
||||
, _torqueAfter = 0
|
||||
, _randomOffset = 0
|
||||
, _sidePush = 25
|
||||
, _bulGunSound = Nothing
|
||||
-- , _bulGunSound = Nothing
|
||||
, _weaponInvLock = 0
|
||||
, _weaponRepeat = mempty
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ autoPistol :: Item
|
||||
autoPistol =
|
||||
pistol
|
||||
& itUse . heldTriggerType .~ AutoTrigger
|
||||
& itUse . heldParams . bulGunSound ?~ (tap1S, 0)
|
||||
-- & itUse . heldParams . bulGunSound ?~ (tap1S, 0)
|
||||
& itType .~ HELD AUTOPISTOL
|
||||
|
||||
machinePistol :: Item
|
||||
@@ -73,7 +73,6 @@ smg :: Item
|
||||
smg =
|
||||
autoPistol -- & some parameter affecting stability
|
||||
& itType .~ HELD SMG
|
||||
& itUse . heldAim . aimStance .~ TwoHandUnder
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
& itUse . heldParams . torqueAfter .~ 0.05
|
||||
|
||||
@@ -23,8 +23,6 @@ flatShield =
|
||||
& itEffect . ieInv .~ EffectRootNotroot CreateShieldWall RemoveShieldWall
|
||||
& itUse . heldAim . aimWeight .~ 5
|
||||
& itUse . heldAim . aimTurnSpeed .~ 0.5
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
-- & itUse . heldAim . aimHandlePos .~ 0
|
||||
& itType .~ HELD FLATSHIELD
|
||||
|
||||
keyCard :: Int -> Item
|
||||
|
||||
@@ -14,4 +14,3 @@ shatterGun =
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleShatter
|
||||
& itUse . heldAim . aimStance .~ TwoHandFlat
|
||||
|
||||
Reference in New Issue
Block a user