W1: choose a worldlet (New World and Host Game pages, kept once an island exists), worldlet shown in the Load list; Godot .uid files

This commit is contained in:
Paul Bailey
2026-11-06 16:10:32 +00:00
parent db4a659236
commit 68e6d814d9
96 changed files with 292 additions and 11 deletions

View File

@@ -0,0 +1 @@
uid://5vs0iggnxpuc

View File

@@ -0,0 +1 @@
uid://bmcefncielej3

View File

@@ -0,0 +1 @@
uid://c4dyxek30amhh

View File

@@ -169,9 +169,20 @@ static func worldlets() -> Array:
if f.ends_with(".json"):
var d := load_worldlet(f.get_basename())
if not d.is_empty():
out.append({"id": String(d.id), "name": String(d.get("name", d.id)), "description": String(d.get("description", ""))})
out.append({"id": String(d.id), "name": String(d.get("name", d.id)), "description": String(d.get("description", "")),
"start": bool(d.get("start", false))})
out.sort_custom(func(a, b): return a.id == "valley" or (b.id != "valley" and a.name < b.name))
return out
## The worldlets a new world can start in (the rest are reached on the journey).
static func starting_worldlets() -> Array:
return worldlets().filter(func(w): return w.start)
## A worldlet's display name ("Valley"), or its id if there's no such worldlet.
static func worldlet_name(id: String) -> String:
var d := load_worldlet(id)
return String(d.get("name", id)) if not d.is_empty() else id
## Takes on worldlet `id`: its size and every block's numbers. Returns ""
## on success, else what's wrong (an unknown worldlet or block keeps the old
## settings, so the game still has an island).

View File

@@ -0,0 +1 @@
uid://b5x4pld4ecyr4

View File

@@ -0,0 +1 @@
uid://ch20dfnan2yed