Cleanup
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
module Dodge.DisplayInventory (
|
||||
toggleCombineInv,
|
||||
-- updateInventorySectionItems,
|
||||
updateInventoryPositioning,
|
||||
updateCombinePositioning,
|
||||
) where
|
||||
@@ -14,7 +13,6 @@ import Control.Lens
|
||||
import Dodge.Inventory.SelectionList
|
||||
import Control.Monad
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
--import qualified Data.IntMap.Merge.Strict as MIM
|
||||
import Data.Maybe
|
||||
import Dodge.Base.You
|
||||
import Dodge.Combine
|
||||
@@ -139,22 +137,6 @@ updateDisplaySections w cfig sss =
|
||||
invDimColor :: Color
|
||||
invDimColor = greyN 0.7
|
||||
|
||||
---- this appears to be only for filtering
|
||||
--updateInventorySectionItems :: World -> World
|
||||
--updateInventorySectionItems w =
|
||||
-- w
|
||||
-- & hud . hudElement . diSections . sssSections . ix 0 . ssItems %~ f
|
||||
-- where
|
||||
-- cr = w ^?! cWorld . lWorld . creatures . ix 0
|
||||
-- invitms = IM.mapWithKey (invSelectionItem' cr)
|
||||
-- $ fmap (^. _2 . locLDT . ldtValue)
|
||||
-- $ allInvLocs $ cr ^. crInv
|
||||
-- f olditems = fromMaybe olditems $ do
|
||||
-- --invitms <- IM.mapWithKey (invSelectionItem' cr) <$> cr ^? crInv
|
||||
-- return $ case w ^? hud . hudElement . diSections . sssExtra . sssFilters . ix (-1) . _Just of
|
||||
-- Just str -> IM.filter (plainRegex str) invitms
|
||||
-- _ -> invitms
|
||||
|
||||
plainRegex :: String -> SelectionItem a -> Bool
|
||||
plainRegex = flip $ andOrRegex (\si str -> regexList str (_siPictures si))
|
||||
|
||||
@@ -255,10 +237,7 @@ listSelectionColorPicture = foldMap f
|
||||
|
||||
enterCombineInv :: Configuration -> World -> World
|
||||
enterCombineInv cfig w =
|
||||
w & hud . hudElement . subInventory
|
||||
.~ CombineInventory
|
||||
cm'
|
||||
sss
|
||||
w & hud . hudElement . subInventory .~ CombineInventory sss
|
||||
where
|
||||
cm' = IM.fromAscList $ zip [0 ..] $ combineList w
|
||||
cm
|
||||
|
||||
Reference in New Issue
Block a user