mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-01-30 20:57:13 +00:00
feat: Add logic to delete session data when overwriting a save (#2565)
This commit is contained in:
parent
8099f02306
commit
e2507a2112
@ -119,7 +119,15 @@ export default class SaveSlotSelectUiHandler extends MessageUiHandler {
|
||||
};
|
||||
if (this.sessionSlots[cursor].hasData) {
|
||||
ui.showText(i18next.t("saveSlotSelectUiHandler:overwriteData"), null, () => {
|
||||
ui.setOverlayMode(Mode.CONFIRM, () => saveAndCallback(), () => {
|
||||
ui.setOverlayMode(Mode.CONFIRM, () => {
|
||||
this.scene.gameData.deleteSession(cursor).then(response => {
|
||||
if (response === false) {
|
||||
this.scene.reset(true);
|
||||
} else {
|
||||
saveAndCallback();
|
||||
}
|
||||
});
|
||||
}, () => {
|
||||
ui.revertMode();
|
||||
ui.showText(null, 0);
|
||||
}, false, 0, 19, 2000);
|
||||
|
Loading…
x
Reference in New Issue
Block a user