Work on time scrolling

This commit is contained in:
2022-10-27 10:23:52 +01:00
parent 4ffd361f11
commit 35f2992fe4
12 changed files with 127 additions and 83 deletions
+9
View File
@@ -14,11 +14,20 @@ useL :: Luse -> Item -> Creature -> World -> World
useL lu = case lu of
LDoNothing -> const $ const id
LRewind -> useRewindGun
LTimeScroll -> useTimeScrollGun
LShrink -> hammerCheckL useShrinkGun
LBlink -> hammerCheckL (shootL $ const blinkActionMousePos)
LUnsafeBlink -> hammerCheckL (shootL $ const unsafeBlinkAction)
LBoost -> boostSelfL 10
useTimeScrollGun :: Item -> Creature -> World -> World
useTimeScrollGun itm _ w = w & timeFlow .~ ScrollTimeFlow
{ _scrollSmoothing = 0
, _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
, _futureWorlds = []
, _scrollItemLocation = _itID itm
}
useRewindGun :: Item -> Creature -> World -> World
useRewindGun _ _ w = w
--useRewindGun _ _ w = case w ^. cwTime . rewindWorlds of