Add qualified efficiency leaderboard rankings
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
export const leaderboardMetrics = [
|
||||
import { efficiencyMetrics, type EfficiencyMetric } from './leaderboard-efficiency.js';
|
||||
|
||||
export const playerStatMetrics = [
|
||||
{ key: 'highestRound', label: 'Highest round' },
|
||||
{ key: 'kills', label: 'Total kills' },
|
||||
{ key: 'roundsSurvived', label: 'Total rounds' },
|
||||
@@ -11,9 +13,11 @@ export const leaderboardMetrics = [
|
||||
{ key: 'bestScore', label: 'Highest reported score' }
|
||||
] as const;
|
||||
|
||||
export const leaderboardMetrics = [...playerStatMetrics, ...efficiencyMetrics] as const;
|
||||
export type LeaderboardMetric = typeof leaderboardMetrics[number]['key'];
|
||||
export type PlayerStatMetric = typeof playerStatMetrics[number]['key'];
|
||||
|
||||
export type PlayerStats = Record<LeaderboardMetric, number>;
|
||||
export type PlayerStats = Record<PlayerStatMetric, number>;
|
||||
export type PersonalBestMetric = 'highestRound' | 'bestKills' | 'bestScore';
|
||||
export interface RecordEvidence {
|
||||
matchId: number;
|
||||
@@ -71,7 +75,7 @@ export function playerProfileHref(guid: string): string {
|
||||
return `/leaderboard/players/${encodeURIComponent(guid)}`;
|
||||
}
|
||||
|
||||
export interface LeaderboardEntry {
|
||||
export interface LeaderboardEntry extends Record<EfficiencyMetric, number | null> {
|
||||
rank: number;
|
||||
guid: string;
|
||||
name: string;
|
||||
|
||||
Reference in New Issue
Block a user