mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-20 16:22:56 +02:00
Removed CharacterInfo maximum hacknet, styling in the options, comments in exploits
This commit is contained in:
+25
-17
@@ -5,17 +5,25 @@ import {numeralWrapper} from "./numeralFormat";
|
||||
|
||||
|
||||
function setSettingsLabels() {
|
||||
var nsExecTime = document.getElementById("settingsNSExecTimeRangeValLabel");
|
||||
var nsLogLimit = document.getElementById("settingsNSLogRangeValLabel");
|
||||
var nsPortLimit = document.getElementById("settingsNSPortRangeValLabel");
|
||||
var suppressMsgs = document.getElementById("settingsSuppressMessages");
|
||||
var suppressFactionInv = document.getElementById("settingsSuppressFactionInvites")
|
||||
var suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
|
||||
var suppressBuyAugmentationConfirmation = document.getElementById("settingsSuppressBuyAugmentationConfirmation");
|
||||
var suppressHospitalizationPopup = document.getElementById("settingsSuppressHospitalizationPopup");
|
||||
var autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
|
||||
var disableHotkeys = document.getElementById("settingsDisableHotkeys");
|
||||
var locale = document.getElementById("settingsLocale");
|
||||
function setAutosaveLabel(elem) {
|
||||
if(Settings.AutosaveInterval === 0) {
|
||||
elem.innerHTML = `disabled`;
|
||||
} else {
|
||||
elem.innerHTML = `every ${Settings.AutosaveInterval}s`;
|
||||
}
|
||||
}
|
||||
|
||||
const nsExecTime = document.getElementById("settingsNSExecTimeRangeValLabel");
|
||||
const nsLogLimit = document.getElementById("settingsNSLogRangeValLabel");
|
||||
const nsPortLimit = document.getElementById("settingsNSPortRangeValLabel");
|
||||
const suppressMsgs = document.getElementById("settingsSuppressMessages");
|
||||
const suppressFactionInv = document.getElementById("settingsSuppressFactionInvites")
|
||||
const suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
|
||||
const suppressBuyAugmentationConfirmation = document.getElementById("settingsSuppressBuyAugmentationConfirmation");
|
||||
const suppressHospitalizationPopup = document.getElementById("settingsSuppressHospitalizationPopup");
|
||||
const autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
|
||||
const disableHotkeys = document.getElementById("settingsDisableHotkeys");
|
||||
const locale = document.getElementById("settingsLocale");
|
||||
|
||||
//Initialize values on labels
|
||||
nsExecTime.innerHTML = Settings.CodeInstructionRunTime + "ms";
|
||||
@@ -26,16 +34,16 @@ function setSettingsLabels() {
|
||||
suppressTravelConfirmation.checked = Settings.SuppressTravelConfirmation;
|
||||
suppressBuyAugmentationConfirmation.checked = Settings.SuppressBuyAugmentationConfirmation;
|
||||
suppressHospitalizationPopup.checked = Settings.SuppressHospitalizationPopup;
|
||||
autosaveInterval.innerHTML = Settings.AutosaveInterval;
|
||||
setAutosaveLabel(autosaveInterval);
|
||||
disableHotkeys.checked = Settings.DisableHotkeys;
|
||||
locale.value = Settings.Locale;
|
||||
numeralWrapper.updateLocale(Settings.Locale); //Initialize locale
|
||||
|
||||
//Set handlers for when input changes for sliders
|
||||
var nsExecTimeInput = document.getElementById("settingsNSExecTimeRangeVal");
|
||||
var nsLogRangeInput = document.getElementById("settingsNSLogRangeVal");
|
||||
var nsPortRangeInput = document.getElementById("settingsNSPortRangeVal");
|
||||
var nsAutosaveIntervalInput = document.getElementById("settingsAutosaveIntervalVal");
|
||||
const nsExecTimeInput = document.getElementById("settingsNSExecTimeRangeVal");
|
||||
const nsLogRangeInput = document.getElementById("settingsNSLogRangeVal");
|
||||
const nsPortRangeInput = document.getElementById("settingsNSPortRangeVal");
|
||||
const nsAutosaveIntervalInput = document.getElementById("settingsAutosaveIntervalVal");
|
||||
nsExecTimeInput.value = Settings.CodeInstructionRunTime;
|
||||
nsLogRangeInput.value = Settings.MaxLogCapacity;
|
||||
nsPortRangeInput.value = Settings.MaxPortCapacity;
|
||||
@@ -57,8 +65,8 @@ function setSettingsLabels() {
|
||||
};
|
||||
|
||||
nsAutosaveIntervalInput.oninput = function() {
|
||||
autosaveInterval.innerHTML = this.value;
|
||||
Settings.AutosaveInterval = Number(this.value);
|
||||
setAutosaveLabel(autosaveInterval)
|
||||
if (Number(this.value) === 0) {
|
||||
Engine.Counters.autoSaveCounter = Infinity;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user