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