Cleanup
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
All good (597 modules, at 10:01:53)
|
||||
All good (597 modules, at 10:13:32)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
module Dodge.Data.HUD where
|
||||
|
||||
import Control.Lens
|
||||
import Data.IntMap.Strict (IntMap)
|
||||
import Dodge.Data.Button
|
||||
import Dodge.Data.Combine
|
||||
import Dodge.Data.FloorItem
|
||||
@@ -22,11 +21,8 @@ data HUDElement
|
||||
|
||||
data SubInventory
|
||||
= NoSubInventory
|
||||
| ExamineInventory -- {_subInvMSel :: Maybe Int}
|
||||
| CombineInventory
|
||||
{ _ciCombinations :: IntMap (SelectionItem CombinableItem)
|
||||
, _ciSections :: SelectionSections CombinableItem
|
||||
}
|
||||
| ExamineInventory
|
||||
| CombineInventory { _ciSections :: SelectionSections CombinableItem }
|
||||
| LockedInventory
|
||||
| DisplayTerminal {_termID :: Int}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -106,7 +106,6 @@ updateWorldEventFlags u =
|
||||
|
||||
updateWorldEventFlag :: WorldEventFlag -> Universe -> Universe
|
||||
updateWorldEventFlag wef = case wef of
|
||||
--InventoryChange -> id -- TODO determine more precisely when the inventory does change
|
||||
InventoryChange -> updateInventoryPositioning
|
||||
CombineInventoryChange -> updateCombinePositioning
|
||||
|
||||
|
||||
Reference in New Issue
Block a user