40 lines
2.0 KiB
TypeScript
40 lines
2.0 KiB
TypeScript
export class PlayerUtils {
|
|
|
|
// TODO: drop this tmp collection, excluding player transport stats from campaign detail page and highscore page,
|
|
// adding valid processing there
|
|
public static readonly tmpAttributeDisplayNames = [
|
|
{prop: 'name', head: 'stats.scoreboard.header.player'},
|
|
{prop: 'fraction', head: 'stats.scoreboard.header.fraction'},
|
|
{prop: 'kill', head: 'stats.scoreboard.header.kill'},
|
|
{prop: 'friendlyFire', head: 'stats.scoreboard.header.friendly.fire'},
|
|
{prop: 'revive', head: 'stats.scoreboard.header.revive'},
|
|
{prop: 'flagTouch', head: 'stats.scoreboard.header.capture'},
|
|
{prop: 'vehicleLight', head: 'stats.scoreboard.header.vehicle.light'},
|
|
{prop: 'vehicleHeavy', head: 'stats.scoreboard.header.vehicle.heavy'},
|
|
{prop: 'vehicleAir', head: 'stats.scoreboard.header.vehicle.air'},
|
|
{prop: 'death', head: 'stats.scoreboard.header.death'},
|
|
{prop: 'respawn', head: 'stats.scoreboard.header.respawn'},
|
|
];
|
|
|
|
public static readonly attributeDisplayNames = [
|
|
{prop: 'name', head: 'stats.scoreboard.header.player'},
|
|
{prop: 'fraction', head: 'stats.scoreboard.header.fraction'},
|
|
{prop: 'kill', head: 'stats.scoreboard.header.kill'},
|
|
{prop: 'friendlyFire', head: 'stats.scoreboard.header.friendly.fire'},
|
|
{prop: 'revive', head: 'stats.scoreboard.header.revive'},
|
|
{prop: 'flagTouch', head: 'stats.scoreboard.header.capture'},
|
|
{prop: 'vehicleLight', head: 'stats.scoreboard.header.vehicle.light'},
|
|
{prop: 'vehicleHeavy', head: 'stats.scoreboard.header.vehicle.heavy'},
|
|
{prop: 'vehicleAir', head: 'stats.scoreboard.header.vehicle.air'},
|
|
{prop: 'travelDistance', head: 'stats.scoreboard.header.travel.distance'},
|
|
{prop: 'driverDistance', head: 'stats.scoreboard.header.driver.distance'},
|
|
{prop: 'death', head: 'stats.scoreboard.header.death'},
|
|
{prop: 'respawn', head: 'stats.scoreboard.header.respawn'},
|
|
];
|
|
|
|
public static isSteamUUID(input: string): boolean {
|
|
const steamUIDPattern = new RegExp('[0-9]{17}');
|
|
return steamUIDPattern.test(input);
|
|
}
|
|
}
|