From f403bd14b79b63055bb570e7bf4aeb14b8a28434 Mon Sep 17 00:00:00 2001 From: danielyxie Date: Fri, 18 May 2018 22:15:58 -0500 Subject: [PATCH] Fixed Bladeburner bug where exception would be thrown if Blackop was created outside of Bladeburner UI --- dist/engine.bundle.js | 4 +++- dist/tests.bundle.js | 4 +++- src/Bladeburner.js | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 96c346992..4749d0856 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -57509,7 +57509,9 @@ Bladeburner.prototype.completeAction = function() { return Object(_RedPill_js__WEBPACK_IMPORTED_MODULE_5__["hackWorldDaemon"])(_Player_js__WEBPACK_IMPORTED_MODULE_4__["Player"].bitNodeN); } - this.createActionAndSkillsContent(); + if (_engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].currentPage === _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].Page.Bladeburner) { + this.createActionAndSkillsContent(); + } if (this.logging.blackops) { this.log(action.name + " successful! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(rankGain, 1) + " rank"); diff --git a/dist/tests.bundle.js b/dist/tests.bundle.js index 748112e48..04230da50 100644 --- a/dist/tests.bundle.js +++ b/dist/tests.bundle.js @@ -57509,7 +57509,9 @@ Bladeburner.prototype.completeAction = function() { return Object(_RedPill_js__WEBPACK_IMPORTED_MODULE_5__["hackWorldDaemon"])(_Player_js__WEBPACK_IMPORTED_MODULE_4__["Player"].bitNodeN); } - this.createActionAndSkillsContent(); + if (_engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].currentPage === _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].Page.Bladeburner) { + this.createActionAndSkillsContent(); + } if (this.logging.blackops) { this.log(action.name + " successful! Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(rankGain, 1) + " rank"); diff --git a/src/Bladeburner.js b/src/Bladeburner.js index c353479be..ade75310e 100644 --- a/src/Bladeburner.js +++ b/src/Bladeburner.js @@ -1202,7 +1202,9 @@ Bladeburner.prototype.completeAction = function() { return hackWorldDaemon(Player.bitNodeN); } - this.createActionAndSkillsContent(); + if (Engine.currentPage === Engine.Page.Bladeburner) { + this.createActionAndSkillsContent(); + } if (this.logging.blackops) { this.log(action.name + " successful! Gained " + formatNumber(rankGain, 1) + " rank");