Allow for scrolling alteRifle

This commit is contained in:
2024-12-23 13:16:38 +00:00
parent cae02d8008
commit ca61ae0c64
+6 -3
View File
@@ -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