Continue refactor of reloading

This commit is contained in:
2022-06-20 11:12:24 +01:00
parent 2f4b381484
commit a85cf4d1fb
27 changed files with 243 additions and 299 deletions
+7 -9
View File
@@ -22,7 +22,6 @@ import Dodge.Item.Weapon.ExtraEffect
--import Dodge.Item.Weapon.InventoryDisplay
import Dodge.Item.Weapon.AmmoParams
--import Dodge.Item.Draw
import Dodge.Item.Weapon.Bullet
import Dodge.Item.Weapon.TriggerType
import Dodge.SoundLogic.LoadSound
import Picture
@@ -38,7 +37,7 @@ import LensHelp
--import System.Random
bangRod :: Item
bangRod = defaultGun
bangRod = defaultBulletWeapon
{ _itParams = BulletShooter
{ _muzVel = 0.8
, _rifling = 1
@@ -69,18 +68,16 @@ bangRod = defaultGun
, _dimSPic = \it -> noPic $ baseRodShape
<> makeSingleClipAt (V3 5 0 3) it
}
, _itConsumption = defaultAmmo
{ _laType = basicBullet
, _laMax = 1
, _laReloadTime = 20
}
}
& itConsumption . laMax .~ 1
& itConsumption . laLoadType . ejectTime .~ 10
& itConsumption . laLoadType . insertTime .~ 10
& itType . iyBase .~ BANGROD
& itUse . useAim . aimWeight .~ 8
& itUse . useAim . aimRange .~ 1
& itUse . useAim . aimStance .~ OneHand
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
& itConsumption . laType . amBulEff .~ expireAndDamage heavyBulDams
& itConsumption . laAmmoType . amBulEff .~ expireAndDamage heavyBulDams
baseRodShape :: Shape
baseRodShape = colorSH orange $ upperPrismPoly 3 $ rectXH 20 2
baseAMRShape :: Shape
@@ -145,6 +142,7 @@ machineGun = bangRod
& useDelay .~ VariableRate {_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
)
& itConsumption . laMax .~ 100
& itConsumption . laReloadTime .~ 75
& itConsumption . laLoadType . ejectTime .~ 25
& itConsumption . laLoadType . insertTime .~ 25
& itInvSize .~ 3
& itParams. torqueAfter .~ 0.2 -- not sure if this is necessary?