Work towards fixing inventory space leak

This commit is contained in:
2025-01-05 20:54:07 +00:00
parent 7175a96249
commit 9769480d0b
3 changed files with 53 additions and 53 deletions
+5 -2
View File
@@ -6,6 +6,7 @@ module Dodge.Inventory.SelectionList (
closeButtonToSelectionItem,
) where
import Dodge.Data.DoubleTree
import Dodge.Item.InvSize
import Dodge.Data.ComposedItem
import Dodge.Data.SelectionList
@@ -19,8 +20,9 @@ import NewInt
import Padding
import Picture.Base
invSelectionItem :: Int -> World -> ComposedItem -> SelectionItem ()
invSelectionItem indent w ci =
--invSelectionItem :: Int -> World -> ComposedItem -> SelectionItem ()
invSelectionItem :: World -> Int -> LocationLDT ItemLink ComposedItem -> SelectionItem ()
invSelectionItem w indent loc =
SelectionItem
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
, _siHeight = itInvHeight $ ci ^. _1
@@ -31,6 +33,7 @@ invSelectionItem indent w ci =
, _siPayload = ()
}
where
ci = loc ^. locLDT . ldtValue
lw = w ^. cWorld . lWorld
cr = lw ^?! creatures . ix 0
itid = ci ^. _1 . itID . unNInt