Remove SelectionSections
This commit is contained in:
@@ -122,7 +122,7 @@ updateCloseObjects w =
|
||||
case w ^? cWorld . lWorld . creatures . ix 0 . crManipulation . manObject . ispCloseObject of
|
||||
Just i
|
||||
| i >= length newcloseobjects -> scrollAugInvSel 1
|
||||
| isNothing (w ^? hud . hudElement . diSections . sssSections . ix 3 . ssItems . ix i) ->
|
||||
| isNothing (w ^? hud . hudElement . diSections . ix 3 . ssItems . ix i) ->
|
||||
scrollAugInvSel (-1)
|
||||
_ -> id
|
||||
filt = filter $ \obj -> dist ypos (closeObjPos obj) < 40 && hasButtonLOS ypos (closeObjPos obj) w
|
||||
@@ -159,7 +159,7 @@ changeSwapClose ::
|
||||
World ->
|
||||
World
|
||||
changeSwapClose f i w = fromMaybe w $ do
|
||||
ss <- w ^? hud . hudElement . diSections . sssSections . ix 3 . ssItems
|
||||
ss <- w ^? hud . hudElement . diSections . ix 3 . ssItems
|
||||
k <- f i ss
|
||||
return $
|
||||
w
|
||||
@@ -176,7 +176,7 @@ swapInvItems ::
|
||||
World ->
|
||||
World
|
||||
swapInvItems f i w = fromMaybe w $ do
|
||||
ss <- w ^? hud . hudElement . diSections . sssSections . ix 0 . ssItems
|
||||
ss <- w ^? hud . hudElement . diSections . ix 0 . ssItems
|
||||
k <- f i ss
|
||||
let updateselection = case w ^? hud . hudElement . diSelection . _Just of
|
||||
Just (0, j) | j == k -> hud . hudElement . diSelection . _Just . _2 .~ i
|
||||
@@ -239,5 +239,5 @@ selectedCloseObject :: World -> Maybe (Either FloorItem Button)
|
||||
selectedCloseObject w = do
|
||||
i <-
|
||||
you w ^? crManipulation . manObject . ispCloseObject
|
||||
<|> fmap fst (IM.lookupMin =<< w ^? hud . hudElement . diSections . sssSections . ix 3 . ssItems)
|
||||
<|> fmap fst (IM.lookupMin =<< w ^? hud . hudElement . diSections . ix 3 . ssItems)
|
||||
w ^? hud . closeObjects . ix i
|
||||
|
||||
Reference in New Issue
Block a user