From e8c8bb76ff186affeab3bda88a7e8b81b422eb50 Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Tue, 30 Aug 2022 09:26:24 -0400 Subject: [PATCH] Don't let sleeve start invalid contract --- src/PersonObjects/Sleeve/Sleeve.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index ef9031473..5e5c28380 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -20,6 +20,8 @@ import { Company } from "../../Company/Company"; import { CompanyPosition } from "../../Company/CompanyPosition"; import { CompanyPositions } from "../../Company/CompanyPositions"; +import { Contracts } from "../../Bladeburner/data/Contracts"; + import { CONSTANTS } from "../../Constants"; import { Faction } from "../../Faction/Faction"; @@ -447,11 +449,12 @@ export class Sleeve extends Person { this.startWork(p, new SleeveSupportWork(p)); return true; case "Take on contracts": + if (!Contracts[contract]) return false; this.startWork(p, new SleeveBladeburnerWork({ type: "Contracts", name: contract })); return true; } - return true; + return false; } recruitmentSuccessChance(p: IPlayer): number {