Cleanup, stop rboptions extending into examine inventory
This commit is contained in:
@@ -69,7 +69,7 @@ defaultSubInvSelectionList =
|
|||||||
invDisplayParams :: World -> ListDisplayParams
|
invDisplayParams :: World -> ListDisplayParams
|
||||||
invDisplayParams w =
|
invDisplayParams w =
|
||||||
defaultListDisplayParams
|
defaultListDisplayParams
|
||||||
& ldpWidth .~ FixedSelectionWidth topInvW
|
-- & ldpWidth .~ FixedSelectionWidth topInvW
|
||||||
& ldpCursorType .~ BorderCursor selcursortype
|
& ldpCursorType .~ BorderCursor selcursortype
|
||||||
& ldpWidth .~ FixedSelectionWidth (determineInvSelCursorWidth w)
|
& ldpWidth .~ FixedSelectionWidth (determineInvSelCursorWidth w)
|
||||||
where
|
where
|
||||||
@@ -294,7 +294,8 @@ determineInvSelCursorWidth :: World -> Int
|
|||||||
determineInvSelCursorWidth w = case _rbOptions w of
|
determineInvSelCursorWidth w = case _rbOptions w of
|
||||||
NoRightButtonOptions -> topInvW
|
NoRightButtonOptions -> topInvW
|
||||||
EquipOptions{}
|
EquipOptions{}
|
||||||
| ButtonRight `M.member` _mouseButtons (_input w) -> 47
|
| ButtonRight `M.member` _mouseButtons (_input w)
|
||||||
|
&& w ^? hud . hudElement . subInventory == Just NoSubInventory -> 47
|
||||||
| otherwise -> topInvW
|
| otherwise -> topInvW
|
||||||
|
|
||||||
combineListSelection :: World -> Maybe Int -> SelectionList ()
|
combineListSelection :: World -> Maybe Int -> SelectionList ()
|
||||||
|
|||||||
+5
-4
@@ -198,7 +198,7 @@ functionalUpdate' u = case u ^. uvWorld . cWorld . timeFlow of
|
|||||||
ScrollTimeFlow smoothing _ _ _ -> over uvWorld (doTimeScroll smoothing) u
|
ScrollTimeFlow smoothing _ _ _ -> over uvWorld (doTimeScroll smoothing) u
|
||||||
RewindLeftClick 0 _ -> u & uvWorld . cWorld . timeFlow .~ NormalTimeFlow
|
RewindLeftClick 0 _ -> u & uvWorld . cWorld . timeFlow .~ NormalTimeFlow
|
||||||
RewindLeftClick _ _ -> over uvWorld scrollTimeBack u -- & uvWorld . cWorld . timeFlow .~ NormalTimeFlow
|
RewindLeftClick _ _ -> over uvWorld scrollTimeBack u -- & uvWorld . cWorld . timeFlow .~ NormalTimeFlow
|
||||||
DeathTime {} -> u
|
DeathTime{} -> u
|
||||||
PausedTimeFlow _ itmloc -> over uvWorld (pauseTime itmloc) u
|
PausedTimeFlow _ itmloc -> over uvWorld (pauseTime itmloc) u
|
||||||
|
|
||||||
pauseTime :: Int -> World -> World
|
pauseTime :: Int -> World -> World
|
||||||
@@ -225,7 +225,6 @@ doTimeScroll' smoothing w = case w ^. input . scrollAmount of
|
|||||||
_ | smoothing < 0 -> scrollTimeForward w & cWorld . timeFlow . scrollSmoothing +~ 1
|
_ | smoothing < 0 -> scrollTimeForward w & cWorld . timeFlow . scrollSmoothing +~ 1
|
||||||
_ -> w
|
_ -> w
|
||||||
|
|
||||||
|
|
||||||
scrollTimeBack :: World -> World
|
scrollTimeBack :: World -> World
|
||||||
scrollTimeBack w = case w ^? cWorld . pastWorlds . _head of
|
scrollTimeBack w = case w ^? cWorld . pastWorlds . _head of
|
||||||
Nothing -> w
|
Nothing -> w
|
||||||
@@ -236,10 +235,11 @@ scrollTimeBack w = case w ^? cWorld . pastWorlds . _head of
|
|||||||
& cWorld . timeFlow . futureWorlds .:~ (w ^. cWorld . lWorld)
|
& cWorld . timeFlow . futureWorlds .:~ (w ^. cWorld . lWorld)
|
||||||
& cWorld . timeFlow . reverseAmount -~ 1
|
& cWorld . timeFlow . reverseAmount -~ 1
|
||||||
& cWorld . lWorld .~ lw
|
& cWorld . lWorld .~ lw
|
||||||
& pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse . leftConsumption . wpCharge .~ (x -1)
|
& pointituse . leftConsumption . wpCharge .~ (x -1)
|
||||||
& pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse . leftHammer .~ HammerDown
|
& pointituse . leftHammer .~ HammerDown
|
||||||
_ -> w
|
_ -> w
|
||||||
where
|
where
|
||||||
|
pointituse = pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse
|
||||||
i = w ^?! cWorld . timeFlow . scrollItemLocation
|
i = w ^?! cWorld . timeFlow . scrollItemLocation
|
||||||
|
|
||||||
scrollTimeForward :: World -> World
|
scrollTimeForward :: World -> World
|
||||||
@@ -350,6 +350,7 @@ advanceScrollAmount u =
|
|||||||
|
|
||||||
updatePastWorlds :: CWorld -> CWorld
|
updatePastWorlds :: CWorld -> CWorld
|
||||||
updatePastWorlds w = w & pastWorlds %~ (forceFoldable . take 100 . ((w ^. lWorld) :))
|
updatePastWorlds w = w & pastWorlds %~ (forceFoldable . take 100 . ((w ^. lWorld) :))
|
||||||
|
|
||||||
--updatePastWorlds w = w & pastWorlds .~ []
|
--updatePastWorlds w = w & pastWorlds .~ []
|
||||||
|
|
||||||
moveHammersUp :: Universe -> Universe
|
moveHammersUp :: Universe -> Universe
|
||||||
|
|||||||
Reference in New Issue
Block a user