Fix reset of reloading from 0 scrolling
This commit is contained in:
@@ -308,7 +308,7 @@ closeObjScrollDir x
|
||||
|
||||
changeInvSel :: Int -> World -> World
|
||||
changeInvSel i w
|
||||
| n == 0 = w
|
||||
| i == 0 || n == 0 = w
|
||||
| yourInvSel w < n =
|
||||
w
|
||||
& pointcrInvSel . iselPos %~ (`mod` n) . subtract i
|
||||
@@ -325,6 +325,7 @@ changeInvSel i w
|
||||
|
||||
changeSwapInvSel :: Int -> World -> World
|
||||
changeSwapInvSel k w
|
||||
| k == 0 = w
|
||||
| yourInvSel w < n =
|
||||
w
|
||||
& cWorld . lWorld . creatures . ix 0 %~ updatecreature
|
||||
@@ -356,10 +357,12 @@ changeSwapInvSel k w
|
||||
numCO = length $ w ^. hud . closeObjects
|
||||
|
||||
changeAugInvSel :: Int -> World -> World
|
||||
changeAugInvSel i w =
|
||||
w
|
||||
& cWorld . lWorld . creatures . ix 0 . crInvSel . iselPos %~ (`mod` n) . subtract i
|
||||
& cWorld . lWorld . creatures . ix 0 . crInvSel . iselAction .~ NoInvSelAction
|
||||
changeAugInvSel i w
|
||||
| i == 0 = w
|
||||
| otherwise =
|
||||
w
|
||||
& cWorld . lWorld . creatures . ix 0 . crInvSel . iselPos %~ (`mod` n) . subtract i
|
||||
& cWorld . lWorld . creatures . ix 0 . crInvSel . iselAction .~ NoInvSelAction
|
||||
where
|
||||
n = length (yourInv w) + length (w ^. hud . closeObjects) + 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user