Partial implementation of wrist shields

This commit is contained in:
2022-05-25 20:25:08 +01:00
parent dccbca5cfc
commit f301a6bae5
2 changed files with 24 additions and 6 deletions
+17 -1
View File
@@ -59,11 +59,13 @@ extraPics cfig w = pictures (_decorations w)
<> viewBoundaries cfig w
<> viewClipBounds cfig w
<> drawMousePosition cfig w
<> drawWallIDs cfig w
<> drawPathing cfig w
<> drawCrInfo cfig w
testPic :: World -> Picture
testPic _ = []
testPic _ = mempty
clDraw :: Cloud -> Picture
clDraw c = translate3 (_clPos c) (_clPict c c)
ppDraw :: PressPlate -> Picture
@@ -111,6 +113,20 @@ drawMousePosition cfig w
p = worldPosToScreen w mwp
mwp = mouseWorldPos w
drawWallIDs :: Configuration -> World -> Picture
drawWallIDs cfig w = setLayer FixedCoordLayer
$ foldMap f (_walls w)
where
f wl
| dist (_crPos $ you w) (fst (_wlLine wl)) > 200 = mempty -- this should be improved with a better "on screen test"
| otherwise = winScale cfig
. uncurryV translate p
. scale 0.1 0.1
. text
$ show $ _wlID wl
where
p = worldPosToScreen w $ 0.5 *.* ( uncurry (+.+) $ _wlLine wl)
drawPathing :: Configuration -> World -> Picture
drawPathing cfig w
| _debug_pathing cfig