Skip to content

Commit 111b25e

Browse files
authored
fix(v0.2.0): fix bugs in v0.2.0 and add some LBs (#312)
1 parent fcfd55c commit 111b25e

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

apps/discord-bot/src/commands/quake/quake.profile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const QuakeProfile = ({
4949
<Table.table>
5050
<Table.tr>
5151
<Table.td title={t("stats.wins")} value={t(stats.wins)} color="§a" />
52-
<Table.td title={t("stats.winRate")} value={`${stats.winRate}%`} color="§c" />
52+
<Table.td title={t("stats.kwr")} value={t(stats.kwr)} color="§c" />
5353
<Table.td
5454
title={t("stats.killstreaks")}
5555
value={t(stats.killstreaks)}

apps/discord-bot/src/commands/status/status.profile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const OnlineTable = ({ status, t }: StatusTableProps) => (
3434
<Table.td
3535
title={t("stats.game")}
3636
value={FormattedGame[status.game.id]}
37-
color=f"
37+
color=e"
3838
t:ignore
3939
/>
4040
<If condition={status.mode}>
@@ -68,7 +68,7 @@ const OfflineTable = ({ status, t }: StatusTableProps) => (
6868
<Table.td
6969
title={t("stats.lastGame")}
7070
value={FormattedGame[status.actions.lastGame.id]}
71-
color=f"
71+
color=a"
7272
t:ignore
7373
/>
7474
</Table.tr>

locales/en-US/default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@
586586
"killsAsSurvivor": "Kills as Survivor",
587587
"killstreaks": "Killstreaks",
588588
"kit": "Current Kit",
589+
"kwr": "KWR",
589590
"lapsCompleted": "Laps",
590591
"lastAction": "Last Action",
591592
"lastActionTime": "Last Action Time",
@@ -664,7 +665,6 @@
664665
"version": "Version",
665666
"votes": "Votes",
666667
"wallsFaced": "Walls Faced",
667-
"winRate": "Win Rate",
668668
"wins": "Wins",
669669
"winstreak": "Winstreak",
670670
"witherDamage": "Wither Damage",

packages/schemas/src/player/gamemodes/arcade/mode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export class EnderSpleef {
114114
@Field({ leaderboard: { enabled: false } })
115115
public powerupActivations: number;
116116

117+
@Field()
117118
public blocksBroken: number;
118119

119120
public constructor(data: APIData) {

packages/schemas/src/player/gamemodes/general/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class General {
4646
@Field()
4747
public ranksGifted: number;
4848

49-
@Field({ leaderboard: { fieldName: "Total Tokens" } })
49+
@Field({ leaderboard: { fieldName: "Tokens", name: "Classic Tokens" } })
5050
public classicTokens: number;
5151

5252
public constructor(legacy: APIData, data: APIData = {}) {

packages/schemas/src/player/gamemodes/murdermystery/mode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class AssassinsMurderMysteryMode extends BaseMurderMysteryMode {
160160
public constructor(data: APIData, mode: string) {
161161
super(data, mode);
162162

163-
this.kills = data.trap_kills_MURDER_ASSASSINS;
163+
this.kills = data.kills_MURDER_ASSASSINS;
164164
this.deaths = data.deaths_MURDER_ASSASSINS;
165165
this.kdr = ratio(this.kills, this.deaths);
166166

packages/schemas/src/player/gamemodes/quake/mode.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ export class QuakeMode {
2323
@Field()
2424
public kdr: number;
2525

26-
@Field({ leaderboard: { enabled: false } })
26+
@Field()
2727
public headshots: number;
2828

2929
@Field()
3030
public killstreaks: number;
3131

32-
@Field({ leaderboard: { enabled: false } })
32+
@Field()
3333
public shotsFired: number;
3434

35-
@Field({ leaderboard: { enabled: false } })
35+
@Field({ leaderboard: { fieldName: "2017+ Kills", name: "2017+ Kills" } })
3636
public postUpdateKills: number;
3737

38-
@Field({ leaderboard: { enabled: false }, store: { default: 100 } })
39-
public winRate: number;
38+
@Field({ leaderboard: { enabled: false } })
39+
public kwr: number;
4040

4141
@Field({ leaderboard: { enabled: false } })
4242
public quakeShotAccuracy: number;
@@ -56,7 +56,7 @@ export class QuakeMode {
5656

5757
public static applyRatios(data: QuakeMode) {
5858
data.kdr = ratio(data.kills, data.deaths);
59-
data.winRate = Math.min(ratio(25, ratio(data.kills, data.wins), 100), 100);
59+
data.kwr = ratio(data.kills, data.wins);
6060
data.quakeShotAccuracy = ratio(data.postUpdateKills, data.shotsFired, 100);
6161
}
6262
}

packages/schemas/src/ratios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type Ratio = [
1616

1717
export const LEADERBOARD_RATIOS: Ratio[] = [
1818
["wins", "losses", "wlr", "WLR"],
19+
["kills", "wins", "kwr", "KWR"],
1920
["kills", "deaths", "kdr", "KDR"],
2021
["finalKills", "finalDeaths", "fkdr", "FKDR"],
2122
["bedsBroken", "bedsLost", "bblr", "BBLR"],
@@ -28,7 +29,6 @@ export const LEADERBOARD_RATIO_KEYS = LEADERBOARD_RATIOS.map(
2829
const EXTRA_RATIOS: Ratio[] = [
2930
["kills", "shotsFired", "shotAccuracy", "Shot Accuracy", 100],
3031
["postUpdateKills", "shotsFired", "quakeShotAccuracy", "Shot Accuracy", 100],
31-
["wins", "gamesPlayed", "winRate", "Win Rate", 100],
3232
["gold", "gamesPlayed", "goldRate", "Gold Rate", 100],
3333
["total", "gamesPlayed", "trophyRate", "Trophy Rate", 100],
3434
];

0 commit comments

Comments
 (0)