Merge pull request #4065 from Snarling/sleeveBladeContractFix

SLEEVES: FIX #4063 fix crash when player tries to assign more than 3 sleeves to Bladeburner contracts
This commit is contained in:
hydroflame 2022-09-23 00:59:46 -03:00 committed by GitHub
commit 944ee71ab9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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";
@ -451,11 +453,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 {