Move equipType out of record

This commit is contained in:
2025-06-05 13:52:36 +01:00
parent 1293aa0fdf
commit c8d44fea79
14 changed files with 123 additions and 164 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ module Dodge.Update.Scroll (
updateWheelEvent,
) where
import Dodge.Data.EquipType
import Padding
import Control.Monad
import qualified Data.Map.Strict as M
@@ -38,7 +39,7 @@ updateBaseWheelEvent yi w
bdown b = w & has (input . mouseButtons . ix b)
rbscrollmax = fromMaybe 1 $ do
invid <- you w ^? crManipulation . manObject . imSelectedItem
esite <- you w ^? crInv . ix invid . itUse . uequipEffect . eeType
esite <- you w ^? crInv . ix invid >>= equipType -- . itUse . uequipEffect . eeType
return . length $ eqSiteToPositions esite
selectedItemScroll :: Int -> World -> Maybe World