Cleanup
This commit is contained in:
@@ -51,7 +51,7 @@ itemDisplay w cr ci = f
|
|||||||
f xs _ = xs
|
f xs _ = xs
|
||||||
g (x:xs) (y:_) = (rightPad 15 ' ' x ++ y) : xs
|
g (x:xs) (y:_) = (rightPad 15 ' ' x ++ y) : xs
|
||||||
g xs _ = xs
|
g xs _ = xs
|
||||||
anyextra = maybe [] (:[]) (anyhotkey <> anyequippos)
|
anyextra = maybeToList (anyhotkey <> anyequippos)
|
||||||
anyhotkey = fmap hotkeyToString
|
anyhotkey = fmap hotkeyToString
|
||||||
(w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid)
|
(w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid)
|
||||||
anyequippos = fmap
|
anyequippos = fmap
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{-# LANGUAGE LambdaCase #-}
|
||||||
module Dodge.Payload (
|
module Dodge.Payload (
|
||||||
usePayload,
|
usePayload,
|
||||||
) where
|
) where
|
||||||
@@ -15,7 +16,7 @@ import Geometry.Data
|
|||||||
import LensHelp
|
import LensHelp
|
||||||
|
|
||||||
usePayload :: Payload -> Point2 -> Point2 -> World -> World
|
usePayload :: Payload -> Point2 -> Point2 -> World -> World
|
||||||
usePayload payload = case payload of
|
usePayload = \case
|
||||||
ExplosionPayload -> makeExplosionAt
|
ExplosionPayload -> makeExplosionAt
|
||||||
ShrapnelBomb -> makeShrapnelAt
|
ShrapnelBomb -> makeShrapnelAt
|
||||||
DudPayload -> const (const id)
|
DudPayload -> const (const id)
|
||||||
@@ -29,7 +30,6 @@ makeShrapnelAt p v w =
|
|||||||
& makeShockwaveAt [] p 50 5 0 white
|
& makeShockwaveAt [] p 50 5 0 white
|
||||||
& cWorld . lWorld . bullets .++~ buls
|
& cWorld . lWorld . bullets .++~ buls
|
||||||
where
|
where
|
||||||
-- speed = magV v
|
|
||||||
vs = replicateM 75 (randInCirc 10) & evalState $ _randGen w
|
vs = replicateM 75 (randInCirc 10) & evalState $ _randGen w
|
||||||
drags :: [Float]
|
drags :: [Float]
|
||||||
drags = replicateM 75 (state $ randomR (0.85,0.9)) & evalState $ _randGen w
|
drags = replicateM 75 (state $ randomR (0.85,0.9)) & evalState $ _randGen w
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
|
|||||||
& hud . hudElement . diCloseFilter .~ Nothing
|
& hud . hudElement . diCloseFilter .~ Nothing
|
||||||
OverInvSelect x
|
OverInvSelect x
|
||||||
| ScancodeLShift `M.member` (w ^. input . pressedKeys)
|
| ScancodeLShift `M.member` (w ^. input . pressedKeys)
|
||||||
&& (isGroupSelectableSection $ fst x) ->
|
&& isGroupSelectableSection (fst x) ->
|
||||||
w & input . mouseContext .~ OverInvDragSelect x (Just $ snd x)
|
w & input . mouseContext .~ OverInvDragSelect x (Just $ snd x)
|
||||||
OverInvSelect x -> startDrag x cfig w
|
OverInvSelect x -> startDrag x cfig w
|
||||||
OverTerminalReturn tmid -> terminalReturnEffect tmid w
|
OverTerminalReturn tmid -> terminalReturnEffect tmid w
|
||||||
|
|||||||
Reference in New Issue
Block a user