Added personal best message fix

This commit is contained in:
frutescens 2024-09-18 12:10:15 -07:00
parent 9867151a86
commit 5a83f70cb6
1 changed files with 7 additions and 11 deletions

View File

@ -381,12 +381,7 @@ export default class RunInfoUiHandler extends UiHandler {
modeText.appendText(`${i18next.t("gameMode:dailyRun")}`, false);
break;
case GameModes.SPLICED_ENDLESS:
modeText.appendText(`${i18next.t("gameMode:endlessSpliced")}`, false);
if (this.runInfo.waveIndex === this.scene.gameData.gameStats.highestEndlessWave) {
modeText.appendText(` [${i18next.t("runHistory:personalBest")}]`, true);
modeText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969);
}
break;
modeText.appendText(`${i18next.t("gameMode:endlessSpliced")}`, false); break;
case GameModes.CHALLENGE:
modeText.appendText(`${i18next.t("gameMode:challenge")}`, false);
modeText.appendText(`${i18next.t("runHistory:challengeRules")}: `);
@ -404,17 +399,18 @@ export default class RunInfoUiHandler extends UiHandler {
break;
case GameModes.ENDLESS:
modeText.appendText(`${i18next.t("gameMode:endless")}`, false);
// If the player achieves a personal best in Endless, the mode text will be tinted similarly to SSS luck to celebrate their achievement.
if (this.runInfo.waveIndex === this.scene.gameData.gameStats.highestEndlessWave) {
modeText.appendText(` [${i18next.t("runHistory:personalBest")}]`, false);
modeText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969);
}
break;
case GameModes.CLASSIC:
modeText.appendText(`${i18next.t("gameMode:classic")}`, false);
break;
}
// If the player achieves a personal best in Endless, the mode text will be tinted similarly to SSS luck to celebrate their achievement.
if ((this.runInfo.gameMode === GameModes.ENDLESS || this.runInfo.gameMode === GameModes.SPLICED_ENDLESS) && this.runInfo.waveIndex === this.scene.gameData.gameStats.highestEndlessWave) {
modeText.appendText(` [${i18next.t("runHistory:personalBest")}]`);
modeText.setTint(0xffef5c, 0x47ff69, 0x6b6bff, 0xff6969);
}
// Duration + Money
const runInfoTextContainer = this.scene.add.container(0, 0);
// Japanese is set to a greater line spacing of 35px in addBBCodeTextObject() if lineSpacing < 12.