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