Make examine inventory controlled by item, perhaps still buggy
This commit is contained in:
@@ -6,9 +6,9 @@ module Dodge.Item.Display (
|
||||
basicItemDisplay,
|
||||
) where
|
||||
|
||||
import Dodge.Data.World
|
||||
import Data.Maybe
|
||||
import Dodge.Data.ComposedItem
|
||||
import Dodge.Data.Creature
|
||||
import Dodge.Item.InvSize
|
||||
import LensHelp
|
||||
import Padding
|
||||
@@ -18,14 +18,14 @@ import ShortShow
|
||||
-- variety of factors but typically don't depend on functional quality,
|
||||
-- colour gives an indication of an item's function within a structure
|
||||
|
||||
itemDisplay :: Creature -> ComposedItem -> [String]
|
||||
itemDisplay cr ci =
|
||||
itemDisplay :: World -> Creature -> ComposedItem -> [String]
|
||||
itemDisplay w cr ci =
|
||||
zipWithDefaults
|
||||
id
|
||||
(leftPad 15 ' ')
|
||||
itemDisplayPad
|
||||
(basicItemDisplay itm)
|
||||
(itemNumberDisplay cr ci)
|
||||
(itemNumberDisplay w cr ci)
|
||||
where
|
||||
itm = ci ^. _1
|
||||
|
||||
@@ -92,8 +92,12 @@ showEquipItem eit = case eit of
|
||||
-- this can change, but probably won't when (say) dropped and then picked up
|
||||
-- again
|
||||
-- that is to say, it should not change based on functional positioning
|
||||
itemNumberDisplay :: Creature -> ComposedItem -> [String]
|
||||
itemNumberDisplay cr ci
|
||||
itemNumberDisplay :: World -> Creature -> ComposedItem -> [String]
|
||||
itemNumberDisplay w cr ci
|
||||
| Just x <- ci ^? _1 . itUse . useToggle = [show x]
|
||||
| ITEMSCANNER <- ci ^. _1 . itType
|
||||
, Just ExamineInventory <- w ^? hud . hudElement . subInventory
|
||||
= ["ACTIVE"]
|
||||
| EQUIP WRIST_ECG <- ci ^. _1 . itType =
|
||||
[displayPulse $ cr ^?! crType . avatarPulse . pulseProgress]
|
||||
| HELD ALTERIFLE <- ci ^. _1 . itType =
|
||||
|
||||
Reference in New Issue
Block a user