Allow for swapping inventory items

This commit is contained in:
2023-02-23 14:12:08 +00:00
parent 6fff71cdcc
commit 683acf8a05
9 changed files with 161 additions and 104 deletions
-10
View File
@@ -171,14 +171,6 @@ updateSectionsPositioning mselpos allavailablelines ((k, y) : xs) sss =
linestaken ss' = max (length $ _ssShownItems ss') (_ssMinSize ss')
previoussections = updateSectionsPositioning mselpos availablelines xs sss
--manObjIndex :: ManipulatedObject -> (Int,Int)
--manObjIndex mo = case mo of
-- InInventory SortInventory -> (-1, 0)
-- InInventory (SelItem i _) -> (0, i)
-- SelNothing -> (1,0)
-- InNearby SortNearby -> (2,0)
-- InNearby (SelCloseObject i) -> (3,i)
updateSection ::
IM.IntMap (SelectionItem a) ->
Maybe Int ->
@@ -247,8 +239,6 @@ enterCombineInv cfig w =
cm'
sss
where
--(updateCombineSelections w cfig sss)
cm' = IM.fromAscList $ zip [0 ..] $ combineList' w
cm
| null cm' = IM.singleton 0 $ SelectionInfo ["No possible combinations"] 1 False white 0