mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
Tried reverting my revert
This commit is contained in:
parent
72e3f06709
commit
272760dcd9
@ -168,24 +168,22 @@ export class TitlePhase extends Phase {
|
|||||||
globalScene.ui.setMode(UiMode.TITLE, config);
|
globalScene.ui.setMode(UiMode.TITLE, config);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadSaveSlot(slotId: number): void {
|
async loadSaveSlot(slotId: number): Promise<void> {
|
||||||
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;
|
globalScene.ui.showText(i18next.t("menu:sessionSuccess"), null, () => this.end());
|
||||||
globalScene.ui.showText(i18next.t("menu:sessionSuccess"), null, () => this.end());
|
} else {
|
||||||
} else {
|
this.end();
|
||||||
this.end();
|
}
|
||||||
}
|
} catch (err) {
|
||||||
})
|
console.error(err);
|
||||||
.catch(err => {
|
globalScene.ui.showText(i18next.t("menu:failedToLoadSession"), null);
|
||||||
console.error(err);
|
}
|
||||||
globalScene.ui.showText(i18next.t("menu:failedToLoadSession"), null);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
initDailyRun(): void {
|
initDailyRun(): void {
|
||||||
|
Loading…
Reference in New Issue
Block a user