mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-05-11 20:41:10 +00:00
idk
This commit is contained in:
parent
b20e35919e
commit
0b50935be1
2 changed files with 14 additions and 12 deletions
js
|
@ -99,13 +99,14 @@ function exportSave() {
|
|||
document.body.removeChild(el);
|
||||
}
|
||||
|
||||
function importSave(imported=undefined) {
|
||||
function importSave(imported=undefined, forced=false) {
|
||||
if (imported===undefined) imported = prompt("Paste your save here")
|
||||
try {
|
||||
tempPlr = Object.assign(getStartPlayer(), JSON.parse(atob(imported)))
|
||||
if(tempPlr.versionType != "Modding") // Wrong save
|
||||
if(tempPlr.versionType != modInfo.id && !forced) // Wrong save (use "Forced" to force it to accept.)
|
||||
return
|
||||
player = tempPlr;
|
||||
player.versionType = modInfo.id
|
||||
fixSave()
|
||||
save()
|
||||
window.location.reload()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue