[PR #155] smp: /vanish for operators #155

Open
opened 2026-11-03 04:03:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-mods/pull/155
Author: @rdbtCVS
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: smp/vanish


📝 Commits (1)

  • 93986dc smp: /vanish for operators

📊 Changes

8 files changed (+429 additions, -13 deletions)

View changed files

📝 native/smp/README.md (+13 -3)
📝 native/smp/mixins/smp/glue.rs (+96 -6)
📝 native/smp/mixins/smp/horizon-mixin.toml (+6 -0)
📝 native/smp/mixins/smp/smp_board.rs (+14 -1)
📝 native/smp/mixins/smp/smp_presence.rs (+31 -3)
➕ native/smp/mixins/smp/smp_vanish.rs (+226 -0)
📝 native/smp/proof.py (+41 -0)
📝 native/smp/src/lib.rs (+2 -0)

📄 Description

🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally.

Draft: this needs horizon-rust/horizon#7003 (native_hide_player). Once that merges and its API number is stamped, compatibility.json needs horizon_revision and hooks bumped to that commit. Until then, CI's package step can't build against the current pin.

Adds /vanish for operators of level 3. /vanish toggles it, and /vanish list shows who is vanished.

What players below level 3 see

  • The vanished operator disappears from their Tab list and from the world, whatever game mode they're in.
  • They get no join or leave message for the operator.

What operators see

  • Operators of level 3 and up still see the vanished operator.
  • Other operators who are on get a [Staff] line when someone vanishes or reappears.

For the vanished operator

  • An aqua subtitle, Vanished: only operators see you, is shown the whole time. It's re-sent every second and lasts 1.5 s, so it never flickers. It's cleared when they reappear.
  • They aren't counted online (sidebar, Tab footer).
  • They don't count toward sleeping, so they don't hold up the night.
  • They're never announced as AFK, back, or on a first join.
  • Players who can't see them can't find them by name (/tpa, /trade, /coinflip, /playtime say they aren't on).
  • Vanish persists across a relog and a restart (vanish.json).

Code

  • New smp_vanish.rs holds the rules: persistence, who sees whom, and which hide/show changes the game must apply. It has unit tests.
  • smp_presence and smp_board get a quiet set.
  • The glue calls native_hide_player. Subtitles go through console title commands in the tick, because commands can't run inside a player's hook.

I left the version alone; the maintainer bumps it at release.

Checks

  • cargo fmt, cargo clippy --all-targets --locked -- -D warnings and cargo test --locked pass (163 tests).
  • native.py check smp and the full native.py proof smp pass ("ok": true) against #7003's branch (eacdc5b). For that local run only, I also patched native.py to build horizon-ctl from horizon-client-lib, where current Horizon has it; that patch isn't part of this PR.
  • The new proof step:
    • Steve can't /vanish.
    • Alex vanishes and her subtitle holds for 4 s.
    • Steve no longer tracks Alex, and /tpa Alex says she isn't on.
    • Alex reappears, her subtitle clears, and Steve sees her again.

Alex, vanished:

vanished

Steve's Tab list at the same moment, showing only himself and "1 online":

tab

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon-mods/pull/155 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `smp/vanish` --- ### 📝 Commits (1) - [`93986dc`](https://github.com/horizon-rust/horizon-mods/commit/93986dcf4780a53ba1ca4dd6faa1208b5c671b73) smp: /vanish for operators ### 📊 Changes **8 files changed** (+429 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `native/smp/README.md` (+13 -3) 📝 `native/smp/mixins/smp/glue.rs` (+96 -6) 📝 `native/smp/mixins/smp/horizon-mixin.toml` (+6 -0) 📝 `native/smp/mixins/smp/smp_board.rs` (+14 -1) 📝 `native/smp/mixins/smp/smp_presence.rs` (+31 -3) ➕ `native/smp/mixins/smp/smp_vanish.rs` (+226 -0) 📝 `native/smp/proof.py` (+41 -0) 📝 `native/smp/src/lib.rs` (+2 -0) </details> ### 📄 Description > 🤖 Opened by rdbtCVS's AI agent (Claude Code, Claude Opus 5.5), not by rdbtCVS personally. **Draft: this needs horizon-rust/horizon#7003 (`native_hide_player`).** Once that merges and its API number is stamped, `compatibility.json` needs `horizon_revision` and `hooks` bumped to that commit. Until then, CI's package step can't build against the current pin. Adds `/vanish` for operators of level 3. `/vanish` toggles it, and `/vanish list` shows who is vanished. **What players below level 3 see** - The vanished operator disappears from their Tab list and from the world, whatever game mode they're in. - They get no join or leave message for the operator. **What operators see** - Operators of level 3 and up still see the vanished operator. - Other operators who are on get a `[Staff]` line when someone vanishes or reappears. **For the vanished operator** - An aqua subtitle, *Vanished: only operators see you*, is shown the whole time. It's re-sent every second and lasts 1.5 s, so it never flickers. It's cleared when they reappear. - They aren't counted online (sidebar, Tab footer). - They don't count toward sleeping, so they don't hold up the night. - They're never announced as AFK, back, or on a first join. - Players who can't see them can't find them by name (`/tpa`, `/trade`, `/coinflip`, `/playtime` say they aren't on). - Vanish persists across a relog and a restart (`vanish.json`). **Code** - New `smp_vanish.rs` holds the rules: persistence, who sees whom, and which hide/show changes the game must apply. It has unit tests. - `smp_presence` and `smp_board` get a `quiet` set. - The glue calls `native_hide_player`. Subtitles go through console `title` commands in the tick, because commands can't run inside a player's hook. I left the version alone; the maintainer bumps it at release. **Checks** - `cargo fmt`, `cargo clippy --all-targets --locked -- -D warnings` and `cargo test --locked` pass (163 tests). - `native.py check smp` and the full `native.py proof smp` pass (`"ok": true`) against #7003's branch (eacdc5b). For that local run only, I also patched `native.py` to build `horizon-ctl` from `horizon-client-lib`, where current Horizon has it; that patch isn't part of this PR. - The new proof step: - Steve can't `/vanish`. - Alex vanishes and her subtitle holds for 4 s. - Steve no longer tracks Alex, and `/tpa Alex` says she isn't on. - Alex reappears, her subtitle clears, and Steve sees her again. Alex, vanished: ![vanished](https://raw.githubusercontent.com/rdbtCVS/horizon/pr-screenshots/horizon-mods-vanish/vanish-subtitle.png) Steve's Tab list at the same moment, showing only himself and "1 online": ![tab](https://raw.githubusercontent.com/rdbtCVS/horizon/pr-screenshots/horizon-mods-vanish/vanish-tab.png) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon-mods#155
No description provided.