feat(rust): Run console commands and Reward by console command (PLAN_REDESIGNS §16)
Two event steps in server/eventCommands.js, on one new budget,
`rust.commands` (D382-D385):
- rust.command.run: up to 10 typed commands once on one server, with
optional teardown commands. irreversible / ledger: the ledger row keeps
the teardown as it was, and core reverts it when the run ends or is
cancelled. Priced one unit per command, teardown included.
- rust.command.reward: the kit reward's recipient picker (tally modes and
linked), by Steam id, so no website account is needed. The bridge fills
{steamid} and {name}; offline recipients are skipped and named (D383).
irreversible / none. Priced commands x people, the bound for a mode that
is not a count.
Both take core's `multiple` string field as a free text box (no
allowlist, D384) and a required "I am sure" toggle. {steamid}/{name} in a
run step are refused. unknown-command, malformed, events-disabled,
interrupted are permanent; the error says how many ran before it.
D385: the run also hands its teardown to the bridge, which keeps it with
the key. A revert with only the key (the step failed, or its answer was
lost, so core recorded nothing) asks every enabled server to run what it
kept; a server the step never reached runs nothing.
sidecarClient.commandsRun -> POST /commands/run; ci/bundle.json lists the
new file; entry.test.js pins the new ids; 21 tests in
test/commandSteps.test.js.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
11
README.md
11
README.md
@@ -150,6 +150,17 @@ one now, kept when the run ends: an airdrop or a patrol helicopter can be sent t
|
||||
step, which takes effect at once and is taken back when the run ends
|
||||
(`docs/modules/rust/PLAN_REDESIGNS.md` §14.3.6).
|
||||
|
||||
**Any other plugin, by console command.** **Run console commands** runs the commands an admin types
|
||||
(at most ten) once on one server, such as RaidableBases' `rbe`, and optional teardown commands when
|
||||
the run ends or is cancelled. **Reward by console command** runs them once for each person the kit
|
||||
reward's picker picks, with `{steamid}` and `{name}` filled in by the bridge, such as `sr add {steamid} 100`.
|
||||
Anyone offline at that moment is skipped and named in the run log. There is no allowlist. Both steps are
|
||||
rated `irreversible`, so they are off until an admin switches them on, only an admin can author them,
|
||||
and each needs its "I am sure" toggle ticked. A command the server does not know stops the step as
|
||||
`unknown-command`. The run log shows what the console answered: "it ran" is not "it worked". The
|
||||
site learns nothing afterwards, so none of it reaches the feed, the map or a title
|
||||
(`docs/modules/rust/PLAN_REDESIGNS.md` §16).
|
||||
|
||||
News and event lines said in chat can wear one styled group's title and colours — the
|
||||
**announcement voice**, chosen in Admin → Rust servers. The line is said by the bridge plugin with no
|
||||
player as its sender, so it looks the same with or without BetterChat.
|
||||
|
||||
Reference in New Issue
Block a user