Streamlining GangKarmaRequirement constant

As suggested by phyzical :

The GangKarmaRequirement const was declared locally in the PlayerObjectGangMethod.ts file.

It's now part of the GangConstants object in the gang/data/constant.ts file.

Allowing it to be referenced in the FactionRoot.tsx tooltip.
This commit is contained in:
borisflagell
2022-04-23 15:55:15 +02:00
parent ff3493e184
commit 90dc8bbc3a
3 changed files with 6 additions and 4 deletions

View File

@@ -2,9 +2,9 @@ import { Factions } from "../../Faction/Factions";
import { Faction } from "../../Faction/Faction";
import { Gang } from "../../Gang/Gang";
import { IPlayer } from "../IPlayer";
import { GangConstants } from "../../Gang/data/Constants"
// Amount of negative karma needed to manage a gang in BitNodes other than 2
const GangKarmaRequirement = -54000;
export function canAccessGang(this: IPlayer): boolean {
if (this.bitNodeN === 2) {
@@ -14,7 +14,7 @@ export function canAccessGang(this: IPlayer): boolean {
return false;
}
return this.karma <= GangKarmaRequirement;
return this.karma <= GangConstants.GangKarmaRequirement;
}
export function isAwareOfGang(this: IPlayer): boolean {