Add capture points and the planet conquest loop (#43)

CapturePoint tracks neutral/blocked/capturing/captured state by polling
proximity each frame (a ship in capture_radius, no enemy within
enemy_clear_radius), draining gradually rather than resetting when
interrupted, and calling GameState.mark_point_captured() on completion.
PlanetSetupHost now instantiates the real CapturePoint scene per
authored point (restoring already-captured state immediately on
re-landing) and spawns each setup's authored enemies, replacing the
placeholder markers from #42. CaptureLabel is a small self-polling HUD
(same convention as ResourceCounter) showing "CAPTURED n/m" or
"CONQUERED" with a one-shot fade on completion, themed per surface
profile alongside the existing bank/fleet captions.

test_planet_atmosphere_transition.gd's "no enemies on a landed
surface" assumption no longer holds now that setups can place guard
enemies by design - narrowed the check to what it actually needs to
prove: no space-side EnemySpawner/AsteroidField node leaks across the
scene swap.

Part of the #40 conquest-mechanic breakdown.
This commit is contained in:
Loïc Wisniewski 2026-08-15 21:22:10 +02:00
commit c4e2ee7178
16 changed files with 511 additions and 36 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=3]
[gd_scene load_steps=17 format=3]
[ext_resource type="Script" path="res://GameController.gd" id="1"]
[ext_resource type="Script" path="res://LunarBackground.gd" id="2"]
@ -12,6 +12,7 @@
[ext_resource type="Script" path="res://CargoCounter.gd" id="12"]
[ext_resource type="Script" path="res://GasCargoCounter.gd" id="13"]
[ext_resource type="Script" path="res://GasBombController.gd" id="14"]
[ext_resource type="Script" path="res://CaptureLabel.gd" id="15"]
[sub_resource type="ShaderMaterial" id="1"]
shader = ExtResource("3")
@ -132,6 +133,20 @@ theme_override_colors/font_color = Color(0.08, 0.08, 0.11, 1)
theme_override_colors/font_outline_color = Color(0.95, 0.95, 0.96, 0.85)
theme_override_constants/outline_size = 5
[node name="CaptureLabel" type="Label" parent="UI"]
mouse_filter = 2
offset_left = 24
offset_top = 286
offset_right = 696
offset_bottom = 326
theme_override_font_sizes/font_size = 28
theme_override_colors/font_color = Color(0.08, 0.16, 0.2, 1)
theme_override_colors/font_outline_color = Color(0.9, 0.95, 0.96, 0.8)
theme_override_constants/outline_size = 4
horizontal_alignment = 1
text = ""
script = ExtResource("15")
[node name="ExitButton" type="Control" parent="UI"]
anchor_top = 1.0
anchor_bottom = 1.0