Move towards displaying tree links in inventory
This commit is contained in:
@@ -84,8 +84,11 @@ invLDT :: IM.IntMap Item -> [LabelDoubleTree ComposeLinkType ComposedItemStructu
|
||||
invLDT = joinItemsInList (leftRightCombine leftIsParentCombine rightIsParentCombine) . IM.elems .
|
||||
fmap (singleLDT . baseCIS)
|
||||
|
||||
invIndentIM' :: IM.IntMap Item -> IM.IntMap (Item,Int, ())
|
||||
invIndentIM' = fmap (\x -> (x,0,()))
|
||||
invAdj :: IM.IntMap Item -> IM.IntMap ([Int],[Int])
|
||||
invAdj = IM.unions . fmap (dtToUpDownAdj getid . ldtToDT) . invLDT
|
||||
where
|
||||
getid (itm, _,_,_) = fromMaybe (error "invAdj attempt to find item not in inventory") $
|
||||
itm ^? itLocation . ipInvID
|
||||
|
||||
invIndentIM :: IM.IntMap Item -> IM.IntMap (Item,Int, LabelDoubleTreeNodeType ComposeLinkType )
|
||||
invIndentIM = IM.fromAscList . zip [0..] . reverse . map (over _1 cisToItem) . concatMap ldtToIndentList . invLDT
|
||||
|
||||
Reference in New Issue
Block a user