Compose planet surfaces from profiles

This commit is contained in:
Loïc Wisniewski 2026-08-14 16:05:32 +02:00
commit 2f68515f33
19 changed files with 123 additions and 39 deletions

View file

@ -1,5 +1,6 @@
extends Node2D
# Spawns "Big Stable Asteroid" planets in ASTEROID_FIELD biome chunks near
# the fleet where WorldGen says one belongs, and despawns them once the
# fleet has moved far enough away - mirrors AsteroidField's chunk-lifecycle
@ -85,6 +86,7 @@ func _spawn_chunk_planet(chunk: Vector2i) -> void:
planet.shape_seed = data.shape_seed
planet.planet_type = String(data.get("planet_type", "rocky"))
planet.resource_type = String(data.get("resource_type", "ore"))
planet.surface_profile_id = String(data.get("surface_profile_id", "rocky"))
# Deferred: update_chunks() can run synchronously from inside a
# parent's own _ready() chain (forced once right after the fleet is
# positioned, to avoid a pop-in on scene load) - Godot refuses a