Make combine and tweak menus servicable

This commit is contained in:
2021-12-04 00:27:22 +00:00
parent ecbc8eab35
commit 0114a2f9f2
14 changed files with 208 additions and 175 deletions
+8 -7
View File
@@ -126,6 +126,7 @@ bangStick i = defaultGun
}
}
, _itTweaks = defaultBulletSelTweak
, _itInvSize = fromIntegral i / 3
}
bangCane,bangRod :: Item
bangCane = defaultGun
@@ -225,9 +226,9 @@ hvAutoGun = defaultAutoGun
& useDelay .~ VariableRate {_rateMax = 25, _rateMaxMax = 24, _rateMinMax = 7, _rateTime = 0}
, _itFloorPict = hvAutoGunPic
, _itInvSize = 3
, _itInvDisplay = \it -> basicItemDisplay it ++
["* FRATE: *"
,"* " ++ fromMaybe " " (maybeRateStatus it) ++ " *"
, _itInvDisplay = \it -> head (basicItemDisplay it) :
["* FIRERATE: *"
,"* " ++ fromMaybe " " (maybeRateStatus it) ++ " *"
]
}
hvAutoGunPic :: Item -> SPic
@@ -340,10 +341,10 @@ miniGun = defaultAutoGun
, _itEquipPict = pictureWeaponAim miniGunPictItem
, _itTweaks = defaultBulletSelTweak
, _itInvSize = 4
, _itInvDisplay = \it -> basicItemDisplay it ++
["*" ++ replicate 8 ' ' ++ "*"
,"* " ++ fromMaybe " " (maybeWarmupStatus it) ++ " *"
,"*" ++ replicate 8 ' ' ++ "*" ]
, _itInvDisplay = \it -> head (basicItemDisplay it) :
["*" ++ replicate 13 ' ' ++ "*"
,"* " ++ fromMaybe " " (maybeWarmupStatus it) ++ " *"
,"*" ++ replicate 13 ' ' ++ "*" ]
-- [" " ++ replicate 8 ch
-- ," " ++ replicate 2 ch ++ fromMaybe " " (maybeWarmupStatus it) ++ replicate 2 ch
-- ," " ++ replicate 8 ch]
+2 -2
View File
@@ -16,8 +16,8 @@ import Control.Lens
{- | Displays the item name, ammo if loaded, and any selected '_itCharMode'. -}
basicItemDisplay :: Item -> [String]
basicItemDisplay it = Prelude.take (itSlotsTaken it) $
[midPadL 15 ' ' thename (' ' : thenumber) ++ theparam]
++ repeat "*"
(midPadL 15 ' ' thename (' ' : thenumber) ++ theparam)
: repeat "*"
where
thename = _itName it
thenumber = case it ^? itConsumption of
+1 -5
View File
@@ -69,12 +69,8 @@ launcher = defaultGun
, _tweakParams = basicAmPjMoves
}
, _itInvSize = 3
, _itInvDisplay = \it -> basicItemDisplay it ++
["!" ++ replicate 8 ch ++ "!"
,"!" ++ replicate 8 ch ++ "!"]
, _itInvDisplay = basicItemDisplay
}
where
ch = ' '
defaultShellAmmo :: AmmoType
defaultShellAmmo = ProjectileAmmo
+2 -2
View File
@@ -402,13 +402,13 @@ spreadLoaded :: ChainEffect
spreadLoaded eff item cr w = foldr f w dirs
where
cd = 0.5 * spread * fromIntegral (numBulLoaded -1)
ds = (subtract cd . (spread *) . fromIntegral) <$> [0 .. numBulLoaded - 1]
ds = subtract cd . (spread *) . fromIntegral <$> [0 .. numBulLoaded - 1]
-- dirs = ds
dirs = zipWith (+)
ds
(randomRs (-spread,spread) (_randGen w))
f dir = eff item (cr & crDir +~ dir)
spread = (_spreadAngle . _brlSpread . _gunBarrels $ _itParams item)
spread = _spreadAngle . _brlSpread . _gunBarrels $ _itParams item
-- numBarrels = _brlNum . _gunBarrels $ _itParams item
-- spread = (_spreadAngle . _brlSpread . _gunBarrels $ _itParams item) * loadedSpreadParam
-- loadedSpreadParam = 0.5 * (fromIntegral (numBulLoaded - numBarrels) + 1)