Add check to see if player is in gang before getting Gang Faction

This commit is contained in:
TheMas3212
2022-01-05 21:41:04 +11:00
parent 538a440b7e
commit 860e77f109

View File

@ -1182,7 +1182,7 @@ export function NetscriptSingularity(
);
return false;
}
if (faction.name === player.getGangFaction().name) {
if (player.inGang() && faction.name === player.getGangFaction().name) {
workerScript.log(
"donateToFaction",
() => `You can't donate to '${name}' because youre managing a gang for it`,