Add stopWatch
This commit is contained in:
@@ -14,12 +14,21 @@ useL :: Luse -> Item -> Creature -> World -> World
|
||||
useL lu = case lu of
|
||||
LDoNothing -> const $ const id
|
||||
LRewind -> useRewindGun
|
||||
LTimePause -> hammerCheckL useStopWatch
|
||||
LTimeScroll -> hammerCheckL useTimeScrollGun
|
||||
LShrink -> hammerCheckL useShrinkGun
|
||||
LBlink -> hammerCheckL (shootL $ const blinkActionMousePos)
|
||||
LUnsafeBlink -> hammerCheckL (shootL $ const unsafeBlinkAction)
|
||||
LBoost -> boostSelfL 10
|
||||
|
||||
useStopWatch :: Item -> Creature -> World -> World
|
||||
useStopWatch itm _ w = w
|
||||
& cWorld . timeFlow .~ PausedTimeFlow
|
||||
{ _timeFlowCharge = itm ^?! itUse . leftConsumption . wpCharge
|
||||
, _scrollItemLocation = _itID itm
|
||||
}
|
||||
|
||||
|
||||
useTimeScrollGun :: Item -> Creature -> World -> World
|
||||
useTimeScrollGun itm _ w = w & cWorld . timeFlow .~ ScrollTimeFlow
|
||||
{ _scrollSmoothing = 0
|
||||
@@ -28,6 +37,7 @@ useTimeScrollGun itm _ w = w & cWorld . timeFlow .~ ScrollTimeFlow
|
||||
, _scrollItemLocation = _itID itm
|
||||
}
|
||||
|
||||
|
||||
useRewindGun :: Item -> Creature -> World -> World
|
||||
useRewindGun itm _ w = w
|
||||
& cWorld . timeFlow .~ RewindLeftClick
|
||||
|
||||
Reference in New Issue
Block a user