diff --git a/src/Player.js b/src/Player.js index f84cbaa6c..39b30b817 100644 --- a/src/Player.js +++ b/src/Player.js @@ -201,6 +201,7 @@ function PlayerObject() { this.lastUpdate = 0; this.totalPlaytime = 0; this.playtimeSinceLastAug = 0; + this.playtimeSinceLastBitnode = 0; //Production since last Augmentation installation this.scriptProdSinceLastAug = 0; @@ -390,6 +391,7 @@ PlayerObject.prototype.prestigeSourceFile = function() { this.corporation = 0; this.playtimeSinceLastAug = 0; + this.playtimeSinceLastBitnode = 0; this.scriptProdSinceLastAug = 0; } diff --git a/src/SaveObject.js b/src/SaveObject.js index 244c8820c..aa6195f45 100644 --- a/src/SaveObject.js +++ b/src/SaveObject.js @@ -503,8 +503,10 @@ function loadImportedGame(saveObj, saveString) { var time = numCyclesOffline * Engine._idleSpeed; if (Player.totalPlaytime == null) {Player.totalPlaytime = 0;} if (Player.playtimeSinceLastAug == null) {Player.playtimeSinceLastAug = 0;} + if (Player.playtimeSinceLastBitnode == null) {Player.playtimeSinceLastBitnode = 0;} Player.totalPlaytime += time; Player.playtimeSinceLastAug += time; + Player.playtimeSinceLastBitnode += time; //Re-apply augmentations Player.reapplyAllAugmentations(); diff --git a/src/engine.js b/src/engine.js index 02c8b850a..0363ab94d 100644 --- a/src/engine.js +++ b/src/engine.js @@ -576,6 +576,11 @@ let Engine = { intText = 'Intelligence: ' + (Player.intelligence).toLocaleString() + "


"; } + let bitNodeTimeText = ""; + if(Player.sourceFiles.length > 0) { + bitNodeTimeText = 'Time played since last Bitnode destroyed: ' + convertTimeMsToTimeElapsedString(Player.playtimeSinceLastBitnode) + '
'; + } + Engine.Display.characterInfo.appendChild(createElement("pre", { innerHTML: 'General

' + @@ -629,6 +634,7 @@ let Engine = { 'Hacknet Nodes owned: ' + Player.hacknetNodes.length + '
' + 'Augmentations installed: ' + Player.augmentations.length + '
' + 'Time played since last Augmentation: ' + convertTimeMsToTimeElapsedString(Player.playtimeSinceLastAug) + '
' + + bitNodeTimeText + 'Time played: ' + convertTimeMsToTimeElapsedString(Player.totalPlaytime), })); @@ -914,8 +920,10 @@ let Engine = { var time = numCycles * Engine._idleSpeed; if (Player.totalPlaytime == null) {Player.totalPlaytime = 0;} if (Player.playtimeSinceLastAug == null) {Player.playtimeSinceLastAug = 0;} + if (Player.playtimeSinceLastBitnode == null) {Player.playtimeSinceLastBitnode = 0;} Player.totalPlaytime += time; Player.playtimeSinceLastAug += time; + Player.playtimeSinceLastBitnode += time; //Start Manual hack if (Player.startAction == true) { @@ -1335,8 +1343,10 @@ let Engine = { var time = numCyclesOffline * Engine._idleSpeed; if (Player.totalPlaytime == null) {Player.totalPlaytime = 0;} if (Player.playtimeSinceLastAug == null) {Player.playtimeSinceLastAug = 0;} + if (Player.playtimeSinceLastBitnode == null) {Player.playtimeSinceLastBitnode = 0;} Player.totalPlaytime += time; Player.playtimeSinceLastAug += time; + Player.playtimeSinceLastBitnode += time; Player.lastUpdate = Engine._lastUpdate; Engine.start(); //Run main game loop and Scripts loop