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.
16 lines
567 B
GDScript
16 lines
567 B
GDScript
class_name PlanetDefinitions
|
|
extends RefCounted
|
|
|
|
const ROCKY_ID: String = "rocky"
|
|
const GAS_GIANT_ID: String = "gas_giant"
|
|
const BLACK_HOLE_ID: String = "black_hole"
|
|
const DEFAULT_DEFINITION_ID: String = ROCKY_ID
|
|
const DEFINITIONS: Dictionary = {
|
|
ROCKY_ID: preload("res://RockyPlanetDefinition.tres"),
|
|
GAS_GIANT_ID: preload("res://GasGiantDefinition.tres"),
|
|
BLACK_HOLE_ID: preload("res://BlackHolePlanetDefinition.tres"),
|
|
}
|
|
|
|
|
|
static func get_definition(definition_id: String) -> Resource:
|
|
return DEFINITIONS.get(definition_id, DEFINITIONS[DEFAULT_DEFINITION_ID])
|