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.
27 lines
901 B
Text
27 lines
901 B
Text
[gd_resource type="Resource" script_class="PlanetSetup" load_steps=4 format=3]
|
|
|
|
[ext_resource type="Script" path="res://PlanetSetup.gd" id="1"]
|
|
[ext_resource type="Script" path="res://PlanetSetupSpawn.gd" id="2"]
|
|
|
|
[sub_resource type="Resource" id="Resource_g1"]
|
|
script = ExtResource("2")
|
|
enemy_id = "chaser"
|
|
position = Vector2(500, -300)
|
|
|
|
[sub_resource type="Resource" id="Resource_g2"]
|
|
script = ExtResource("2")
|
|
enemy_id = "chaser"
|
|
position = Vector2(-450, 400)
|
|
|
|
[sub_resource type="Resource" id="Resource_g3"]
|
|
script = ExtResource("2")
|
|
enemy_id = "chaser"
|
|
position = Vector2(200, 700)
|
|
|
|
[resource]
|
|
script = ExtResource("1")
|
|
setup_id = "gas_default"
|
|
display_name = "Gas Default"
|
|
surface_profile_id = "gas"
|
|
capture_points = PackedVector2Array(600, -200, -550, -250, 0, 650, -700, 450)
|
|
enemy_spawns = Array[Resource]([SubResource("Resource_g1"), SubResource("Resource_g2"), SubResource("Resource_g3")])
|