Commit before changing CombineInventory to use SelectionSections
This commit is contained in:
@@ -8,7 +8,6 @@ module Dodge.Inventory (
|
|||||||
firstPosSelectionSections,
|
firstPosSelectionSections,
|
||||||
checkInvSlotsYou,
|
checkInvSlotsYou,
|
||||||
rmSelectedInvItem,
|
rmSelectedInvItem,
|
||||||
--invSelSize,
|
|
||||||
selNumPos,
|
selNumPos,
|
||||||
selNumTextEndPos,
|
selNumTextEndPos,
|
||||||
selSecSelCol,
|
selSecSelCol,
|
||||||
@@ -481,25 +480,8 @@ ssLookupGE' i sss = do
|
|||||||
Just (j',si) -> return (i',j',si)
|
Just (j',si) -> return (i',j',si)
|
||||||
Nothing -> ssLookupGT' i' sss
|
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 :: World -> Maybe (Either FloorItem Button)
|
||||||
selectedCloseObject w = do
|
selectedCloseObject w = do
|
||||||
i <- you w ^? crManipulation . manObject . inNearby . ispCloseObject
|
i <- you w ^? crManipulation . manObject . inNearby . ispCloseObject
|
||||||
<|> fmap fst (IM.lookupMin =<< w ^? hud . hudElement . diSections . sssSections . ix 3 . ssItems)
|
<|> fmap fst (IM.lookupMin =<< w ^? hud . hudElement . diSections . sssSections . ix 3 . ssItems)
|
||||||
w ^? hud . closeObjects . ix i
|
w ^? hud . closeObjects . ix i
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user