From 0c93764ef8c15f350f38b18694b0133a491595ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=B6ffl?= Date: Thu, 25 Aug 2022 11:08:33 +0200 Subject: [PATCH] Added weight to GangMemberTask construction call Added hackWeight: 100 to GangMember Task construction call to prevent error messages from the constructor checks. Since we only compare with roughlyIs() this will have no impact on functionality --- src/Netscript/NetscriptHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Netscript/NetscriptHelpers.ts b/src/Netscript/NetscriptHelpers.ts index 043292ace..234cead72 100644 --- a/src/Netscript/NetscriptHelpers.ts +++ b/src/Netscript/NetscriptHelpers.ts @@ -554,7 +554,7 @@ function gangMember(ctx: NetscriptContext, m: unknown): GangMember { } function gangTask(ctx: NetscriptContext, t: unknown): GangMemberTask { - if (!roughlyIs(new GangMemberTask("", "", false, false, {}), t)) + if (!roughlyIs(new GangMemberTask("", "", false, false, { hackWeight: 100 }), t)) throw makeRuntimeErrorMsg(ctx, `task should be a GangMemberTask.`); return t as GangMemberTask; }