[Misc] Migrate REROLL_TARGET to SHOP_CURSOR_TARGET (#4016)
* migrate reroll target to shop cursor target * delete key after migrating
This commit is contained in:
parent
7b97657756
commit
d58f035287
|
@ -857,6 +857,14 @@ export class GameData {
|
||||||
|
|
||||||
const settings = JSON.parse(localStorage.getItem("settings")!); // TODO: is this bang correct?
|
const settings = JSON.parse(localStorage.getItem("settings")!); // TODO: is this bang correct?
|
||||||
|
|
||||||
|
// TODO: Remove this block after save migration is implemented
|
||||||
|
if (settings.hasOwnProperty("REROLL_TARGET") && !settings.hasOwnProperty(SettingKeys.Shop_Cursor_Target)) {
|
||||||
|
settings[SettingKeys.Shop_Cursor_Target] = settings["REROLL_TARGET"];
|
||||||
|
delete settings["REROLL_TARGET"];
|
||||||
|
localStorage.setItem("settings", JSON.stringify(settings));
|
||||||
|
}
|
||||||
|
// End of block to remove
|
||||||
|
|
||||||
for (const setting of Object.keys(settings)) {
|
for (const setting of Object.keys(settings)) {
|
||||||
setSetting(this.scene, setting, settings[setting]);
|
setSetting(this.scene, setting, settings[setting]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue