Tweak rewind gun

This commit is contained in:
2022-12-30 11:43:29 +00:00
parent 5bc764655d
commit 29d6307076
9 changed files with 24 additions and 15 deletions
+3 -2
View File
@@ -196,8 +196,8 @@ functionalUpdate' :: Universe -> Universe
functionalUpdate' u = case u ^. uvWorld . cWorld . timeFlow of
NormalTimeFlow -> functionalUpdate u
ScrollTimeFlow smoothing _ _ _ -> over uvWorld (doTimeScroll smoothing) u
RewindLeftClick 0 _ -> u
RewindLeftClick _ _ -> over uvWorld scrollTimeBack u & uvWorld . cWorld . timeFlow .~ NormalTimeFlow
RewindLeftClick 0 _ -> u & uvWorld . cWorld . timeFlow .~ NormalTimeFlow
RewindLeftClick _ _ -> over uvWorld scrollTimeBack u -- & uvWorld . cWorld . timeFlow .~ NormalTimeFlow
_ -> u
doTimeScroll :: Int -> World -> World
@@ -226,6 +226,7 @@ scrollTimeBack w = case w ^? cWorld . pastWorlds . _head of
& cWorld . timeFlow . reverseAmount -~ 1
& cWorld . lWorld .~ lw
& pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse . leftConsumption . wpCharge .~ (x -1)
& pointerToItemLocation (w ^?! cWorld . lWorld . itemLocations . ix i) . itUse . leftHammer .~ HammerDown
_ -> w
where
i = w ^?! cWorld . timeFlow . scrollItemLocation