Expose recoil, torque etc as item parameters
This commit is contained in:
@@ -51,6 +51,9 @@ bangCane = defaultGun
|
||||
, _gunBarrels = SingleBarrel
|
||||
{ _brlInaccuracy = 0.01
|
||||
}
|
||||
, _recoil = 50
|
||||
, _torqueAfter = 0.1
|
||||
, _randomOffset = 0
|
||||
}
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
@@ -63,9 +66,9 @@ bangCane = defaultGun
|
||||
, useTimeCheck
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, torqueAfterI 0.1
|
||||
, withTorqueAfter
|
||||
, applyInaccuracy
|
||||
, withRecoilI 50
|
||||
, withRecoil
|
||||
, withSmoke 1 black 20 200 5
|
||||
, withMuzFlareI
|
||||
]
|
||||
@@ -244,7 +247,7 @@ miniGunUse i = ruseInstant (useAmmoParams $ Just 1) NoHammer $
|
||||
[ withSidePushI 50
|
||||
, torqueBefore 0.05
|
||||
, afterRecoil recoilAmount
|
||||
, withRandomOffsetI 10
|
||||
, withRandomOffset
|
||||
, withOldDir x
|
||||
, trigDoAlso (useAmmoParams $ Just x)
|
||||
] | x <- map ((/fromIntegral i) . fromIntegral) [1..i-1]
|
||||
@@ -252,7 +255,7 @@ miniGunUse i = ruseInstant (useAmmoParams $ Just 1) NoHammer $
|
||||
<>
|
||||
[ withSidePushI 50
|
||||
, afterRecoil recoilAmount
|
||||
, withRandomOffsetI 10
|
||||
, withRandomOffset
|
||||
]
|
||||
where
|
||||
recoilAmount = 5
|
||||
@@ -283,6 +286,9 @@ miniGunX i = defaultAutoGun
|
||||
,_brlNum = i
|
||||
,_brlInaccuracy = 0
|
||||
}
|
||||
, _recoil = 10
|
||||
, _torqueAfter = 0
|
||||
, _randomOffset = 10
|
||||
}
|
||||
, _itEquipPict = pictureWeaponAim (miniGunXPictItem i)
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
|
||||
@@ -44,17 +44,20 @@ bangRod = defaultGun
|
||||
, _rifling = 1
|
||||
, _bore = 2
|
||||
, _gunBarrels = SingleBarrel 0.1
|
||||
, _recoil = 50
|
||||
, _torqueAfter = 0.3
|
||||
, _randomOffset = 0
|
||||
}
|
||||
, _itUse = ruseAmmoParamsRate 12 upHammer
|
||||
[ ammoHammerCheck
|
||||
, useTimeCheck
|
||||
, withSoundStart bangEchoS
|
||||
, useAmmoAmount 1
|
||||
, torqueAfterI 0.3
|
||||
, withTorqueAfter
|
||||
, applyInaccuracy
|
||||
, withThickSmokeI
|
||||
, withMuzFlareI
|
||||
, withRecoilI 50
|
||||
, withRecoil
|
||||
]
|
||||
, _itDimension = ItemDimension
|
||||
{ _dimRad = 12
|
||||
|
||||
@@ -58,10 +58,10 @@ bangStick i = defaultGun
|
||||
, withSoundItemChoiceStart bangStickSoundChoice
|
||||
, useAllAmmo
|
||||
, withMuzFlareI
|
||||
, torqueAfterI (0.18 + 0.02 * fromIntegral i)
|
||||
, withTorqueAfter
|
||||
, spreadLoaded
|
||||
-- , applyInaccuracy
|
||||
, withRecoilI 25
|
||||
, withRecoil
|
||||
]
|
||||
, _itID = Nothing
|
||||
, _itInvColor = white
|
||||
@@ -74,6 +74,9 @@ bangStick i = defaultGun
|
||||
,_brlSpread = SpreadBarrels baseStickSpread
|
||||
,_brlInaccuracy = 0.01
|
||||
}
|
||||
, _recoil = 25
|
||||
, _torqueAfter = 0.18 + 0.02 * fromIntegral i
|
||||
, _randomOffset = 0
|
||||
}
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
, _itInvSize = fromIntegral i / 3
|
||||
@@ -184,14 +187,14 @@ pistol = (bangStick 1)
|
||||
-- , _itEquipPict = pictureWeaponAim pistolPic
|
||||
, _itID = Nothing
|
||||
, _itInvColor = white
|
||||
, _itParams = BulletShooter
|
||||
{ _muzVel = 0.8
|
||||
, _rifling = 0.8
|
||||
, _bore = 2
|
||||
, _gunBarrels = SingleBarrel 0.05
|
||||
}
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
} & itDimension . dimSPic .~ (\it -> noPic $ baseStickShape <> makeTinClipAt pi (V3 5 2 0) it)
|
||||
& itParams %~
|
||||
( ( muzVel .~ 0.8 )
|
||||
. ( rifling .~ 0.8 )
|
||||
. ( bore .~ 2 )
|
||||
. ( gunBarrels .~ SingleBarrel 0.05 )
|
||||
)
|
||||
autoPistol :: Item
|
||||
autoPistol = pistol
|
||||
& itUse . useMods .~ (ammoCheckI : pistolAfterHamMods)
|
||||
|
||||
Reference in New Issue
Block a user