Revert "Revert "Gang rework""

This reverts commit be0a08d70c.
This commit is contained in:
danielyxie
2018-10-23 13:55:42 -05:00
parent 66e7d88d0e
commit 4c3219bb9e
41 changed files with 171074 additions and 1693 deletions
+4 -1
View File
@@ -219,7 +219,8 @@ function scriptEditorInit() {
});
//Get functions from namespaces
if (name === "bladeburner" || name === "hacknet") {
const namespaces = ["bladeburner", "hacknet", "codingcontract", "gang"];
if (namespaces.includes(name)) {
let namespace = fns[name];
if (typeof namespace !== "object") {continue;}
let namespaceFns = Object.keys(namespace);
@@ -557,6 +558,8 @@ async function parseOnlyRamCalculate(server, code, workerScript) {
func = workerScript.env.vars.bladeburner[ref];
} else if (ref in workerScript.env.vars.codingcontract) {
func = workerScript.env.vars.codingcontract[ref];
} else if (ref in workerScript.env.vars.gang) {
func = workerScript.env.vars.gang[ref];
} else {
func = workerScript.env.get(ref);
}