fix backup_ folder not working

This commit is contained in:
Olivier Gagnon 2021-11-10 12:34:56 -05:00
parent 77fce11813
commit 9fe817daf2
5 changed files with 21 additions and 17 deletions

26
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -228,6 +228,7 @@ function evaluateVersionCompatibility(ver: string | number): void {
Player.reapplyAllSourceFiles();
}
}
v1APIBreak();
}
function loadGame(saveString: string): boolean {

@ -109,7 +109,10 @@ export function v1APIBreak(): void {
const backups: Script[] = [];
for (const script of server.scripts) {
if (!hasChanges(script.code)) continue;
backups.push(new Script("BACKUP_" + script.filename, script.code, script.server));
console.log(script.filename);
const prefix = script.filename.includes("/") ? "/BACKUP_" : "BACKUP_";
console.log(prefix + script.filename);
backups.push(new Script(prefix + script.filename, script.code, script.server));
script.code = convert(script.code);
}
server.scripts = server.scripts.concat(backups);