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
|
||||
|
||||
Reference in New Issue
Block a user