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

View File

@@ -28,11 +28,6 @@ export function runScript(path: ScriptFilePath, commandArgs: (string | number |
// Todo: Switch out arg for something with typescript support
const args = flags["_"] as ScriptArg[];
// Check if this script is already running
if (server.getRunningScript(path, args)) {
return Terminal.error("This script is already running with the same args.");
}
const singleRamUsage = script.getRamUsage(server.scripts);
if (!singleRamUsage) return Terminal.error("Error while calculating ram usage for this script.");