feat(levels): level catalogue with stable ids (slice 7)
LevelResource gains a stable Id and swaps the string ScenePath for an editor-tracked PackedScene. The old path field was never read and had rotted - forest_1 pointed at level_forest_5.tscn, which doesn't exist, and borrowed LEVEL_5_NAME so it would have displayed "VILLAGE - 5". LevelCatalogue lists levels in campaign order and produces the domain's Campaign; an authoring mistake fails at boot because Campaign.Of rejects blank and duplicate ids. Not a domain port - nothing in the domain resolves a level to a scene. All 8 scenes now have a resource; campaign keeps the existing 6 (tutorial_1, village_1..5). village_6 and forest_1 are catalogued but deliberately out of the campaign. GameManager.LevelScenes stays until slice 10 rewrites GameManager.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
[gd_resource type="Resource" script_class="LevelResource" load_steps=2 format=3 uid="uid://cxfei28yu3buh"]
|
||||
[gd_resource type="Resource" script_class="LevelResource" load_steps=3 format=3 uid="uid://cxfei28yu3buh"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c2h0pqhxiqswe" path="res://scripts/Resources/LevelResource.cs" id="1_h4twv"]
|
||||
[ext_resource type="Script" uid="uid://c2h0pqhxiqswe" path="res://scripts/Resources/LevelResource.cs" id="1_script"]
|
||||
[ext_resource type="PackedScene" uid="uid://bhad760x3vvco" path="res://scenes/level_village_4.tscn" id="2_scene"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_h4twv")
|
||||
script = ExtResource("1_script")
|
||||
Id = "village_4"
|
||||
LevelName = "LEVEL_4_NAME"
|
||||
ScenePath = "res://scenes/level_village_4.tscn"
|
||||
Scene = ExtResource("2_scene")
|
||||
metadata/_custom_type_script = "uid://cp68km8bykymb"
|
||||
|
||||
Reference in New Issue
Block a user