spaceship/tests/_setup_markers_preview.gd
Loïc Wisniewski 5326852807 Add planet setups as authored resources (#42)
PlanetSetup/PlanetSetupSpawn define a curated capture-point/enemy
layout for a surface profile; PlanetSetups scans res://PlanetSetups/
at first use (not a hardcoded preload table) so dropping in a new
.tres is the only step needed to add one, and resolves the same
setup for the same planet deterministically, same pattern as
WorldGen.planet_data_at_chunk. PlanetSurfaceController composes a
PlanetSetupHost onto the landed surface alongside the existing
resource-provider feature scene.

Ships two starter setups (rocky_default, gas_default) with
placeholder capture-point markers; #43 replaces the markers with the
real CapturePoint scene through the same apply_setup() entry point.

Part of the #40 conquest-mechanic breakdown.
2026-08-15 14:41:37 +02:00

12 lines
364 B
GDScript

extends Node2D
func _ready() -> void:
GameState.planet_name = "Kepler's Rest"
GameState.planet_id = "chunk:3:7"
GameState.planet_definition_id = "rocky"
GameState.surviving_ship_count = 3
GameState.rocks = 128
var surface: Node = load("res://PlanetSurface.tscn").instantiate()
surface.get_node("SurfaceController").fade_duration = 0.0
add_child(surface)