Add planet setups as authored resources (#42)
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.
This commit is contained in:
parent
a1ad6cc844
commit
5326852807
17 changed files with 350 additions and 4 deletions
27
PlanetSetups/gas_default.tres
Normal file
27
PlanetSetups/gas_default.tres
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
[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")])
|
||||
22
PlanetSetups/rocky_default.tres
Normal file
22
PlanetSetups/rocky_default.tres
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
[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_r1"]
|
||||
script = ExtResource("2")
|
||||
enemy_id = "chaser"
|
||||
position = Vector2(450, 250)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_r2"]
|
||||
script = ExtResource("2")
|
||||
enemy_id = "chaser"
|
||||
position = Vector2(-600, -350)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
setup_id = "rocky_default"
|
||||
display_name = "Rocky Default"
|
||||
surface_profile_id = "rocky"
|
||||
capture_points = PackedVector2Array(700, 100, -650, 300, 50, -750)
|
||||
enemy_spawns = Array[Resource]([SubResource("Resource_r1"), SubResource("Resource_r2")])
|
||||
Loading…
Reference in a new issue