Cleanup, remove inventory display update code on dropping item

This commit is contained in:
2024-10-06 22:32:10 +01:00
parent 650854d13e
commit 507c8e9819
7 changed files with 64 additions and 77 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ module Dodge.Item.Grammar (
invRootTrees,
pciToCI,
basePCI,
invTrees'',
allInvLocs,
) where
import Control.Applicative
@@ -201,8 +201,8 @@ invTrees' = IM.unions . map (ldtToIM getindex . fmap (^. _1)) . map (fmap (\(x,
-- returns an intmap with trees for all items
--invTrees'' :: IM.IntMap Item -> [LocationLDT ItemLink ComposedItem]
invTrees'' :: IM.IntMap Item -> IM.IntMap (Int,LocationLDT ItemLink ComposedItem)
invTrees'' inv = foldMap (f . LocLDT TopLDT) (IM.elems (invRootTrees inv)) mempty
allInvLocs :: IM.IntMap Item -> IM.IntMap (Int,LocationLDT ItemLink ComposedItem)
allInvLocs inv = foldMap (f . LocLDT TopLDT) (IM.elems (invRootTrees inv)) mempty
where
f t = cldtPropagateFold h h g 0 t id
h x _ _ _ = x + 1