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:
parent
ff2ace9d3c
commit
3e31afb2d9
9 changed files with 219 additions and 1 deletions
|
|
@ -130,6 +130,7 @@ extends Resource
|
|||
"reinforced_fences": {"wood": 20, "scrap": 6},
|
||||
"long_range": {"scrap": 14, "wood": 10},
|
||||
"sticky_tar": {"straw": 14, "scrap": 6},
|
||||
"radar": {"scrap": 8, "wood": 6},
|
||||
"fence": {"wood": 2},
|
||||
"gate": {"wood": 4, "scrap": 1},
|
||||
"slowing_trap": {"scrap": 3, "wood": 1},
|
||||
|
|
@ -153,6 +154,7 @@ extends Resource
|
|||
"shurikens": {"name": "Shurikens", "text": "Fast, cheap throws for a quick hit", "track": "Weapon", "shop": "shed"},
|
||||
"propane_torch": {"name": "Propane torch", "text": "A short-range jet of flame that burns everything in its cone while held", "track": "Weapon", "shop": "shed"},
|
||||
"alien_ray": {"name": "Alien ray", "text": "A salvaged alien weapon: a fast, powerful beam", "track": "Weapon", "shop": "shed", "hidden": true},
|
||||
"radar": {"name": "Radar", "text": "A minimap showing nearby enemy positions", "track": "Item", "shop": "shed", "hidden": true},
|
||||
"wide_fear": {"name": "Wide fear", "text": "Fear reaches 30% farther", "track": "Fear", "stat": "fear_radius", "mult": 1.3},
|
||||
"quick_fear": {"name": "Quick fear", "text": "Fear recharges 20% faster", "track": "Fear", "stat": "fear_cooldown", "mult": 0.8},
|
||||
"straw_stuffing": {"name": "Straw stuffing", "text": "+2 max health", "track": "Scarecrow", "stat": "scarecrow_max_hp", "add": 2},
|
||||
|
|
@ -297,6 +299,16 @@ extends Resource
|
|||
@export var alien_ray_speed: float = 50.0
|
||||
@export var alien_ray_lifetime: float = 2.0
|
||||
|
||||
@export_group("Radar")
|
||||
## Radar (the Radar item, bought at the supply shed, hidden until hidden_reveal_goop Alien Goop is
|
||||
## collected, #8): once owned, a minimap shows every alive enemy within radar_range meters of the
|
||||
## local scarecrow, redrawn every radar_refresh seconds (RadarHud). 40 m is generous: it covers
|
||||
## most of the playable farm (60x60) from a central position, so the minimap is useful without
|
||||
## needing to be perfectly centered on the scarecrow at all times. A quarter-second refresh keeps
|
||||
## the dots responsive without redrawing every frame.
|
||||
@export var radar_range: float = 40.0
|
||||
@export var radar_refresh: float = 0.25
|
||||
|
||||
@export_group("Enemies")
|
||||
@export_range(1, 1024) var enemy_capacity: int = 800
|
||||
## The enemy roster (EnemySystem.TYPE_NAMES), one row per type:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue