Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+93
View File
@@ -0,0 +1,93 @@
module Dodge.Item.Held.Rod (
bangRod,
elephantGun,
amr,
autoAmr,
sniperRifle,
machineGun,
) where
import Dodge.Item.Targeting
import Dodge.Data.Item
import Dodge.Default
import Dodge.Item.Weapon.Bullet
import Dodge.Reloading.Action
import Geometry
import LensHelp
bangRod :: Item
bangRod =
defaultBulletWeapon
& itParams
.~ BulletShooter
{ _muzVel = 0.8
, _rifling = 1
, _bore = 2
, _gunBarrels = SingleBarrel 0.1
, _recoil = 50
, _torqueAfter = 0.3
, _randomOffset = 0
}
& itUse . heldDelay . rateMax .~ 12
& itUse . heldMods .~ BangRodMod
& itDimension . dimRad .~ 12
& itDimension . dimCenter .~ V3 5 0 0
& itUse . heldConsumption . laMax .~ 1
& itUse . heldConsumption . laCycle .~ [loadEject 5, loadInsert 10, loadPrime 5]
& itType . iyBase .~ HELD BANGROD
& itUse . heldAim . aimWeight .~ 8
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimStance .~ OneHand
& itUse . heldAim . aimZoom .~ defaultItZoom{_itZoomFac = 1.5}
& itUse . heldAim . aimHandlePos .~ 5
& itUse . heldAim . aimMuzPos .~ 30
& itUse . heldConsumption . laAmmoType .~ hvBullet
elephantGun :: Item
elephantGun =
bangRod
& itType . iyBase .~ HELD ELEPHANTGUN
& itUse . heldAim . aimStance .~ TwoHandTwist
& itParams . gunBarrels .~ SingleBarrel 0.05
& itUse . heldMods .~ ElephantGunMod
& itParams . recoil .~ 50
& itParams . torqueAfter .~ 0.1
amr :: Item
amr =
elephantGun
& itType . iyBase .~ HELD AMR
& itUse . heldConsumption . laMax .~ 15
autoAmr :: Item
autoAmr =
amr
& itType . iyBase .~ HELD AUTOAMR
& itUse . heldMods .~ AutoAmrMod
sniperRifle :: Item
sniperRifle =
elephantGun
& itType . iyBase .~ HELD SNIPERRIFLE
& itParams . gunBarrels .~ SingleBarrel 0
& itUse . heldAim . aimZoom .~ defaultItZoom{_itZoomMax = 0.5, _itZoomMin = 0.5}
& itUse . heldScroll .~ HeldScrollZoom -- zoomLongGun
& itScope .~ ZoomScope (V2 0 0) 0 1 0.5 False
& itTargeting .~ targetLaser
& itUse . heldAim . aimZoom .~ defaultItZoom{_itZoomFac = 1}
machineGun :: Item
machineGun =
bangRod
& itType . iyBase .~ HELD MACHINEGUN
& itUse . heldDelay . rateMax .~ 25
& itUse . heldMods .~ MachineGunMod
& itUse . heldAim . aimWeight .~ 8
& itUse . heldAim . aimRange .~ 1
& itUse . heldAim . aimStance .~ TwoHandTwist
& itUse . heldAim . aimZoom .~ defaultItZoom{_itZoomFac = 1.5}
& itUse . heldDelay .~ VariableRate{_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
& itUse . heldConsumption . laMax .~ 100
& itUse . heldConsumption . laCycle .~ [loadEject 10, loadInsert 40, loadPrime 10]
& itInvSize .~ 3
& itParams . torqueAfter .~ 0.2 -- not sure if this is necessary?