mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 21:53:50 +01:00
added options to suppress travel confirmation
This commit is contained in:
parent
a97aaf3abb
commit
7362ead364
10
index.html
10
index.html
@ -821,6 +821,16 @@
|
||||
<input type="checkbox" name="settingsSuppressFactionInvites" id="settingsSuppressFactionInvites">
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress travel confirmation -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressTravelConfirmation" class="tooltip">Suppress Travel Confirmation:
|
||||
<span class="tooltiptext">
|
||||
If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.
|
||||
</span>
|
||||
</label>
|
||||
<input type="checkbox" name="settingsSuppressTravelConfirmation" id="settingsSuppressTravelConfirmation">
|
||||
</fieldset>
|
||||
|
||||
<!-- Disable Terminal and Navigation Shortcuts -->
|
||||
<fieldset>
|
||||
<label for="settingsDisableHotkeys" class="tooltip">Disable Hotkeys:
|
||||
|
@ -11,6 +11,7 @@ import {Player} from "./Player.js";
|
||||
import {Server, AllServers, AddToAllServers} from "./Server.js";
|
||||
import {purchaseServer,
|
||||
purchaseRamForHomeComputer} from "./ServerPurchases.js";
|
||||
import {Settings} from "./Settings.js";
|
||||
import {SpecialServerNames, SpecialServerIps} from "./SpecialServerIps.js";
|
||||
|
||||
import {dialogBoxCreate} from "../utils/DialogBox.js";
|
||||
@ -2144,6 +2145,10 @@ function setJobRequirementTooltip(loc, entryPosType, btn) {
|
||||
}
|
||||
|
||||
function travelBoxCreate(destCityName, cost) {
|
||||
if(Settings.SuppressTravelConfirmation) {
|
||||
travelToCity(destCityName, cost);
|
||||
return;
|
||||
}
|
||||
var yesBtn = yesNoBoxGetYesButton(), noBtn = yesNoBoxGetNoButton();
|
||||
yesBtn.innerHTML = "Yes";
|
||||
noBtn.innerHTML = "No";
|
||||
|
@ -7,6 +7,7 @@ let Settings = {
|
||||
MaxPortCapacity: 50,
|
||||
SuppressMessages: false,
|
||||
SuppressFactionInvites: false,
|
||||
SuppressTravelConfirmation: false,
|
||||
AutosaveInterval: 60,
|
||||
DisableHotkeys: false,
|
||||
ThemeHighlightColor: "#ffffff",
|
||||
@ -26,6 +27,7 @@ function initSettings() {
|
||||
Settings.MaxPortCapacity = 50;
|
||||
Settings.SuppressMessages = false;
|
||||
Settings.SuppressFactionInvites = false;
|
||||
Settings.SuppressTravelConfirmation = false,
|
||||
Settings.AutosaveInterval = 60;
|
||||
Settings.DisableHotkeys = false;
|
||||
}
|
||||
@ -36,6 +38,7 @@ function setSettingsLabels() {
|
||||
var nsPortLimit = document.getElementById("settingsNSPortRangeValLabel");
|
||||
var suppressMsgs = document.getElementById("settingsSuppressMessages");
|
||||
var suppressFactionInv = document.getElementById("settingsSuppressFactionInvites")
|
||||
var suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
|
||||
var autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
|
||||
var disableHotkeys = document.getElementById("settingsDisableHotkeys");
|
||||
|
||||
@ -45,6 +48,7 @@ function setSettingsLabels() {
|
||||
nsPortLimit.innerHTML = Settings.MaxPortCapacity;
|
||||
suppressMsgs.checked = Settings.SuppressMessages;
|
||||
suppressFactionInv.checked = Settings.SuppressFactionInvites;
|
||||
suppressTravelConfirmation.checked = Settings.suppressTravelConfirmation;
|
||||
autosaveInterval.innerHTML = Settings.AutosaveInterval;
|
||||
disableHotkeys.checked = Settings.DisableHotkeys;
|
||||
|
||||
@ -91,6 +95,10 @@ function setSettingsLabels() {
|
||||
Settings.SuppressFactionInvites = this.checked;
|
||||
};
|
||||
|
||||
suppressTravelConfirmation.onclick = function() {
|
||||
Settings.SuppressTravelConfirmation = this.checked;
|
||||
};
|
||||
|
||||
disableHotkeys.onclick = function() {
|
||||
Settings.DisableHotkeys = this.checked;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user