feat(rust): Backpacks — staff and player views, the Bigger backpack step (PLAN_REDESIGNS §11.3)
The site half of §11.3.2, on protocol 14:
- `rust.backpack.size` ("Bigger backpack"): a kit reward with a different
permission (D337) — one rust_perm_run_grants row per website user with
backpacks.size.N, no kit, no credit; the perm mirror pushes it and the run's
revert deletes it. risk change, reversible ledger, a new `rust.backpacks`
budget, rust.kit.entitle's recipient modes including `linked`. Refused with
"Backpacks is not installed on this server" in the dry run too (D199), and a
size the server does not offer is refused by name. Its message is never
silent: empty is the take-back warning (D338).
- `rust.options.backpacksizes`: each server's sizes above its smallest, from
the last hello, grouped by server.
- GET /player/rust/backpacks (own links only, 20 reads a minute) and
GET /admin/users/:id/rust/backpacks (that user's links only). Live, never
stored; a stranger's id is a 404 and never reaches the game.
- Client: a shared Backpack panel (pick server and account, open, read once)
on the account page and the admin user page; the grid draws pages of
pageSize, each slot named by the game (D340, no icons), blueprints by what
they make (D341), overflow marked. Backpacks joins the server's mod line.
Server 548/548 (13 new in test/backpacks.test.js), client 79/79 (5 new),
routes.manifest regenerated against the pinned core (89 routes), swagger
fragment regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -135,6 +135,12 @@ export const playerEconomics = {
|
||||
list: () => req('/player/rust/economics'),
|
||||
}
|
||||
|
||||
// Your own backpack on one server, from one of your linked accounts
|
||||
// (PLAN_REDESIGNS §11.3.2): read live from the game, once per open.
|
||||
export const playerBackpacks = {
|
||||
read: (serverId, steamId) => req(`/player/rust/backpacks${query({ serverId, steamId })}`),
|
||||
}
|
||||
|
||||
// ── admin ─────────────────────────────────────────────────────────────────
|
||||
// **`sidecarToken` goes up and never comes back.** The list answers `hasToken`,
|
||||
// and a save that omits the field leaves the stored credential alone — so an
|
||||
@@ -337,6 +343,13 @@ export const adminUserEconomics = {
|
||||
req(`/admin/users/${encodeURIComponent(userId)}/rust/economics`, { method: 'POST', body }),
|
||||
}
|
||||
|
||||
// …and its Backpacks half (§11.3.2): what this person carries, read live. There
|
||||
// is no write, here or in the game (R2).
|
||||
export const adminUserBackpacks = {
|
||||
read: (userId, serverId, steamId) =>
|
||||
req(`/admin/users/${encodeURIComponent(userId)}/rust/backpacks${query({ serverId, steamId })}`),
|
||||
}
|
||||
|
||||
// ── core's public event calendar ───────────────────────────────────────────
|
||||
// The one CORE route this module reads, and core published `runId` on it for
|
||||
// exactly this: a map marker holds a run id and nothing else, and the calendar is
|
||||
@@ -357,6 +370,7 @@ export default {
|
||||
playerLinks,
|
||||
playerPermissions,
|
||||
playerEconomics,
|
||||
playerBackpacks,
|
||||
admin,
|
||||
adminPermissions,
|
||||
adminConfig,
|
||||
@@ -367,6 +381,7 @@ export default {
|
||||
adminUserLinks,
|
||||
adminUserPermissions,
|
||||
adminUserEconomics,
|
||||
adminUserBackpacks,
|
||||
coreEvents,
|
||||
BASE,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user