Work on held item usage

This commit is contained in:
2023-05-27 12:32:09 +01:00
parent 4cfb7d431a
commit ec8317c14e
19 changed files with 150 additions and 173 deletions
+6 -4
View File
@@ -31,7 +31,8 @@ teslaGun =
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimStance .~ TwoHandFlat
& itUse . heldAim . aimHandlePos .~ 4
& itUse . heldAim . aimMuzPos .~ 4
-- & itUse . heldAim . aimMuzPos .~ 4
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 4 0) 0 0]
& itType . iyBase .~ HELD TESLAGUN
lasGun :: Item
@@ -63,7 +64,8 @@ lasGun =
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimStance .~ TwoHandTwist
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 30
-- & itUse . heldAim . aimMuzPos .~ 30
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0]
& itType . iyBase .~ HELD LASGUN
lasGunTweak :: TweakParam
@@ -94,7 +96,7 @@ tractorGun =
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimStance .~ TwoHandTwist
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 30
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0]
& itType . iyBase .~ HELD TRACTORGUN
tractorGunTweak :: TweakParam
@@ -149,7 +151,7 @@ dualBeam :: Item
dualBeam =
lasGun
& itType . iyBase .~ HELD DUALBEAM
& itUse . heldAim . aimMuzPos .~ 0
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0]
& itParams
.~ DualBeam
{ _phaseV = 1
+4 -8
View File
@@ -22,7 +22,6 @@ defaultBangCane =
{ _muzVel = 0.8
, _rifling = 0.9
, _bore = 2
, _gunBarrels = [GunBarrel 0 0 0.01]
, _recoil = 50
, _torqueAfter = 0.1
, _randomOffset = 0
@@ -33,7 +32,7 @@ defaultBangCane =
& itUse . heldMods .~ BangCaneMod
& itUse . heldAim . aimStance .~ OneHand
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 15
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.01]
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 1
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadPartialInsert 10 1]
@@ -47,20 +46,17 @@ volleyGun i =
& itUse . heldAim . aimStance .~ TwoHandFlat
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 15
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 x) 0 0.01 | x <- spreadAroundCenter i 3]
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i
& itParams
.~ BulletShooter
{ _muzVel = 0.8
, _rifling = 0.9
, _bore = 2
, _gunBarrels = [GunBarrel 0 0 0.01]
, _recoil = 50
, _torqueAfter = 0.1
, _randomOffset = 0
}
& itParams . gunBarrels
.~ [ GunBarrel (V2 0 x) 0 0.1 | x <- spreadAroundCenter i 3]
& itParams . torqueAfter .~ 0.48 + 0.2 * fromIntegral i
& itType . iyBase .~ HELD (VOLLEYGUN i)
@@ -96,7 +92,7 @@ burstRifle :: Item
burstRifle =
repeater
& itType . iyBase .~ HELD BURSTRIFLE
& itParams . gunBarrels . ix 0 . barlInaccuracy .~ 0.05
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
& itUse . heldDelay . rateMax .~ 18
& itUse . heldMods .~ BurstRifleMod
@@ -124,12 +120,12 @@ miniGunX i =
autoRifle
& itUse .~ miniGunUse i
& itUse . heldAim . aimTurnSpeed .~ 0.5
& itUse . heldAim . aimMuzzles .~ replicate i (Muzzle (V2 15 0) 0 0.05)
& itParams
.~ BulletShooter
{ _muzVel = 1
, _rifling = 0.9
, _bore = 2
, _gunBarrels = replicate i (GunBarrel 0 0 0.05)
, _recoil = 10
, _torqueAfter = 0
, _randomOffset = 10
+8 -8
View File
@@ -1,10 +1,11 @@
module Dodge.Item.Held.Cone
where
import Dodge.Default.Item
import Dodge.Data.Item
import Dodge.Reloading.Action
module Dodge.Item.Held.Cone where
import Control.Lens
import Dodge.Data.Item
import Dodge.Default.Item
import Dodge.Reloading.Action
import Geometry.Data
import Linear
bangCone :: Item
bangCone =
@@ -14,7 +15,6 @@ bangCone =
{ _muzVel = 0.7
, _rifling = 0.8
, _bore = 5
, _gunBarrels = [GunBarrel 0 0 0.5]
, _recoil = 150
, _torqueAfter = 0.1
, _randomOffset = 12
@@ -25,7 +25,7 @@ bangCone =
& itUse . heldDelay . rateMax .~ 20
& itUse . heldMods .~ BangConeMod
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 15
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 15 0) 0 0.5]
& itType . iyBase .~ HELD BANGCONE
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ 5
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadEject 5, loadInsert 20, loadPrime 5]
@@ -38,7 +38,7 @@ blunderbuss =
& itUse . heldAim . aimStance .~ TwoHandTwist
& itUse . heldAim . aimWeight .~ 6
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 30
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 30
& itType . iyBase .~ HELD BLUNDERBUSS
grapeCannon :: Int -> Item
+2 -1
View File
@@ -30,7 +30,8 @@ launcher =
& itUse . heldAim . aimRange .~ 0.5
& itUse . heldAim . aimStance .~ TwoHandTwist
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 20
-- & itUse . heldAim . aimMuzPos .~ 20
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 20 0) 0 0]
& itUse . heldConsumption . laAmmoType
.~ ProjectileAmmo
{ _amPayload = ExplosionPayload
+3 -4
View File
@@ -22,7 +22,6 @@ bangRod =
{ _muzVel = 0.8
, _rifling = 1
, _bore = 2
, _gunBarrels = [GunBarrel 0 0 0.1]
, _recoil = 50
, _torqueAfter = 0.3
, _randomOffset = 0
@@ -39,7 +38,7 @@ bangRod =
& itUse . heldAim . aimStance .~ OneHand
& itUse . heldAim . aimZoom .~ defaultItZoom{_izFac = 1.5}
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 30
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 30 0) 0 0.1]
& itUse . heldConsumption . laAmmoType .~ hvBulletAmmo
elephantGun :: Item
@@ -47,7 +46,7 @@ elephantGun =
bangRod
& itType . iyBase .~ HELD ELEPHANTGUN
& itUse . heldAim . aimStance .~ TwoHandTwist
& itParams . gunBarrels .~ [GunBarrel 0 0 0.05]
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0.05
& itUse . heldMods .~ ElephantGunMod
& itParams . recoil .~ 50
& itParams . torqueAfter .~ 0.1
@@ -68,7 +67,7 @@ sniperRifle :: Item
sniperRifle =
elephantGun
& itType . iyBase .~ HELD SNIPERRIFLE
& itParams . gunBarrels .~ [GunBarrel 0 0 0]
& itUse . heldAim . aimMuzzles . ix 0 . mzInaccuracy .~ 0
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
& itUse . heldScroll .~ HeldScrollZoom -- zoomLongGun
& itScope .~ ZoomScope (V2 0 0) 1 0.5 False
+1 -1
View File
@@ -93,7 +93,7 @@ flameThrower =
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 5, _izMin = 1.5}
& itUse . heldAim . aimStance .~ TwoHandTwist
& itUse . heldAim . aimHandlePos .~ 0
& itUse . heldAim . aimMuzPos .~ 18
& itUse . heldAim . aimMuzzles .~ [Muzzle (V2 18 0) 0 0]
& itUse . heldConsumption
.~ ( defaultLoadable
& laSource . _InternalSource . iaMax .~ 250
+2 -3
View File
@@ -23,7 +23,6 @@ bangStick i =
{ _muzVel = 0.8
, _rifling = 0.8
, _bore = 2
, _gunBarrels = [GunBarrel 0 a 0.01 | a <- spreadAroundCenter i baseStickSpread]
, _recoil = 25
, _torqueAfter = 0.18 + 0.02 * fromIntegral i
, _randomOffset = 0
@@ -35,7 +34,7 @@ bangStick i =
& itUse . heldDelay . rateMax .~ 8
& itUse . heldMods .~ BangStickMod
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 10
& itUse . heldAim . aimMuzzles .~ [Muzzle 10 a 0.01 | a <- spreadAroundCenter i baseStickSpread]
& itUse . heldConsumption . laSource . _InternalSource . iaMax .~ i
& itUse . heldConsumption . laSource . _InternalSource . iaCycle .~ [loadPartialInsert 10 1]
@@ -62,11 +61,11 @@ pistol =
)
& itUse . heldDelay . rateMax .~ 6
& itUse . heldMods .~ PistolMod
& itUse . heldAim . aimMuzzles .~ [Muzzle 0 0 0.05]
& itParams
%~ ( (muzVel .~ 0.8)
. (rifling .~ 0.8)
. (bore .~ 2)
. (gunBarrels .~ [GunBarrel 0 0 0.05])
. (recoil .~ 10)
. (torqueAfter .~ 0.2)
)
+4 -4
View File
@@ -1,10 +1,11 @@
module Dodge.Item.Held.Utility where
import Linear
import Dodge.Default.Item
import Color
import Control.Lens
import Dodge.Data.Item
import Geometry.Data
--import Geometry.Data
flatShield :: Item
flatShield =
@@ -14,7 +15,6 @@ flatShield =
& itUse . heldAim . aimTurnSpeed .~ 0.5
& itUse . heldAim . aimStance .~ TwoHandFlat
& itUse . heldAim . aimHandlePos .~ 0
& itUse . heldAim . aimMuzPos .~ 0
& itInvSize .~ 3
& itType . iyBase .~ HELD FLATSHIELD
@@ -35,7 +35,7 @@ binoculars =
& itScope .~ ZoomScope (V2 0 0) 1 0.5 False
& itType . iyBase .~ HELD BINOCULARS
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 10
-- & itUse . heldAim . aimMuzPos .~ 10
& itUse . heldAim . aimStance .~ TwoHandFlat
& itUse . heldScroll .~ HeldScrollZoom -- zoomLongGun
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5, _izFac = 1}
@@ -47,7 +47,7 @@ torch =
& itEffect . ieInv .~ EffectWhileHeld CreateHeldLight
& itType . iyBase .~ HELD TORCH
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 10
& itUse . heldAim . aimMuzzles . ix 0 . mzPos . _x .~ 10
forceFieldGun :: Item
forceFieldGun =