up to date omg

This commit is contained in:
Olivier Gagnon 2021-10-13 02:27:55 -04:00
parent a5a28db47f
commit e436d7f3a0
10 changed files with 16081 additions and 15954 deletions

31967
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -13,10 +13,10 @@
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@monaco-editor/react": "^4.2.2",
"@mui/icons-material": "^5.0.0-rc.1",
"@mui/icons-material": "^5.0.3",
"@mui/lab": "^5.0.0-alpha.46",
"@mui/material": "^5.0.0-rc.1",
"@mui/styles": "^5.0.0-rc.1",
"@mui/material": "^5.0.3",
"@mui/styles": "^5.0.1",
"@types/escodegen": "^0.0.7",
"@types/js-beautify": "^1.13.2",
"@types/numeral": "0.0.25",
@ -122,7 +122,6 @@
"start-server-and-test": "^1.14.0",
"style-loader": "^0.21.0",
"stylelint": "^9.2.1",
"stylelint-declaration-use-variable": "^1.6.1",
"stylelint-order": "^0.8.1",
"typescript": "^4.2.4",
"uglify-es": "^3.3.9",

@ -132,7 +132,7 @@ export class Bladeburner implements IBladeburner {
return this.resetAction();
}
this.actionTimeToComplete = action.getActionTime(this);
} catch (e) {
} catch (e: any) {
exceptionAlert(e);
}
break;
@ -149,7 +149,7 @@ export class Bladeburner implements IBladeburner {
return this.resetAction();
}
this.actionTimeToComplete = action.getActionTime(this);
} catch (e) {
} catch (e: any) {
exceptionAlert(e);
}
break;
@ -169,7 +169,7 @@ export class Bladeburner implements IBladeburner {
throw new Error("Failed to get BlackOperation object for: " + actionId.name);
}
this.actionTimeToComplete = action.getActionTime(this);
} catch (e) {
} catch (e: any) {
exceptionAlert(e);
}
break;
@ -220,7 +220,7 @@ export class Bladeburner implements IBladeburner {
for (let i = 0; i < arrayOfCommands.length; ++i) {
this.executeConsoleCommand(player, arrayOfCommands[i]);
}
} catch (e) {
} catch (e: any) {
exceptionAlert(e);
}
}
@ -1298,7 +1298,7 @@ export class Bladeburner implements IBladeburner {
action.level = action.maxLevel;
} // Autolevel
this.startAction(player, this.action); // Repeat action
} catch (e) {
} catch (e: any) {
exceptionAlert(e);
}
break;
@ -1387,7 +1387,7 @@ export class Bladeburner implements IBladeburner {
this.log("You lost " + formatNumber(losses, 0) + " team members during " + action.name);
}
}
} catch (e) {
} catch (e: any) {
exceptionAlert(e);
}
break;
@ -2056,7 +2056,7 @@ export class Bladeburner implements IBladeburner {
this.startAction(player, actionId);
workerScript.log("bladeburner.startAction", `Starting bladeburner action with type '${type}' and name ${name}"`);
return true;
} catch (e) {
} catch (e: any) {
this.resetAction();
workerScript.log("bladeburner.startAction", errorLogText);
return false;

@ -99,7 +99,7 @@ export class Warehouse {
updateSize(corporation: ICorporation, industry: IIndustry): void {
try {
this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();
} catch (e) {
} catch (e: any) {
exceptionAlert(e);
}
}

@ -97,7 +97,7 @@ export class Gang {
this.processExperienceGains(cycles);
this.processTerritoryAndPowerGains(cycles);
this.storedCycles -= cycles;
} catch (e) {
} catch (e: any) {
console.error(`Exception caught when processing Gang: ${e}`);
}
}
@ -344,7 +344,7 @@ export class Gang {
workerScript.log("ascend", `Ascended Gang member ${member.name}`);
}
return res;
} catch (e) {
} catch (e: any) {
if (workerScript == null) {
exceptionAlert(e);
}

@ -2301,7 +2301,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
// Coerce 'data' to be a string
try {
data = String(data);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("write", `Invalid data (${e}). Data being written must be convertible to a string`);
}
@ -3959,7 +3959,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.startActionNetscriptFn(Player, type, name, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.startAction", e);
}
},
@ -3984,7 +3984,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.getActionTimeNetscriptFn(Player, type, name, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.getActionTime", e);
}
},
@ -3998,7 +3998,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.getActionEstimatedSuccessChanceNetscriptFn(Player, type, name, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.getActionEstimatedSuccessChance", e);
}
},
@ -4022,7 +4022,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.getActionCountRemaining", e);
}
},
@ -4083,7 +4083,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.getSkillLevel", e);
}
},
@ -4094,7 +4094,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.getSkillUpgradeCost", e);
}
},
@ -4105,7 +4105,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.upgradeSkill", e);
}
},
@ -4116,7 +4116,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.getTeamSize", e);
}
},
@ -4127,7 +4127,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
try {
return bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);
} catch (e) {
} catch (e: any) {
throw makeRuntimeErrorMsg("bladeburner.setTeamSize", e);
}
},

@ -93,7 +93,7 @@ function startNetscript2Script(workerScript: WorkerScript): Promise<WorkerScript
let result;
try {
result = f(...args);
} catch (e) {
} catch (e: any) {
runningFn = null;
throw e;
}
@ -151,7 +151,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
const importProcessingRes = processNetscript1Imports(code, workerScript);
codeWithImports = importProcessingRes.code;
codeLineOffset = importProcessingRes.lineOffset;
} catch (e) {
} catch (e: any) {
dialogBoxCreate("Error processing Imports in " + workerScript.name + ":<br>" + e);
workerScript.env.stopFlag = true;
workerScript.running = false;
@ -251,7 +251,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
let interpreter: any;
try {
interpreter = new Interpreter(codeWithImports, interpreterInitialization, codeLineOffset);
} catch (e) {
} catch (e: any) {
dialogBoxCreate("Syntax ERROR in " + workerScript.name + ":<br>" + e);
workerScript.env.stopFlag = true;
workerScript.running = false;
@ -271,7 +271,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
} else {
resolve(workerScript);
}
} catch (e) {
} catch (e: any) {
e = e.toString();
if (!isScriptErrorMessage(e)) {
e = makeRuntimeRejectMsg(workerScript, e);
@ -283,7 +283,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
try {
runInterpreter();
} catch (e) {
} catch (e: any) {
if (isString(e)) {
workerScript.errorMessage = e;
return reject(workerScript);

@ -73,9 +73,10 @@ class BitburnerSaveObject {
const bn = Player.bitNodeN;
const filename = `bitburnerSave_BN${bn}x${SourceFileFlags[bn]}_${epochTime}.json`;
const file = new Blob([saveString], { 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"),

@ -35,9 +35,10 @@ export class TextFile {
const filename: string = this.fn;
const file: Blob = new Blob([this.text], { type: "text/plain" });
/* tslint:disable-next-line:strict-boolean-expressions */
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: HTMLAnchorElement = document.createElement("a");

@ -1,7 +1,6 @@
/* eslint-disable spaced-comment */
module.exports = {
plugins: [
"stylelint-declaration-use-variable",
"stylelint-order" /*,
"stylelint-scss" */,
],