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
+17 -1
View File
@@ -2,8 +2,24 @@ import { describe, expect, it } from 'vitest';
import {
parseServerName,
t5ZombieMapBySlug,
T5_ZOMBIE_MAPS
T5_ZOMBIE_MAPS,
T6_ZOMBIE_MAPS
} from '../../src/lib/server/fleet/map-aliases.js';
import { serverTitle } from '../../src/lib/ui/server-labels.js';
describe('T6 map identity', () => {
it.each(T6_ZOMBIE_MAPS)('parses and labels $friendly without losing its variant', (map) => {
const name = `t6_zombie_${map.slug}_2`;
expect(parseServerName(name)).toMatchObject({ game: 't6', gameMode: 'zombie', mapCanonical: map.canonical, mapSlug: map.slug, lobby: 2 });
expect(serverTitle(name)).toBe(`${map.friendly} · Lobby 2`);
});
it('does not interpret another game or mode through the T5 catalog', () => {
for (const name of ['t6_zombie_theater_1', 't5_zombie_tomb_1', 't5_mp_theater_1', 'iw5_theater_1']) {
expect(parseServerName(name)?.mapCanonical).toBeNull();
}
});
});
describe('parseServerName (new naming: t5_<mode>_<slug>_<n>)', () => {
it('extracts game, mode, slug, canonical, and lobby from a T5 zombie name', () => {