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:
David Walker
2023-04-27 15:21:06 -07:00
committed by GitHub
parent f81297dcd6
commit aa7facd4ba
44 changed files with 573 additions and 493 deletions
+2 -7
View File
@@ -24,6 +24,7 @@ import { FactionNames } from "../Faction/data/FactionNames";
import { BlackOperationNames } from "../Bladeburner/data/BlackOperationNames";
import { isClassWork } from "../Work/ClassWork";
import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
import { workerScripts } from "../Netscript/WorkerScripts";
import type { PlayerObject } from "../PersonObjects/Player/PlayerObject";
@@ -284,13 +285,7 @@ export const achievements: Record<string, Achievement> = {
RUNNING_SCRIPTS_1000: {
...achievementData["RUNNING_SCRIPTS_1000"],
Icon: "run1000",
Condition: (): boolean => {
let running = 0;
for (const s of GetAllServers()) {
running += s.runningScripts.length;
}
return running >= 1000;
},
Condition: (): boolean => workerScripts.size >= 1000,
},
DRAIN_SERVER: {
...achievementData["DRAIN_SERVER"],