One clock for every land: going back to a land catches it up on the time away (like a night's sleep) instead of rewinding to when you left; J3 decided: a server per land with the Valley's as hub, sleep needs everyone in every land

This commit is contained in:
Paul Bailey
2026-11-06 21:57:37 +00:00
parent ad47cd53da
commit b938e045cb
4 changed files with 72 additions and 15 deletions

View File

@@ -238,6 +238,10 @@ func _body() -> void:
print("back up home")
check(w.sea_cave.open(), "the sea cave leads back up (the tunnel's dug)")
# A day and a half in the Cove before going home.
w.day_night.advance(w.day_night.day_length * 1.5)
var cove_day: int = w.day_night.day
var cove_time: float = w.day_night.time
_went = ""
w.sea_cave.interact(player)
check(_went == "valley", "into the cave: back to the Valley")
@@ -247,6 +251,8 @@ func _body() -> void:
player = w.player
check(w.worldlet_id() == "valley" and w.underground_at(player.global_position) and player.global_position.distance_to(t.bottom) < 2.0,
"arriving at the bottom of the tunnel")
check(w.day_night.day == cove_day and absf(w.day_night.time - cove_time) < 0.01,
"one clock for every land: home is on the Cove's day and hour (day %d), not the one you left it" % w.day_night.day)
t.go_out(player)
await physics_frame
check(not w.underground_at(player.global_position) and player.global_position.distance_to(t.seam_out) < 1.0, "climb out at the top, on the clifftop")