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

View File

@@ -57,6 +57,7 @@ var pier: Node3D ## the Cove's pier (scripts/world/pier.gd), or null
var tunnel: Node3D ## the cliff tunnel (scripts/world/tunnel.gd, J1), or null
var wreck: Node3D ## the Cove's wreck (scripts/world/wreck.gd, 0.6.0), or null
var treasure: Node3D ## the pirate treasure (scripts/world/treasure.gd), or null
var moorings: Node3D ## the boats tied up at the pier (scripts/world/moorings.gd), or null
var sea_cave: Node3D ## the Cove's end of it (scripts/world/sea_cave.gd), or null
var traveling := false ## on the way to another worldlet (the scene is about to change)
var _session_time := 0.0 ## seconds played since the last save
@@ -368,6 +369,15 @@ func _on_terrain_ready() -> void:
props.pier = pr
else:
pr.free()
# The moorings (0.6.0): rowing boats tied up at the end of the pier.
if pier != null and not menu_mode:
var mo := preload("res://scripts/world/moorings.gd").new()
mo.name = "Moorings"
add_child(mo)
if mo.setup(self):
moorings = mo
else:
mo.free()
# The wreck (0.6.0): on the Cove's beach, with the sea chest's treasure maps.
var wk := preload("res://scripts/world/wreck.gd").new()
wk.name = "Wreck"
@@ -717,6 +727,7 @@ func collect_save() -> Dictionary:
"tunnel": tunnel.to_data() if tunnel != null else {},
"wreck": wreck.to_data() if wreck != null else {},
"treasure": treasure.to_data() if treasure != null else {},
"moorings": moorings.to_data() if moorings != null else {},
"map": map_data(),
}
@@ -735,6 +746,7 @@ func _shared_state(harvested: Dictionary, regrow: Dictionary, taken: Array, drop
"tunnel": tunnel.to_data() if tunnel != null else {},
"wreck": wreck.to_data() if wreck != null else {},
"treasure": treasure.to_data() if treasure != null else {},
"moorings": moorings.to_data() if moorings != null else {},
}
## The live pieces (placed and not being removed).
@@ -872,6 +884,8 @@ func _apply_save(s: Dictionary, with_player: bool) -> void:
wreck.load_data(s.get("wreck", {}))
if treasure != null:
treasure.load_data(s.get("treasure", {}))
if moorings != null:
moorings.load_data(s.get("moorings", {}))
if with_player:
load_map_data(String(s.get("map", "")))
# The bear (bear_range.gd): applied when it's set up, after loading.