spaceship/PlanetSetup.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

16 lines
776 B
GDScript

class_name PlanetSetup
extends Resource
# A hand-authored capture-point/enemy layout for a planet surface. Chosen
# deterministically per planet (see PlanetSetups.setup_for_planet) rather
# than generated - #40 wants curated setups, not procedural ones - and
# stored as a committed .tres under res://PlanetSetups/, not in a save.
@export var setup_id: String = ""
@export var display_name: String = ""
# Which PlanetSurfaceProfiles id (e.g. "rocky", "gas") this setup was
# authored for; only setups matching a planet's own profile are eligible.
@export var surface_profile_id: String = "rocky"
# Surface-local positions (the fleet lands at Vector2.ZERO).
@export var capture_points: PackedVector2Array = PackedVector2Array()
@export var enemy_spawns: Array[Resource] = []