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

@@ -0,0 +1,35 @@
extends StaticBody3D
## Something to press E on in or by the cliff tunnel (tunnel.gd): the
## seam's doorway ("in"), the way out at the top ("out"), the mouth of a
## stretch that needs propping ("prop", stretch k), and the sea cave's
## mouth ("cave"). On the interactables layer, so you walk through it.
var tunnel: Node3D
var what := ""
var k := 0
func interact_prompt(player: Node) -> String:
match what:
"in":
return "[E] Go down into the tunnel"
"out":
return "[E] Climb out onto the clifftop"
"prop":
var have: int = player.inventory.count("wood")
return "Unpropped: [E] Set a timber prop (%d wood, you have %d)" % [tunnel.PROP_WOOD, have]
"cave":
return "The sea cave: walk on out to the %s" % Terrain.worldlet_name(tunnel.to)
return ""
func interact(player: Node) -> void:
match what:
"in":
tunnel.go_in(player)
"out":
tunnel.go_out(player)
"prop":
tunnel.set_prop(player, k)
"cave":
tunnel.world.travel(tunnel.to, "sea_cave")
const Terrain = preload("res://scripts/world/terrain.gd")