Continue tree based inventory update
This commit is contained in:
@@ -11,6 +11,7 @@ module Dodge.DisplayInventory (
|
||||
|
||||
import Control.Monad
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.IntMap.Merge.Strict as MIM
|
||||
import Data.Maybe
|
||||
import Dodge.Base.You
|
||||
import Dodge.Combine
|
||||
@@ -112,9 +113,11 @@ updateDisplaySections w cfig sss =
|
||||
coitems' =
|
||||
IM.fromDistinctAscList . zip [0 ..] $
|
||||
map closeObjectToSelectionItem (w ^. hud . closeObjects)
|
||||
invitems' = IM.mapWithKey (invSelectionItem cr) inv
|
||||
invitems' = MIM.merge MIM.dropMissing MIM.dropMissing (MIM.zipWithMatched $ const addindent) indents $ IM.mapWithKey (invSelectionItem cr) inv
|
||||
addindent x y = y & siPictures %~ map (x ++)
|
||||
cr = you w
|
||||
inv = _crInv (you w)
|
||||
indents = indentInv inv
|
||||
--inv = indentInv $ _crInv (you w)
|
||||
nfreeslots = crNumFreeSlots cr
|
||||
filtpair i itms filtdescription =
|
||||
|
||||
Reference in New Issue
Block a user