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:
@@ -372,6 +372,11 @@ func _run(p: Node3D, what: String, a: Array) -> void:
|
||||
if w.wreck != null and p.global_position.distance_to(w.wreck.chest.global_position) < 4.0:
|
||||
if w.wreck.open_for(p, String(p.player_id)):
|
||||
WorldNet.wreck_state(w.wreck.to_data())
|
||||
"moor":
|
||||
# The mooring post at the end of the pier: tie up your boat.
|
||||
if w.moorings != null and p.global_position.distance_to(w.moorings.post.global_position) < 4.0:
|
||||
if w.moorings.moor(p, String(p.player_id)):
|
||||
WorldNet.boats_state(w.moorings.to_data())
|
||||
"tunnel_go":
|
||||
# Down into the cliff tunnel, or back out at the top: a teleport
|
||||
# the server makes (the tunnel's under the island), from nearby.
|
||||
|
||||
@@ -389,6 +389,17 @@ func _s2c_treasure(d: Dictionary) -> void:
|
||||
return
|
||||
world.treasure.load_data(d)
|
||||
|
||||
## Someone tied up a boat at the pier: everyone here sees it.
|
||||
func boats_state(d: Dictionary) -> void:
|
||||
_all("_s2c_boats", [d])
|
||||
mark_changed()
|
||||
|
||||
@rpc("authority", "call_remote", "reliable")
|
||||
func _s2c_boats(d: Dictionary) -> void:
|
||||
if not is_client() or world.moorings == null:
|
||||
return
|
||||
world.moorings.load_data(d)
|
||||
|
||||
## Who's had their share of the wreck's sea chest changed: everyone here
|
||||
## sees whether it's empty for them.
|
||||
func wreck_state(d: Dictionary) -> void:
|
||||
|
||||
Reference in New Issue
Block a user