Fix combinations display

This commit is contained in:
2024-11-04 10:19:53 +00:00
parent 0b43541080
commit 2a314d22e3
6 changed files with 105 additions and 91 deletions
+1
View File
@@ -86,6 +86,7 @@ itemCombinations =
, po [HELD FLAMESPITTER, cr STEELDRUM] flameThrower
, po [HELD FLAMETHROWER, cr STEELDRUM] flameWall
, po [HELD FLAMETHROWER, cr PUMP] flameTorrent
, po [HELD LASER, HELD BURSTRIFLE] flameTorrent
, p [o $ cr PRISM, o $ cr TRANSFORMER, o $ cr PIPE] laser
-- , po [HELD LASGUN, HELD LASGUN, cr HARDWARE] dualBeam
-- , po [HELD LASGUN, cr TRANSFORMER] (lasWide 2)
+7 -3
View File
@@ -3,6 +3,7 @@
module Dodge.Render.Connectors (
zConnect,
zConnectCol,
zConnectColMidX,
lConnect,
lConnectMulti,
) where
@@ -25,14 +26,17 @@ zConnect (V2 x y) (V2 a b) =
]
zConnectCol :: Point2 -> Point2 -> Color -> Color -> Color -> Color -> Picture
zConnectCol (V2 x y) (V2 a b) c1 c2 c3 c4 =
zConnectCol (V2 x y) (V2 a b) = zConnectColMidX (V2 x y) (V2 a b) (0.5 * (x + a))
zConnectColMidX :: Point2 -> Point2 -> Float -> Color -> Color -> Color -> Color -> Picture
zConnectColMidX (V2 x y) (V2 a b) midx c1 c2 c3 c4 =
lineCol $
zip
( map
toV2
[ (x, y)
, (0.5 * (x + a), y)
, (0.5 * (x + a), b)
, (midx, y)
, (midx, b)
, (a, b)
]
)
+2 -2
View File
@@ -334,7 +334,7 @@ combineInventoryExtra sss msel cfig w = fromMaybe mempty $ do
return $
translateScreenPos cfig (idp ^. ldpPos) $
selSecDrawCursor
17
15
idp
(BoundaryCursor [North, South, East, West])
sss'
@@ -374,7 +374,7 @@ lnkMidPosInvSelsCol cfig w i col = fromMaybe mempty . foldMap f
lp <- selNumPos cfig (invDisplayParams w) sss 0 j
rp <- selNumPos cfig secondColumnParams combinesss 0 i
invcol <- selSecSelCol 0 j sss
return $ zConnectCol (rp - V2 5 0) (lp + V2 175 0) col col col invcol
return $ zConnectColMidX (rp - V2 5 0) (lp + V2 155 0) (rp ^. _1 - 20) col col col invcol
invHead :: Configuration -> String -> Picture
invHead cfig =