Tweak combine inventory regex
This commit is contained in:
@@ -16,7 +16,6 @@ module Dodge.Inventory (
|
||||
updateTerminal,
|
||||
closeObjScrollDir,
|
||||
closeObjectCol,
|
||||
changeInvSel,
|
||||
changeSwapInvSel,
|
||||
changeAugInvSel,
|
||||
crNumFreeSlots,
|
||||
@@ -322,19 +321,6 @@ closeObjScrollDir x
|
||||
| x < 0 = over (hud . closeObjects) rotD
|
||||
| otherwise = id
|
||||
|
||||
changeInvSel :: Int -> World -> World
|
||||
changeInvSel i w
|
||||
| i == 0 || n == 0 = w
|
||||
| otherwise = w
|
||||
& pointcrInvSel . isel . ispItem %~ (`mod` n) . subtract i
|
||||
& pointcrInvSel . isel . iselAction .~ NoInvSelAction
|
||||
& pointcrInvSel . isel . ispCloseObject %~ (`mod` numCO) . subtract i
|
||||
where
|
||||
-- arguably this should jump the invpos into the inventory proper
|
||||
pointcrInvSel = cWorld . lWorld . creatures . ix 0 . crInvSel
|
||||
n = length $ w ^?! cWorld . lWorld . creatures . ix 0 . crInv
|
||||
numCO = length $ w ^. hud . closeObjects
|
||||
|
||||
changeSwapInvSel :: Int -> World -> World
|
||||
changeSwapInvSel k w = case you w ^? crInvSel . isel of
|
||||
Just (SelItem i _) -> w & cWorld . lWorld . creatures . ix 0 %~ updatecreature i
|
||||
|
||||
Reference in New Issue
Block a user