mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-25 15:24:03 +08:00
allowing adding xp without a breakdown
This commit is contained in:
parent
c7858ef7b2
commit
d0aa156f5f
1 changed files with 6 additions and 2 deletions
|
@ -143,7 +143,7 @@ export async function update(
|
|||
export async function updateXpBar(
|
||||
currentXp: number,
|
||||
addedXp: number,
|
||||
breakdown: Record<string, number>
|
||||
breakdown?: Record<string, number>
|
||||
): Promise<void> {
|
||||
skipBreakdown = false;
|
||||
const startingLevel = Misc.getLevel(currentXp);
|
||||
|
@ -176,8 +176,12 @@ export async function updateXpBar(
|
|||
|
||||
async function animateXpBreakdown(
|
||||
addedXp: number,
|
||||
breakdown: Record<string, number>
|
||||
breakdown?: Record<string, number>
|
||||
): Promise<void> {
|
||||
if (!breakdown) {
|
||||
$("#menu .xpBar .xpGain").text(`+${addedXp}`);
|
||||
return;
|
||||
}
|
||||
const delay = 1000;
|
||||
let total = 0;
|
||||
const xpGain = $("#menu .xpBar .xpGain");
|
||||
|
|
Loading…
Reference in a new issue