mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
initAugmentations() now called applyAugmentations() at the end
This commit is contained in:
parent
bc282daf08
commit
d63f17fa8d
@ -508,12 +508,8 @@ div.faction-clear {
|
||||
|
||||
/* Location */
|
||||
#location-container {
|
||||
color: var(--my-font-color);
|
||||
position: fixed;
|
||||
padding: 6px;
|
||||
height: 100%;
|
||||
margin-left: 10%;
|
||||
width: 99%;
|
||||
}
|
||||
|
||||
#location-slums-description {
|
||||
@ -533,3 +529,9 @@ div.faction-clear {
|
||||
#location-job-reputation, #location-company-favor {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Infiltration */
|
||||
#infiltration-container {
|
||||
position: fixed;
|
||||
padding: 6px;
|
||||
}
|
||||
|
20
index.html
20
index.html
@ -683,16 +683,16 @@
|
||||
<div id="infiltration-left-panel">
|
||||
<p id="infiltration-level-text"> </p>
|
||||
<div id="infiltration-buttons">
|
||||
<a id="infiltration-kill"> </a>
|
||||
<a id="infiltration-knockout"> </a>
|
||||
<a id="infiltration-stealthknockout"> </a>
|
||||
<a id="infiltration-assassinate"> </a>
|
||||
<a id="infiltration-hacksecurity"> </a>
|
||||
<a id="infiltration-destroysecurity"> </a>
|
||||
<a id="infiltration-sneak"> </a>
|
||||
<a id="infiltration-pickdoor"> </a>
|
||||
<a id="infiltration-bribe"> </a>
|
||||
<a id="infiltration-escape"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-kill"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-knockout"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-stealthknockout"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-assassinate"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-hacksecurity"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-destroysecurity"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-sneak"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-pickdoor"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-bribe"> </a>
|
||||
<a class="a-link-button tooltip" id="infiltration-escape"> </a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="infiltration-right-panel">
|
||||
|
@ -1379,6 +1379,8 @@ initAugmentations = function() {
|
||||
Augmentations[name].baseCost *= mult;
|
||||
}
|
||||
}
|
||||
|
||||
Player.reapplyAllAugmentations();
|
||||
}
|
||||
|
||||
applyAugmentation = function(aug, reapply=false) {
|
||||
|
@ -91,6 +91,9 @@ CONSTANTS = {
|
||||
//How much a TOR router costs
|
||||
TorRouterCost: 200000,
|
||||
|
||||
//Infiltration constants
|
||||
InfiltrationBribeBaseAmount: 100000, //Amount per clearance level
|
||||
|
||||
MillisecondsPer20Hours: 72000000,
|
||||
GameCyclesPer20Hours: 72000000 / 200,
|
||||
|
||||
|
@ -1204,6 +1204,14 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
|
||||
Engine.loadLocationContent();
|
||||
}
|
||||
|
||||
PlayerObject.prototype.takeDamage = function() {
|
||||
|
||||
}
|
||||
|
||||
PlayerObject.prototype.hospitalize = function() {
|
||||
|
||||
}
|
||||
|
||||
/* Functions for saving and loading the Player data */
|
||||
PlayerObject.prototype.toJSON = function() {
|
||||
return Generic_toJSON("PlayerObject", this);
|
||||
|
@ -54,6 +54,7 @@ var Engine = {
|
||||
factionAugmentationsContent: null,
|
||||
augmentationsContent: null,
|
||||
tutorialContent: null,
|
||||
infiltrationContent: null,
|
||||
locationContent: null,
|
||||
workInProgressContent: null,
|
||||
|
||||
@ -682,7 +683,7 @@ var Engine = {
|
||||
Engine.setDisplayElements(); //Sets variables for important DOM elements
|
||||
Engine.init(); //Initialize buttons, work, etc.
|
||||
CompanyPositions.init();
|
||||
initAugmentations();
|
||||
initAugmentations(); //Also calls Player.reapplyAllAugmentations()
|
||||
|
||||
//Calculate the number of cycles have elapsed while offline
|
||||
Engine._lastUpdate = new Date().getTime();
|
||||
@ -721,9 +722,6 @@ var Engine = {
|
||||
Player.totalPlaytime += time;
|
||||
Player.playtimeSinceLastAug += time;
|
||||
|
||||
//Re-apply augmentations
|
||||
Player.reapplyAllAugmentations();
|
||||
|
||||
Player.lastUpdate = Engine._lastUpdate;
|
||||
Engine.start(); //Run main game loop and Scripts loop
|
||||
dialogBoxCreate("While you were offline, your scripts generated $" +
|
||||
@ -787,6 +785,9 @@ var Engine = {
|
||||
Engine.Display.tutorialContent = document.getElementById("tutorial-container");
|
||||
Engine.Display.tutorialContent.style.visibility = "hidden";
|
||||
|
||||
Engine.Display.infiltrationContent = document.getElementById("infiltration-container");
|
||||
Engine.Display.infiltrationContent.style.visibility = "hidden";
|
||||
|
||||
//Character info
|
||||
Engine.Display.characterInfo = document.getElementById("character-info");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user