diff --git a/css/styles.css b/css/styles.css index 9b4f09d1f..399ed28b0 100644 --- a/css/styles.css +++ b/css/styles.css @@ -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; +} diff --git a/index.html b/index.html index a16559387..ab3d8ad5a 100644 --- a/index.html +++ b/index.html @@ -116,6 +116,7 @@
  • (DEBUG) Delete Active Scripts
  • + @@ -706,9 +707,14 @@ Back + +
    +

    +
    +
    -

    +

    Test

    diff --git a/src/Augmentations.js b/src/Augmentations.js index 9ec455c05..9c0eb54dd 100644 --- a/src/Augmentations.js +++ b/src/Augmentations.js @@ -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.

    " + "This augmentation:
    " + "Increases the player's hacking speed by 10%
    " + @@ -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.

    " + "This augmentation:
    " + @@ -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.

    " + "This augmentation:
    " + @@ -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.

    " + diff --git a/src/Player.js b/src/Player.js index 03ef98400..f2121f81c 100644 --- a/src/Player.js +++ b/src/Player.js @@ -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 diff --git a/src/engine.js b/src/engine.js index b5bc4151a..628ea4b7a 100644 --- a/src/engine.js +++ b/src/engine.js @@ -222,6 +222,18 @@ var Engine = { Engine.volhavenLocationsList.style.display = "none"; }, + displayCharacterOverviewInfo: function() { + document.getElementById("character-overview-text").innerHTML = + ("Money: $" + formatNumber(Player.money, 2) + "
    " + + "Hack: " + (Player.hacking_skill).toLocaleString() + "
    " + + "Str: " + (Player.strength).toLocaleString() + "
    " + + "Def: " + (Player.defense).toLocaleString() + "
    " + + "Dex: " + (Player.dexterity).toLocaleString() + "
    " + + "Agi: " + (Player.agility).toLocaleString() + "
    " + + "Cha: " + (Player.charisma).toLocaleString() + ).replace( / /g, " " ); + }, + /* Display character info */ displayCharacterInfo: function() { var companyPosition = ""; @@ -276,7 +288,6 @@ var Engine = { 'Servers owned: ' + Player.purchasedServers.length + '
    ' + 'Hacknet Nodes owned: ' + Player.hacknetNodes.length + '
    ' + 'Time played: ' + convertTimeMsToTimeElapsedString(Player.totalPlaytime) + '


    ').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) {