Tweak bullet magazines

This commit is contained in:
2025-10-03 12:33:28 +01:00
parent 4d1d2f36bc
commit a8348a3515
6 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -219,7 +219,7 @@ invDT =
. fmap (singleDT . baseCI)
invDT' :: NewIntMap InvInt Item -> [DTree OItem]
invDT' = fmap propagateOrientation' . invDT
invDT' = fmap propagateOrientation . invDT
-- this assumes the creature inventory is well formed, specifically the
-- location ids
@@ -243,7 +243,7 @@ invAdj = IM.unions . map g . invDT
---- returns an intmap with trees for (only!) root items, indexed by inventory position
invIMDT :: NewIntMap InvInt Item -> IM.IntMap (DTree OItem)
invIMDT = fmap propagateOrientation' . IM.fromDistinctAscList . reverse . map getid . invDT
invIMDT = fmap propagateOrientation . IM.fromDistinctAscList . reverse . map getid . invDT
where
getid :: DTree CItem -> (Int, DTree CItem)
getid t = (t ^?! dtValue . _1 . itLocation . ilInvID . unNInt, t)