Task #8: Radar item, a Supply Shed minimap reveal

Adds a Radar upgrade (hidden until enough Alien Goop is collected,
same as the Alien Ray; buyable at the supply shed for 8 scrap/6 wood)
and a RadarHud minimap, created in code under the Hud CanvasLayer
(top-right corner, under the materials readout): hidden until bought,
then draws the playable farm's outline with a dot for the scarecrow
and one per alive enemy within GameConfig.radar_range (40 m) of it,
redrawn every radar_refresh (0.25 s). New test_radar suite covers the
hidden/revealed/bought shop states, minimap visibility, in-range vs
out-of-range dot filtering, and upgrade ownership surviving a save
round trip.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-05 16:08:54 -04:00
parent ff2ace9d3c
commit 3e31afb2d9
9 changed files with 219 additions and 1 deletions

View file

@ -57,6 +57,10 @@ costs = {
"scrap": 6,
"straw": 16
},
"radar": {
"scrap": 8,
"wood": 6
},
"rapid_fire": {
"scrap": 12,
"straw": 12,
@ -152,6 +156,13 @@ upgrades = {
"text": "Fear recharges 20% faster",
"track": "Fear"
},
"radar": {
"hidden": true,
"name": "Radar",
"shop": "shed",
"text": "A minimap showing nearby enemy positions",
"track": "Item"
},
"rapid_fire": {
"mult": 3.0,
"name": "Rapid fire",