mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
Refactored NetscriptJS to take in the NS environment as a parameter to main
This commit is contained in:
@@ -14,9 +14,10 @@ export function makeScriptBlob(code) {
|
||||
// (i.e. hack, grow, etc.).
|
||||
// When the promise returned by this resolves, we'll have finished
|
||||
// running the main function of the script.
|
||||
export async function executeJSScript(script, scripts = [], workerScript) {
|
||||
export async function executeJSScript(scripts = [], workerScript) {
|
||||
let loadedModule;
|
||||
let urlStack = null;
|
||||
let script = workerScript.getScript();
|
||||
if (script.module === "") {
|
||||
// The URL at the top is the one we want to import. It will
|
||||
// recursively import all the other modules in the urlStack.
|
||||
|
||||
Reference in New Issue
Block a user