mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-28 02:23:53 +01:00
Fix blade corp gang equal 0
This commit is contained in:
parent
85aa67ac26
commit
6543e73f6f
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -153,6 +153,17 @@ function evaluateVersionCompatibility(ver: string): void {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ver < "0.56.1") {
|
||||
if (anyPlayer.bladeburner === 0) {
|
||||
anyPlayer.bladeburner = null;
|
||||
}
|
||||
if (anyPlayer.gang === 0) {
|
||||
anyPlayer.gang = null;
|
||||
}
|
||||
if (anyPlayer.corporation === 0) {
|
||||
anyPlayer.corporation = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadGame(saveString: string): boolean {
|
||||
|
@ -58,9 +58,10 @@ export class Script {
|
||||
download(): void {
|
||||
const filename = this.filename + ".js";
|
||||
const file = new Blob([this.code], { type: "text/plain" });
|
||||
if (window.navigator.msSaveOrOpenBlob) {
|
||||
const navigator = window.navigator as any;
|
||||
if (navigator.msSaveOrOpenBlob) {
|
||||
// IE10+
|
||||
window.navigator.msSaveOrOpenBlob(file, filename);
|
||||
navigator.msSaveOrOpenBlob(file, filename);
|
||||
} else {
|
||||
// Others
|
||||
const a = document.createElement("a"),
|
||||
@ -112,6 +113,10 @@ export class Script {
|
||||
this.markUpdated();
|
||||
}
|
||||
|
||||
imports(): string[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Serialize the current object to a JSON save state
|
||||
toJSON(): any {
|
||||
return Generic_toJSON("Script", this);
|
||||
|
Loading…
Reference in New Issue
Block a user