Cleanup
This commit is contained in:
@@ -55,10 +55,10 @@ bangCane = defaultGun
|
||||
, _randomOffset = 0
|
||||
}
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
, _ammoBaseMax = 1
|
||||
, _reloadTime = 15
|
||||
, _reloadType = ActivePartial 1
|
||||
{ _laType = basicBullet
|
||||
, _laMax = 1
|
||||
, _laReloadTime = 15
|
||||
, _laReloadType = ActivePartial 1
|
||||
}
|
||||
, _itUse = ruseAmmoParamsRate 6 upHammer
|
||||
[ ammoHammerCheck
|
||||
@@ -114,7 +114,7 @@ bangCaneX i = bangCane
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ TwoHandFlat
|
||||
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
||||
& itConsumption . ammoBaseMax .~ i
|
||||
& itConsumption . laMax .~ i
|
||||
& itParams . gunBarrels .~ MultiBarrel
|
||||
{_brlSpread = AlignedBarrels
|
||||
,_brlNum = i
|
||||
@@ -123,10 +123,10 @@ bangCaneX i = bangCane
|
||||
& itParams . torqueAfter .~ 0.48 + 0.2 * fromIntegral i
|
||||
caneStickSoundChoice :: Item -> SoundID
|
||||
caneStickSoundChoice it
|
||||
| _ammoLoaded (_itConsumption it) < 2 = tap3S
|
||||
| _laLoaded (_itConsumption it) < 2 = tap3S
|
||||
| otherwise = shotgunS
|
||||
caneClipX :: Int -> Item -> Shape
|
||||
caneClipX i it = case it ^? itConsumption . ammoLoaded of
|
||||
caneClipX i it = case it ^? itConsumption . laLoaded of
|
||||
Just la | la > 0 -> foldMap
|
||||
( (\y -> translateSH (V3 5 0 3) . upperPrismPoly 1 $ map (+.+ V2 0 y) $ square 1.5)
|
||||
. (\k -> fromIntegral k * 5 - ((fromIntegral i - 1) * 2.5)))
|
||||
@@ -148,7 +148,7 @@ rifle = bangCane
|
||||
& itUse . useAim . aimStance .~ TwoHandTwist
|
||||
& itName .~ "RIFLE"
|
||||
& itType .~ RIFLE
|
||||
& itConsumption . ammoBaseMax .~ 1
|
||||
& itConsumption . laMax .~ 1
|
||||
& itUse . useAim . aimWeight .~ 6
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
-- & itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
||||
@@ -158,9 +158,9 @@ repeater = rifle
|
||||
& itModules . at ModRifleMag ?~ DefaultModule
|
||||
& itName .~ "REPEATER"
|
||||
& itType .~ REPEATER
|
||||
& itConsumption . reloadType .~ ActiveClear
|
||||
& itConsumption . reloadTime .~ 80
|
||||
& itConsumption . ammoBaseMax .~ 15
|
||||
& itConsumption . laReloadType .~ ActiveClear
|
||||
& itConsumption . laReloadTime .~ 80
|
||||
& itConsumption . laMax .~ 15
|
||||
& itDimension . dimSPic .~ (\it -> noPic $ baseRifleShape
|
||||
<> makeTinClipAt 0 (V3 10 (-2) 0) it
|
||||
)
|
||||
@@ -189,7 +189,7 @@ burstRifle = repeater
|
||||
, useTimeCheck
|
||||
, sideEffectOnFrame 7 (torqueSideEffect 0.2)
|
||||
, lockInvFor 7
|
||||
, \f it -> repeatOnFrames (take (_ammoLoaded (_itConsumption it) - 1) [3,6]) f it
|
||||
, \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [3,6]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, applyInaccuracy
|
||||
@@ -207,7 +207,7 @@ fastBurstRifle = repeater
|
||||
, useTimeCheck
|
||||
, sideEffectOnFrame 9 (torqueSideEffect 0.4)
|
||||
, lockInvFor 9
|
||||
, \f it -> repeatOnFrames (take (_ammoLoaded (_itConsumption it) - 1) [2,4,6,8]) f it
|
||||
, \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [2,4,6,8]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, applyInaccuracy
|
||||
@@ -226,7 +226,7 @@ completeBurstRifle = repeater
|
||||
, useTimeCheck
|
||||
, sideEffectOnFrame 15 (torqueSideEffect 0.8)
|
||||
, lockInvFor 15
|
||||
, \f it -> repeatOnFrames (take (_ammoLoaded (_itConsumption it) - 1) [1..14]) f it
|
||||
, \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [1..14]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoAmount 1
|
||||
, applyInaccuracy
|
||||
@@ -265,10 +265,10 @@ miniGunX i = defaultAutoGun
|
||||
{ _itName = "MINIGUN-" ++ show i
|
||||
, _itType = MINIGUNX i
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
, _ammoBaseMax = 1500
|
||||
, _ammoLoaded = 1500
|
||||
, _reloadTime = 200
|
||||
{ _laType = basicBullet
|
||||
, _laMax = 1500
|
||||
, _laLoaded = 1500
|
||||
, _laReloadTime = 200
|
||||
}
|
||||
, _itUse = miniGunUse i
|
||||
& useDelay .~ WarmUpNoDelay {_warmTime = 0,_warmMax = 200}
|
||||
@@ -310,9 +310,9 @@ miniGunX i = defaultAutoGun
|
||||
& itDimension . dimPortage . muzPos .~ 40
|
||||
|
||||
miniGunXPictItem :: Int -> Item -> SPic
|
||||
miniGunXPictItem i it = miniGunXPict i spin (_ammoLoaded $ _itConsumption it)
|
||||
miniGunXPictItem i it = miniGunXPict i spin (_laLoaded $ _itConsumption it)
|
||||
where
|
||||
spin = (-10) * _ammoLoaded (_itConsumption it) + _warmTime (_useDelay $ _itUse it)
|
||||
spin = (-10) * _laLoaded (_itConsumption it) + _warmTime (_useDelay $ _itUse it)
|
||||
|
||||
miniGunXPict :: Int -> Int -> Int -> SPic
|
||||
miniGunXPict i spin _ =
|
||||
|
||||
@@ -6,7 +6,7 @@ import Data.Maybe
|
||||
import Control.Lens
|
||||
|
||||
makeSingleClipAt :: Point3 -> Item -> Shape
|
||||
makeSingleClipAt p it = case it ^? itConsumption . ammoLoaded of
|
||||
makeSingleClipAt p it = case it ^? itConsumption . laLoaded of
|
||||
Just 0 -> mempty
|
||||
_ -> translateSH p $ upperPrismPoly 1 $ square 1.5
|
||||
|
||||
@@ -14,4 +14,4 @@ makeTinClipAt :: Float -> Point3 -> Item -> Shape
|
||||
makeTinClipAt r p it = translateSH p . overPosSH (rotate3z r) $ upperPrismPoly 1 $ rectNSEW 0 (-y) (-2) 2
|
||||
where
|
||||
y = fromIntegral y' * 0.3
|
||||
y' = fromMaybe 0 $ it ^? itConsumption . ammoLoaded
|
||||
y' = fromMaybe 0 $ it ^? itConsumption . laLoaded
|
||||
|
||||
@@ -73,17 +73,17 @@ bangRod = defaultGun
|
||||
<> makeSingleClipAt (V3 5 0 3) it
|
||||
}
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
, _ammoBaseMax = 1
|
||||
, _reloadTime = 20
|
||||
, _reloadType = ActiveClear
|
||||
{ _laType = basicBullet
|
||||
, _laMax = 1
|
||||
, _laReloadTime = 20
|
||||
, _laReloadType = ActiveClear
|
||||
}
|
||||
}
|
||||
& itUse . useAim . aimWeight .~ 8
|
||||
& itUse . useAim . aimRange .~ 1
|
||||
& itUse . useAim . aimStance .~ OneHand
|
||||
& itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1.5}
|
||||
& itConsumption . aoType . amBulEff .~ expireAndDamage heavyBulDams
|
||||
& itConsumption . laType . amBulEff .~ expireAndDamage heavyBulDams
|
||||
baseRodShape :: Shape
|
||||
baseRodShape = colorSH orange $ upperPrismPoly 3 $ rectXH 20 2
|
||||
baseAMRShape :: Shape
|
||||
@@ -114,7 +114,7 @@ amr :: Item
|
||||
amr = elephantGun
|
||||
& itName .~ "ANTIMATERIELRIFLE"
|
||||
& itType .~ AMR
|
||||
& itConsumption . ammoBaseMax .~ 15
|
||||
& itConsumption . laMax .~ 15
|
||||
& itDimension . dimSPic .~ (\it -> noPic $ baseAMRShape
|
||||
<> makeTinClipAt 0 (V3 10 (-2) 0) it
|
||||
)
|
||||
|
||||
@@ -36,7 +36,7 @@ import LensHelp
|
||||
|
||||
bangStickSoundChoice :: Item -> SoundID
|
||||
bangStickSoundChoice it
|
||||
| _ammoLoaded (_itConsumption it) < 2 = tap3S
|
||||
| _laLoaded (_itConsumption it) < 2 = tap3S
|
||||
| otherwise = shotgunS
|
||||
|
||||
bangStick :: Int -> Item
|
||||
@@ -46,10 +46,10 @@ bangStick i = defaultGun
|
||||
_ -> "BANGSTICKx"++ show i
|
||||
, _itType = BANGSTICK i
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
, _ammoBaseMax = i
|
||||
, _reloadTime = 10
|
||||
, _reloadType = ActivePartial 1
|
||||
{ _laType = basicBullet
|
||||
, _laMax = i
|
||||
, _laReloadTime = 10
|
||||
, _laReloadType = ActivePartial 1
|
||||
}
|
||||
, _itUse = ruseAmmoParamsRate 8 upHammer
|
||||
[ ammoHammerCheck
|
||||
@@ -104,7 +104,7 @@ baseSMGShape = colorSH green $ upperPrismPoly 3 $ rectXH 20 2
|
||||
baseStickShape :: Shape
|
||||
baseStickShape = colorSH green $ upperPrismPoly 3 $ rectXH 10 2
|
||||
stickClip :: Item -> Shape
|
||||
stickClip it = case it ^? itConsumption . ammoLoaded of
|
||||
stickClip it = case it ^? itConsumption . laLoaded of
|
||||
Just x | x > 0 -> foldMap f [0..x-1]
|
||||
_ -> mempty
|
||||
where
|
||||
@@ -118,17 +118,17 @@ revolver = pistol
|
||||
{ _itName = "REVOLVER"
|
||||
, _itType = REVOLVER
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
, _ammoBaseMax = 6
|
||||
, _ammoLoaded = 0
|
||||
, _reloadTime = 10
|
||||
, _reloadType = ActivePartial 1
|
||||
{ _laType = basicBullet
|
||||
, _laMax = 6
|
||||
, _laLoaded = 0
|
||||
, _laReloadTime = 10
|
||||
, _laReloadType = ActivePartial 1
|
||||
}
|
||||
}
|
||||
& itDimension . dimSPic .~ (\it -> noPic $ baseStickShape <> revolverClip it)
|
||||
|
||||
revolverClip :: Item -> Shape
|
||||
revolverClip it = case it ^? itConsumption . ammoLoaded of
|
||||
revolverClip it = case it ^? itConsumption . laLoaded of
|
||||
Just al | al > 0 -> translateSH (V3 5 0 1) $ foldMap f [1..al]
|
||||
_ -> mempty
|
||||
where
|
||||
@@ -173,11 +173,11 @@ pistol = (bangStick 1)
|
||||
{ _itName = "PISTOL"
|
||||
, _itType = PISTOL
|
||||
, _itConsumption = defaultAmmo
|
||||
{ _aoType = basicBullet
|
||||
, _ammoBaseMax = 15
|
||||
, _ammoLoaded = 0
|
||||
, _reloadTime = 70
|
||||
, _reloadType = ActiveClear
|
||||
{ _laType = basicBullet
|
||||
, _laMax = 15
|
||||
, _laLoaded = 0
|
||||
, _laReloadTime = 70
|
||||
, _laReloadType = ActiveClear
|
||||
}
|
||||
, _itUse = ruseAmmoParamsRate 6 upHammer
|
||||
(ammoHammerCheck : pistolAfterHamMods)
|
||||
@@ -228,7 +228,7 @@ revolverX i = revolver
|
||||
-- rather than locking the inventory, a better solution may be to check
|
||||
-- that the weapon is still in your hands in the repeated frames
|
||||
, lockInvFor 10
|
||||
, \f it -> repeatOnFrames (take (_ammoLoaded (_itConsumption it) - 1) [2,4,6,8,10]) f it
|
||||
, \f it -> repeatOnFrames (take (_laLoaded (_itConsumption it) - 1) [2,4,6,8,10]) f it
|
||||
, withSoundStart tap3S
|
||||
, useAmmoUpTo 1
|
||||
, applyInaccuracy
|
||||
@@ -237,4 +237,4 @@ revolverX i = revolver
|
||||
, withTorqueAfter
|
||||
, withRecoil
|
||||
]
|
||||
} & itConsumption . ammoBaseMax .~ i * 6
|
||||
} & itConsumption . laMax .~ i * 6
|
||||
|
||||
Reference in New Issue
Block a user