Merge branch 'dev' of github.com:danielyxie/bitburner into dev

This commit is contained in:
Olivier Gagnon
2022-07-21 02:42:52 -04:00
7 changed files with 284 additions and 15 deletions
+7 -2
View File
@@ -39,6 +39,7 @@ export function NetscriptSleeve(player: IPlayer): InternalAPI<ISleeve> {
return {
shock: 100 - sl.shock,
sync: sl.sync,
memory: sl.memory,
hacking: sl.hacking,
strength: sl.strength,
defense: sl.defense,
@@ -349,9 +350,13 @@ export function NetscriptSleeve(player: IPlayer): InternalAPI<ISleeve> {
continue;
}
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(
`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.`,
);
}
}