feat(rust): zone presets, and the zone step's options, messages and dome (PLAN_REDESIGNS §3, D210)
Admin → Rust zone presets: named sets of ZoneManager flags and settings for one server, several, or every server (D195), ticked in groups read from each server's own ZoneManager list in its last hello (D211). A flag not on a covered server is refused on save with the server named; two presets of one name may not share a server. rust.zone.open gains options (one line, NoBuild, radiation=10), enterMessage, leaveMessage, delivery, dome and domeStack. The options field's dropdown is rust.options.zone_presets, whose row VALUE is the preset's line, so picking one copies it into the step (D210) and no published event changes when a preset does. The line and the dome are checked against the server's hello on save and in a dry run; bad-option and dome-unavailable are permanent. Schema: rust_zone_presets, rust_zone_preset_servers. Swagger fragment and routes.manifest regenerated against the pinned core f0e7d2a. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
This commit is contained in:
@@ -1026,6 +1026,54 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
RustZonePreset: {
|
||||
type: 'object',
|
||||
description: 'A named set of ZoneManager flags and settings for one server, several, or every server (PLAN_REDESIGNS §3.1, D195). `line` is the text a zone step copies when the preset is picked (D210).',
|
||||
properties: {
|
||||
id: { type: 'integer', example: 3 },
|
||||
name: { type: 'string', example: 'Arena' },
|
||||
flags: { type: 'array', items: { type: 'string' }, example: ['NoBuild', 'NoPlayerLoot'] },
|
||||
settings: { type: 'object', additionalProperties: true, example: { radiation: 10, safezone: false } },
|
||||
allServers: { type: 'boolean', example: false },
|
||||
servers: { type: 'array', items: { type: 'string' }, example: ['main'] },
|
||||
line: { type: 'string', example: 'NoBuild, NoPlayerLoot, radiation=10, safezone=false' },
|
||||
updatedAt: { type: 'string', format: 'date-time', nullable: true },
|
||||
},
|
||||
},
|
||||
RustZonePresetInput: {
|
||||
type: 'object',
|
||||
required: ['name'],
|
||||
description: 'A preset to save. `servers` is required unless `allServers` is true. Every flag must be on each covered server that has reported its ZoneManager flags; settings are radiation (0–500), comfort (0–1), temperature (−100–100), safezone (boolean) and permission (1–32 of a–z, 0–9, _).',
|
||||
properties: {
|
||||
name: { type: 'string', example: 'Arena' },
|
||||
flags: { type: 'array', items: { type: 'string' }, example: ['NoBuild', 'NoPlayerLoot'] },
|
||||
settings: { type: 'object', additionalProperties: true, example: { radiation: 10 } },
|
||||
allServers: { type: 'boolean', example: false },
|
||||
servers: { type: 'array', items: { type: 'string' }, example: ['main'] },
|
||||
},
|
||||
},
|
||||
RustZones: {
|
||||
type: 'object',
|
||||
description: 'The zone presets page: each server with what its last hello said about ZoneManager (version, flags) and ZoneDomes (loaded, version, helper state, ready), every server’s flags grouped for the form, the settings a zone may carry, and the presets.',
|
||||
properties: {
|
||||
servers: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: { type: 'string', example: 'main' },
|
||||
name: { type: 'string', example: 'Main · Vanilla' },
|
||||
enabled: { type: 'boolean', example: true },
|
||||
zoneManager: { type: 'object', nullable: true, example: { version: '3.1.14', flagCount: 69, flags: ['NoBuild'] } },
|
||||
zoneDomes: { type: 'object', nullable: true, example: { loaded: true, version: '2.0.2', helper: { state: 'patched', version: '0.1.0' }, ready: true } },
|
||||
},
|
||||
},
|
||||
},
|
||||
groups: { type: 'array', items: { type: 'object' }, example: [{ group: 'Building', flags: [{ name: 'NoBuild' }] }] },
|
||||
settings: { type: 'array', items: { type: 'object' }, example: [{ key: 'radiation', type: 'float', min: 0, max: 500, label: 'Radiation' }] },
|
||||
presets: { type: 'array', items: { $ref: '#/components/schemas/RustZonePreset' } },
|
||||
},
|
||||
},
|
||||
RustVisibilityUpdate: {
|
||||
type: 'object',
|
||||
description: 'A change to who may see who is online. Either part may be omitted; a server set to null follows the fleet default again.',
|
||||
|
||||
Reference in New Issue
Block a user