mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 13:43:49 +01:00
Added a Character ovewview screen
This commit is contained in:
parent
a91f1c5fef
commit
0054ab7222
@ -222,3 +222,25 @@ tr:focus {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
/* Character Overview */
|
||||
#character-overview-container {
|
||||
position: fixed; /* Stay in place */
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%; /* Full height */
|
||||
margin: 45% auto;
|
||||
padding: 5px;
|
||||
border: 2px solid #66ff33;
|
||||
width: 20%;
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
background-color: #444; /* Fallback color */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#character-overview-text {
|
||||
padding: 4px;
|
||||
margin: 4px;
|
||||
color: white;
|
||||
background-color: #444;
|
||||
}
|
||||
|
@ -116,6 +116,7 @@
|
||||
<li class="debug-delete-scripts-tab">
|
||||
<a href="#" id="debug-delete-scripts-link"> (DEBUG) Delete Active Scripts </a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -706,9 +707,14 @@
|
||||
<span id="interactive-tutorial-back"> Back </span>
|
||||
</div>
|
||||
|
||||
<!-- Character Overview Screen -->
|
||||
<div id="character-overview-container">
|
||||
<p id="character-overview-text"> </p>
|
||||
</div>
|
||||
|
||||
<!-- Status text -->
|
||||
<div id="status-text-container">
|
||||
<p id="status-text"> </p>
|
||||
<p id="status-text">Test </p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@ -960,7 +960,7 @@ initAugmentations = function() {
|
||||
//Illuminati
|
||||
var QLink = new Augmentation(AugmentationNames.QLink);
|
||||
QLink.setInfo("A brain implant that wirelessly connects you to the Illuminati's " +
|
||||
"quantum supercomputer, allowing you to access and use its incredible " =
|
||||
"quantum supercomputer, allowing you to access and use its incredible " +
|
||||
"computing power. <br><br>" +
|
||||
"This augmentation: <br>" +
|
||||
"Increases the player's hacking speed by 10%<br>" +
|
||||
@ -1018,7 +1018,7 @@ initAugmentations = function() {
|
||||
"Increases all of the player's combat stat experience gain rate by 40%");
|
||||
CordiARCReactor.setRequirements(450000, 900000000);
|
||||
CordiARCReactor.addToFactions(["MegaCorp"]);
|
||||
if (augmentationExists(AugmentationNames.CordiARCReactor) {
|
||||
if (augmentationExists(AugmentationNames.CordiARCReactor)) {
|
||||
CordiARCReactor.owned = Augmentations[AugmentationNames.CordiARCReactor].owned;
|
||||
delete Augmentations[AugmentationNames.CordiARCReactor];
|
||||
}
|
||||
@ -1036,7 +1036,7 @@ initAugmentations = function() {
|
||||
"Increases the amount of reputation the player gains for a faction by 25%");
|
||||
SmartJaw.setRequirements(150000, 400000000);
|
||||
SmartJaw.addToFactions(["Bachman & Associates"]);
|
||||
if (augmentationExists(AugmentationNames.SmartJaw) {
|
||||
if (augmentationExists(AugmentationNames.SmartJaw)) {
|
||||
SmartJaw.owned = Augmentations[AugmentationNames.SmartJaw].owned;
|
||||
delete Augmentations[AugmentationNames.SmartJaw];
|
||||
}
|
||||
@ -1059,7 +1059,7 @@ initAugmentations = function() {
|
||||
|
||||
//NWO
|
||||
var Xanipher = new Augmentation(AugmentationNames.Xanipher);
|
||||
Xanipher.setInfo("A concoction of advanced nanobots that is orally ingested into the " +)
|
||||
Xanipher.setInfo("A concoction of advanced nanobots that is orally ingested into the " +
|
||||
"body. These nanobots induce physiological change and significantly " +
|
||||
"improve the body's functionining in all aspects. <br><br>" +
|
||||
"This augmentation: <br>" +
|
||||
@ -1208,7 +1208,7 @@ initAugmentations = function() {
|
||||
//NewTokyo
|
||||
var NutriGen = new Augmentation(AugmentationNames.NutriGen);
|
||||
NutriGen.setInfo("A thermo-powered artificial nutrition generator. Endogenously " +
|
||||
"synthesizes glucose, amino acids, and vitamins and redistributes them "
|
||||
"synthesizes glucose, amino acids, and vitamins and redistributes them " +
|
||||
"across the body. The device is powered by the body's naturally wasted " +
|
||||
"energy in the form of heat.<br><br>" +
|
||||
"This augmentation: <br>" +
|
||||
@ -1315,7 +1315,6 @@ initAugmentations = function() {
|
||||
AddToAugmentations(BionicArms);
|
||||
|
||||
//TianDiHui
|
||||
Augmentation that improves negotiation, leading to increased wages, faction rep, and company rep
|
||||
var SNA = new Augmentation(AugmentationNames.SNA);
|
||||
SNA.setInfo("A cranial implant that affects the user's personality, making them better " +
|
||||
"at negotiation in social situations. <br><br>" +
|
||||
|
@ -221,7 +221,7 @@ PlayerObject.prototype.calculateHackingChance = function() {
|
||||
var chance = skillChance * difficultyMult;
|
||||
if (chance > 1) {return 1;}
|
||||
if (chance < 0) {return 0;}
|
||||
return chance;}
|
||||
return chance;
|
||||
}
|
||||
|
||||
//Calculate the time it takes to hack a server in seconds. Returns the time
|
||||
|
@ -222,6 +222,18 @@ var Engine = {
|
||||
Engine.volhavenLocationsList.style.display = "none";
|
||||
},
|
||||
|
||||
displayCharacterOverviewInfo: function() {
|
||||
document.getElementById("character-overview-text").innerHTML =
|
||||
("Money: $" + formatNumber(Player.money, 2) + "<br>" +
|
||||
"Hack: " + (Player.hacking_skill).toLocaleString() + "<br>" +
|
||||
"Str: " + (Player.strength).toLocaleString() + "<br>" +
|
||||
"Def: " + (Player.defense).toLocaleString() + "<br>" +
|
||||
"Dex: " + (Player.dexterity).toLocaleString() + "<br>" +
|
||||
"Agi: " + (Player.agility).toLocaleString() + "<br>" +
|
||||
"Cha: " + (Player.charisma).toLocaleString()
|
||||
).replace( / /g, " " );
|
||||
},
|
||||
|
||||
/* Display character info */
|
||||
displayCharacterInfo: function() {
|
||||
var companyPosition = "";
|
||||
@ -276,7 +288,6 @@ var Engine = {
|
||||
'Servers owned: ' + Player.purchasedServers.length + '<br>' +
|
||||
'Hacknet Nodes owned: ' + Player.hacknetNodes.length + '<br>' +
|
||||
'Time played: ' + convertTimeMsToTimeElapsedString(Player.totalPlaytime) + '<br><br><br>').replace( / /g, " " );
|
||||
|
||||
},
|
||||
|
||||
/* Display locations in the world*/
|
||||
@ -609,6 +620,7 @@ var Engine = {
|
||||
}
|
||||
|
||||
if (Engine.Counters.updateDisplays <= 0) {
|
||||
Engine.displayCharacterOverviewInfo();
|
||||
if (Engine.currentPage == Engine.Page.ActiveScripts) {
|
||||
Engine.updateActiveScriptsItems();
|
||||
} else if (Engine.currentPage == Engine.Page.CharacterInfo) {
|
||||
|
Loading…
Reference in New Issue
Block a user