mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 02:06:07 +00:00
Add checks to initial title data load to prevent softlocks
This commit is contained in:
parent
69f9692bcd
commit
7f01d3f57b
@ -151,15 +151,18 @@ export class TitlePhase extends Phase {
|
||||
this.scene.arenaBg.setTexture(bgTexture);
|
||||
}
|
||||
this.showOptions();
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
this.showOptions();
|
||||
});
|
||||
}
|
||||
|
||||
showOptions(): void {
|
||||
const options: OptionSelectItem[] = [];
|
||||
if (this.lastSessionData) {
|
||||
if (loggedInUser.lastSessionSlot > -1) {
|
||||
options.push({
|
||||
label: 'Continue',
|
||||
handler: () => this.loadSaveSlot(-1)
|
||||
handler: () => this.loadSaveSlot(this.lastSessionData ? -1 : loggedInUser.lastSessionSlot)
|
||||
});
|
||||
}
|
||||
options.push({
|
||||
|
Loading…
Reference in New Issue
Block a user