Continue reload refactor
This commit is contained in:
+4
-4
@@ -119,7 +119,7 @@ doCombine i w = case combineItemListYou w !? i of
|
||||
$ foldr (rmInvItem yid) w (sort is)
|
||||
where
|
||||
yid = _yourID w
|
||||
selectinv (Just i', w') = w' & creatures . ix yid . crInvSel .~ i'
|
||||
selectinv (Just i', w') = w' & creatures . ix yid . crInvSel .~ InvSel i' NoInvSelAction
|
||||
selectinv (Nothing, w') = w'
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ wheelEvent y w = case _hudElement $ _hud w of
|
||||
| rbDown -> case (yourItem w ^? _Just . itUse . heldScroll,_rbOptions w) of
|
||||
(_,EquipOptions{}) -> scrollRBOption y w
|
||||
(Nothing,_) -> closeObjScrollDir y w
|
||||
(Just f,_) -> w & creatures . ix 0 . crInv . ix (_crInvSel $ you w) %~ f y (you w)
|
||||
(Just f,_) -> w & creatures . ix 0 . crInv . ix (crSel $ you w) %~ f y (you w)
|
||||
| lbDown -> w & cameraZoom +~ y
|
||||
| invKeyDown -> stopSoundFrom (CrReloadSound 0) $ changeSwapInvSel yi w
|
||||
| otherwise -> stopSoundFrom (CrReloadSound 0) $ changeAugInvSel yi w
|
||||
@@ -218,12 +218,12 @@ scrollRBOption y w
|
||||
|
||||
moveTweakSel :: Int -> World -> World
|
||||
moveTweakSel i w = case yourItem w ^? _Just . itTweaks . tweakParams of
|
||||
Just l -> w & creatures . ix (_yourID w) . crInv . ix (_crInvSel (you w))
|
||||
Just l -> w & creatures . ix (_yourID w) . crInv . ix (crSel (you w))
|
||||
. itTweaks . tweakSel %~ (`mod` length l) . subtract i
|
||||
_ -> w
|
||||
changeTweakParam :: Int -> World -> World
|
||||
changeTweakParam i w = w
|
||||
& creatures . ix (_yourID w) . crInv . ix (_crInvSel (you w)) %~
|
||||
& creatures . ix (_yourID w) . crInv . ix (crSel (you w)) %~
|
||||
( (itTweaks . tweakParams . ix paramid . curTweak .~ x)
|
||||
. _doTweak params x)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user