Cleanup
This commit is contained in:
+25
-26
@@ -1,18 +1,15 @@
|
||||
module Dodge.Luse
|
||||
( useL
|
||||
)
|
||||
where
|
||||
{-# LANGUAGE LambdaCase #-}
|
||||
module Dodge.Luse (
|
||||
useL,
|
||||
) where
|
||||
|
||||
--import Dodge.Base
|
||||
import Dodge.Creature.Action
|
||||
import Dodge.Data.World
|
||||
import Dodge.Item.Weapon.TriggerType
|
||||
--import Geometry
|
||||
--import qualified IntMapHelp as IM
|
||||
import LensHelp
|
||||
|
||||
useL :: Luse -> Item -> Creature -> World -> World
|
||||
useL lu = case lu of
|
||||
useL = \case
|
||||
LDoNothing -> const $ const id
|
||||
LRewind -> useRewindGun
|
||||
LTimePause -> hammerCheckL useStopWatch
|
||||
@@ -22,28 +19,30 @@ useL lu = case lu of
|
||||
LBoost -> boostSelfL 10
|
||||
|
||||
useStopWatch :: Item -> Creature -> World -> World
|
||||
useStopWatch itm _ w = w
|
||||
& timeFlow .~ PausedTimeFlow
|
||||
{ _timeFlowCharge = itm ^?! itUse . leftConsumption . wpCharge
|
||||
, _scrollItemID = _itID itm
|
||||
}
|
||||
|
||||
useStopWatch itm _ =
|
||||
timeFlow
|
||||
.~ PausedTimeFlow
|
||||
{ _timeFlowCharge = itm ^?! itUse . leftConsumption . wpCharge
|
||||
, _scrollItemID = _itID itm
|
||||
}
|
||||
|
||||
useTimeScrollGun :: Item -> Creature -> World -> World
|
||||
useTimeScrollGun itm _ w = w & timeFlow .~ ItemScrollTimeFlow
|
||||
{ _scrollSmoothing = 0
|
||||
, _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
||||
, _futureWorlds = []
|
||||
, _scrollItemID = _itID itm
|
||||
}
|
||||
|
||||
useTimeScrollGun itm _ =
|
||||
timeFlow
|
||||
.~ ItemScrollTimeFlow
|
||||
{ _scrollSmoothing = 0
|
||||
, _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
||||
, _futureWorlds = []
|
||||
, _scrollItemID = _itID itm
|
||||
}
|
||||
|
||||
useRewindGun :: Item -> Creature -> World -> World
|
||||
useRewindGun itm _ w = w
|
||||
& timeFlow .~ RewindLeftClick
|
||||
{ _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
||||
, _scrollItemID = _itID itm
|
||||
}
|
||||
useRewindGun itm _ =
|
||||
timeFlow
|
||||
.~ RewindLeftClick
|
||||
{ _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
||||
, _scrollItemID = _itID itm
|
||||
}
|
||||
|
||||
--useRewindGun _ _ w = case w ^. cwTime . rewindWorlds of
|
||||
-- [w'] -> w & cwTime . maybeWorld .~ Just' w'
|
||||
|
||||
Reference in New Issue
Block a user