From ae04b7357e8f5d86ad7e9ed01dfa7a177fe9b81b Mon Sep 17 00:00:00 2001 From: Martin Fournier Date: Thu, 13 May 2021 08:11:42 -0400 Subject: [PATCH] Add setting to suppress Bladeburner popups Used to suppress the message that is shown when your Bladeburner action is cancelled when busy with something else. Will be hidden if the player does not have access to Bladeburners. --- src/Bladeburner.jsx | 5 ++++- src/Settings/Settings.ts | 7 +++++++ src/index.html | 10 ++++++++++ src/ui/setSettingsLabels.js | 10 +++++++++- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/Bladeburner.jsx b/src/Bladeburner.jsx index 6893feaeb..64738708d 100644 --- a/src/Bladeburner.jsx +++ b/src/Bladeburner.jsx @@ -24,6 +24,7 @@ import { convertTimeMsToTimeElapsedString, } from "../utils/StringHelperFunctions"; +import { Settings } from "./Settings/Settings"; import { ConsoleHelpText } from "./Bladeburner/data/Help"; import { City } from "./Bladeburner/City"; import { BladeburnerConstants } from "./Bladeburner/data/Constants"; @@ -358,7 +359,9 @@ Bladeburner.prototype.process = function() { msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console` this.automateEnabled = false; } - dialogBoxCreate(msg); + if (!Settings.SuppressBladeburnerPopup) { + dialogBoxCreate(msg); + } } this.resetAction(); } diff --git a/src/Settings/Settings.ts b/src/Settings/Settings.ts index af7376174..ab0956d78 100644 --- a/src/Settings/Settings.ts +++ b/src/Settings/Settings.ts @@ -74,6 +74,11 @@ interface IDefaultSettings { * Whether the user should be asked to confirm travelling between cities. */ SuppressTravelConfirmation: boolean; + + /** + * Whether the user should be displayed a popup message when his Bladeburner actions are cancelled. + */ + SuppressBladeburnerPopup: boolean; } /** @@ -122,6 +127,7 @@ const defaultSettings: IDefaultSettings = { SuppressHospitalizationPopup: false, SuppressMessages: false, SuppressTravelConfirmation: false, + SuppressBladeburnerPopup: false, }; /** @@ -147,6 +153,7 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = { SuppressHospitalizationPopup: defaultSettings.SuppressHospitalizationPopup, SuppressMessages: defaultSettings.SuppressMessages, SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation, + SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup, init() { Object.assign(Settings, defaultSettings); }, diff --git a/src/index.html b/src/index.html index c39ae82a0..fd7b0ad26 100644 --- a/src/index.html +++ b/src/index.html @@ -519,6 +519,16 @@ if (htmlWebpackPlugin.options.googleAnalytics.trackingId) { %> + +
+ + +
+