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.
This commit is contained in:
Martin Fournier
2021-05-13 08:11:42 -04:00
parent bf141c7eb0
commit ae04b7357e
4 changed files with 30 additions and 2 deletions
+9 -1
View File
@@ -1,6 +1,6 @@
import {Engine} from "../engine";
import {Settings} from "../Settings/Settings";
import {Player} from "../Player";
import {numeralWrapper} from "./numeralFormat";
@@ -21,6 +21,7 @@ function setSettingsLabels() {
const suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
const suppressBuyAugmentationConfirmation = document.getElementById("settingsSuppressBuyAugmentationConfirmation");
const suppressHospitalizationPopup = document.getElementById("settingsSuppressHospitalizationPopup");
const suppressBladeburnerPopup = document.getElementById("settingsSuppressBladeburnerPopup");
const autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
const disableHotkeys = document.getElementById("settingsDisableHotkeys");
const disableASCIIArt = document.getElementById("settingsDisableASCIIArt");
@@ -36,6 +37,9 @@ function setSettingsLabels() {
suppressTravelConfirmation.checked = Settings.SuppressTravelConfirmation;
suppressBuyAugmentationConfirmation.checked = Settings.SuppressBuyAugmentationConfirmation;
suppressHospitalizationPopup.checked = Settings.SuppressHospitalizationPopup;
suppressBladeburnerPopup.checked = Settings.SuppressBladeburnerPopup;
suppressBladeburnerPopup.closest('fieldset').style.display =
Player.canAccessBladeburner() ? 'block' : 'none';
setAutosaveLabel(autosaveInterval);
disableHotkeys.checked = Settings.DisableHotkeys;
disableASCIIArt.checked = Settings.CityListView;
@@ -99,6 +103,10 @@ function setSettingsLabels() {
Settings.SuppressHospitalizationPopup = this.checked;
}
suppressBladeburnerPopup.onclick = function() {
Settings.SuppressBladeburnerPopup = this.checked;
}
disableHotkeys.onclick = function() {
Settings.DisableHotkeys = this.checked;
}