Remove hvAuto, replace with machineGun

This commit is contained in:
2022-06-07 23:50:28 +01:00
parent c31f398fab
commit d91a53f76c
7 changed files with 44 additions and 95 deletions
+22 -2
View File
@@ -8,6 +8,7 @@ module Dodge.Item.Weapon.BulletGun.Rod
) where
import Dodge.Data
import Dodge.Item.Weapon.BulletGun.Clip
import Dodge.Item.Weapon.InventoryDisplay
import Dodge.Particle.HitEffect
import Dodge.Particle.Damage
--import Dodge.ChainEffect
@@ -32,7 +33,7 @@ import Shape
--import Sound.Data
import LensHelp
--import Data.Maybe
import Data.Maybe
--import qualified Data.Sequence as Seq
--import Control.Lens
--import Control.Monad.State
@@ -76,7 +77,6 @@ bangRod = defaultGun
{ _laType = basicBullet
, _laMax = 1
, _laReloadTime = 20
, _laReloadType = ActiveClear
}
}
& itUse . useAim . aimWeight .~ 8
@@ -139,3 +139,23 @@ machineGun :: Item
machineGun = bangRod
& itName .~ "MACHINEGUN"
& itType .~ MACHINEGUN
& itUse .~ (ruseAmmoParamsRate 25 NoHammer
[ ammoCheckI
, rateIncAB (torqueBeforeAtLeast 0.1 0.1) withTorqueAfter
, withSoundStart bangEchoS
, withThinSmokeI
, withMuzFlareI
]
& useAim . aimWeight .~ 8
& useAim . aimRange .~ 1
& useAim . aimStance .~ TwoHandTwist
& useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
& useDelay .~ VariableRate {_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
)
& itConsumption . laMax .~ 100
& itConsumption . laReloadTime .~ 75
& itInvSize .~ 3
& itParams. torqueAfter .~ 0.2 -- not sure if this is necessary?
& itInvDisplay .~ \it -> head (basicItemDisplay it) :
["*FIRERATE:" ++ fromMaybe "" (maybeRateStatus it)
]
-33
View File
@@ -6,7 +6,6 @@ module Dodge.Item.Weapon.BulletGuns
, biggestBlunderbuss
, grenadeLauncher
, ltAutoGun
, hvAutoGun
, autogunSpread
, autoGun
, autoGunPic
@@ -23,7 +22,6 @@ import Dodge.Item.Weapon.ZoomScope
import Dodge.Data
--import Dodge.ChainEffect
import Dodge.Default.Weapon
import Dodge.Item.Weapon.InventoryDisplay
import Dodge.Default
import Dodge.Item.Attachment
--import Dodge.Item.Weapon.InventoryDisplay
@@ -39,7 +37,6 @@ import Shape
--import Sound.Data
import LensHelp
import Data.Maybe
import qualified Data.Sequence as Seq
--import Control.Lens
import Control.Monad.State
@@ -212,36 +209,6 @@ biggestBlunderbuss = biggerBlunderbuss
grenadeLauncher :: Int -> Item
grenadeLauncher _ = bangCone
hvAutoGun :: Item
hvAutoGun = defaultAutoGun
{ _itName = "AUTO-HV"
, _itType = HVAUTOGUN
, _itConsumption = defaultAmmo
{ _laType = hvBullet
, _laMax = 100
, _laLoaded = 100
, _laReloadTime = 200
}
, _itUse = ruseAmmoParamsRate 25 NoHammer
[ ammoCheckI
, rateIncAB (torqueBeforeAtLeast 0.1 0.1) withTorqueAfter
, withSoundStart bangEchoS
, withThinSmokeI
, withMuzFlareI
]
& useAim . aimWeight .~ 8
& useAim . aimRange .~ 1
& useAim . aimStance .~ TwoHandTwist
& useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
& useDelay .~ VariableRate {_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
-- , _itFloorPict = hvAutoGunPic
, _itInvSize = 3
, _itInvDisplay = \it -> head (basicItemDisplay it) :
["* FIRERATE: *"
,"* " ++ fromMaybe " " (maybeRateStatus it) ++ " *"
]
}
& itParams. torqueAfter .~ 0.2
ltAutoGun :: Item
ltAutoGun = defaultAutoGun
{ _itName = "AUTO-LT"
+1 -1
View File
@@ -49,7 +49,7 @@ maybeModeStatus it = case it ^? itAttachment of
maybeRateStatus :: Item -> Maybe String
maybeRateStatus it = case it ^? itUse . useDelay . rateMaxMax of
Nothing -> Nothing
_ -> Just $ ' ' : " " ++ leftPad 4 ' ' (show (_rateMax . _useDelay $ _itUse it))
_ -> Just $ leftPad 3 ' ' (show (_rateMax . _useDelay $ _itUse it))
maybeWarmupStatus :: Item -> Maybe String
maybeWarmupStatus it = case it ^? itUse . useDelay . warmMax of