Cleanup
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
--{-# LANGUAGE TupleSections #-}
|
||||
|
||||
module Dodge.Inventory (
|
||||
selSecSelPos,
|
||||
checkInvSlotsYou,
|
||||
@@ -89,9 +88,6 @@ rmInvItem cid invid w = case w ^? getcid . crInv . ix invid . itUse . useAmount
|
||||
doanyitemeffect = fromMaybe id $ do
|
||||
rmf <- itm ^? itEffect . ieOnDrop
|
||||
return $ doInvEffect rmf itm cr
|
||||
--removeAnySlotEquipment = case w ^? cWorld . lWorld . creatures . ix cid . crInvEquipped . ix invid of
|
||||
-- Just epos -> pointcid . crEquipment . at epos .~ Nothing
|
||||
-- Nothing -> id
|
||||
removeAnySlotEquipment = fromMaybe id $ do
|
||||
epos <- w ^? cWorld . lWorld . creatures . ix cid . crInvEquipped . ix invid
|
||||
return $ pointcid . crEquipment . at epos .~ Nothing
|
||||
@@ -114,16 +110,6 @@ rmSelectedInvItem cid w = case w ^? cWorld . lWorld . creatures . ix cid . crMan
|
||||
Just i -> rmInvItem cid i w
|
||||
Nothing -> w
|
||||
|
||||
--selNumPos :: ManipulatedObject -> World -> Maybe Int
|
||||
--selNumPos mo w =
|
||||
-- w ^? hud . hudElement . diSections
|
||||
-- >>= case mo of
|
||||
-- InInventory SortInventory -> selSecSelPos (-1) 0
|
||||
-- InInventory (SelItem i _) -> selSecSelPos 0 i
|
||||
-- SelNothing -> selSecSelPos 1 0
|
||||
-- InNearby SortNearby -> selSecSelPos 2 0
|
||||
-- InNearby (SelCloseObject i) -> selSecSelPos 3 i
|
||||
|
||||
-- there are still more ListDisplayParams to integrate here
|
||||
selNumTextEndPos :: Configuration -> ListDisplayParams -> SelectionSections a -> Int -> Int -> Maybe Point2
|
||||
selNumTextEndPos cfig ldp sss i j = do
|
||||
|
||||
Reference in New Issue
Block a user