Make examine inventory controlled by item, perhaps still buggy
This commit is contained in:
@@ -440,7 +440,6 @@ updateInitialPressInGame uv sc = case sc of
|
||||
ScancodeM -> toggleMap uv
|
||||
-- ScancodeR -> over (uvWorld . cWorld . lWorld . creatures . ix 0) crReloadToggle uv
|
||||
ScancodeT -> over uvWorld testEvent uv
|
||||
ScancodeX -> uv & uvWorld %~ toggleTweakInv
|
||||
ScancodeC -> toggleCombineInv uv
|
||||
-- the following should be put in a more sensible place
|
||||
ScancodeSlash -> uv & uvWorld %~ updateEnterRegex
|
||||
@@ -470,8 +469,7 @@ doRegexInput inp i sss msel filts
|
||||
)
|
||||
where
|
||||
endregex a b =
|
||||
--( sss & ix i . ssItems .~ mempty
|
||||
( sss -- & ix i . ssItems .~ mempty
|
||||
( sss
|
||||
, msel & ssSetCursor (ssLookupDown a b) sss
|
||||
, Nothing
|
||||
)
|
||||
@@ -596,15 +594,6 @@ toggleMap u = case u ^. uvWorld . hud . hudElement of
|
||||
}
|
||||
_ -> u & uvWorld . hud . hudElement .~ DisplayCarte
|
||||
|
||||
toggleTweakInv :: World -> World
|
||||
toggleTweakInv w = case w ^? hud . hudElement . subInventory of
|
||||
Just ExamineInventory{} ->
|
||||
w
|
||||
& thepointer .~ NoSubInventory --MouseInvNothing
|
||||
_ -> w & thepointer .~ ExamineInventory -- mi
|
||||
where
|
||||
thepointer = hud . hudElement . subInventory
|
||||
|
||||
tryCombine :: (Int, Int) -> World -> World
|
||||
tryCombine (i, j) w = fromMaybe w $ do
|
||||
sss <- w ^? hud . hudElement . subInventory . ciSections
|
||||
|
||||
Reference in New Issue
Block a user