Display equipment as well, may want to move this into number display
This commit is contained in:
@@ -52,7 +52,7 @@ itemDisplay :: World -> Creature -> ComposedItem -> [String]
|
|||||||
itemDisplay w cr ci = f
|
itemDisplay w cr ci = f
|
||||||
(basicItemDisplay itm)
|
(basicItemDisplay itm)
|
||||||
(itemNumberDisplay w cr ci)
|
(itemNumberDisplay w cr ci)
|
||||||
`g` anyhotkey
|
`g` anyextra
|
||||||
where
|
where
|
||||||
itm = ci ^. _1
|
itm = ci ^. _1
|
||||||
NInt itid = itm ^. itID
|
NInt itid = itm ^. itID
|
||||||
@@ -60,9 +60,18 @@ itemDisplay w cr ci = f
|
|||||||
f xs _ = xs
|
f xs _ = xs
|
||||||
g (x:xs) (y:_) = (rightPad 15 ' ' x ++ y) : xs
|
g (x:xs) (y:_) = (rightPad 15 ' ' x ++ y) : xs
|
||||||
g xs _ = xs
|
g xs _ = xs
|
||||||
-- anyhotkey = [" [E]"]
|
anyextra = maybe [] ((:[])) (anyhotkey <> anyequippos)
|
||||||
anyhotkey = maybe [] ((:[]) . hotkeyToString)
|
anyhotkey = fmap hotkeyToString
|
||||||
(w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid)
|
(w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid)
|
||||||
|
-- anyhotkey = maybe [] ((:[]) . hotkeyToString)
|
||||||
|
-- (w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid)
|
||||||
|
anyequippos = fmap
|
||||||
|
(rightPad 8 ' ' . (' ' :) . eqPosText)
|
||||||
|
(ci ^? _1 . itLocation . ilEquipSite . _Just)
|
||||||
|
-- anyequippos = maybe
|
||||||
|
-- []
|
||||||
|
-- (rightPad 8 ' ' . (' ' :) . eqPosText)
|
||||||
|
-- (ci ^? _1 . itLocation . ilEquipSite . _Just)
|
||||||
|
|
||||||
--itemDisplay :: World -> Creature -> ComposedItem -> [String]
|
--itemDisplay :: World -> Creature -> ComposedItem -> [String]
|
||||||
--itemDisplay w cr ci =
|
--itemDisplay w cr ci =
|
||||||
|
|||||||
Reference in New Issue
Block a user