Unify UI workflows and streamline fleet management
This commit is contained in:
@@ -13,3 +13,13 @@ export function serverTitle(name: string): string {
|
||||
const title = zombieMaps(parsed.game).find((entry) => entry.slug === parsed.mapSlug)?.friendly ?? mapTitle(parsed.mapCanonical);
|
||||
return parsed.lobby === null ? title : `${title} · Lobby ${parsed.lobby}`;
|
||||
}
|
||||
|
||||
export function serverIdentity(name: string): { map: string; lobby: number | null; game: string } {
|
||||
const parsed = parseServerName(name);
|
||||
if (!parsed || !['t5', 't6'].includes(parsed.game.toLowerCase()) || !parsed.mapCanonical || (parsed.gameMode && parsed.gameMode !== 'zombie')) return { map: name, lobby: null, game: '' };
|
||||
return {
|
||||
map: zombieMaps(parsed.game).find(entry => entry.slug === parsed.mapSlug)?.friendly ?? mapTitle(parsed.mapCanonical),
|
||||
lobby: parsed.lobby,
|
||||
game: parsed.game === 't6' ? 'Black Ops II' : 'Black Ops I'
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user