bladeburner supress option now correctly updates when blade become accessible/unaccessible

This commit is contained in:
Olivier Gagnon 2021-05-17 21:17:17 -04:00
parent eb7004feaa
commit 188dcbad89
3 changed files with 7 additions and 2 deletions

@ -263,5 +263,6 @@ export const CONSTANTS: IMap<any> = {
* City hall now has some generic text if you can't create a corp yet.
* Deleting a file without extension now returns an appropriate error message.
* Fixed an issue where bladeburner would miscalculate the cost of hospitalization.
* It is now possible to suppress bladeburner "action stopped" popup.
`,
}

@ -38,8 +38,6 @@ function setSettingsLabels() {
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;

@ -1,4 +1,5 @@
/* GameOptions.js */
import { Player } from "../src/Player";
//Close box when clicking outside
$(document).click(function(event) {
@ -36,6 +37,11 @@ function gameOptionsBoxClose() {
function gameOptionsBoxOpen() {
var box = document.getElementById("game-options-container");
box.style.display = "flex";
// special exception for bladeburner popup because it's only visible later.
document.getElementById("settingsSuppressBladeburnerPopup").
closest('fieldset').style.display =
Player.canAccessBladeburner() ? 'block' : 'none';
setTimeout(function() {
gameOptionsOpened = true;
}, 500);