diff --git a/src/Dodge/Update/Scroll.hs b/src/Dodge/Update/Scroll.hs index 8edae84f5..a9d8f7162 100644 --- a/src/Dodge/Update/Scroll.hs +++ b/src/Dodge/Update/Scroll.hs @@ -61,11 +61,14 @@ selectedItemScroll :: Int -> World -> World selectedItemScroll scrollamount w = fromMaybe w $ do i <- you w ^? crManipulation . manObject . imSelectedItem itm <- you w ^? crInv . ix i - return $ itemScroll scrollamount itm w + return $ itemScroll scrollamount i itm w -itemScroll :: Int -> Item -> World -> World -itemScroll yi itm w = case itm ^. itType of +itemScroll :: Int -> Int -> Item -> World -> World +itemScroll yi invid itm w = case itm ^. itType of ATTACH ZOOMSCOPE -> updateScopeZoom w + HELD ALTERIFLE | yi /= 0 -> w + & cWorld . lWorld . creatures . ix 0 . crInv . ix invid + . itUse . heldAim . aimMuzzles . ix 0 . mzAmmoSlot %~ ((`mod` 2) . (+1)) _ -> w -- note that your _crInvLock does not apply to this TODO check that this is what