mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 10:12:53 +02:00
NETSCRIPT: Greatly speed up script launching, and remove the limitation unique args per script (#440)
* Remove the limitation unique args per script * Internal changes to how runningScripts are stored on the server, to make common usage faster.
This commit is contained in:
@@ -252,7 +252,6 @@ export function prestigeHomeComputer(homeComp: Server): void {
|
||||
const hasBitflume = homeComp.programs.includes(CompletedProgramName.bitFlume);
|
||||
|
||||
homeComp.programs.length = 0; //Remove programs
|
||||
homeComp.runningScripts = [];
|
||||
homeComp.serversOnNetwork = [];
|
||||
homeComp.isConnectedTo = true;
|
||||
homeComp.ramUsed = 0;
|
||||
@@ -263,6 +262,9 @@ export function prestigeHomeComputer(homeComp: Server): void {
|
||||
|
||||
homeComp.messages.length = 0; //Remove .lit and .msg files
|
||||
homeComp.messages.push(LiteratureName.HackersStartingHandbook);
|
||||
if (homeComp.runningScriptMap.size !== 0) {
|
||||
throw new Error("All programs weren't already killed!");
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the i-th server on the specified server's network
|
||||
|
||||
Reference in New Issue
Block a user