Cleanup
This commit is contained in:
@@ -93,7 +93,7 @@ handlePressedKeyInGame scode uv = case scode of
|
||||
ScancodeM -> over uvWorld toggleMap uv
|
||||
ScancodeR -> over uvWorld (crToggleReloading (you w)) uv
|
||||
ScancodeT -> over uvWorld testEvent uv
|
||||
ScancodeX -> uv & uvWorld . cWorld . hud . hudElement %~ toggleTweakInv
|
||||
ScancodeX -> uv & uvWorld %~ toggleTweakInv
|
||||
ScancodeC -> over uvWorld toggleCombineInv uv
|
||||
ScancodeI -> uv & uvWorld . cWorld . hud . hudElement %~ toggleInspectInv
|
||||
_ -> uv
|
||||
@@ -114,10 +114,13 @@ handlePressedKeyTerminal tmid scode w = case scode of
|
||||
Nothing -> t
|
||||
Just (t',_) -> t'
|
||||
|
||||
toggleTweakInv :: HUDElement -> HUDElement
|
||||
toggleTweakInv he = case he of
|
||||
DisplayInventory TweakInventory -> DisplayInventory NoSubInventory
|
||||
_ -> DisplayInventory TweakInventory
|
||||
toggleTweakInv :: World -> World
|
||||
toggleTweakInv w = case w ^. cWorld . hud . hudElement of
|
||||
DisplayInventory TweakInventory{} -> w & thepointer .~ DisplayInventory NoSubInventory
|
||||
_ -> w & thepointer .~ DisplayInventory (TweakInventory mi)
|
||||
where
|
||||
thepointer = cWorld . hud . hudElement
|
||||
mi = 0 <$ (yourItem w >>= (^? itTweaks . tweakParams . ix 0))
|
||||
|
||||
toggleInspectInv :: HUDElement -> HUDElement
|
||||
toggleInspectInv he = case he of
|
||||
|
||||
Reference in New Issue
Block a user