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
|
module Dodge.Data.HUD where
|
||||||
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
import Data.IntMap.Strict (IntMap)
|
|
||||||
import Dodge.Data.Button
|
import Dodge.Data.Button
|
||||||
import Dodge.Data.Combine
|
import Dodge.Data.Combine
|
||||||
import Dodge.Data.FloorItem
|
import Dodge.Data.FloorItem
|
||||||
@@ -22,11 +21,8 @@ data HUDElement
|
|||||||
|
|
||||||
data SubInventory
|
data SubInventory
|
||||||
= NoSubInventory
|
= NoSubInventory
|
||||||
| ExamineInventory -- {_subInvMSel :: Maybe Int}
|
| ExamineInventory
|
||||||
| CombineInventory
|
| CombineInventory { _ciSections :: SelectionSections CombinableItem }
|
||||||
{ _ciCombinations :: IntMap (SelectionItem CombinableItem)
|
|
||||||
, _ciSections :: SelectionSections CombinableItem
|
|
||||||
}
|
|
||||||
| LockedInventory
|
| LockedInventory
|
||||||
| DisplayTerminal {_termID :: Int}
|
| DisplayTerminal {_termID :: Int}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
module Dodge.DisplayInventory (
|
module Dodge.DisplayInventory (
|
||||||
toggleCombineInv,
|
toggleCombineInv,
|
||||||
-- updateInventorySectionItems,
|
|
||||||
updateInventoryPositioning,
|
updateInventoryPositioning,
|
||||||
updateCombinePositioning,
|
updateCombinePositioning,
|
||||||
) where
|
) where
|
||||||
@@ -14,7 +13,6 @@ import Control.Lens
|
|||||||
import Dodge.Inventory.SelectionList
|
import Dodge.Inventory.SelectionList
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import qualified Data.IntMap.Strict as IM
|
import qualified Data.IntMap.Strict as IM
|
||||||
--import qualified Data.IntMap.Merge.Strict as MIM
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Dodge.Base.You
|
import Dodge.Base.You
|
||||||
import Dodge.Combine
|
import Dodge.Combine
|
||||||
@@ -139,22 +137,6 @@ updateDisplaySections w cfig sss =
|
|||||||
invDimColor :: Color
|
invDimColor :: Color
|
||||||
invDimColor = greyN 0.7
|
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 :: String -> SelectionItem a -> Bool
|
||||||
plainRegex = flip $ andOrRegex (\si str -> regexList str (_siPictures si))
|
plainRegex = flip $ andOrRegex (\si str -> regexList str (_siPictures si))
|
||||||
|
|
||||||
@@ -255,10 +237,7 @@ listSelectionColorPicture = foldMap f
|
|||||||
|
|
||||||
enterCombineInv :: Configuration -> World -> World
|
enterCombineInv :: Configuration -> World -> World
|
||||||
enterCombineInv cfig w =
|
enterCombineInv cfig w =
|
||||||
w & hud . hudElement . subInventory
|
w & hud . hudElement . subInventory .~ CombineInventory sss
|
||||||
.~ CombineInventory
|
|
||||||
cm'
|
|
||||||
sss
|
|
||||||
where
|
where
|
||||||
cm' = IM.fromAscList $ zip [0 ..] $ combineList w
|
cm' = IM.fromAscList $ zip [0 ..] $ combineList w
|
||||||
cm
|
cm
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ updateWorldEventFlags u =
|
|||||||
|
|
||||||
updateWorldEventFlag :: WorldEventFlag -> Universe -> Universe
|
updateWorldEventFlag :: WorldEventFlag -> Universe -> Universe
|
||||||
updateWorldEventFlag wef = case wef of
|
updateWorldEventFlag wef = case wef of
|
||||||
--InventoryChange -> id -- TODO determine more precisely when the inventory does change
|
|
||||||
InventoryChange -> updateInventoryPositioning
|
InventoryChange -> updateInventoryPositioning
|
||||||
CombineInventoryChange -> updateCombinePositioning
|
CombineInventoryChange -> updateCombinePositioning
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user