Merge branch 'v26'

This commit is contained in:
evanpelle
2025-10-28 14:10:27 -07:00
34 changed files with 249 additions and 74 deletions
+2 -7
View File
@@ -1,5 +1,6 @@
import { Config } from "../configuration/Config";
import { AllPlayersStats, ClientID } from "../Schemas";
import { getClanTag } from "../Util";
import { GameMap, TileRef } from "./GameMap";
import {
GameUpdate,
@@ -407,13 +408,7 @@ export class PlayerInfo {
public readonly id: PlayerID,
public readonly nation?: Nation | null,
) {
// Compute clan from name
if (!name.includes("[") || !name.includes("]")) {
this.clan = null;
} else {
const clanMatch = name.match(/\[([a-zA-Z0-9]{2,5})\]/);
this.clan = clanMatch ? clanMatch[1].toUpperCase() : null;
}
this.clan = getClanTag(name);
}
}