mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 08:03:48 +01:00
fix disableLog not disabling blade functions
This commit is contained in:
parent
3fd26bea9b
commit
3d36982a56
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4610,19 +4610,19 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
...extra,
|
||||
};
|
||||
|
||||
function getFunctionNames(obj: NS): string[] {
|
||||
function getFunctionNames(obj: NS, prefix: string): string[] {
|
||||
const functionNames: string[] = [];
|
||||
for (const [key, value] of Object.entries(obj)) {
|
||||
if (typeof value == "function") {
|
||||
functionNames.push(key);
|
||||
functionNames.push(prefix + key);
|
||||
} else if (typeof value == "object") {
|
||||
functionNames.push(...getFunctionNames(value));
|
||||
functionNames.push(...getFunctionNames(value, key + "."));
|
||||
}
|
||||
}
|
||||
return functionNames;
|
||||
}
|
||||
|
||||
const possibleLogs = Object.fromEntries([...getFunctionNames(functions)].map((a) => [a, true]));
|
||||
const possibleLogs = Object.fromEntries([...getFunctionNames(functions, "")].map((a) => [a, true]));
|
||||
|
||||
return functions;
|
||||
} // End NetscriptFunction()
|
||||
|
Loading…
Reference in New Issue
Block a user