Move item inv size and item dimensions from records to external function

This commit is contained in:
2024-11-26 23:36:08 +00:00
parent 9534698a24
commit b21513c4dd
22 changed files with 187 additions and 176 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ module Dodge.Inventory.SelectionList (
closeButtonToSelectionItem,
) where
import Dodge.Item.InvSize
import Dodge.Data.ComposedItem
import Dodge.Data.SelectionList
import Dodge.Data.World
@@ -22,7 +23,7 @@ invSelectionItem :: Int -> Creature -> Int -> ComposedItem -> SelectionItem ()
invSelectionItem indent cr i ci =
SelectionItem
{ _siPictures = pics & ix 0 %~ (++ anyequippos ++ anyhotkey)
, _siHeight = _itInvSize $ _cItem ci
, _siHeight = itInvHeight $ _cItem ci
, _siWidth = 15
, _siIsSelectable = True
, _siColor = col