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

@@ -52,14 +52,14 @@ func _body(S: Node, Net: Node) -> void:
for _i in range(3):
await process_frame
var release: Array = TS.offered_worldlets(false)
check(release.size() == 1 and String(release[0].id) == "valley", "a release build offers only the Valley")
check(release.size() == 1 and String(release[0].id) == "valley", "normally only the Valley is offered")
var dev: Array = TS.offered_worldlets(true)
check(String(dev[0].id) == "valley" and dev.any(func(w): return w.id == "cove" and String(w.name) == "Cove (testing)"),
"running from the source, the Cove too, marked for testing (%s)" % [dev.map(func(w): return w.name)])
"with --dev-worldlets, the Cove too, marked for testing (%s)" % [dev.map(func(w): return w.name)])
check(not TS.dev_worldlets(), "(this test runs without --dev-worldlets)")
var pick: OptionButton = title._worldlet_pick
check(pick != null and pick.item_count == dev.size() and pick.get_item_text(0) == "Valley", "a \"Where\" picker, on the Valley first")
check(not pick.disabled, "(with more than one to choose from)")
check(TS.picked_worldlet(pick) == "valley", "and gives the Valley")
check(pick == null, "New World has no \"Where\": the journey always begins in the Valley")
check(TS.picked_worldlet(pick) == "valley", "so a new world is the Valley")
var id: String = S.create_world("Pick test", 4242, {"worldlet": TS.picked_worldlet(pick)})
var meta: Dictionary = S.list_worlds().filter(func(w): return w.id == id)[0] if not id.is_empty() else {}
check(String(meta.get("worldlet", "")) == "valley", "a world made from it remembers the Valley (%s)" % meta.get("worldlet", "-"))
@@ -74,7 +74,7 @@ func _body(S: Node, Net: Node) -> void:
check(hp != null and hp.get_item_text(hp.selected) == "Valley", "a \"Where\" picker too, on the Valley")
title._show("host")
await process_frame
check(not hp.disabled and TS.picked_worldlet(hp) == "valley", "a new island: the Valley to start with, free to change")
check(hp.disabled and TS.picked_worldlet(hp) == "valley", "a new island: the Valley (the only start; One land mode will widen it)")
# Once the island exists it keeps its worldlet: the picker shows that one.
DirAccess.make_dir_recursive_absolute(DIR + "/server/worlds/server-world")
var f := FileAccess.open(DIR + "/server/worlds/server-world/meta.json", FileAccess.WRITE)