mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 23:53:48 +01:00
Added option to disable hospitalization popup message
This commit is contained in:
parent
b15582ff71
commit
bb4094f879
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
29
dist/engine.css
vendored
29
dist/engine.css
vendored
@ -388,32 +388,29 @@ a:visited {
|
||||
/* Status text */
|
||||
@-webkit-keyframes status-text {
|
||||
from {
|
||||
opacity: 1;
|
||||
top: 0; }
|
||||
opacity: 1; }
|
||||
to {
|
||||
opacity: 0;
|
||||
top: 0; } }
|
||||
opacity: 0; } }
|
||||
|
||||
.status-text {
|
||||
display: inline;
|
||||
display: inline-block;
|
||||
height: 15%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
-webkit-animation: status-text 3s 1;
|
||||
background-color: transparent;
|
||||
height: 15%; }
|
||||
z-index: 2;
|
||||
-webkit-animation: status-text 3s 1; }
|
||||
|
||||
#status-text-container {
|
||||
background-color: transparent; }
|
||||
|
||||
#status-text {
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 4px;
|
||||
margin-right: 14px;
|
||||
background-color: transparent;
|
||||
z-index: 2;
|
||||
font-size: 20px;
|
||||
bottom: 0;
|
||||
color: #fff;
|
||||
margin-right: 14px;
|
||||
padding: 4px;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: auto; }
|
||||
|
||||
/* Character Overview */
|
||||
|
114
dist/vendor.bundle.js
vendored
114
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
10
index.html
10
index.html
@ -932,6 +932,16 @@
|
||||
<input type="checkbox" name="settingsSuppressBuyAugmentationConfirmation" id="settingsSuppressBuyAugmentationConfirmation">
|
||||
</fieldset>
|
||||
|
||||
<!-- Hospitalization Popup -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressHospitalizationPopup" class="tooltip">Suppress Hospitalization popup:
|
||||
<span class="tooltiptext">
|
||||
If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.
|
||||
</span>
|
||||
</label>
|
||||
<input type="checkbox" name="settingsSuppressHospitalizationPopup" id="settingsSuppressHospitalizationPopup">
|
||||
</fieldset>
|
||||
|
||||
<!-- Disable Terminal and Navigation Shortcuts -->
|
||||
<fieldset>
|
||||
<label for="settingsDisableHotkeys" class="tooltip">Disable Hotkeys:
|
||||
|
@ -504,6 +504,7 @@ let CONSTANTS = {
|
||||
"*** The number (count) of Operations should now increase significantly faster<br>" +
|
||||
"*** There are now, on average, more Synthoid communities in a city<br>" +
|
||||
"*** If automation is enabled (the feature in Bladeburner console), then switching to another action such as working for a company will now disable the automation<br>" +
|
||||
"* There is now a setting for enabling/disabling the popup that appears when you are hospitalized<br>" +
|
||||
"* Bug Fix: Stock market should now be correctly initialized in BitNode-8 (by Kline-)<br>" +
|
||||
"* Bug Fix: bladeburner.getCurrentAction() should now properly an 'Idle' object rather than null (by Kline-)<br>" +
|
||||
"* Bug Fix: Bladeburner skill cost multiplier should now properly increase in BitNode-12 (by hydroflame)<br>"
|
||||
|
@ -16,6 +16,7 @@ import {Gang, resetGangs} from "./Gang";
|
||||
import {Locations} from "./Locations";
|
||||
import {hasBn11SF, hasWallStreetSF,hasAISF} from "./NetscriptFunctions";
|
||||
import {AllServers, Server, AddToAllServers} from "./Server";
|
||||
import {Settings} from "./Settings";
|
||||
import {SpecialServerIps, SpecialServerNames} from "./SpecialServerIps";
|
||||
import {SourceFiles, applySourceFile} from "./SourceFile";
|
||||
|
||||
@ -1692,9 +1693,14 @@ PlayerObject.prototype.takeDamage = function(amt) {
|
||||
}
|
||||
|
||||
PlayerObject.prototype.hospitalize = function() {
|
||||
dialogBoxCreate("You were in critical condition! You were taken to the hospital where " +
|
||||
"luckily they were able to save your life. You were charged $" +
|
||||
formatNumber(this.max_hp * CONSTANTS.HospitalCostPerHp, 2));
|
||||
if (Settings.SuppressHospitalizationPopup === false) {
|
||||
dialogBoxCreate(
|
||||
"You were in critical condition! You were taken to the hospital where " +
|
||||
"luckily they were able to save your life. You were charged " +
|
||||
numeral(this.max_hp * CONSTANTS.HospitalCostPerHp).format('$0.000a')
|
||||
);
|
||||
}
|
||||
|
||||
this.loseMoney(this.max_hp * CONSTANTS.HospitalCostPerHp);
|
||||
this.hp = this.max_hp;
|
||||
}
|
||||
|
@ -48,6 +48,11 @@ interface IDefaultSettings {
|
||||
* Whether the user should be asked to confirm travelling between cities.
|
||||
*/
|
||||
SuppressTravelConfirmation: boolean;
|
||||
|
||||
/**
|
||||
* Whether to show a popup message when player is hospitalized from taking too much damage
|
||||
*/
|
||||
SuppressHospitalizationPopup: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -92,6 +97,7 @@ const defaultSettings: IDefaultSettings = {
|
||||
SuppressFactionInvites: false,
|
||||
SuppressMessages: false,
|
||||
SuppressTravelConfirmation: false,
|
||||
SuppressHospitalizationPopup: false,
|
||||
};
|
||||
|
||||
/**
|
||||
@ -110,6 +116,7 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = {
|
||||
SuppressFactionInvites: defaultSettings.SuppressFactionInvites,
|
||||
SuppressMessages: defaultSettings.SuppressMessages,
|
||||
SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,
|
||||
SuppressHospitalizationPopup: defaultSettings.SuppressHospitalizationPopup,
|
||||
ThemeBackgroundColor: "#000000",
|
||||
ThemeFontColor: "#66ff33",
|
||||
ThemeHighlightColor: "#ffffff",
|
||||
|
@ -9,6 +9,7 @@ function setSettingsLabels() {
|
||||
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");
|
||||
|
||||
@ -20,6 +21,7 @@ function setSettingsLabels() {
|
||||
suppressFactionInv.checked = Settings.SuppressFactionInvites;
|
||||
suppressTravelConfirmation.checked = Settings.SuppressTravelConfirmation;
|
||||
suppressBuyAugmentationConfirmation.checked = Settings.SuppressBuyAugmentationConfirmation;
|
||||
suppressHospitalizationPopup.checked = Settings.SuppressHospitalizationPopup;
|
||||
autosaveInterval.innerHTML = Settings.AutosaveInterval;
|
||||
disableHotkeys.checked = Settings.DisableHotkeys;
|
||||
|
||||
@ -72,9 +74,12 @@ function setSettingsLabels() {
|
||||
|
||||
suppressBuyAugmentationConfirmation.onclick = function() {
|
||||
Settings.SuppressBuyAugmentationConfirmation = this.checked;
|
||||
console.log('sup buy: '+Settings.SuppressBuyAugmentationConfirmation);
|
||||
};
|
||||
|
||||
suppressHospitalizationPopup.onclick = function() {
|
||||
Settings.SuppressHospitalizationPopup = this.checked;
|
||||
}
|
||||
|
||||
disableHotkeys.onclick = function() {
|
||||
Settings.DisableHotkeys = this.checked;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user