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:
2026-07-28 19:28:56 +02:00
parent 330e10880c
commit f991bb99fc
14 changed files with 155 additions and 32 deletions

View File

@@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="LevelCatalogue" load_steps=8 format=3]
[ext_resource type="Script" path="res://scripts/Resources/LevelCatalogue.cs" id="1_script"]
[ext_resource type="Resource" path="res://resources/levels/tutorial_1.tres" id="2_tutorial_1"]
[ext_resource type="Resource" uid="uid://cqtalsov2bkpo" path="res://resources/levels/village/village_1.tres" id="3_village_1"]
[ext_resource type="Resource" uid="uid://dlwkbjw1l33uq" path="res://resources/levels/village/village_2.tres" id="4_village_2"]
[ext_resource type="Resource" uid="uid://b63u5qfp8p7pv" path="res://resources/levels/village/village_3.tres" id="5_village_3"]
[ext_resource type="Resource" uid="uid://cxfei28yu3buh" path="res://resources/levels/village/village_4.tres" id="6_village_4"]
[ext_resource type="Resource" uid="uid://qld841xv5ui0" path="res://resources/levels/village/village_5.tres" id="7_village_5"]
[resource]
script = ExtResource("1_script")
Levels = Array[Resource]([ExtResource("2_tutorial_1"), ExtResource("3_village_1"), ExtResource("4_village_2"), ExtResource("5_village_3"), ExtResource("6_village_4"), ExtResource("7_village_5")])