mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-04 06:37:49 +02:00
Refactored stock buying/selling code into its own file. Refactored WorkerScript & NetscriptEnvironment into their own Typescript classes. Refactored a ton of code to remove circular dependencies
This commit is contained in:
+3
-2
@@ -57,6 +57,7 @@ import { killWorkerScript, addWorkerScript } from "./NetscriptWorker";
|
||||
import { Player } from "./Player";
|
||||
import { hackWorldDaemon } from "./RedPill";
|
||||
import { RunningScript } from "./Script/RunningScript";
|
||||
import { getRamUsageFromRunningScript } from "./Script/RunningScriptHelpers";
|
||||
import { findRunningScript } from "./Script/ScriptHelpers";
|
||||
import { isScriptFilename } from "./Script/ScriptHelpersTS";
|
||||
import { AllServers } from "./Server/AllServers";
|
||||
@@ -1447,7 +1448,7 @@ let Terminal = {
|
||||
let spacesThread = Array(numSpacesThread+1).join(" ");
|
||||
|
||||
// Calculate and transform RAM usage
|
||||
let ramUsage = numeralWrapper.format(script.getRamUsage() * script.threads, '0.00') + " GB";
|
||||
let ramUsage = numeralWrapper.format(getRamUsageFromRunningScript(script) * script.threads, '0.00') + " GB";
|
||||
|
||||
var entry = [script.filename, spacesScript, script.threads, spacesThread, ramUsage];
|
||||
post(entry.join(""));
|
||||
@@ -2268,7 +2269,7 @@ let Terminal = {
|
||||
|
||||
// This has to come after addWorkerScript() because that fn
|
||||
// updates the RAM usage. This kinda sucks, address if possible
|
||||
server.runScript(runningScriptObj, Player);
|
||||
server.runScript(runningScriptObj, Player.hacknet_node_money_mult);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user