Fix missing ref to celestial exit modal (fixes #3358)

This commit is contained in:
SpectralFlame 2023-04-26 19:03:14 -05:00 committed by cyip92
parent 0a7200aad9
commit c20d02c0b7
4 changed files with 13 additions and 8 deletions

View File

@ -28,7 +28,12 @@ export default {
const confirms = player.options.confirmations;
if (GameEnd.creditsClosed) return;
if (this.isInCelestialReality) {
if (confirms.resetCelestial) Modal.exitCelestialReality.show();
if (confirms.exitChallenge) Modal.exitChallenge.show({
challengeName: "a Celestial Reality",
normalName: "Reality",
hasHigherLayers: false,
exitFn: () => beginProcessReality(getRealityProps(true))
});
else beginProcessReality(getRealityProps(true));
} else if (confirms.resetReality) Modal.resetReality.show();
else beginProcessReality(getRealityProps(true));

View File

@ -358,7 +358,7 @@ window.player = {
previousRuns: {}
},
IPMultPurchases: 0,
version: 17,
version: 19,
infinityPower: DC.D1,
postC4Tier: 0,
eternityPoints: DC.D0,
@ -834,7 +834,6 @@ window.player = {
autoClean: true,
glyphSelection: true,
glyphUndo: true,
resetCelestial: true,
deleteGlyphSetSave: true,
glyphRefine: true,
bigCrunch: true,

View File

@ -65,10 +65,6 @@ GameDatabase.confirmationTypes = [
name: "Switch Automator Editor",
option: "switchAutomatorMode",
isUnlocked: () => Player.automatorUnlocked,
}, {
name: "Reset Celestial",
option: "resetCelestial",
isUnlocked: () => TeresaUnlocks.run.canBeApplied,
}, {
name: "Delete Glyph Preset",
option: "deleteGlyphSetSave",

View File

@ -269,7 +269,12 @@ GameStorage.migrations = {
// to ensure a consistent UI sort order. However, before this version the sort order didn't exist, so we have
// to immediately fill it
player.reality.automator.constantSortOrder = Object.keys(player.reality.automator.constants);
}
},
19: player => {
// This was removed in favor of the more generic "Exit challenge" modal, but a few references were missing and
// this prop was left in the save file instead of being cleaned up
delete player.options.confirmations.resetCelestial;
},
},
normalizeTimespans(player) {