J1: the cliff tunnel (seam, six propped stretches, dark, lights), travel Valley <-> Cove through the sea cave, a save file per worldlet; New World has no Where (--dev-worldlets to try others)

This commit is contained in:
Paul Bailey
2026-11-06 17:51:58 +00:00
parent 793b214786
commit 980ee53579
22 changed files with 1181 additions and 33 deletions

View File

@@ -594,7 +594,10 @@ func _new_page() -> Control:
_rot_pick.add_item(t[1])
_rot_pick.custom_minimum_size = Vector2(360, 36)
v.add_child(_rot_pick)
_worldlet_pick = _worldlet_picker(v)
# The journey always begins in the Valley, so a new world has no "Where"
# (only with --dev-worldlets, to try the others).
if dev_worldlets():
_worldlet_pick = _worldlet_picker(v)
var h := HBoxContainer.new()
h.add_theme_constant_override("separation", 10)
h.add_child(_button("Create & Play", _create, 170))
@@ -698,7 +701,7 @@ var _host_worldlet: OptionButton
## description under it. (Only the Valley today: the others are reached on
## the journey, so the list is short and the picker sits still.)
func _worldlet_picker(v: VBoxContainer) -> OptionButton:
var starts: Array = offered_worldlets(OS.is_debug_build())
var starts: Array = offered_worldlets(dev_worldlets())
v.add_child(UITheme.label("Where", 15, UITheme.TEXT_DIM))
var pick := OptionButton.new()
pick.custom_minimum_size = Vector2(360, 36)
@@ -716,12 +719,16 @@ func _worldlet_picker(v: VBoxContainer) -> OptionButton:
about.text = String(Terrain.load_worldlet(String(pick.get_item_metadata(i))).get("description", "")))
return pick
## The worldlets offered for a new world: the starts, and (running from the
## source, `debug`) the rest too, marked for testing, so a worldlet can be
## tried before the journey reaches it. A release build offers only the starts.
static func offered_worldlets(debug: bool) -> Array:
## Started with `-- --dev-worldlets`: every worldlet can be picked, for
## trying one before the journey reaches it.
static func dev_worldlets() -> bool:
return "--dev-worldlets" in OS.get_cmdline_user_args()
## The worldlets offered for a new world or island: the starts, and (`dev`)
## the rest too, marked for testing.
static func offered_worldlets(dev: bool) -> Array:
var out: Array = Terrain.starting_worldlets()
if debug:
if dev:
for w in Terrain.worldlets():
if not w.start:
var t: Dictionary = w.duplicate()