Cleanup
This commit is contained in:
@@ -79,7 +79,6 @@ updateKeyInGame uv sc InitialPress = case sc of
|
||||
ScancodeT -> over uvWorld testEvent uv
|
||||
ScancodeX -> uv & uvWorld %~ toggleTweakInv
|
||||
ScancodeC -> over uvWorld toggleCombineInv uv
|
||||
ScancodeI -> uv & uvWorld . cWorld . lWorld . hud . hudElement %~ toggleInspectInv
|
||||
_ -> uv
|
||||
where
|
||||
w = _uvWorld uv
|
||||
@@ -108,13 +107,8 @@ toggleMap w = case w ^?! cWorld . lWorld . hud . hudElement of
|
||||
|
||||
toggleTweakInv :: World -> World
|
||||
toggleTweakInv w = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
DisplayInventory TweakInventory{} -> w & thepointer .~ NoSubInventory
|
||||
_ -> w & thepointer .~ TweakInventory mi
|
||||
DisplayInventory ExamineInventory{} -> w & thepointer .~ NoSubInventory
|
||||
_ -> w & thepointer .~ ExamineInventory mi
|
||||
where
|
||||
thepointer = cWorld . lWorld . hud . hudElement . subInventory
|
||||
mi = 0 <$ (yourItem w >>= (^? itTweaks . tweakParams . ix 0))
|
||||
|
||||
toggleInspectInv :: HUDElement -> HUDElement
|
||||
toggleInspectInv he = case he of
|
||||
DisplayInventory InspectInventory -> DisplayInventory NoSubInventory
|
||||
_ -> DisplayInventory InspectInventory
|
||||
|
||||
@@ -32,7 +32,7 @@ updateWheelEvent yi w = case w ^. cWorld . lWorld . hud . hudElement of
|
||||
| lbDown -> w & cWorld . camPos . camZoom +~ y
|
||||
| invKeyDown -> changeSwapInvSel yi w
|
||||
| otherwise -> stopSoundFrom (CrReloadSound 0) $ changeAugInvSel yi w
|
||||
DisplayInventory (TweakInventory mi)
|
||||
DisplayInventory (ExamineInventory mi)
|
||||
| invKeyDown && rbDown -> w & moveTweakSel yi
|
||||
| invKeyDown -> stopSoundFrom (CrReloadSound 0) $ changeInvSel yi w
|
||||
| rbDown -> w & changeTweakParam mi yi
|
||||
@@ -87,7 +87,7 @@ scrollRBOption y w
|
||||
|
||||
moveTweakSel :: Int -> World -> World
|
||||
moveTweakSel i w = case yourItem w ^? _Just . itTweaks . tweakParams of
|
||||
Just l -> w & cWorld . lWorld . hud . hudElement . subInventory . tweakInvSel . _Just %~ (`mod` length l) . subtract i
|
||||
Just l -> w & cWorld . lWorld . hud . hudElement . subInventory . examineInvSel . _Just %~ (`mod` length l) . subtract i
|
||||
_ -> w
|
||||
|
||||
changeTweakParam :: Maybe Int -> Int -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user