mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 06:03:50 +01:00
Merge pull request #279 from hydroflame/prevent-work-faction-bn2
prevent players from doing work through singularity in BN2 when the p…
This commit is contained in:
commit
ff12c87913
@ -14,6 +14,7 @@ import {CONSTANTS} from "./Constants.js";
|
||||
import {Programs} from "./CreateProgram.js";
|
||||
import {parseDarkwebItemPrice, DarkWebItems} from "./DarkWeb.js";
|
||||
import {Engine} from "./engine.js";
|
||||
import {AllGangs} from "./Gang.js";
|
||||
import {Factions, Faction, joinFaction,
|
||||
factionExists, purchaseAugmentation} from "./Faction.js";
|
||||
import {getCostOfNextHacknetNode, purchaseHacknet} from "./HacknetNode.js";
|
||||
@ -2779,6 +2780,12 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
}
|
||||
|
||||
// if the player is in a gang and the target faction is any of the gang faction, fail
|
||||
if(Player.gang != null && AllGangs[name] !== undefined) {
|
||||
workerScript.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (inMission) {
|
||||
workerScript.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.");
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user