Fixed hardReset not updating the active save file
This commit is contained in:
parent
11df9853d0
commit
c4db2a51c7
1 changed files with 5 additions and 2 deletions
|
@ -187,6 +187,9 @@ window.onbeforeunload = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
window.save = save;
|
window.save = save;
|
||||||
window.hardReset = () => {
|
window.hardReset = async () => {
|
||||||
loadSave(newSave());
|
await loadSave(newSave());
|
||||||
|
const modData = JSON.parse(decodeURIComponent(escape(atob(localStorage.getItem(modInfo.id)!))));
|
||||||
|
modData.active = player.id;
|
||||||
|
localStorage.setItem(modInfo.id, btoa(unescape(encodeURIComponent(JSON.stringify(modData)))));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue