mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
Reverted title phase async change
This commit is contained in:
parent
c41a98447a
commit
ba489231f9
@ -173,23 +173,21 @@ 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) {
|
loggedInUser.lastSessionSlot = slotId;
|
||||||
loggedInUser.lastSessionSlot = slotId;
|
|
||||||
}
|
|
||||||
globalScene.ui.showText(i18next.t("menu:sessionSuccess"), null, () => this.end());
|
|
||||||
} else {
|
|
||||||
this.end();
|
|
||||||
}
|
}
|
||||||
})
|
globalScene.ui.showText(i18next.t("menu:sessionSuccess"), null, () => this.end());
|
||||||
.catch(err => {
|
} else {
|
||||||
console.error(err);
|
this.end();
|
||||||
globalScene.ui.showText(i18next.t("menu:failedToLoadSession"), null);
|
}
|
||||||
});
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
globalScene.ui.showText(i18next.t("menu:failedToLoadSession"), null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initDailyRun(): void {
|
initDailyRun(): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user