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)
|
||||
|
||||
enterCombineInv :: Configuration -> World -> World
|
||||
enterCombineInv cfig w =
|
||||
w & hud . hudElement . subInventory .~ CombineInventory sss
|
||||
enterCombineInv cfig w = w & hud . hudElement . subInventory .~ CombineInventory sss
|
||||
where
|
||||
cm' = IM.fromDistinctAscList . zip [0 ..] $ combineList w
|
||||
cm
|
||||
@@ -258,7 +257,7 @@ enterCombineInv cfig w =
|
||||
availablelines = getAvailableListLines secondColumnParams cfig
|
||||
filtsection =
|
||||
SelectionSection
|
||||
{ _ssItems = IM.singleton 0 $ SelectionInfo ["No possible combinations"] 1 False white 0
|
||||
{ _ssItems = mempty
|
||||
, _ssCursor = Nothing
|
||||
, _ssMinSize = 0
|
||||
, _ssOffset = 0
|
||||
@@ -266,9 +265,7 @@ enterCombineInv cfig w =
|
||||
, _ssIndent = 0
|
||||
, _ssDescriptor = "COMB FILTER"
|
||||
}
|
||||
combsection = updateSection cm (Just 0) availablelines combinationssection'
|
||||
combinationssection' =
|
||||
SelectionSection
|
||||
combsection = updateSection cm (Just 0) availablelines SelectionSection
|
||||
{ _ssItems = cm
|
||||
, _ssCursor = do
|
||||
(_, si) <- IM.lookupMin cm
|
||||
|
||||
@@ -22,7 +22,8 @@ import Dodge.Item.Orientation
|
||||
import LensHelp
|
||||
import ListHelp
|
||||
|
||||
useBreakL :: [(ItemStructuralFunction, ComposeLinkType)] -> [(ItemStructuralFunction, ComposeLinkType)]
|
||||
useBreakL :: [(ItemStructuralFunction, ComposeLinkType)]
|
||||
-> [(ItemStructuralFunction, ComposeLinkType)]
|
||||
-> LinkTest
|
||||
useBreakL x y = useBreakListsLinkTest (map (uncurry noa) x) (map (uncurry noa) y)
|
||||
where
|
||||
|
||||
+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