Compose planet surfaces from profiles
This commit is contained in:
parent
bcbf1b6515
commit
2f68515f33
19 changed files with 123 additions and 39 deletions
|
|
@ -17,7 +17,8 @@ extends Node2D
|
|||
@export var despawn_radius: float = 2600.0
|
||||
@export var check_interval: float = 0.5
|
||||
|
||||
@onready var fleet: Node2D = get_node("../Fleet")
|
||||
@export var fleet_path: NodePath = NodePath("../Fleet")
|
||||
@onready var fleet: Node2D = get_node(fleet_path)
|
||||
|
||||
var rock_scene: PackedScene = preload("res://Rock.tscn")
|
||||
var rocks: Array = []
|
||||
|
|
@ -26,12 +27,6 @@ var rng: RandomNumberGenerator = RandomNumberGenerator.new()
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
# Gas giants have their own gas vents and must never receive ore pickups.
|
||||
# This check happens before the initial population pass, unlike merely
|
||||
# hiding the field later from PlanetSurfaceController.
|
||||
if GameState.planet_type == "gas_giant":
|
||||
set_process(false)
|
||||
return
|
||||
rng.randomize()
|
||||
# Populate immediately rather than waiting out the first interval, so
|
||||
# the surface isn't visibly empty for half a second on arrival.
|
||||
|
|
|
|||
Loading…
Reference in a new issue