Make examine inventory controlled by item, perhaps still buggy

This commit is contained in:
2025-01-01 21:14:38 +00:00
parent 86aba6d115
commit 5b978d9f1c
25 changed files with 523 additions and 502 deletions
+3 -10
View File
@@ -27,10 +27,6 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
-- functions that modify the inventory should be centralised so that
-- this lock can be sensibly applied, perhaps
| w ^?! cWorld . lWorld . creatures . ix 0 . crInvLock -> w
-- | rbDown -> case (yourScrollAttachment w, _rbOptions w) of
-- (_,EquipOptions{}) -> w & rbOptions . opSel %~ scrollRBOption yi rbscrollmax
-- (Nothing, _) -> w
-- (Just (invid,hs), _) -> doHeldScroll invid hs y w
| bdown ButtonRight -> case _rbOptions w of
EquipOptions{} -> w & rbOptions . opSel %~ scrollRBOption yi rbscrollmax
NoRightButtonOptions -> selectedItemScroll yi w
@@ -38,12 +34,9 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
| invKeyDown -> changeSwapSel yi w
| otherwise -> scrollAugInvSel yi w
DisplayInventory{_subInventory = ExamineInventory}
| invKeyDown -> scrollAugInvSel yi w
| otherwise -> w
-- | invKeyDown && rbDown -> w & moveTweakSel yi
-- | invKeyDown -> scrollAugInvSel yi w
-- | rbDown -> w & changeTweakParam mi yi
-- | otherwise -> w & moveTweakSel yi
-- | invKeyDown
-> scrollAugInvSel yi w
-- | otherwise -> w
DisplayInventory{_subInventory = CombineInventory{}} -> w & moveCombineSel yi
DisplayInventory{_subInventory = DisplayTerminal tmid} -> terminalWheelEvent yi tmid w
_ -> w