feat(bridge): a zone's ZoneManager options, its messages, and a ZoneDomes dome (PLAN_REDESIGNS §3) #21

Merged
whitlocktech merged 2 commits from feat/zones-domes into edge 2026-09-29 11:28:52 -05:00
Member

What & why

PLAN_REDESIGNS §3 (D166, D167, D193, D194, D210–D212). Spec: PROTOCOL §19.11 (docs docs/rust-zones-domes).

  • world.zone gains flags and settings:
    • Flags are checked against the live ZoneManager's own list, read through its API call ZoneFieldListRaw() (D211; plan §0.6 was wrong that only a helper could read it).
    • Settings are an allowlist of five: radiation 0–500, comfort 0–1, temperature ±100, safezone, permission.
    • An unknown one is refused bad-option, never dropped.
    • Both are kept on the registry entry and re-applied whenever the bridge re-creates the zone.
  • enterMessage/leaveMessage/delivery/format: the bridge says a zone's messages itself (D193), from OnEnterZone/OnExitZone, for its own zones only.
    • Chat, or a popup. A popup falls back to chat when PopupNotifications is missing.
    • It stays quiet for 5 s after re-creating a zone.
  • dome: { type, stack }:
    • A missing type is Standard, the one full dome (D212).
    • The bridge adds the dome after the zone. At revert and expiry it removes the dome before the zone, and after re-creating zones it puts the domes back.
    • A dome is refused dome-unavailable, with what's missing, unless ZoneDomes and the helper are ready.
  • New helper RunicGatewayDomes.cs: Harmony patches for ZoneDomes, shipped beside the bridge.
    • A prefix on TranslateMessage so its API can be called without a player. It used to throw after making the dome.
    • A postfix on InitializeDomes that raises OnRgDomesReady, so the bridge never adds a dome before ZoneDomes' own start. Adding one before that draws it twice and leaves spheres nothing can remove.
  • Hello: zoneManager { version, flags } and integrations.zoneDomes { loaded, version, helper, ready }. Hello is sent again when ZoneManager, ZoneDomes or either helper loads or unloads.
  • Release: release.yml ships the new helper in HELPERS, and the README documents it.

How it was tested

  • node scripts/checkPlugin.js: 38 hooks, all void and listed.
  • Compiled and loaded on both rigs (Oxide; Carbon with 0 failed plugins). Both helpers patched, and the domes helper ready.
  • Walked on rust-oxide without a player (2026-09-29), all rows passing (PLAN_REDESIGNS §3.4):
    • Hello carried all 69 flags.
    • bad-option for an unknown flag, a setting outside the allowlist, and radiation 900.
    • A full zone: ZoneManager held exactly its flags and settings (checked with a throwaway probe, since removed), and ZoneDomes recorded the dome.
    • ZoneManager reload, ZoneDomes reload, a server restart and the forced opposite boot order: exactly one set of spheres each time.
    • Revert and expiry removed the dome from the world and from ZoneDomes' data.
    • With the helper unloaded, a dome was refused dome-unavailable and hello said missing.
  • Through the site on rust-carbon: an event run opened the zone with a preset's flags and a full dome, and its cleanup removed both.
  • Deferred to the later in-game walk (org lead): flags on a player with and without the exemption; the messages as chat and popup; the default dome stack.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

Merge note: #20 (§5 titles) also edits RunicGateway.cs, so whichever merges second needs a small conflict fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why PLAN_REDESIGNS §3 (D166, D167, D193, D194, D210–D212). Spec: PROTOCOL §19.11 (docs `docs/rust-zones-domes`). - **`world.zone` gains `flags` and `settings`:** - Flags are checked against the live ZoneManager's own list, read through its API call `ZoneFieldListRaw()` (D211; plan §0.6 was wrong that only a helper could read it). - Settings are an allowlist of five: radiation 0–500, comfort 0–1, temperature ±100, safezone, permission. - An unknown one is refused `bad-option`, never dropped. - Both are kept on the registry entry and re-applied whenever the bridge re-creates the zone. - **`enterMessage`/`leaveMessage`/`delivery`/`format`:** the bridge says a zone's messages itself (D193), from `OnEnterZone`/`OnExitZone`, for its own zones only. - Chat, or a popup. A popup falls back to chat when PopupNotifications is missing. - It stays quiet for 5 s after re-creating a zone. - **`dome: { type, stack }`:** - A missing type is Standard, the one full dome (D212). - The bridge adds the dome after the zone. At revert and expiry it removes the dome before the zone, and after re-creating zones it puts the domes back. - A dome is refused `dome-unavailable`, with what's missing, unless ZoneDomes and the helper are ready. - **New helper `RunicGatewayDomes.cs`:** Harmony patches for ZoneDomes, shipped beside the bridge. - A prefix on `TranslateMessage` so its API can be called without a player. It used to throw after making the dome. - A postfix on `InitializeDomes` that raises `OnRgDomesReady`, so the bridge never adds a dome before ZoneDomes' own start. Adding one before that draws it twice and leaves spheres nothing can remove. - **Hello:** `zoneManager { version, flags }` and `integrations.zoneDomes { loaded, version, helper, ready }`. Hello is sent again when ZoneManager, ZoneDomes or either helper loads or unloads. - **Release:** `release.yml` ships the new helper in `HELPERS`, and the README documents it. ## How it was tested - `node scripts/checkPlugin.js`: 38 hooks, all void and listed. - **Compiled and loaded on both rigs** (Oxide; Carbon with 0 failed plugins). Both helpers `patched`, and the domes helper `ready`. - **Walked on rust-oxide without a player (2026-09-29)**, all rows passing (PLAN_REDESIGNS §3.4): - Hello carried all 69 flags. - `bad-option` for an unknown flag, a setting outside the allowlist, and radiation 900. - A full zone: ZoneManager held exactly its flags and settings (checked with a throwaway probe, since removed), and ZoneDomes recorded the dome. - ZoneManager reload, ZoneDomes reload, a server restart and the forced opposite boot order: exactly one set of spheres each time. - Revert and expiry removed the dome from the world and from ZoneDomes' data. - With the helper unloaded, a dome was refused `dome-unavailable` and hello said `missing`. - **Through the site on rust-carbon:** an event run opened the zone with a preset's flags and a full dome, and its cleanup removed both. - **Deferred to the later in-game walk (org lead):** flags on a player with and without the exemption; the messages as chat and popup; the default dome stack. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. **Merge note:** #20 (§5 titles) also edits `RunicGateway.cs`, so whichever merges second needs a small conflict fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 2 commits 2026-09-29 11:26:09 -05:00
world.zone gains flags, settings, enterMessage, leaveMessage, delivery,
format and dome (PROTOCOL §19.11). Flags are checked against the live
ZoneManager's own list, read through its API call ZoneFieldListRaw() (D211),
and refused bad-option rather than dropped; settings are an allowlist of
five with bounds. Both are kept on the registry entry and re-applied when
a zone is re-created.

The bridge says a zone's enter and leave messages itself (D193), as chat
or a popup (chat when PopupNotifications is missing), and stays quiet for
5 s after re-creating a zone.

RunicGatewayDomes.cs, a new helper, patches ZoneDomes so its API can be
called without a player, and raises OnRgDomesReady after ZoneDomes' own
start; the bridge puts its domes back only after it, so none is drawn
twice. Domes are removed before their zone at expiry and revert.

hello carries zoneManager { version, flags }, integrations.zoneDomes the
ZoneDomes and helper state, and hello is sent again when ZoneManager,
ZoneDomes or either helper loads or unloads. The release ships the new
helper beside the zone helper.

Not compiled or walked on a rig: the panel's file API was down on both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
feat(bridge): a dome without a type is the full dome (D212)
All checks were successful
PR Checks / plugin-checks (pull_request) Successful in 7s
b30c6edd59
ZoneDomes' Standard type is its one whole dome; the four colours show only
where they meet the ground or a building. Walked on both rigs 2026-09-29.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit 463a50dbb3 into edge 2026-09-29 11:28:52 -05:00
whitlocktech deleted branch feat/zones-domes 2026-09-29 11:28:53 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Rust-Plugins#21
No description provided.