Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e436d7f

Browse files
committedOct 13, 2021
up to date omg
1 parent a5a28db commit e436d7f

10 files changed

+16124
-15997
lines changed
 

‎package-lock.json

+16,090-15,963
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"@emotion/react": "^11.4.1",
1414
"@emotion/styled": "^11.3.0",
1515
"@monaco-editor/react": "^4.2.2",
16-
"@mui/icons-material": "^5.0.0-rc.1",
16+
"@mui/icons-material": "^5.0.3",
1717
"@mui/lab": "^5.0.0-alpha.46",
18-
"@mui/material": "^5.0.0-rc.1",
19-
"@mui/styles": "^5.0.0-rc.1",
18+
"@mui/material": "^5.0.3",
19+
"@mui/styles": "^5.0.1",
2020
"@types/escodegen": "^0.0.7",
2121
"@types/js-beautify": "^1.13.2",
2222
"@types/numeral": "0.0.25",
@@ -122,7 +122,6 @@
122122
"start-server-and-test": "^1.14.0",
123123
"style-loader": "^0.21.0",
124124
"stylelint": "^9.2.1",
125-
"stylelint-declaration-use-variable": "^1.6.1",
126125
"stylelint-order": "^0.8.1",
127126
"typescript": "^4.2.4",
128127
"uglify-es": "^3.3.9",

‎src/Bladeburner/Bladeburner.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export class Bladeburner implements IBladeburner {
132132
return this.resetAction();
133133
}
134134
this.actionTimeToComplete = action.getActionTime(this);
135-
} catch (e) {
135+
} catch (e: any) {
136136
exceptionAlert(e);
137137
}
138138
break;
@@ -149,7 +149,7 @@ export class Bladeburner implements IBladeburner {
149149
return this.resetAction();
150150
}
151151
this.actionTimeToComplete = action.getActionTime(this);
152-
} catch (e) {
152+
} catch (e: any) {
153153
exceptionAlert(e);
154154
}
155155
break;
@@ -169,7 +169,7 @@ export class Bladeburner implements IBladeburner {
169169
throw new Error("Failed to get BlackOperation object for: " + actionId.name);
170170
}
171171
this.actionTimeToComplete = action.getActionTime(this);
172-
} catch (e) {
172+
} catch (e: any) {
173173
exceptionAlert(e);
174174
}
175175
break;
@@ -220,7 +220,7 @@ export class Bladeburner implements IBladeburner {
220220
for (let i = 0; i < arrayOfCommands.length; ++i) {
221221
this.executeConsoleCommand(player, arrayOfCommands[i]);
222222
}
223-
} catch (e) {
223+
} catch (e: any) {
224224
exceptionAlert(e);
225225
}
226226
}
@@ -1298,7 +1298,7 @@ export class Bladeburner implements IBladeburner {
12981298
action.level = action.maxLevel;
12991299
} // Autolevel
13001300
this.startAction(player, this.action); // Repeat action
1301-
} catch (e) {
1301+
} catch (e: any) {
13021302
exceptionAlert(e);
13031303
}
13041304
break;
@@ -1387,7 +1387,7 @@ export class Bladeburner implements IBladeburner {
13871387
this.log("You lost " + formatNumber(losses, 0) + " team members during " + action.name);
13881388
}
13891389
}
1390-
} catch (e) {
1390+
} catch (e: any) {
13911391
exceptionAlert(e);
13921392
}
13931393
break;
@@ -2056,7 +2056,7 @@ export class Bladeburner implements IBladeburner {
20562056
this.startAction(player, actionId);
20572057
workerScript.log("bladeburner.startAction", `Starting bladeburner action with type '${type}' and name ${name}"`);
20582058
return true;
2059-
} catch (e) {
2059+
} catch (e: any) {
20602060
this.resetAction();
20612061
workerScript.log("bladeburner.startAction", errorLogText);
20622062
return false;

‎src/Corporation/Warehouse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export class Warehouse {
9999
updateSize(corporation: ICorporation, industry: IIndustry): void {
100100
try {
101101
this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();
102-
} catch (e) {
102+
} catch (e: any) {
103103
exceptionAlert(e);
104104
}
105105
}

‎src/Gang/Gang.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class Gang {
9797
this.processExperienceGains(cycles);
9898
this.processTerritoryAndPowerGains(cycles);
9999
this.storedCycles -= cycles;
100-
} catch (e) {
100+
} catch (e: any) {
101101
console.error(`Exception caught when processing Gang: ${e}`);
102102
}
103103
}
@@ -344,7 +344,7 @@ export class Gang {
344344
workerScript.log("ascend", `Ascended Gang member ${member.name}`);
345345
}
346346
return res;
347-
} catch (e) {
347+
} catch (e: any) {
348348
if (workerScript == null) {
349349
exceptionAlert(e);
350350
}

‎src/NetscriptFunctions.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
23012301
// Coerce 'data' to be a string
23022302
try {
23032303
data = String(data);
2304-
} catch (e) {
2304+
} catch (e: any) {
23052305
throw makeRuntimeErrorMsg("write", `Invalid data (${e}). Data being written must be convertible to a string`);
23062306
}
23072307

@@ -3959,7 +3959,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
39593959
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
39603960
try {
39613961
return bladeburner.startActionNetscriptFn(Player, type, name, workerScript);
3962-
} catch (e) {
3962+
} catch (e: any) {
39633963
throw makeRuntimeErrorMsg("bladeburner.startAction", e);
39643964
}
39653965
},
@@ -3984,7 +3984,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
39843984
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
39853985
try {
39863986
return bladeburner.getActionTimeNetscriptFn(Player, type, name, workerScript);
3987-
} catch (e) {
3987+
} catch (e: any) {
39883988
throw makeRuntimeErrorMsg("bladeburner.getActionTime", e);
39893989
}
39903990
},
@@ -3998,7 +3998,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
39983998
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
39993999
try {
40004000
return bladeburner.getActionEstimatedSuccessChanceNetscriptFn(Player, type, name, workerScript);
4001-
} catch (e) {
4001+
} catch (e: any) {
40024002
throw makeRuntimeErrorMsg("bladeburner.getActionEstimatedSuccessChance", e);
40034003
}
40044004
},
@@ -4022,7 +4022,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
40224022
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
40234023
try {
40244024
return bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);
4025-
} catch (e) {
4025+
} catch (e: any) {
40264026
throw makeRuntimeErrorMsg("bladeburner.getActionCountRemaining", e);
40274027
}
40284028
},
@@ -4083,7 +4083,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
40834083
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
40844084
try {
40854085
return bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);
4086-
} catch (e) {
4086+
} catch (e: any) {
40874087
throw makeRuntimeErrorMsg("bladeburner.getSkillLevel", e);
40884088
}
40894089
},
@@ -4094,7 +4094,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
40944094
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
40954095
try {
40964096
return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);
4097-
} catch (e) {
4097+
} catch (e: any) {
40984098
throw makeRuntimeErrorMsg("bladeburner.getSkillUpgradeCost", e);
40994099
}
41004100
},
@@ -4105,7 +4105,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
41054105
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
41064106
try {
41074107
return bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);
4108-
} catch (e) {
4108+
} catch (e: any) {
41094109
throw makeRuntimeErrorMsg("bladeburner.upgradeSkill", e);
41104110
}
41114111
},
@@ -4116,7 +4116,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
41164116
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
41174117
try {
41184118
return bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);
4119-
} catch (e) {
4119+
} catch (e: any) {
41204120
throw makeRuntimeErrorMsg("bladeburner.getTeamSize", e);
41214121
}
41224122
},
@@ -4127,7 +4127,7 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
41274127
if (bladeburner === null) throw new Error("Should not be called without Bladeburner");
41284128
try {
41294129
return bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);
4130-
} catch (e) {
4130+
} catch (e: any) {
41314131
throw makeRuntimeErrorMsg("bladeburner.setTeamSize", e);
41324132
}
41334133
},

‎src/NetscriptWorker.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function startNetscript2Script(workerScript: WorkerScript): Promise<WorkerScript
9393
let result;
9494
try {
9595
result = f(...args);
96-
} catch (e) {
96+
} catch (e: any) {
9797
runningFn = null;
9898
throw e;
9999
}
@@ -151,7 +151,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
151151
const importProcessingRes = processNetscript1Imports(code, workerScript);
152152
codeWithImports = importProcessingRes.code;
153153
codeLineOffset = importProcessingRes.lineOffset;
154-
} catch (e) {
154+
} catch (e: any) {
155155
dialogBoxCreate("Error processing Imports in " + workerScript.name + ":<br>" + e);
156156
workerScript.env.stopFlag = true;
157157
workerScript.running = false;
@@ -251,7 +251,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
251251
let interpreter: any;
252252
try {
253253
interpreter = new Interpreter(codeWithImports, interpreterInitialization, codeLineOffset);
254-
} catch (e) {
254+
} catch (e: any) {
255255
dialogBoxCreate("Syntax ERROR in " + workerScript.name + ":<br>" + e);
256256
workerScript.env.stopFlag = true;
257257
workerScript.running = false;
@@ -271,7 +271,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
271271
} else {
272272
resolve(workerScript);
273273
}
274-
} catch (e) {
274+
} catch (e: any) {
275275
e = e.toString();
276276
if (!isScriptErrorMessage(e)) {
277277
e = makeRuntimeRejectMsg(workerScript, e);
@@ -283,7 +283,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<WorkerScript
283283

284284
try {
285285
runInterpreter();
286-
} catch (e) {
286+
} catch (e: any) {
287287
if (isString(e)) {
288288
workerScript.errorMessage = e;
289289
return reject(workerScript);

‎src/SaveObject.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ class BitburnerSaveObject {
7373
const bn = Player.bitNodeN;
7474
const filename = `bitburnerSave_BN${bn}x${SourceFileFlags[bn]}_${epochTime}.json`;
7575
const file = new Blob([saveString], { type: "text/plain" });
76-
if (window.navigator.msSaveOrOpenBlob) {
76+
const navigator = window.navigator as any;
77+
if (navigator.msSaveOrOpenBlob) {
7778
// IE10+
78-
window.navigator.msSaveOrOpenBlob(file, filename);
79+
navigator.msSaveOrOpenBlob(file, filename);
7980
} else {
8081
// Others
8182
const a = document.createElement("a"),

‎src/TextFile.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ export class TextFile {
3535
const filename: string = this.fn;
3636
const file: Blob = new Blob([this.text], { type: "text/plain" });
3737
/* tslint:disable-next-line:strict-boolean-expressions */
38-
if (window.navigator.msSaveOrOpenBlob) {
38+
const navigator = window.navigator as any;
39+
if (navigator.msSaveOrOpenBlob) {
3940
// IE10+
40-
window.navigator.msSaveOrOpenBlob(file, filename);
41+
navigator.msSaveOrOpenBlob(file, filename);
4142
} else {
4243
// Others
4344
const a: HTMLAnchorElement = document.createElement("a");

‎stylelint.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable spaced-comment */
22
module.exports = {
33
plugins: [
4-
"stylelint-declaration-use-variable",
54
"stylelint-order" /*,
65
"stylelint-scss" */,
76
],

0 commit comments

Comments
 (0)
Please sign in to comment.