mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 20:37:05 +02:00
NETSCRIPT: More ns Proxy changes (#297)
This commit is contained in:
@@ -83,11 +83,6 @@ async function startNetscript1Script(workerScript: WorkerScript): Promise<void>
|
||||
type BasicObject = Record<string, any>;
|
||||
const wrappedNS = NetscriptFunctions(workerScript);
|
||||
function wrapNS1Layer(int: Interpreter, intLayer: unknown, nsLayer = wrappedNS as BasicObject) {
|
||||
if (nsLayer === wrappedNS) {
|
||||
int.setProperty(intLayer, "args", int.nativeToPseudo(nsLayer.args));
|
||||
int.setProperty(intLayer, "enums", int.nativeToPseudo(nsLayer.enums));
|
||||
int.setProperty(intLayer, "pid", nsLayer.pid);
|
||||
}
|
||||
for (const [name, entry] of Object.entries(nsLayer)) {
|
||||
if (typeof entry === "function") {
|
||||
const wrapper = async (...args: unknown[]) => {
|
||||
|
||||
Reference in New Issue
Block a user