Tweak inventory management
This commit is contained in:
@@ -14,10 +14,11 @@ module Dodge.Item.Weapon.BulletGuns
|
||||
import Dodge.Data
|
||||
import Dodge.TweakBullet
|
||||
import Dodge.Default.Weapon
|
||||
import Dodge.Item.Weapon.InventoryDisplay
|
||||
import Dodge.Default
|
||||
import Dodge.Item.Attachment
|
||||
import Dodge.Item.Weapon.ExtraEffect
|
||||
import Dodge.Item.Weapon.InventoryDisplay
|
||||
--import Dodge.Item.Weapon.InventoryDisplay
|
||||
import Dodge.Item.Weapon.AmmoParams
|
||||
import Dodge.Item.Draw
|
||||
import Dodge.Item.Weapon.Bullet
|
||||
@@ -28,6 +29,7 @@ import Geometry
|
||||
import ShapePicture
|
||||
import Shape
|
||||
|
||||
import Data.Maybe
|
||||
import qualified Data.Sequence as Seq
|
||||
import Control.Lens
|
||||
|
||||
@@ -256,10 +258,17 @@ miniGun = defaultAutoGun
|
||||
, _itFloorPict = miniGunPictItem
|
||||
, _itEquipPict = pictureWeaponAim miniGunPictItem
|
||||
, _itTweaks = defaultBulletSelTweak
|
||||
, _itInvSize = 2
|
||||
, _itInvDisplay = \it -> basicWeaponDisplay it ++ [" COLD"]
|
||||
, _itInvSize = 4
|
||||
, _itInvDisplay = \it -> basicWeaponDisplay it ++
|
||||
["*" ++ replicate 8 ' ' ++ "*"
|
||||
,"* " ++ fromMaybe " " (maybeWarmupStatus it) ++ " *"
|
||||
,"*" ++ replicate 8 ' ' ++ "*" ]
|
||||
-- [" " ++ replicate 8 ch
|
||||
-- ," " ++ replicate 2 ch ++ fromMaybe " " (maybeWarmupStatus it) ++ replicate 2 ch
|
||||
-- ," " ++ replicate 8 ch]
|
||||
} & itDimension . muzzleLength .~ 15
|
||||
where
|
||||
--ch = '*'
|
||||
recoilAmount = 5
|
||||
[vm1,vm2,vm3,vm4] =
|
||||
[ 0.25
|
||||
|
||||
@@ -3,6 +3,7 @@ Display of weapon strings in the inventory.
|
||||
-}
|
||||
module Dodge.Item.Weapon.InventoryDisplay
|
||||
( basicWeaponDisplay
|
||||
, maybeWarmupStatus
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Padding
|
||||
@@ -26,7 +27,7 @@ basicWeaponDisplay it = [midPadL 10 ' ' thename (' ' : thenumber) ++ theparam]
|
||||
. listToMaybe
|
||||
$ mapMaybe ($ it)
|
||||
[ maybeModeStatus
|
||||
, maybeWarmupStatus
|
||||
-- , maybeWarmupStatus
|
||||
, maybeRateStatus
|
||||
]
|
||||
|
||||
@@ -45,6 +46,6 @@ maybeWarmupStatus :: Item -> Maybe String
|
||||
maybeWarmupStatus it = case it ^? itUse . useDelay . warmMax of
|
||||
Nothing -> Nothing
|
||||
Just m -> case m - (_warmTime . _useDelay $ _itUse it) of
|
||||
x | x <= 1 -> Just " WARM"
|
||||
x | x <= 1 -> Just "WARM"
|
||||
| otherwise -> let n = show x
|
||||
in Just $ ' ' : Prelude.take (4 - Prelude.length n) "WARM" ++ n
|
||||
in Just $ Prelude.take (4 - Prelude.length n) "WARM" ++ n
|
||||
|
||||
@@ -5,6 +5,7 @@ module Dodge.Item.Weapon.Launcher
|
||||
import Dodge.Data
|
||||
import Dodge.Default
|
||||
import Dodge.Default.Weapon
|
||||
import Dodge.Item.Weapon.InventoryDisplay
|
||||
import Dodge.Default.Shell
|
||||
import Dodge.SoundLogic.LoadSound
|
||||
import Dodge.WorldEvent.Explosion
|
||||
@@ -67,7 +68,13 @@ launcher = defaultGun
|
||||
{ _tweakSel = 0
|
||||
, _tweakParams = basicAmPjMoves
|
||||
}
|
||||
, _itInvSize = 3
|
||||
, _itInvDisplay = \it -> basicWeaponDisplay it ++
|
||||
["!" ++ replicate 8 ch ++ "!"
|
||||
,"!" ++ replicate 8 ch ++ "!"]
|
||||
}
|
||||
where
|
||||
ch = ' '
|
||||
|
||||
defaultShellAmmo :: AmmoType
|
||||
defaultShellAmmo = ProjectileAmmo
|
||||
|
||||
Reference in New Issue
Block a user