Skip to content

GB5 part 1: a joined terrain lab edits the server's world (rcon admins only) - #1527

Merged
transfix merged 2 commits into
masterfrom
feat/gb5-world-relay
Nov 25, 2026
Merged

transfix merged 2 commits into
masterfrom
feat/gb5-world-relay

Conversation

@transfix

Copy link
Copy Markdown
Owner

GB5 part 1 (ARIADNE_WORLDS section 18.8): the terrain lab in One World. A lab joined to a relay whose document runs the same generated_world node now edits the relay's world, which is the room's. Only a connection the server's rcon password made an admin can change it.

Stacked on #1518 (GB4), which is stacked on #1508. Until those squash-merge, this diff also shows their commits. I'll rebase it onto master as each one lands.

What changes

GeneratedWorldRelay (scene_generated_world.h/.cpp). Both hosts use it: cvcGL's generated node and the headless GeneratedWorldRuntime.

  • follow(): when the relay's conf.rooms.<room>.world_on lists the node with params other than the world shown, the keys take those params and ask for a follow. The node makes that world itself and never sends it back. It looks again only when world_on's stamp moves.
  • ask(): the panel's Regenerate, Randomize and world.auto edits go to the relay as (room-call "server.regenerate" NODE PARAMS-JSON), and the node makes nothing itself. The world the relay makes comes back through world_on, to every client's lab and replica.
  • login(): a new world.request: rcon sends world.server.password as server.rcon and clears the key.
  • world.server.status says what the relay did ("refused: …", "the server's world (seed N)").
  • The room is the one room_call_client::for_app(app) joined: arigl, or a document with relay:. A host that joined none, or a relay that doesn't run the node, behaves as before.
  • poll_generated_world reports whether a rebuild was the panel's (asked). SceneWorld::follow_generated now asks with follow (not regenerate), so a client's replica never sends its follow on.
  • write_generated_world_keys holds the key writes that follow_generated used to do inline.

arisrv server.regenerate NODE PARAMS

  • It's an admin call: forbidden unless server.rcon made the caller's connection an admin.
  • PARAMS is a JSON object's text or a dict. Fields left out keep the world's current values.
  • It calls follow_generated on the document's world. The world is made at the next sync, and publish_world_on takes it to every client.
  • It answers {node, asked, seed}, with asked false when the world already is that one. A node the document doesn't run is invalid.

world_controls.ari: an "Admin password" field (masked), "Log in as admin", and a "server status" line.

Docs: ARIADNE.md, ARISRV_IDENTITY 2.5 (the admin call), and ARIADNE_WORLDS (GB5 part 1, and what's still open).

Still open in GB5

Tests

  • AriadneOneWorld.AJoinedLabShowsTheRelaysWorldAndSendsItsRegenerate covers, without a relay:
    • not joined: ignored;
    • joined: follows world_on;
    • Regenerate is sent, not made, and the reply shows in the status;
    • the relay's next world comes back;
    • a follow is never sent;
    • the login clears its key;
    • a relay without the node, or no relay, means local rebuilds.
  • arisrv_world_regenerate (ctest, relay plus client):
    • forbidden before server.rcon;
    • after it, asked with seed 4242;
    • three seconds later the same call answers asked: false, so the relay made it;
    • an unknown node is invalid.

A lab joined to a relay whose document runs the same generated_world node now
shows the relay's world and sends its Regenerate to the relay:

- GeneratedWorldRelay (both hosts: cvcGL's node and GeneratedWorldRuntime)
  follows the relay's world_on with a "follow" request, sends the panel's
  rebuilds as (room-call "server.regenerate" NODE PARAMS-JSON), and logs in
  with world.request: rcon (world.server.password). world.server.status says
  what the relay did.
- poll_generated_world says whether a rebuild was the panel's (asked);
  SceneWorld::follow_generated asks with "follow", so a replica never sends
  its follow on. write_generated_world_keys is the shared key writer.
- arisrv: server.regenerate, an admin call (forbidden until server.rcon),
  remakes the document's generated world; publish_world_on takes it to every
  client.
- world_controls: an admin password field, Log in as admin, server status.
- Tests: AriadneOneWorld.AJoinedLabShowsTheRelaysWorldAndSendsItsRegenerate,
  ctest arisrv_world_regenerate.
@transfix
transfix force-pushed the feat/gb5-world-relay branch from 3c8ef31 to 0a0ef38 Compare November 25, 2026 04:19
@transfix
transfix enabled auto-merge (squash) November 25, 2026 04:19
@transfix
transfix merged commit 5958dcc into master Nov 25, 2026
30 checks passed
@transfix
transfix deleted the feat/gb5-world-relay branch November 25, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant