mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 21:53:50 +01:00
Merge pull request #434 from danielyxie/prevent_dom_buttonclicks
Prevent dom buttonclicks
This commit is contained in:
commit
ebeb803109
@ -8,6 +8,8 @@
|
||||
z-index: 10; /* Sit on top */
|
||||
left: 0;
|
||||
top: 0;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
@ -16,10 +18,21 @@
|
||||
|
||||
.popup-box-content {
|
||||
background-color: var(--my-background-color);
|
||||
margin: 15% auto;
|
||||
padding: 12px;
|
||||
border: 5px solid var(--my-highlight-color);
|
||||
width: 70%;
|
||||
max-height:80%;
|
||||
/*
|
||||
margin: auto;
|
||||
height:auto;
|
||||
max-height:80%;
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:0;
|
||||
*/
|
||||
overflow-y:auto;
|
||||
color: var(--my-font-color);
|
||||
}
|
||||
|
||||
@ -141,11 +154,12 @@
|
||||
|
||||
#game-options-content {
|
||||
background-color: var(--my-background-color);
|
||||
margin: 15% auto;
|
||||
padding: 10px;
|
||||
border: 5px solid var(--my-highlight-color);
|
||||
width: 60%;
|
||||
color: var(--my-font-color);
|
||||
width: 80%;
|
||||
max-height:80%;
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
#game-options-left-panel,
|
||||
|
@ -6,6 +6,14 @@
|
||||
color: var(--my-font-color);
|
||||
width: 99%;
|
||||
height: 100%;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.generic-fullscreen-container-scroll {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
#work-in-progress-container {
|
||||
|
2
dist/engine.bundle.js
vendored
2
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
60
dist/engine.css
vendored
60
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 */
|
||||
@ -1119,7 +1116,14 @@ a:visited {
|
||||
.generic-fullscreen-container {
|
||||
color: var(--my-font-color);
|
||||
width: 99%;
|
||||
height: 100%; }
|
||||
height: 100%;
|
||||
overflow-y: hidden; }
|
||||
|
||||
.generic-fullscreen-container-scroll {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
padding-right: 20px; }
|
||||
|
||||
#work-in-progress-container {
|
||||
position: fixed; }
|
||||
@ -1174,6 +1178,8 @@ a:visited {
|
||||
/* Sit on top */
|
||||
left: 0;
|
||||
top: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
@ -1181,10 +1187,21 @@ a:visited {
|
||||
|
||||
.popup-box-content {
|
||||
background-color: var(--my-background-color);
|
||||
margin: 15% auto;
|
||||
padding: 12px;
|
||||
border: 5px solid var(--my-highlight-color);
|
||||
width: 70%;
|
||||
max-height: 80%;
|
||||
/*
|
||||
margin: auto;
|
||||
height:auto;
|
||||
max-height:80%;
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:0;
|
||||
*/
|
||||
overflow-y: auto;
|
||||
color: var(--my-font-color); }
|
||||
|
||||
.popup-box-button,
|
||||
@ -1292,11 +1309,12 @@ a:visited {
|
||||
|
||||
#game-options-content {
|
||||
background-color: var(--my-background-color);
|
||||
margin: 15% auto;
|
||||
padding: 10px;
|
||||
border: 5px solid var(--my-highlight-color);
|
||||
width: 60%;
|
||||
color: var(--my-font-color); }
|
||||
color: var(--my-font-color);
|
||||
width: 80%;
|
||||
max-height: 80%;
|
||||
overflow-y: auto; }
|
||||
|
||||
#game-options-left-panel,
|
||||
#game-options-right-panel {
|
||||
|
114
dist/vendor.bundle.js
vendored
114
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
16
index.html
16
index.html
@ -766,7 +766,9 @@
|
||||
</div>
|
||||
|
||||
<!-- Red Pill Container -->
|
||||
<div id="red-pill-container" class="generic-fullscreen-container"></div>
|
||||
<div id="red-pill-container" class="generic-fullscreen-container">
|
||||
<div id="red-pill-content" class="generic-fullscreen-container-scroll"></div>
|
||||
</div>
|
||||
|
||||
<!-- Cinematic Text Container -->
|
||||
<div id="cinematic-text-container" class="generic-fullscreen-container"></div>
|
||||
@ -813,7 +815,7 @@
|
||||
<tr id="character-int-wrapper">
|
||||
<td>Int: </td><td id="character-int-text" class="character-stat-cell"></td>
|
||||
</tr>
|
||||
<table>
|
||||
</table>
|
||||
</div>
|
||||
<div class="character-quick-options">
|
||||
<span id="character-overview-save-button"> Save Game </span>
|
||||
@ -931,6 +933,16 @@
|
||||
</label>
|
||||
<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>
|
||||
|
@ -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>"
|
||||
|
329
src/Location.js
329
src/Location.js
@ -1053,63 +1053,72 @@ function displayLocationContent() {
|
||||
function initLocationButtons() {
|
||||
//Buttons to travel to different locations in World
|
||||
let aevumTravelAgency = document.getElementById("aevum-travelagency");
|
||||
aevumTravelAgency.addEventListener("click", function() {
|
||||
aevumTravelAgency.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumTravelAgency;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumHospital = document.getElementById("aevum-hospital");
|
||||
aevumHospital.addEventListener("click", function() {
|
||||
aevumHospital.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Hospital;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumSummitUniversity = document.getElementById("aevum-summituniversity");
|
||||
aevumSummitUniversity.addEventListener("click", function() {
|
||||
aevumSummitUniversity.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumSummitUniversity;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumECorp = document.getElementById("aevum-ecorp");
|
||||
aevumECorp.addEventListener("click", function() {
|
||||
aevumECorp.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumECorp;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumBachmanAndAssociates = document.getElementById("aevum-bachmanandassociates");
|
||||
aevumBachmanAndAssociates.addEventListener("click", function() {
|
||||
aevumBachmanAndAssociates.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumBachmanAndAssociates;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumClarkeIncorporated = document.getElementById("aevum-clarkeincorporated");
|
||||
aevumClarkeIncorporated.addEventListener("click", function() {
|
||||
aevumClarkeIncorporated.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumClarkeIncorporated;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumFulcrumTechnologies = document.getElementById("aevum-fulcrumtechnologies");
|
||||
aevumFulcrumTechnologies.addEventListener("click", function() {
|
||||
aevumFulcrumTechnologies.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumFulcrumTechnologies;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumAeroCorp = document.getElementById("aevum-aerocorp");
|
||||
aevumAeroCorp.addEventListener("click", function() {
|
||||
aevumAeroCorp.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumAeroCorp;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumGalacticCybersystems = document.getElementById("aevum-galacticcybersystems");
|
||||
aevumGalacticCybersystems.addEventListener("click", function() {
|
||||
aevumGalacticCybersystems.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumGalacticCybersystems;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
@ -1123,385 +1132,440 @@ function initLocationButtons() {
|
||||
});
|
||||
|
||||
let aevumRhoConstruction = document.getElementById("aevum-rhoconstruction");
|
||||
aevumRhoConstruction.addEventListener("click", function() {
|
||||
Player.location = Locations.AevumRhoConstruction;
|
||||
aevumRhoConstruction.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumRhoConstruction;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumPolice = document.getElementById("aevum-aevumpolice");
|
||||
aevumPolice.addEventListener("click", function() {
|
||||
aevumPolice.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumPolice;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumNetLinkTechnologies = document.getElementById("aevum-netlinktechnologies");
|
||||
aevumNetLinkTechnologies.addEventListener("click", function() {
|
||||
aevumNetLinkTechnologies.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumNetLinkTechnologies;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumCrushFitnessGym = document.getElementById("aevum-crushfitnessgym");
|
||||
aevumCrushFitnessGym.addEventListener("click", function() {
|
||||
aevumCrushFitnessGym.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumCrushFitnessGym;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumSnapFitnessGym = document.getElementById("aevum-snapfitnessgym");
|
||||
aevumSnapFitnessGym.addEventListener("click", function() {
|
||||
aevumSnapFitnessGym.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumSnapFitnessGym;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let aevumSlums = document.getElementById("aevum-slums");
|
||||
aevumSlums.addEventListener("click", function() {
|
||||
aevumSlums.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.AevumSlums;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let chongqingTravelAgency = document.getElementById("chongqing-travelagency");
|
||||
chongqingTravelAgency.addEventListener("click", function() {
|
||||
chongqingTravelAgency.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.ChongqingTravelAgency;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let chongqingHospital = document.getElementById("chongqing-hospital");
|
||||
chongqingHospital.addEventListener("click", function() {
|
||||
chongqingHospital.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Hospital;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let chongqingKuaiGongInternational = document.getElementById("chongqing-kuaigonginternational");
|
||||
chongqingKuaiGongInternational.addEventListener("click", function() {
|
||||
chongqingKuaiGongInternational.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.ChongqingKuaiGongInternational;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let chongqingSolarisSpaceSystems = document.getElementById("chongqing-solarisspacesystems");
|
||||
chongqingSolarisSpaceSystems.addEventListener("click", function() {
|
||||
chongqingSolarisSpaceSystems.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.ChongqingSolarisSpaceSystems;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let chongqingSlums = document.getElementById("chongqing-slums");
|
||||
chongqingSlums.addEventListener("click", function() {
|
||||
chongqingSlums.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.ChongqingSlums;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12TravelAgency = document.getElementById("sector12-travelagency");
|
||||
sector12TravelAgency.addEventListener("click", function() {
|
||||
sector12TravelAgency.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12TravelAgency;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12Hospital = document.getElementById("sector12-hospital");
|
||||
sector12Hospital.addEventListener("click", function() {
|
||||
sector12Hospital.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Hospital;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12RothmanUniversity = document.getElementById("sector12-rothmanuniversity");
|
||||
sector12RothmanUniversity.addEventListener("click", function() {
|
||||
sector12RothmanUniversity.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12RothmanUniversity;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12MegaCorp = document.getElementById("sector12-megacorp");
|
||||
sector12MegaCorp.addEventListener("click", function() {
|
||||
sector12MegaCorp.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12MegaCorp;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12BladeIndustries = document.getElementById("sector12-bladeindustries");
|
||||
sector12BladeIndustries.addEventListener("click", function() {
|
||||
sector12BladeIndustries.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12BladeIndustries;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12FourSigma = document.getElementById("sector12-foursigma");
|
||||
sector12FourSigma.addEventListener("click", function() {
|
||||
sector12FourSigma.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12FourSigma;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12IcarusMicrosystems = document.getElementById("sector12-icarusmicrosystems");
|
||||
sector12IcarusMicrosystems.addEventListener("click", function() {
|
||||
sector12IcarusMicrosystems.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12IcarusMicrosystems;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12UniversalEnergy = document.getElementById("sector12-universalenergy");
|
||||
sector12UniversalEnergy.addEventListener("click", function() {
|
||||
sector12UniversalEnergy.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12UniversalEnergy;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12DeltaOne = document.getElementById("sector12-deltaone");
|
||||
sector12DeltaOne.addEventListener("click", function() {
|
||||
sector12DeltaOne.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12DeltaOne;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12CIA = document.getElementById("sector12-cia");
|
||||
sector12CIA.addEventListener("click", function() {
|
||||
sector12CIA.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12CIA;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12NSA = document.getElementById("sector12-nsa");
|
||||
sector12NSA.addEventListener("click", function() {
|
||||
sector12NSA.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12NSA;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12AlphaEnterprises = document.getElementById("sector12-alphaenterprises");
|
||||
sector12AlphaEnterprises.addEventListener("click", function() {
|
||||
sector12AlphaEnterprises.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12AlphaEnterprises;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12CarmichaelSecurity = document.getElementById("sector12-carmichaelsecurity");
|
||||
sector12CarmichaelSecurity.addEventListener("click", function() {
|
||||
sector12CarmichaelSecurity.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12CarmichaelSecurity;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12FoodNStuff = document.getElementById("sector12-foodnstuff");
|
||||
sector12FoodNStuff.addEventListener("click", function() {
|
||||
sector12FoodNStuff.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12FoodNStuff;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12JoesGuns = document.getElementById("sector12-joesguns");
|
||||
sector12JoesGuns.addEventListener("click", function() {
|
||||
sector12JoesGuns.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12JoesGuns;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12IronGym = document.getElementById("sector12-irongym");
|
||||
sector12IronGym.addEventListener("click", function() {
|
||||
sector12IronGym.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12IronGym;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12PowerhouseGym = document.getElementById("sector12-powerhousegym");
|
||||
sector12PowerhouseGym.addEventListener("click", function() {
|
||||
sector12PowerhouseGym.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12PowerhouseGym;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12Slums = document.getElementById("sector12-slums");
|
||||
sector12Slums.addEventListener("click", function() {
|
||||
sector12Slums.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12Slums;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let sector12CityHall = document.getElementById("sector12-cityhall");
|
||||
sector12CityHall.addEventListener("click", function() {
|
||||
sector12CityHall.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Sector12CityHall;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let newTokyoTravelAgency = document.getElementById("newtokyo-travelagency");
|
||||
newTokyoTravelAgency.addEventListener("click", function() {
|
||||
newTokyoTravelAgency.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.NewTokyoTravelAgency;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let newTokyoHospital = document.getElementById("newtokyo-hospital");
|
||||
newTokyoHospital.addEventListener("click", function() {
|
||||
newTokyoHospital.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Hospital;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let newTokyoDefComm = document.getElementById("newtokyo-defcomm");
|
||||
newTokyoDefComm.addEventListener("click", function() {
|
||||
newTokyoDefComm.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.NewTokyoDefComm;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let newTokyoVitaLife = document.getElementById("newtokyo-vitalife");
|
||||
newTokyoVitaLife.addEventListener("click", function() {
|
||||
newTokyoVitaLife.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.NewTokyoVitaLife;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let newTokyoGlobalPharmaceuticals = document.getElementById("newtokyo-globalpharmaceuticals");
|
||||
newTokyoGlobalPharmaceuticals.addEventListener("click", function() {
|
||||
newTokyoGlobalPharmaceuticals.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.NewTokyoGlobalPharmaceuticals;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let newTokyoNoodleBar = document.getElementById("newtokyo-noodlebar");
|
||||
newTokyoNoodleBar.addEventListener("click", function() {
|
||||
newTokyoNoodleBar.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.NewTokyoNoodleBar;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let newTokyoSlums = document.getElementById("newtokyo-slums");
|
||||
newTokyoSlums.addEventListener("click", function() {
|
||||
newTokyoSlums.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.NewTokyoSlums;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let ishimaTravelAgency = document.getElementById("ishima-travelagency");
|
||||
ishimaTravelAgency.addEventListener("click", function() {
|
||||
ishimaTravelAgency.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.IshimaTravelAgency;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let ishimaHospital = document.getElementById("ishima-hospital");
|
||||
ishimaHospital.addEventListener("click", function() {
|
||||
ishimaHospital.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Hospital;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let ishimaStormTechnologies = document.getElementById("ishima-stormtechnologies");
|
||||
ishimaStormTechnologies.addEventListener("click", function() {
|
||||
ishimaStormTechnologies.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.IshimaStormTechnologies;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let ishimaNovaMedical = document.getElementById("ishima-novamedical");
|
||||
ishimaNovaMedical.addEventListener("click", function() {
|
||||
ishimaNovaMedical.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.IshimaNovaMedical;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let ishimaOmegaSoftware = document.getElementById("ishima-omegasoftware");
|
||||
ishimaOmegaSoftware.addEventListener("click", function() {
|
||||
ishimaOmegaSoftware.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.IshimaOmegaSoftware;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let ishimaSlums = document.getElementById("ishima-slums");
|
||||
ishimaSlums.addEventListener("click", function() {
|
||||
ishimaSlums.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.IshimaSlums;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenTravelAgency = document.getElementById("volhaven-travelagency");
|
||||
volhavenTravelAgency.addEventListener("click", function() {
|
||||
volhavenTravelAgency.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenTravelAgency;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenHospital = document.getElementById("volhaven-hospital");
|
||||
volhavenHospital.addEventListener("click", function() {
|
||||
volhavenHospital.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.Hospital;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenZBInstituteOfTechnology = document.getElementById("volhaven-zbinstituteoftechnology");
|
||||
volhavenZBInstituteOfTechnology.addEventListener("click", function() {
|
||||
volhavenZBInstituteOfTechnology.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenZBInstituteOfTechnology;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenOmniTekIncorporated = document.getElementById("volhaven-omnitekincorporated");
|
||||
volhavenOmniTekIncorporated.addEventListener("click", function() {
|
||||
volhavenOmniTekIncorporated.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenOmniTekIncorporated;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenNWO = document.getElementById("volhaven-nwo");
|
||||
volhavenNWO.addEventListener("click", function() {
|
||||
volhavenNWO.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenNWO;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenHeliosLabs = document.getElementById("volhaven-helioslabs");
|
||||
volhavenHeliosLabs.addEventListener("click", function() {
|
||||
volhavenHeliosLabs.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenHeliosLabs;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenOmniaCybersystems = document.getElementById("volhaven-omniacybersystems");
|
||||
volhavenOmniaCybersystems.addEventListener("click", function() {
|
||||
volhavenOmniaCybersystems.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenOmniaCybersystems;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenLexoCorp = document.getElementById("volhaven-lexocorp");
|
||||
volhavenLexoCorp.addEventListener("click", function() {
|
||||
volhavenLexoCorp.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenLexoCorp;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenSysCoreSecurities = document.getElementById("volhaven-syscoresecurities");
|
||||
volhavenSysCoreSecurities.addEventListener("click", function() {
|
||||
volhavenSysCoreSecurities.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenSysCoreSecurities;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenCompuTek = document.getElementById("volhaven-computek");
|
||||
volhavenCompuTek.addEventListener("click", function() {
|
||||
volhavenCompuTek.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenCompuTek;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenMilleniumFitnessGym = document.getElementById("volhaven-milleniumfitnessgym");
|
||||
volhavenMilleniumFitnessGym.addEventListener("click", function() {
|
||||
volhavenMilleniumFitnessGym.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenMilleniumFitnessGym;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
});
|
||||
|
||||
let volhavenSlums = document.getElementById("volhaven-slums");
|
||||
volhavenSlums.addEventListener("click", function() {
|
||||
volhavenSlums.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.location = Locations.VolhavenSlums;
|
||||
Engine.loadLocationContent();
|
||||
return false;
|
||||
@ -1564,127 +1628,152 @@ function initLocationButtons() {
|
||||
|
||||
var hospitalTreatment = document.getElementById("location-hospital-treatment");
|
||||
|
||||
softwareJob.addEventListener("click", function() {
|
||||
softwareJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForSoftwareJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
softwareConsultantJob.addEventListener("click", function() {
|
||||
softwareConsultantJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForSoftwareConsultantJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
itJob.addEventListener("click", function() {
|
||||
itJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForItJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
securityEngineerJob.addEventListener("click", function() {
|
||||
securityEngineerJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForSecurityEngineerJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
networkEngineerJob.addEventListener("click", function() {
|
||||
networkEngineerJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForNetworkEngineerJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
businessJob.addEventListener("click", function() {
|
||||
businessJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForBusinessJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
businessConsultantJob.addEventListener("click", function() {
|
||||
businessConsultantJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForBusinessConsultantJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
securityJob.addEventListener("click", function() {
|
||||
securityJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForSecurityJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
agentJob.addEventListener("click", function() {
|
||||
agentJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForAgentJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
employeeJob.addEventListener("click", function() {
|
||||
employeeJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForEmployeeJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
employeePartTimeJob.addEventListener("click", function() {
|
||||
employeePartTimeJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForPartTimeEmployeeJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
waiterJob.addEventListener("click", function() {
|
||||
waiterJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForWaiterJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
waiterPartTimeJob.addEventListener("click", function() {
|
||||
waiterPartTimeJob.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Player.applyForPartTimeWaiterJob();
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase2gb.addEventListener("click", function() {
|
||||
purchase2gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(2, 2 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase4gb.addEventListener("click", function() {
|
||||
purchase4gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(4, 4 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase8gb.addEventListener("click", function() {
|
||||
purchase8gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(8, 8 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase16gb.addEventListener("click", function() {
|
||||
purchase16gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(16, 16 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase32gb.addEventListener("click", function() {
|
||||
purchase32gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(32, 32 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase64gb.addEventListener("click", function() {
|
||||
purchase64gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(64, 64 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase128gb.addEventListener("click", function() {
|
||||
purchase128gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(128, 128 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase256gb.addEventListener("click", function() {
|
||||
purchase256gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(256, 256 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase512gb.addEventListener("click", function() {
|
||||
purchase512gb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(512, 512 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase1tb.addEventListener("click", function() {
|
||||
purchase1tb.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseServerBoxCreate(1024, 1024 * CONSTANTS.BaseCostFor1GBOfRamServer);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchaseTor.addEventListener("click", function() {
|
||||
purchaseTor.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
purchaseTorRouter();
|
||||
return false;
|
||||
});
|
||||
|
||||
purchaseHomeRam.addEventListener("click", function() {
|
||||
purchaseHomeRam.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
const cost = Player.getUpgradeHomeRamCost();
|
||||
const ram = Player.getHomeComputer().maxRam;
|
||||
|
||||
@ -1702,7 +1791,8 @@ function initLocationButtons() {
|
||||
"This will cost " + numeral(cost).format('$0.000a'));
|
||||
});
|
||||
|
||||
purchaseHomeCores.addEventListener("click", function() {
|
||||
purchaseHomeCores.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
var currentCores = Player.getHomeComputer().cpuCores;
|
||||
if (currentCores >= 8) {return;} //Max of 8 cores
|
||||
|
||||
@ -1738,92 +1828,110 @@ function initLocationButtons() {
|
||||
"cost " + numeral(cost).format('$0.000a'));
|
||||
});
|
||||
|
||||
travelToAevum.addEventListener("click", function() {
|
||||
travelToAevum.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
travelBoxCreate(Locations.Aevum, CONSTANTS.TravelCost);
|
||||
return false;
|
||||
});
|
||||
|
||||
travelToChongqing.addEventListener("click", function() {
|
||||
travelToChongqing.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
travelBoxCreate(Locations.Chongqing, CONSTANTS.TravelCost);
|
||||
return false;
|
||||
});
|
||||
|
||||
travelToSector12.addEventListener("click", function() {
|
||||
travelToSector12.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
travelBoxCreate(Locations.Sector12, CONSTANTS.TravelCost);
|
||||
return false;
|
||||
});
|
||||
|
||||
travelToNewTokyo.addEventListener("click", function() {
|
||||
travelToNewTokyo.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
travelBoxCreate(Locations.NewTokyo, CONSTANTS.TravelCost);
|
||||
return false;
|
||||
});
|
||||
|
||||
travelToIshima.addEventListener("click", function() {
|
||||
travelToIshima.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
travelBoxCreate(Locations.Ishima, CONSTANTS.TravelCost);
|
||||
return false;
|
||||
});
|
||||
|
||||
travelToVolhaven.addEventListener("click", function() {
|
||||
travelToVolhaven.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
travelBoxCreate(Locations.Volhaven, CONSTANTS.TravelCost);
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsShoplift.addEventListener("click", function() {
|
||||
slumsShoplift.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.Shoplift.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsRobStore.addEventListener("click", function() {
|
||||
slumsRobStore.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.RobStore.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsMug.addEventListener("click", function() {
|
||||
slumsMug.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.Mug.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsLarceny.addEventListener("click", function() {
|
||||
slumsLarceny.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.Larceny.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsDealDrugs.addEventListener("click", function() {
|
||||
slumsDealDrugs.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.DealDrugs.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsBondForgery.addEventListener("click", function() {
|
||||
slumsBondForgery.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.BondForgery.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsTrafficArms.addEventListener("click", function() {
|
||||
slumsTrafficArms.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.TraffickArms.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsHomicide.addEventListener("click", function() {
|
||||
slumsHomicide.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.Homicide.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsGta.addEventListener("click", function() {
|
||||
slumsGta.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.GrandTheftAuto.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsKidnap.addEventListener("click", function() {
|
||||
slumsKidnap.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.Kidnap.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsAssassinate.addEventListener("click", function() {
|
||||
slumsAssassinate.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.Assassination.commit();
|
||||
return false;
|
||||
});
|
||||
|
||||
slumsHeist.addEventListener("click", function() {
|
||||
slumsHeist.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
Crimes.Heist.commit();
|
||||
return false;
|
||||
});
|
||||
@ -1887,7 +1995,8 @@ function initLocationButtons() {
|
||||
}
|
||||
});
|
||||
|
||||
hospitalTreatment.addEventListener("click", function() {
|
||||
hospitalTreatment.addEventListener("click", function(e) {
|
||||
if (!e.isTrusted) {return false;}
|
||||
if (Player.hp < 0) {Player.hp = 0;}
|
||||
var price = (Player.max_hp - Player.hp) * CONSTANTS.HospitalCostPerHp;
|
||||
Player.loseMoney(price);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ import {yesNoBoxCreate, yesNoBoxGetYesButton,
|
||||
function writeRedPillLine(line) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
||||
var container = document.getElementById("red-pill-container");
|
||||
var container = document.getElementById("red-pill-content");
|
||||
var pElem = document.createElement("p");
|
||||
container.appendChild(pElem);
|
||||
|
||||
@ -134,7 +134,7 @@ function giveSourceFile(bitNodeNumber) {
|
||||
|
||||
function loadBitVerse(destroyedBitNodeNum, flume=false) {
|
||||
//Clear the screen
|
||||
var container = document.getElementById("red-pill-container");
|
||||
var container = document.getElementById("red-pill-content");
|
||||
removeChildrenFromElement(container);
|
||||
|
||||
//Create the Bit Verse
|
||||
|
@ -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,8 +74,11 @@ 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;
|
||||
|
@ -12,7 +12,7 @@ function factionInvitationBoxClose() {
|
||||
|
||||
function factionInvitationBoxOpen() {
|
||||
var factionInvitationBox = document.getElementById("faction-invitation-box-container");
|
||||
factionInvitationBox.style.display = "block";
|
||||
factionInvitationBox.style.display = "flex";
|
||||
}
|
||||
|
||||
function factionInvitationSetText(txt) {
|
||||
|
@ -35,7 +35,7 @@ function gameOptionsBoxClose() {
|
||||
|
||||
function gameOptionsBoxOpen() {
|
||||
var box = document.getElementById("game-options-container");
|
||||
box.style.display = "block";
|
||||
box.style.display = "flex";
|
||||
setTimeout(function() {
|
||||
gameOptionsOpened = true;
|
||||
}, 500);
|
||||
|
@ -32,7 +32,7 @@ function yesNoBoxCreate(txt) {
|
||||
|
||||
var c = document.getElementById("yes-no-box-container");
|
||||
if (c) {
|
||||
c.style.display = "block";
|
||||
c.style.display = "flex";
|
||||
} else {
|
||||
console.log("ERROR: Container not found for YesNoBox");
|
||||
}
|
||||
@ -75,7 +75,7 @@ function yesNoTxtInpBoxCreate(txt) {
|
||||
|
||||
var c = document.getElementById("yes-no-text-input-box-container");
|
||||
if (c) {
|
||||
c.style.display = "block";
|
||||
c.style.display = "flex";
|
||||
} else {
|
||||
console.log("ERROR: Container not found for YesNoTextInputBox");
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import { getElementById } from "./getElementById";
|
||||
export function createPopup(id: string, elems: HTMLElement[]) {
|
||||
const container: HTMLDivElement = createElement("div", {
|
||||
class: "popup-box-container",
|
||||
display: "block",
|
||||
display: "flex",
|
||||
id,
|
||||
}) as HTMLDivElement;
|
||||
const content: HTMLElement = createElement("div", {
|
||||
|
Loading…
Reference in New Issue
Block a user