Mapper, ARHUD, radar sweeps update. Add dropper items

This commit is contained in:
2025-01-03 10:43:06 +00:00
parent e9f5a39ed7
commit 386d6f47b0
27 changed files with 802 additions and 700 deletions
+17 -6
View File
@@ -1,15 +1,26 @@
module Dodge.RadarSweep.Draw where
module Dodge.RadarSweep.Draw (
drawRadarSweep,
) where
import Control.Lens
import Data.Maybe
import Dodge.Data.RadarSweep
import Geometry
import Picture
-- I have taken shortcuts in determining whether this is drawn or not wrt to the
-- linked ARHUD: it needs to have existed at the sweeps original creation, then
-- the sweep is drawn
drawRadarSweep :: RadarSweep -> Picture
drawRadarSweep pt = setLayer DebugLayer $ fold
[ colHelper 0.1 $ uncurryV translate p $ thickCircle r 15
, colHelper 0.06 $ uncurryV translate p $ thickCircle (r -5) 5
, colHelper 0.03 $ uncurryV translate p $ thickCircle (r -10) 5
]
drawRadarSweep pt
| isJust (pt ^. rsAR) =
setLayer DebugLayer $
fold
[ colHelper 0.1 $ uncurryV translate p $ thickCircle r 15
, colHelper 0.06 $ uncurryV translate p $ thickCircle (r -5) 5
, colHelper 0.03 $ uncurryV translate p $ thickCircle (r -10) 5
]
| otherwise = mempty
where
col = rsObjectColor $ _rsObject pt
p = _rsPos pt