Merge pull request #3739 from borisflagell/FIX#3732-v2

API: FIX#3732  Cannot assign two sleeve on "Take on contracts" regardless of contract type.
This commit is contained in:
hydroflame 2022-07-21 02:31:12 -04:00 committed by GitHub
commit 68ecc9613c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -333,9 +333,13 @@ export function NetscriptSleeve(player: IPlayer): InternalAPI<ISleeve> {
continue; continue;
} }
const other = player.sleeves[i]; const other = player.sleeves[i];
if (other.currentTask === SleeveTaskType.Bladeburner && other.bbAction === action) { if (
other.currentTask === SleeveTaskType.Bladeburner &&
other.bbAction === action &&
other.bbContract === contract
) {
throw ctx.helper.makeRuntimeErrorMsg( throw ctx.helper.makeRuntimeErrorMsg(
`Sleeve ${sleeveNumber} cannot take of contracts because Sleeve ${i} is already performing that action.`, `Sleeve ${sleeveNumber} cannot take on contracts because Sleeve ${i} is already performing that action.`,
); );
} }
} }