mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
fix backup_ folder not working
This commit is contained in:
parent
77fce11813
commit
9fe817daf2
26
dist/vendor.bundle.js
vendored
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);
|
||||
|
Loading…
Reference in New Issue
Block a user