fixes #3415
This commit is contained in:
borisflagell
2022-04-20 23:03:25 +02:00
parent 4ea7a4d7a8
commit e05617d9d3
4 changed files with 35 additions and 7 deletions
+2
View File
@@ -218,6 +218,7 @@ export class PlayerObject implements IPlayer {
hasProgram: (program: string) => boolean;
inBladeburner: () => boolean;
inGang: () => boolean;
isAwareOfGang: () => boolean;
isQualified: (company: Company, position: CompanyPosition) => boolean;
loseMoney: (money: number, source: string) => void;
reapplyAllAugmentations: (resetMultipliers?: boolean) => void;
@@ -604,6 +605,7 @@ export class PlayerObject implements IPlayer {
this.hasCorporation = corporationMethods.hasCorporation;
this.startCorporation = corporationMethods.startCorporation;
this.canAccessGang = gangMethods.canAccessGang;
this.isAwareOfGang = gangMethods.isAwareOfGang;
this.getGangFaction = gangMethods.getGangFaction;
this.getGangName = gangMethods.getGangName;
this.hasGangWith = gangMethods.hasGangWith;
@@ -17,6 +17,13 @@ export function canAccessGang(this: IPlayer): boolean {
return this.karma <= GangKarmaRequirement;
}
export function isAwareOfGang(this: IPlayer): boolean {
if (this.bitNodeN === 2 || this.sourceFileLvl(2) >= 1) {
return true;
}
return false;
}
export function getGangFaction(this: IPlayer): Faction {
const gang = this.gang;
if (gang === null) {