Move weapon muzzles up a record
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -32,7 +32,7 @@ import Geometry.Data
|
|||||||
data ItemUse
|
data ItemUse
|
||||||
= UseHeld
|
= UseHeld
|
||||||
{ _heldDelay :: UseDelay
|
{ _heldDelay :: UseDelay
|
||||||
, _heldAim :: AimParams
|
, _heldMuzzles :: [Muzzle]
|
||||||
, _heldParams :: HeldParams
|
, _heldParams :: HeldParams
|
||||||
, _heldFrame :: Int
|
, _heldFrame :: Int
|
||||||
, _heldUseEffect :: HeldUseEffect
|
, _heldUseEffect :: HeldUseEffect
|
||||||
@@ -106,8 +106,8 @@ data AmmoParams
|
|||||||
| NoAmmoParams
|
| NoAmmoParams
|
||||||
deriving (Eq, Show, Read) --Generic, Flat)
|
deriving (Eq, Show, Read) --Generic, Flat)
|
||||||
|
|
||||||
data AimParams = AimParams { _aimMuzzles :: [Muzzle] }
|
--data AimParams = AimParams { _aimMuzzles :: [Muzzle] }
|
||||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||||
|
|
||||||
data FlareType
|
data FlareType
|
||||||
= NoFlare
|
= NoFlare
|
||||||
@@ -168,7 +168,7 @@ data Muzzle = Muzzle
|
|||||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||||
|
|
||||||
makeLenses ''ItemUse
|
makeLenses ''ItemUse
|
||||||
makeLenses ''AimParams
|
--makeLenses ''AimParams
|
||||||
makeLenses ''Muzzle
|
makeLenses ''Muzzle
|
||||||
makeLenses ''HeldParams
|
makeLenses ''HeldParams
|
||||||
makeLenses ''AttachParams
|
makeLenses ''AttachParams
|
||||||
@@ -188,5 +188,5 @@ deriveJSON defaultOptions ''HeldParams
|
|||||||
deriveJSON defaultOptions ''AmmoPerShot
|
deriveJSON defaultOptions ''AmmoPerShot
|
||||||
deriveJSON defaultOptions ''Muzzle
|
deriveJSON defaultOptions ''Muzzle
|
||||||
deriveJSON defaultOptions ''AttachParams
|
deriveJSON defaultOptions ''AttachParams
|
||||||
deriveJSON defaultOptions ''AimParams
|
--deriveJSON defaultOptions ''AimParams
|
||||||
deriveJSON defaultOptions ''ItemUse
|
deriveJSON defaultOptions ''ItemUse
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ defaultBulletWeapon :: Item
|
|||||||
defaultBulletWeapon =
|
defaultBulletWeapon =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itAmmoSlots .~ singleAmmo BulletAmmo
|
& itAmmoSlots .~ singleAmmo BulletAmmo
|
||||||
& itUse . heldAim . aimMuzzles .~
|
& itUse . heldMuzzles .~
|
||||||
[Muzzle (V2 15 0) 0 0.01 0 BasicFlare MuzzleShootBullet (UseExactly 1) 0]
|
[Muzzle (V2 15 0) 0 0.01 0 BasicFlare MuzzleShootBullet (UseExactly 1) 0]
|
||||||
|
|
||||||
defaultItEffect :: ItEffect
|
defaultItEffect :: ItEffect
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ defaultHeldUse :: ItemUse
|
|||||||
defaultHeldUse = UseHeld
|
defaultHeldUse = UseHeld
|
||||||
{ _heldDelay = FixedRate{_rateMax = 8, _rateTimeLastUsed = 0}
|
{ _heldDelay = FixedRate{_rateMax = 8, _rateTimeLastUsed = 0}
|
||||||
-- , _heldHammer = HammerUp
|
-- , _heldHammer = HammerUp
|
||||||
, _heldAim = defaultAimParams
|
, _heldMuzzles = defaultMuzzles
|
||||||
, _heldParams = BulletShooterParams
|
, _heldParams = BulletShooterParams
|
||||||
{ _muzVel = ConstFloat 0.8
|
{ _muzVel = ConstFloat 0.8
|
||||||
, _rifling = ConstFloat 0.8
|
, _rifling = ConstFloat 0.8
|
||||||
|
|||||||
@@ -1,32 +1,20 @@
|
|||||||
module Dodge.Default.Item.Use.AimParams (
|
module Dodge.Default.Item.Use.AimParams (
|
||||||
defaultAimParams,
|
defaultMuzzles,
|
||||||
-- defaultItZoom,
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Dodge.Data.Item.Use
|
import Dodge.Data.Item.Use
|
||||||
import Linear
|
import Linear
|
||||||
|
|
||||||
defaultAimParams :: AimParams
|
defaultMuzzles :: [Muzzle]
|
||||||
defaultAimParams =
|
defaultMuzzles =
|
||||||
AimParams
|
[ Muzzle
|
||||||
{ _aimMuzzles =
|
{ _mzPos = V2 20 0
|
||||||
[ Muzzle
|
, _mzRot = 0
|
||||||
{ _mzPos = V2 20 0
|
, _mzInaccuracy = 0.05
|
||||||
, _mzRot = 0
|
, _mzAmmoSlot = 0
|
||||||
, _mzInaccuracy = 0.05
|
, _mzFlareType = NoFlare
|
||||||
, _mzAmmoSlot = 0
|
, _mzEffect = MuzzleShootBullet
|
||||||
, _mzFlareType = NoFlare
|
, _mzAmmoPerShot = UseExactly 1
|
||||||
, _mzEffect = MuzzleShootBullet
|
, _mzFrame = 0
|
||||||
, _mzAmmoPerShot = UseExactly 1
|
|
||||||
, _mzFrame = 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
]
|
||||||
--defaultItZoom :: ItZoom
|
|
||||||
--defaultItZoom =
|
|
||||||
-- ItZoom
|
|
||||||
-- { _izMax = 20
|
|
||||||
-- , _izMin = 0.2
|
|
||||||
-- , _izFac = 1
|
|
||||||
-- }
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ heldEffectMuzzles t cr w =
|
|||||||
uncurry (applyCME (_ldtValue t) cr) cmew
|
uncurry (applyCME (_ldtValue t) cr) cmew
|
||||||
& doWeaponRepetitions upitm cr
|
& doWeaponRepetitions upitm cr
|
||||||
where
|
where
|
||||||
muzzles = t ^. ldtValue . itUse . heldAim . aimMuzzles
|
muzzles = t ^. ldtValue . itUse . heldMuzzles
|
||||||
(upitm, loadedmuzzles) = mapAccumR loadMuzzle t muzzles
|
(upitm, loadedmuzzles) = mapAccumR loadMuzzle t muzzles
|
||||||
cmew = foldl' (useLoadedAmmo t cr) (CME 0 0 False, w) $ zip [0 ..] loadedmuzzles
|
cmew = foldl' (useLoadedAmmo t cr) (CME 0 0 False, w) $ zip [0 ..] loadedmuzzles
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ doHeldUseEffect t cr w = case t ^? ldtValue . itUse . heldUseEffect of
|
|||||||
let g = w ^. randGen
|
let g = w ^. randGen
|
||||||
(is, g') = runState (shuffle [0 .. x -1]) g
|
(is, g') = runState (shuffle [0 .. x -1]) g
|
||||||
return $
|
return $
|
||||||
w & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i . itUse . heldAim . aimMuzzles %~ zipWith (\j mz -> mz & mzFrame .~ j) is
|
w & cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i . itUse . heldMuzzles %~ zipWith (\j mz -> mz & mzFrame .~ j) is
|
||||||
& randGen .~ g'
|
& randGen .~ g'
|
||||||
Just SwitchAlteRifle -> fromMaybe w $ do
|
Just SwitchAlteRifle -> fromMaybe w $ do
|
||||||
i <- t ^? ldtValue . itLocation . ilInvID
|
i <- t ^? ldtValue . itLocation . ilInvID
|
||||||
@@ -143,8 +143,7 @@ doHeldUseEffect t cr w = case t ^? ldtValue . itUse . heldUseEffect of
|
|||||||
w
|
w
|
||||||
& cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i
|
& cWorld . lWorld . creatures . ix (_crID cr) . crInv . ix i
|
||||||
. itUse
|
. itUse
|
||||||
. heldAim
|
. heldMuzzles
|
||||||
. aimMuzzles
|
|
||||||
. ix 0
|
. ix 0
|
||||||
. mzAmmoSlot
|
. mzAmmoSlot
|
||||||
%~ ((`mod` 2) . (+ 1))
|
%~ ((`mod` 2) . (+ 1))
|
||||||
@@ -488,8 +487,7 @@ walkNozzle mzid mz itm cr w = fromMaybe w $ do
|
|||||||
& cWorld . lWorld . creatures . ix (_crID cr) . crInv
|
& cWorld . lWorld . creatures . ix (_crID cr) . crInv
|
||||||
. ix invid
|
. ix invid
|
||||||
. itUse
|
. itUse
|
||||||
. heldAim
|
. heldMuzzles
|
||||||
. aimMuzzles
|
|
||||||
. ix mzid
|
. ix mzid
|
||||||
. mzEffect
|
. mzEffect
|
||||||
. nzCurrentWalkAngle
|
. nzCurrentWalkAngle
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ bgateCalc x l r = (x `div` ((2::Int) ^ ((2::Int)*f l + f r))) `mod` 2
|
|||||||
itemScrollDisplay :: Item -> Maybe String
|
itemScrollDisplay :: Item -> Maybe String
|
||||||
itemScrollDisplay itm
|
itemScrollDisplay itm
|
||||||
| HELD ALTERIFLE <- itm ^. itType = Just $
|
| HELD ALTERIFLE <- itm ^. itType = Just $
|
||||||
case itm ^? itUse . heldAim . aimMuzzles . ix 0 . mzAmmoSlot of
|
case itm ^? itUse . heldMuzzles . ix 0 . mzAmmoSlot of
|
||||||
Just 0 -> "L"
|
Just 0 -> "L"
|
||||||
_ -> "R"
|
_ -> "R"
|
||||||
| UseScope OpticScope{_opticZoom = x} <- itm ^. itUse = Just $ shortShow x
|
| UseScope OpticScope{_opticZoom = x} <- itm ^. itUse = Just $ shortShow x
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ torchShape =
|
|||||||
back = upperPrismPolySE 3 $ rectXH 1 2
|
back = upperPrismPolySE 3 $ rectXH 1 2
|
||||||
|
|
||||||
baseStickShapeX :: Item -> Int -> Shape
|
baseStickShapeX :: Item -> Int -> Shape
|
||||||
baseStickShapeX it _ = foldMap f (it ^?! itUse . heldAim . aimMuzzles)
|
baseStickShapeX it _ = foldMap f (it ^?! itUse . heldMuzzles)
|
||||||
where
|
where
|
||||||
f brl = rotateSH (_mzRot brl) baseStickShape
|
f brl = rotateSH (_mzRot brl) baseStickShape
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ teslaGun =
|
|||||||
& itUse . heldParams .~ BeamShooterParams-- (Just (elecCrackleS, 2))
|
& itUse . heldParams .~ BeamShooterParams-- (Just (elecCrackleS, 2))
|
||||||
& itParams .~ teslaParams
|
& itParams .~ teslaParams
|
||||||
& itUse . heldDelay .~ NoDelay
|
& itUse . heldDelay .~ NoDelay
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 10 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 10 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
& itUse . heldMuzzles . ix 0 . mzFlareType .~ TeslaGunFlare
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTesla
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleTesla
|
||||||
& itType .~ HELD TESLAGUN
|
& itType .~ HELD TESLAGUN
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
|
|
||||||
@@ -41,14 +41,13 @@ teslaParams =
|
|||||||
laser :: Item
|
laser :: Item
|
||||||
laser =
|
laser =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
-- & itUse . heldParams .~ BeamShooterParams (Just (tone440sawtoothquietS, 2))
|
|
||||||
& itUse . heldParams .~ BeamShooterParams-- Nothing
|
& itUse . heldParams .~ BeamShooterParams-- Nothing
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldDelay .~ NoDelay
|
& itUse . heldDelay .~ NoDelay
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 6 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 6 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ LasGunFlare
|
& itUse . heldMuzzles . ix 0 . mzFlareType .~ LasGunFlare
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleLaser
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleLaser
|
||||||
& itTargeting
|
& itTargeting
|
||||||
.~ ItTargeting
|
.~ ItTargeting
|
||||||
{ _itTgPos = Nothing
|
{ _itTgPos = Nothing
|
||||||
@@ -63,8 +62,8 @@ tractorGun =
|
|||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itUse . heldParams .~ BeamShooterParams
|
& itUse . heldParams .~ BeamShooterParams
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ NoFlare
|
& itUse . heldMuzzles . ix 0 . mzFlareType .~ NoFlare
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleTractor
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleTractor
|
||||||
& itType .~ HELD TRACTORGUN
|
& itType .~ HELD TRACTORGUN
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ volleyGun :: Int -> Item
|
|||||||
volleyGun i =
|
volleyGun i =
|
||||||
defaultBangCane
|
defaultBangCane
|
||||||
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
& itUse . heldAim . aimMuzzles .~ getZipList
|
& itUse . heldMuzzles .~ getZipList
|
||||||
(ZipList [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 6]
|
(ZipList [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 6]
|
||||||
<*> ZipList [0..i-1]
|
<*> ZipList [0..i-1]
|
||||||
<*> pure MiniGunFlare
|
<*> pure MiniGunFlare
|
||||||
@@ -52,7 +52,7 @@ rifle =
|
|||||||
defaultBangCane
|
defaultBangCane
|
||||||
& itType .~ HELD RIFLE
|
& itType .~ HELD RIFLE
|
||||||
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 25 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 25 0
|
||||||
|
|
||||||
alteRifle :: Item
|
alteRifle :: Item
|
||||||
alteRifle = rifle
|
alteRifle = rifle
|
||||||
@@ -75,11 +75,11 @@ burstRifle :: Item
|
|||||||
burstRifle =
|
burstRifle =
|
||||||
rifle
|
rifle
|
||||||
& itType .~ HELD BURSTRIFLE
|
& itType .~ HELD BURSTRIFLE
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
||||||
& itUse . heldDelay . rateMax .~ 6
|
& itUse . heldDelay . rateMax .~ 6
|
||||||
& itUse . heldParams . weaponInvLock .~ 7
|
& itUse . heldParams . weaponInvLock .~ 7
|
||||||
& itUse . heldParams . weaponRepeat .~ [3,6]
|
& itUse . heldParams . weaponRepeat .~ [3,6]
|
||||||
& itUse . heldAim . aimMuzzles %~ doreplicate
|
& itUse . heldMuzzles %~ doreplicate
|
||||||
where
|
where
|
||||||
doreplicate (x:_) = [x,x & mzFrame .~ 3,x & mzFrame .~ 6]
|
doreplicate (x:_) = [x,x & mzFrame .~ 3,x & mzFrame .~ 6]
|
||||||
doreplicate [] = error "tried to replicate non-existing burstRifle muzzle"
|
doreplicate [] = error "tried to replicate non-existing burstRifle muzzle"
|
||||||
@@ -91,7 +91,7 @@ miniGunX i =
|
|||||||
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
& itAmmoSlots .~ singleAmmo BeltBulletAmmo
|
& itAmmoSlots .~ singleAmmo BeltBulletAmmo
|
||||||
-- & itUse . heldParams . bulGunSound ?~ (mini1S,2)
|
-- & itUse . heldParams . bulGunSound ?~ (mini1S,2)
|
||||||
& itUse . heldAim . aimMuzzles
|
& itUse . heldMuzzles
|
||||||
.~ replicate i
|
.~ replicate i
|
||||||
(Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet (UseExactly 1) 0)
|
(Muzzle (V2 30 0) 0 0.05 0 MiniGunFlare MuzzleShootBullet (UseExactly 1) 0)
|
||||||
-- & itUse . heldParams . recoil .~ 10 * fromIntegral i
|
-- & itUse . heldParams . recoil .~ 10 * fromIntegral i
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ bangCone :: Item
|
|||||||
bangCone =
|
bangCone =
|
||||||
defaultBulletWeapon
|
defaultBulletWeapon
|
||||||
& itUse . heldDelay . rateMax .~ 20
|
& itUse . heldDelay . rateMax .~ 20
|
||||||
& itUse . heldAim . aimMuzzles
|
& itUse . heldMuzzles
|
||||||
.~ replicate
|
.~ replicate
|
||||||
15
|
15
|
||||||
(Muzzle (V2 15 0) 0 0.5 0 NoFlare MuzzleShootBullet (UseExactly 1) 0)
|
(Muzzle (V2 15 0) 0 0.5 0 NoFlare MuzzleShootBullet (UseExactly 1) 0)
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ BasicFlare
|
& itUse . heldMuzzles . ix 0 . mzFlareType .~ BasicFlare
|
||||||
& itUse . heldParams . muzVel .~ UniRandFloat 0.5 0.8
|
& itUse . heldParams . muzVel .~ UniRandFloat 0.5 0.8
|
||||||
& itUse . heldParams . rifling .~ UniRandFloat 0.3 0.8
|
& itUse . heldParams . rifling .~ UniRandFloat 0.3 0.8
|
||||||
& itUse . heldParams . torqueAfter .~ 0.1
|
& itUse . heldParams . torqueAfter .~ 0.1
|
||||||
@@ -28,7 +28,7 @@ bangCone =
|
|||||||
blunderbuss :: Item
|
blunderbuss :: Item
|
||||||
blunderbuss =
|
blunderbuss =
|
||||||
bangCone
|
bangCone
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 30
|
& itUse . heldMuzzles . ix 0 . mzPos . _x .~ 30
|
||||||
& itType .~ HELD BLUNDERBUSS
|
& itType .~ HELD BLUNDERBUSS
|
||||||
|
|
||||||
grapeCannon :: Int -> Item
|
grapeCannon :: Int -> Item
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ rLauncher :: Item
|
|||||||
rLauncher =
|
rLauncher =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itUse . heldDelay . rateMax .~ 20
|
& itUse . heldDelay . rateMax .~ 20
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleRLauncher
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleRLauncher
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 20 0
|
||||||
& itAmmoSlots .~ singleAmmo LauncherAmmo
|
& itAmmoSlots .~ singleAmmo LauncherAmmo
|
||||||
& itType .~ HELD RLAUNCHER
|
& itType .~ HELD RLAUNCHER
|
||||||
& itUse . heldParams . muzVel .~ ConstFloat 0
|
& itUse . heldParams . muzVel .~ ConstFloat 0
|
||||||
@@ -31,13 +31,13 @@ gLauncher :: Item
|
|||||||
gLauncher =
|
gLauncher =
|
||||||
rLauncher
|
rLauncher
|
||||||
& itType .~ HELD GLAUNCHER
|
& itType .~ HELD GLAUNCHER
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleGLauncher
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleGLauncher
|
||||||
|
|
||||||
rLauncherX :: Int -> Item
|
rLauncherX :: Int -> Item
|
||||||
rLauncherX i =
|
rLauncherX i =
|
||||||
rLauncher
|
rLauncher
|
||||||
& itType .~ HELD (RLAUNCHERX i)
|
& itType .~ HELD (RLAUNCHERX i)
|
||||||
& itUse . heldAim . aimMuzzles
|
& itUse . heldMuzzles
|
||||||
.~ getZipList
|
.~ getZipList
|
||||||
( ZipList [Muzzle (V2 20 0) a 0 | a <- angles]
|
( ZipList [Muzzle (V2 20 0) a 0 | a <- angles]
|
||||||
<*> ZipList [0 ..]
|
<*> ZipList [0 ..]
|
||||||
|
|||||||
@@ -26,15 +26,15 @@ bangRod =
|
|||||||
& itType .~ HELD BANGROD
|
& itType .~ HELD BANGROD
|
||||||
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
|
||||||
-- & itUse . heldAim . aimHandlePos .~ 5
|
-- & itUse . heldAim . aimHandlePos .~ 5
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ HeavySmokeFlare
|
& itUse . heldMuzzles . ix 0 . mzFlareType .~ HeavySmokeFlare
|
||||||
-- & itUse . heldConsumption . laAmmoType .~ hvBulletAmmo
|
-- & itUse . heldConsumption . laAmmoType .~ hvBulletAmmo
|
||||||
|
|
||||||
elephantGun :: Item
|
elephantGun :: Item
|
||||||
elephantGun =
|
elephantGun =
|
||||||
bangRod
|
bangRod
|
||||||
& itType .~ HELD ELEPHANTGUN
|
& itType .~ HELD ELEPHANTGUN
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0.05
|
||||||
-- & itUse . heldParams . recoil .~ 50
|
-- & itUse . heldParams . recoil .~ 50
|
||||||
|
|
||||||
amr :: Item
|
amr :: Item
|
||||||
@@ -51,7 +51,7 @@ sniperRifle :: Item
|
|||||||
sniperRifle =
|
sniperRifle =
|
||||||
elephantGun
|
elephantGun
|
||||||
& itType .~ HELD SNIPERRIFLE
|
& itType .~ HELD SNIPERRIFLE
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
|
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
|
||||||
|
|
||||||
--machineGun :: Item
|
--machineGun :: Item
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ flameSpitter =
|
|||||||
& itUse . heldDelay .~ FixedRate{_rateMax = 3, _rateTimeLastUsed = 0}
|
& itUse . heldDelay .~ FixedRate{_rateMax = 3, _rateTimeLastUsed = 0}
|
||||||
& itUse . heldParams . weaponInvLock .~ 10
|
& itUse . heldParams . weaponInvLock .~ 10
|
||||||
& itUse . heldParams . weaponRepeat .~ [1..9]
|
& itUse . heldParams . weaponRepeat .~ [1..9]
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect . nzPressure .~ UniRandFloat 3 4
|
& itUse . heldMuzzles . ix 0 . mzEffect . nzPressure .~ UniRandFloat 3 4
|
||||||
|
|
||||||
flameTorrent :: Item
|
flameTorrent :: Item
|
||||||
flameTorrent =
|
flameTorrent =
|
||||||
@@ -73,7 +73,7 @@ flameThrower =
|
|||||||
& itParams .~ NoParams
|
& itParams .~ NoParams
|
||||||
& itUse . heldDelay .~ NoDelay
|
& itUse . heldDelay .~ NoDelay
|
||||||
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5}
|
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5}
|
||||||
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0 0 NoFlare
|
& itUse . heldMuzzles .~ [Muzzle (V2 18 0) 0 0 0 NoFlare
|
||||||
MuzzleNozzle
|
MuzzleNozzle
|
||||||
{ _nzPressure = ConstFloat 4
|
{ _nzPressure = ConstFloat 4
|
||||||
, _nzMaxWalkAngle = 0.2
|
, _nzMaxWalkAngle = 0.2
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ bangStick i =
|
|||||||
& itUse . heldParams . torqueAfter .~ 0.18 + 0.02 * fromIntegral i
|
& itUse . heldParams . torqueAfter .~ 0.18 + 0.02 * fromIntegral i
|
||||||
& itType .~ HELD (BANGSTICK i)
|
& itType .~ HELD (BANGSTICK i)
|
||||||
& itUse . heldDelay . rateMax .~ 8
|
& itUse . heldDelay . rateMax .~ 8
|
||||||
& itUse . heldAim . aimMuzzles
|
& itUse . heldMuzzles
|
||||||
.~ [ Muzzle
|
.~ [ Muzzle
|
||||||
(V2 10 0)
|
(V2 10 0)
|
||||||
a
|
a
|
||||||
@@ -32,9 +32,9 @@ bangStick i =
|
|||||||
0
|
0
|
||||||
| a <- spreadAroundCenter i baseStickSpread
|
| a <- spreadAroundCenter i baseStickSpread
|
||||||
]
|
]
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType .~ NoLightFlare
|
& itUse . heldMuzzles . ix 0 . mzFlareType .~ NoLightFlare
|
||||||
& itUse . heldAim . aimMuzzles . ix (i `div` 2) . mzFlareType .~ MiniGunFlare
|
& itUse . heldMuzzles . ix (i `div` 2) . mzFlareType .~ MiniGunFlare
|
||||||
& itUse . heldAim . aimMuzzles . ix (i-1) . mzFlareType .~ NoLightFlare
|
& itUse . heldMuzzles . ix (i-1) . mzFlareType .~ NoLightFlare
|
||||||
|
|
||||||
baseStickSpread :: Float
|
baseStickSpread :: Float
|
||||||
baseStickSpread = 0.2
|
baseStickSpread = 0.2
|
||||||
@@ -43,9 +43,9 @@ pistol :: Item
|
|||||||
pistol =
|
pistol =
|
||||||
bangStick 1
|
bangStick 1
|
||||||
& itUse . heldDelay . rateMax .~ 6
|
& itUse . heldDelay . rateMax .~ 6
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos %~ const (V2 10 0)
|
& itUse . heldMuzzles . ix 0 . mzPos %~ const (V2 10 0)
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy %~ const 0.05
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy %~ const 0.05
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzFlareType %~ const BasicFlare
|
& itUse . heldMuzzles . ix 0 . mzFlareType %~ const BasicFlare
|
||||||
& itUse . heldParams
|
& itUse . heldParams
|
||||||
%~ ( (muzVel .~ ConstFloat 0.8)
|
%~ ( (muzVel .~ ConstFloat 0.8)
|
||||||
. (rifling .~ ConstFloat 0.8)
|
. (rifling .~ ConstFloat 0.8)
|
||||||
@@ -69,7 +69,7 @@ smg :: Item
|
|||||||
smg =
|
smg =
|
||||||
autoPistol -- & some parameter affecting stability
|
autoPistol -- & some parameter affecting stability
|
||||||
& itType .~ HELD SMG
|
& itType .~ HELD SMG
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 20 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 20 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldParams . torqueAfter .~ 0.05
|
& itUse . heldParams . torqueAfter .~ 0.05
|
||||||
& itUse . heldParams . sidePush .~ 30
|
& itUse . heldParams . sidePush .~ 30
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ torch :: Item
|
|||||||
torch =
|
torch =
|
||||||
defaultHeldItem
|
defaultHeldItem
|
||||||
& itType .~ HELD TORCH
|
& itType .~ HELD TORCH
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 10
|
& itUse . heldMuzzles . ix 0 . mzPos . _x .~ 10
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
|
|
||||||
-- | Sends out pulses that display walls.
|
-- | Sends out pulses that display walls.
|
||||||
@@ -43,8 +43,8 @@ detector dt =
|
|||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldParams .~ DefaultHeldParams
|
& itUse . heldParams .~ DefaultHeldParams
|
||||||
& itType .~ DETECTOR dt
|
& itType .~ DETECTOR dt
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleDetector
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleDetector
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100
|
& itUse . heldMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100
|
||||||
|
|
||||||
blinker :: Item
|
blinker :: Item
|
||||||
blinker =
|
blinker =
|
||||||
@@ -54,14 +54,14 @@ blinker =
|
|||||||
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
|
-- & itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1}
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldParams .~ DefaultHeldParams
|
& itUse . heldParams .~ DefaultHeldParams
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleBlink
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleBlink
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 10000000
|
& itUse . heldMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 10000000
|
||||||
& itType .~ HELD BLINKER
|
& itType .~ HELD BLINKER
|
||||||
|
|
||||||
unsafeBlinker :: Item
|
unsafeBlinker :: Item
|
||||||
unsafeBlinker =
|
unsafeBlinker =
|
||||||
blinker
|
blinker
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleUnsafeBlink
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleUnsafeBlink
|
||||||
& itType .~ HELD BLINKERUNSAFE
|
& itType .~ HELD BLINKERUNSAFE
|
||||||
|
|
||||||
-- & itUse . uequipEffect . eeViewDist ?~ 400
|
-- & itUse . uequipEffect . eeViewDist ?~ 400
|
||||||
@@ -69,18 +69,18 @@ unsafeBlinker =
|
|||||||
rewinder :: Item
|
rewinder :: Item
|
||||||
rewinder =
|
rewinder =
|
||||||
blinker
|
blinker
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleRewind
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleRewind
|
||||||
& itType .~ HELD REWINDER
|
& itType .~ HELD REWINDER
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100000
|
& itUse . heldMuzzles . ix 0 . mzAmmoPerShot .~ UseExactly 100000
|
||||||
|
|
||||||
timeStopper :: Item
|
timeStopper :: Item
|
||||||
timeStopper =
|
timeStopper =
|
||||||
blinker
|
blinker
|
||||||
& itType .~ HELD TIMESTOPPER
|
& itType .~ HELD TIMESTOPPER
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleStopper
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleStopper
|
||||||
|
|
||||||
timeScroller :: Item
|
timeScroller :: Item
|
||||||
timeScroller =
|
timeScroller =
|
||||||
timeStopper
|
timeStopper
|
||||||
& itType .~ HELD TIMESCROLLER
|
& itType .~ HELD TIMESCROLLER
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleScroller
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleScroller
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ shatterGun =
|
|||||||
& itType .~ HELD SHATTERGUN
|
& itType .~ HELD SHATTERGUN
|
||||||
& itUse . heldDelay . rateMax .~ 10
|
& itUse . heldDelay . rateMax .~ 10
|
||||||
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
& itAmmoSlots .~ singleAmmo ElectricalAmmo
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzPos .~ V2 30 0
|
& itUse . heldMuzzles . ix 0 . mzPos .~ V2 30 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
|
& itUse . heldMuzzles . ix 0 . mzInaccuracy .~ 0
|
||||||
& itUse . heldAim . aimMuzzles . ix 0 . mzEffect .~ MuzzleShatter
|
& itUse . heldMuzzles . ix 0 . mzEffect .~ MuzzleShatter
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ itemScroll yi invid itm w
|
|||||||
| HELD ALTERIFLE <- itm ^. itType
|
| HELD ALTERIFLE <- itm ^. itType
|
||||||
, yi /= 0 =
|
, yi /= 0 =
|
||||||
w
|
w
|
||||||
& itmlens . itUse . heldAim . aimMuzzles . ix 0 . mzAmmoSlot
|
& itmlens . itUse . heldMuzzles . ix 0 . mzAmmoSlot
|
||||||
%~ ((`mod` 2) . (+ 1))
|
%~ ((`mod` 2) . (+ 1))
|
||||||
| isJust $ itm ^? itScroll . itsInt = w & itmlens . itScroll . itsInt +~ yi
|
| isJust $ itm ^? itScroll . itsInt = w & itmlens . itScroll . itsInt +~ yi
|
||||||
| Just y <- itm ^? itScroll . itsMax = w & itmlens . itScroll . itsRangeInt
|
| Just y <- itm ^? itScroll . itsMax = w & itmlens . itScroll . itsRangeInt
|
||||||
|
|||||||
Reference in New Issue
Block a user