mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 04:17:05 +02:00
BitNode-9 initial implementation
This commit is contained in:
+15
-9
@@ -30,8 +30,10 @@ import { FconfSettings } from "./Fconf/FconfSetti
|
||||
import {displayLocationContent,
|
||||
initLocationButtons} from "./Location";
|
||||
import {Locations} from "./Locations";
|
||||
import {displayHacknetNodesContent, processAllHacknetNodeEarnings,
|
||||
updateHacknetNodesContent} from "./HacknetNode";
|
||||
import { hasHacknetServers,
|
||||
renderHacknetNodesUI,
|
||||
clearHacknetNodesUI,
|
||||
processHacknetEarnings } from "./Hacknet/HacknetHelpers";
|
||||
import {iTutorialStart} from "./InteractiveTutorial";
|
||||
import {initLiterature} from "./Literature";
|
||||
import { checkForMessagesToSend, initMessages } from "./Message/MessageHelpers";
|
||||
@@ -109,6 +111,7 @@ import "../css/mainmenu.scss";
|
||||
import "../css/characteroverview.scss";
|
||||
import "../css/terminal.scss";
|
||||
import "../css/scripteditor.scss";
|
||||
import "../css/hacknetnodes.scss";
|
||||
import "../css/menupages.scss";
|
||||
import "../css/redpill.scss";
|
||||
import "../css/stockmarket.scss";
|
||||
@@ -294,8 +297,8 @@ const Engine = {
|
||||
loadHacknetNodesContent: function() {
|
||||
Engine.hideAllContent();
|
||||
Engine.Display.hacknetNodesContent.style.display = "block";
|
||||
displayHacknetNodesContent();
|
||||
routing.navigateTo(Page.HacknetNodes);
|
||||
renderHacknetNodesUI();
|
||||
MainMenuLinks.HacknetNodes.classList.add("active");
|
||||
},
|
||||
|
||||
@@ -506,7 +509,7 @@ const Engine = {
|
||||
Engine.Display.characterContent.style.display = "none";
|
||||
Engine.Display.scriptEditorContent.style.display = "none";
|
||||
Engine.Display.activeScriptsContent.style.display = "none";
|
||||
Engine.Display.hacknetNodesContent.style.display = "none";
|
||||
clearHacknetNodesUI();
|
||||
Engine.Display.worldContent.style.display = "none";
|
||||
Engine.Display.createProgramContent.style.display = "none";
|
||||
Engine.Display.factionsContent.style.display = "none";
|
||||
@@ -870,7 +873,7 @@ const Engine = {
|
||||
updateOnlineScriptTimes(numCycles);
|
||||
|
||||
//Hacknet Nodes
|
||||
processAllHacknetNodeEarnings(numCycles);
|
||||
processHacknetEarnings(numCycles);
|
||||
},
|
||||
|
||||
//Counters for the main event loop. Represent the number of game cycles are required
|
||||
@@ -932,7 +935,7 @@ const Engine = {
|
||||
if (Engine.Counters.updateDisplays <= 0) {
|
||||
Engine.displayCharacterOverviewInfo();
|
||||
if (routing.isOn(Page.HacknetNodes)) {
|
||||
updateHacknetNodesContent();
|
||||
renderHacknetNodesUI();
|
||||
} else if (routing.isOn(Page.CreateProgram)) {
|
||||
displayCreateProgramContent();
|
||||
} else if (routing.isOn(Page.Sleeves)) {
|
||||
@@ -1183,7 +1186,10 @@ const Engine = {
|
||||
}
|
||||
|
||||
//Hacknet Nodes offline progress
|
||||
var offlineProductionFromHacknetNodes = processAllHacknetNodeEarnings(numCyclesOffline);
|
||||
var offlineProductionFromHacknetNodes = processHacknetEarnings(numCyclesOffline);
|
||||
const hacknetProdInfo = hasHacknetServers() ?
|
||||
`${numeralWrapper.format(offlineProductionFromHacknetNodes, "0.000a")} hashes` :
|
||||
`${numeralWrapper.formatMoney(offlineProductionFromHacknetNodes)}`;
|
||||
|
||||
//Passive faction rep gain offline
|
||||
processPassiveFactionRepGain(numCyclesOffline);
|
||||
@@ -1237,8 +1243,8 @@ const Engine = {
|
||||
const timeOfflineString = convertTimeMsToTimeElapsedString(time);
|
||||
dialogBoxCreate(`Offline for ${timeOfflineString}. While you were offline, your scripts ` +
|
||||
"generated <span class='money-gold'>" +
|
||||
numeralWrapper.formatMoney(offlineProductionFromScripts) + "</span> and your Hacknet Nodes generated <span class='money-gold'>" +
|
||||
numeralWrapper.formatMoney(offlineProductionFromHacknetNodes) + "</span>");
|
||||
numeralWrapper.formatMoney(offlineProductionFromScripts) + "</span> " +
|
||||
"and your Hacknet Nodes generated <span class='money-gold'>" + hacknetProdInfo + "</span>");
|
||||
//Close main menu accordions for loaded game
|
||||
var visibleMenuTabs = [terminal, createScript, activeScripts, stats,
|
||||
hacknetnodes, city, tutorial, options, dev];
|
||||
|
||||
Reference in New Issue
Block a user