Add black hole planet and dark matter resource (#55)

A rare, deterministically-seeded landable body yielding a fourth
resource, dark matter, obtainable only through an extractor - never a
surface pickup. Reuses every existing generic system (resource/planet
definitions, surface profiles, extractor/transporter pipeline) with no
type-switch branching.

Also fixes a latent conquest-gating gap: a surface profile with no
authored PlanetSetup (like the black hole's "void") never registered
capture points at all, permanently blocking extractor placement.
register_capture_points() now treats zero required points as vacuously
conquered, and PlanetSurfaceController registers that zero-point state
explicitly when no setup exists.
This commit is contained in:
Loïc Wisniewski 2026-08-16 13:13:38 +02:00
commit cbe07bbb55
20 changed files with 421 additions and 2 deletions

View file

@ -65,6 +65,16 @@ func _compose_surface(profile: Resource) -> void:
var setup_host: Node = SETUP_HOST_SCENE.instantiate()
feature_host.add_child(setup_host)
setup_host.apply_setup(setup)
else:
# No PlanetSetup exists for this profile at all (#55: "void" has
# none authored) - register zero required points directly, rather
# than leaving this planet's conquest state unregistered forever.
# capture_state()'s fallback for an unregistered planet_id defaults
# to conquered=false (see test_planet_conquest_gate.gd's own "a
# fresh planet reported conquered" check), which would otherwise
# permanently block extractor placement here - register_capture_
# points() treats a total of 0 as vacuously already conquered.
GameState.register_capture_points(GameState.planet_id, 0)
func _on_exit_pressed() -> void: