diff --git a/ghcidOutput b/ghcidOutput index 3c0914f78..74a2d71b7 100644 --- a/ghcidOutput +++ b/ghcidOutput @@ -1 +1 @@ -All good (594 modules, at 14:23:55) +All good (594 modules, at 09:43:09) diff --git a/src/Dodge/DisplayInventory.hs b/src/Dodge/DisplayInventory.hs index c51defccb..fbaf0c18a 100644 --- a/src/Dodge/DisplayInventory.hs +++ b/src/Dodge/DisplayInventory.hs @@ -77,6 +77,10 @@ updateInventoryPositioning :: Universe -> Universe updateInventoryPositioning u = u & uvWorld . hud . hudElement . diSections %~ updateDisplaySections (_uvWorld u) (_uvConfig u) + & checkInventorySelectionExists + +checkInventorySelectionExists :: Universe -> Universe +checkInventorySelectionExists u = u updateDisplaySections :: World -> diff --git a/src/Dodge/Inventory.hs b/src/Dodge/Inventory.hs index be3b635d3..29b1a652b 100644 --- a/src/Dodge/Inventory.hs +++ b/src/Dodge/Inventory.hs @@ -84,6 +84,7 @@ rmInvItem cid invid w = updateselection | cid == 0 && cr ^? crManipulation . manObject . imSelectedItem == Just invid = scrollAugInvSel (-1) . scrollAugInvSel 1 -- . updateInventorySectionItems +-- id -- . updateInventorySectionItems | otherwise = pointcid . crManipulation . manObject . imSelectedItem %~ g diff --git a/src/Dodge/Render/HUD.hs b/src/Dodge/Render/HUD.hs index 7ebf4415f..1c40fe676 100644 --- a/src/Dodge/Render/HUD.hs +++ b/src/Dodge/Render/HUD.hs @@ -91,7 +91,7 @@ drawRootCursor w sss msel ldp cfig = fromMaybe mempty $ do (i,j) <- msel guard $ i == 0 inv <- w ^? cWorld . lWorld . creatures . ix 0 . crInv - (x,y) <- getRootItemBounds j $ inv + (x,y) <- getRootItemBounds j inv return $ drawSSMultiCursor sss (Just (0,x)) (Just (y- x)) ldp (BoundaryCursor [minBound .. maxBound]) cfig diff --git a/src/Dodge/SelectionSections.hs b/src/Dodge/SelectionSections.hs index 44c96744e..9a327e0cc 100644 --- a/src/Dodge/SelectionSections.hs +++ b/src/Dodge/SelectionSections.hs @@ -168,7 +168,7 @@ selSecYint i j sss = do . fst $ IM.split j (ss ^. ssItems) where - secpos = sum . fmap (length . _ssShownItems) . fst $ IM.split i $ sss + secpos = sum . fmap (length . _ssShownItems) . fst $ IM.split i sss -- it is annoying that Control.Foldl doesn't seem to allow for scans to be done -- at the same time as folds diff --git a/src/Dodge/TestString.hs b/src/Dodge/TestString.hs index 9d964714a..7e1ea1807 100644 --- a/src/Dodge/TestString.hs +++ b/src/Dodge/TestString.hs @@ -21,7 +21,9 @@ import Dodge.Data.Universe import qualified IntMapHelp as IM testStringInit :: Universe -> [String] -testStringInit u = [show $ u ^? uvWorld . hud . hudElement . subInventory . nsMouseOver . _Just] +testStringInit u = [show $ u ^? uvWorld . hud . hudElement . diSelection . _Just + , show $ u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crManipulation . manObject + ] -- <> map show (IM.elems (L.postscan (L.premap _siHeight L.sum) -- $ fromMaybe mempty $ u ^? uvWorld . hud . hudElement . diSections . sssSections . ix 0 . ssItems) -- )