Add T6 Zombies fleet support with Plutainer configuration

This commit is contained in:
2026-09-17 18:03:12 -04:00
parent 1350e6df7c
commit 9dcf4ac1d3
28 changed files with 492 additions and 146 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { json } from '@sveltejs/kit';
import { T5_ZOMBIE_MAPS } from '$lib/server/fleet/map-aliases.js';
import { T5_ZOMBIE_MAPS, T6_ZOMBIE_MAPS } from '$lib/server/fleet/map-aliases.js';
export function GET() {
return json({ t5Zombie: T5_ZOMBIE_MAPS });
return json({ t5Zombie: T5_ZOMBIE_MAPS, t6Zombie: T6_ZOMBIE_MAPS });
}
+5 -3
View File
@@ -6,7 +6,7 @@ import { classifyHealth } from '$lib/server/fleet/health.js';
import { queueCreateServer } from '$lib/server/fleet/create.js';
import { config, komodoConfigured, rconConfigured } from '$lib/server/config.js';
import type { RconPlayer } from '$lib/server/integrations/rcon.js';
import type { GameMode } from '$lib/server/fleet/map-aliases.js';
import type { GameMode, ZombieGame } from '$lib/server/fleet/map-aliases.js';
function safeJson<T>(raw: string | null): T | null {
if (!raw) return null;
@@ -52,18 +52,20 @@ export async function GET() {
export async function POST({ request }: { request: Request }) {
const body = (await request.json().catch(() => ({}))) as {
game?: string;
gameMode?: string;
mapSlug?: string;
plutoKey?: string;
expectedName?: string;
};
if (!body || typeof body.gameMode !== 'string' || typeof body.mapSlug !== 'string' || (body.plutoKey !== undefined && typeof body.plutoKey !== 'string') || (body.expectedName !== undefined && typeof body.expectedName !== 'string')) {
if (!body || (body.game !== undefined && body.game !== 't5' && body.game !== 't6') || typeof body.gameMode !== 'string' || typeof body.mapSlug !== 'string' || (body.plutoKey !== undefined && typeof body.plutoKey !== 'string') || (body.expectedName !== undefined && typeof body.expectedName !== 'string')) {
return json(
{ ok: false, error: 'gameMode and mapSlug are required strings; plutoKey and expectedName are optional strings', kind: 'bad-request' },
{ ok: false, error: 'game must be t5 or t6; gameMode and mapSlug are required strings; plutoKey and expectedName are optional strings', kind: 'bad-request' },
{ status: 400 }
);
}
const result = queueCreateServer({
game: body.game as ZombieGame | undefined,
gameMode: body.gameMode as GameMode,
mapSlug: body.mapSlug,
plutoKey: body.plutoKey,
+3 -3
View File
@@ -196,15 +196,15 @@
<h2 class="panel-title">Upload a baseline <span class="dim">(one per game)</span></h2>
<form onsubmit={createBaseline} class="upload-form">
<Field label="Name">
<Input bind:value={baselineName} placeholder="t5 baseline" disabled={uploading} />
<Input bind:value={baselineName} placeholder="Game baseline" disabled={uploading} />
</Field>
<Field label="Game">
<Select bind:value={baselineScopeGame} options={gameOptions} disabled={uploading} />
</Field>
<Field label="Notes" hint="Optional. Describe what this baseline covers.">
<Input bind:value={baselineNotes} placeholder="dedicated_sp.cfg baseline" disabled={uploading} />
<Input bind:value={baselineNotes} placeholder="Server config baseline" disabled={uploading} />
</Field>
<Field label="Cfg file (dedicated_sp.cfg)">
<Field label="Server cfg file">
<Input type="file" accept=".cfg,text/plain" onchange={pickBaselineFile} disabled={uploading} />
</Field>
<div class="form-actions">
+1 -1
View File
@@ -56,7 +56,7 @@
<p>Save a Plutonium key for each server ID, even when the server is not deployed. Destroying a server keeps its saved key.</p>
<form onsubmit={save}>
<h2>{editing ? 'Update key' : 'Add key'}</h2>
<Field label="Server ID" hint="Use a map slug and lobby number from 1 to 20, e.g. t5_zombie_theater_2.">
<Field label="Server ID" hint="Use a T5 or T6 map slug and lobby number from 1 to 20, e.g. t5_zombie_theater_2 or t6_zombie_tomb_1.">
<Input bind:value={serverId} placeholder="t5_zombie_theater_2" required readonly={editing} disabled={busy} mono />
</Field>
<Field label="Plutonium server key" hint="Changes apply the next time this server ID is deployed.">
+1 -1
View File
@@ -296,7 +296,7 @@
server={server.name}
tabs={[
{ key: 'console', label: 'console.log' },
{ key: 'games_sp', label: 'games_sp.log' }
server.game === 't6' ? { key: 'games_zm', label: 'games_zm.log' } : { key: 'games_sp', label: 'games_sp.log' }
]}
/>
</Card>