2026-08-14 16:13:24 +02:00
|
|
|
class_name PlanetDefinitions
|
|
|
|
|
extends RefCounted
|
|
|
|
|
|
|
|
|
|
const ROCKY_ID: String = "rocky"
|
|
|
|
|
const GAS_GIANT_ID: String = "gas_giant"
|
2026-08-16 13:13:38 +02:00
|
|
|
const BLACK_HOLE_ID: String = "black_hole"
|
2026-08-16 20:14:29 +02:00
|
|
|
const RESEARCH_LAB_ID: String = "research_lab"
|
2026-08-14 16:13:24 +02:00
|
|
|
const DEFAULT_DEFINITION_ID: String = ROCKY_ID
|
|
|
|
|
const DEFINITIONS: Dictionary = {
|
|
|
|
|
ROCKY_ID: preload("res://RockyPlanetDefinition.tres"),
|
|
|
|
|
GAS_GIANT_ID: preload("res://GasGiantDefinition.tres"),
|
2026-08-16 13:13:38 +02:00
|
|
|
BLACK_HOLE_ID: preload("res://BlackHolePlanetDefinition.tres"),
|
2026-08-16 20:14:29 +02:00
|
|
|
RESEARCH_LAB_ID: preload("res://ResearchLabPlanetDefinition.tres"),
|
2026-08-14 16:13:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static func get_definition(definition_id: String) -> Resource:
|
|
|
|
|
return DEFINITIONS.get(definition_id, DEFINITIONS[DEFAULT_DEFINITION_ID])
|