The rowing boat: seagrass at the tide line and resin from pines; rope, pitch, and a boat at the workbench (driftwood, rope, pitch, nails); tied up at a berth of its own at the end of the pier, one each, saved; Set sail needs the ship's compass and the Highlands aren't charted yet; online too

This commit is contained in:
Paul Bailey
2026-11-07 11:16:15 +00:00
parent 9709d2c424
commit 2004fe193c
17 changed files with 579 additions and 5 deletions

22
scripts/world/boat.gd Normal file
View File

@@ -0,0 +1,22 @@
extends StaticBody3D
## A rowing boat tied up at the pier (moorings.gd): whose it is, and, for
## its owner, "Set sail".
const PostScript = preload("res://scripts/world/mooring_post.gd")
var moorings: Node3D
var owner_id := ""
var rest := Transform3D() ## where it's tied up (it bobs about this)
func mine(player: Node) -> bool:
return PostScript.id_of(player) == owner_id
func interact_prompt(player: Node) -> String:
if mine(player):
return "Your rowing boat [E] Set sail"
var who := String(moorings.moored.get(owner_id, {}).get("name", ""))
return "%s's rowing boat" % who if not who.is_empty() else "Someone's rowing boat"
func interact(player: Node) -> void:
if mine(player):
moorings.set_sail(player)