Reverted title phase async change

This commit is contained in:
Bertie690 2025-09-10 10:35:49 -04:00
parent c41a98447a
commit ba489231f9

View File

@ -173,9 +173,8 @@ export class TitlePhase extends Phase {
globalScene.sessionSlotId = slotId > -1 || !loggedInUser ? slotId : loggedInUser.lastSessionSlot;
globalScene.ui.setMode(UiMode.MESSAGE);
globalScene.ui.resetModeChain();
globalScene.gameData
.loadSession(slotId, slotId === -1 ? this.lastSessionData : undefined)
.then((success: boolean) => {
try {
const success = await globalScene.gameData.loadSession(slotId, slotId === -1 ? this.lastSessionData : undefined);
if (success) {
this.loaded = true;
if (loggedInUser) {
@ -185,11 +184,10 @@ export class TitlePhase extends Phase {
} else {
this.end();
}
})
.catch(err => {
} catch (err) {
console.error(err);
globalScene.ui.showText(i18next.t("menu:failedToLoadSession"), null);
});
}
}
initDailyRun(): void {