fixed breakdown only showing punctuation if both punctuation and numbers are enabled

This commit is contained in:
Miodec 2022-08-31 01:28:01 +02:00
parent 20d18e71d4
commit 2004d89a78

View file

@ -196,14 +196,17 @@ async function animateXpBreakdown(
await Misc.sleep(delay);
await append(`quote +${breakdown["quote"]}`);
total += breakdown["quote"];
} else if (breakdown["punctuation"]) {
await Misc.sleep(delay);
await append(`punctuation +${breakdown["punctuation"]}`);
total += breakdown["punctuation"];
} else if (breakdown["numbers"]) {
await Misc.sleep(delay);
await append(`numbers +${breakdown["numbers"]}`);
total += breakdown["numbers"];
} else {
if (breakdown["punctuation"]) {
await Misc.sleep(delay);
await append(`punctuation +${breakdown["punctuation"]}`);
total += breakdown["punctuation"];
}
if (breakdown["numbers"]) {
await Misc.sleep(delay);
await append(`numbers +${breakdown["numbers"]}`);
total += breakdown["numbers"];
}
}
if (skipBreakdown) return;