Commit before changing CombineInventory to use SelectionSections

This commit is contained in:
2023-02-17 20:08:43 +00:00
parent 56f2dc04cf
commit 1cb59d0809
-18
View File
@@ -8,7 +8,6 @@ module Dodge.Inventory (
firstPosSelectionSections,
checkInvSlotsYou,
rmSelectedInvItem,
--invSelSize,
selNumPos,
selNumTextEndPos,
selSecSelCol,
@@ -481,25 +480,8 @@ ssLookupGE' i sss = do
Just (j',si) -> return (i',j',si)
Nothing -> ssLookupGT' i' sss
--toAugSelPos :: World -> ManipulatedObject -> Int
--toAugSelPos w mo = case mo of
-- SelItem i _ -> i
-- SelNothing -> ninv
-- SelCloseObject i -> ninv + i + 1
-- where
-- ninv = length (yourInv w)
--
--fromAugSelPos :: World -> Int -> ManipulatedObject
--fromAugSelPos w i
-- | i > ninv = SelCloseObject (i - ninv - 1)
-- | i == ninv = SelNothing
-- | otherwise = SelItem i NoInvSelAction
-- where
-- ninv = length (yourInv w)
selectedCloseObject :: World -> Maybe (Either FloorItem Button)
selectedCloseObject w = do
i <- you w ^? crManipulation . manObject . inNearby . ispCloseObject
<|> fmap fst (IM.lookupMin =<< w ^? hud . hudElement . diSections . sssSections . ix 3 . ssItems)
w ^? hud . closeObjects . ix i