Cleanup
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
All good (597 modules, at 10:20:30)
|
All good (597 modules, at 10:47:27)
|
||||||
|
|||||||
@@ -236,8 +236,7 @@ listSelectionColorPicture = foldMap f
|
|||||||
g str = (_siColor si,translate indent 0 . color (_siColor si) $ text str)
|
g str = (_siColor si,translate indent 0 . color (_siColor si) $ text str)
|
||||||
|
|
||||||
enterCombineInv :: Configuration -> World -> World
|
enterCombineInv :: Configuration -> World -> World
|
||||||
enterCombineInv cfig w =
|
enterCombineInv cfig w = w & hud . hudElement . subInventory .~ CombineInventory sss
|
||||||
w & hud . hudElement . subInventory .~ CombineInventory sss
|
|
||||||
where
|
where
|
||||||
cm' = IM.fromDistinctAscList . zip [0 ..] $ combineList w
|
cm' = IM.fromDistinctAscList . zip [0 ..] $ combineList w
|
||||||
cm
|
cm
|
||||||
@@ -258,7 +257,7 @@ enterCombineInv cfig w =
|
|||||||
availablelines = getAvailableListLines secondColumnParams cfig
|
availablelines = getAvailableListLines secondColumnParams cfig
|
||||||
filtsection =
|
filtsection =
|
||||||
SelectionSection
|
SelectionSection
|
||||||
{ _ssItems = IM.singleton 0 $ SelectionInfo ["No possible combinations"] 1 False white 0
|
{ _ssItems = mempty
|
||||||
, _ssCursor = Nothing
|
, _ssCursor = Nothing
|
||||||
, _ssMinSize = 0
|
, _ssMinSize = 0
|
||||||
, _ssOffset = 0
|
, _ssOffset = 0
|
||||||
@@ -266,9 +265,7 @@ enterCombineInv cfig w =
|
|||||||
, _ssIndent = 0
|
, _ssIndent = 0
|
||||||
, _ssDescriptor = "COMB FILTER"
|
, _ssDescriptor = "COMB FILTER"
|
||||||
}
|
}
|
||||||
combsection = updateSection cm (Just 0) availablelines combinationssection'
|
combsection = updateSection cm (Just 0) availablelines SelectionSection
|
||||||
combinationssection' =
|
|
||||||
SelectionSection
|
|
||||||
{ _ssItems = cm
|
{ _ssItems = cm
|
||||||
, _ssCursor = do
|
, _ssCursor = do
|
||||||
(_, si) <- IM.lookupMin cm
|
(_, si) <- IM.lookupMin cm
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ import Dodge.Item.Orientation
|
|||||||
import LensHelp
|
import LensHelp
|
||||||
import ListHelp
|
import ListHelp
|
||||||
|
|
||||||
useBreakL :: [(ItemStructuralFunction, ComposeLinkType)] -> [(ItemStructuralFunction, ComposeLinkType)]
|
useBreakL :: [(ItemStructuralFunction, ComposeLinkType)]
|
||||||
|
-> [(ItemStructuralFunction, ComposeLinkType)]
|
||||||
-> LinkTest
|
-> LinkTest
|
||||||
useBreakL x y = useBreakListsLinkTest (map (uncurry noa) x) (map (uncurry noa) y)
|
useBreakL x y = useBreakListsLinkTest (map (uncurry noa) x) (map (uncurry noa) y)
|
||||||
where
|
where
|
||||||
|
|||||||
+25
-26
@@ -1,18 +1,15 @@
|
|||||||
module Dodge.Luse
|
{-# LANGUAGE LambdaCase #-}
|
||||||
( useL
|
module Dodge.Luse (
|
||||||
)
|
useL,
|
||||||
where
|
) where
|
||||||
|
|
||||||
--import Dodge.Base
|
|
||||||
import Dodge.Creature.Action
|
import Dodge.Creature.Action
|
||||||
import Dodge.Data.World
|
import Dodge.Data.World
|
||||||
import Dodge.Item.Weapon.TriggerType
|
import Dodge.Item.Weapon.TriggerType
|
||||||
--import Geometry
|
|
||||||
--import qualified IntMapHelp as IM
|
|
||||||
import LensHelp
|
import LensHelp
|
||||||
|
|
||||||
useL :: Luse -> Item -> Creature -> World -> World
|
useL :: Luse -> Item -> Creature -> World -> World
|
||||||
useL lu = case lu of
|
useL = \case
|
||||||
LDoNothing -> const $ const id
|
LDoNothing -> const $ const id
|
||||||
LRewind -> useRewindGun
|
LRewind -> useRewindGun
|
||||||
LTimePause -> hammerCheckL useStopWatch
|
LTimePause -> hammerCheckL useStopWatch
|
||||||
@@ -22,28 +19,30 @@ useL lu = case lu of
|
|||||||
LBoost -> boostSelfL 10
|
LBoost -> boostSelfL 10
|
||||||
|
|
||||||
useStopWatch :: Item -> Creature -> World -> World
|
useStopWatch :: Item -> Creature -> World -> World
|
||||||
useStopWatch itm _ w = w
|
useStopWatch itm _ =
|
||||||
& timeFlow .~ PausedTimeFlow
|
timeFlow
|
||||||
{ _timeFlowCharge = itm ^?! itUse . leftConsumption . wpCharge
|
.~ PausedTimeFlow
|
||||||
, _scrollItemID = _itID itm
|
{ _timeFlowCharge = itm ^?! itUse . leftConsumption . wpCharge
|
||||||
}
|
, _scrollItemID = _itID itm
|
||||||
|
}
|
||||||
|
|
||||||
useTimeScrollGun :: Item -> Creature -> World -> World
|
useTimeScrollGun :: Item -> Creature -> World -> World
|
||||||
useTimeScrollGun itm _ w = w & timeFlow .~ ItemScrollTimeFlow
|
useTimeScrollGun itm _ =
|
||||||
{ _scrollSmoothing = 0
|
timeFlow
|
||||||
, _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
.~ ItemScrollTimeFlow
|
||||||
, _futureWorlds = []
|
{ _scrollSmoothing = 0
|
||||||
, _scrollItemID = _itID itm
|
, _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
||||||
}
|
, _futureWorlds = []
|
||||||
|
, _scrollItemID = _itID itm
|
||||||
|
}
|
||||||
|
|
||||||
useRewindGun :: Item -> Creature -> World -> World
|
useRewindGun :: Item -> Creature -> World -> World
|
||||||
useRewindGun itm _ w = w
|
useRewindGun itm _ =
|
||||||
& timeFlow .~ RewindLeftClick
|
timeFlow
|
||||||
{ _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
.~ RewindLeftClick
|
||||||
, _scrollItemID = _itID itm
|
{ _reverseAmount = itm ^?! itUse . leftConsumption . wpCharge
|
||||||
}
|
, _scrollItemID = _itID itm
|
||||||
|
}
|
||||||
|
|
||||||
--useRewindGun _ _ w = case w ^. cwTime . rewindWorlds of
|
--useRewindGun _ _ w = case w ^. cwTime . rewindWorlds of
|
||||||
-- [w'] -> w & cwTime . maybeWorld .~ Just' w'
|
-- [w'] -> w & cwTime . maybeWorld .~ Just' w'
|
||||||
|
|||||||
Reference in New Issue
Block a user