mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-08 19:32:31 +01:00
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:
@ -130,7 +130,7 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
|
||||
<Box>
|
||||
<Paper sx={{ my: 1, p: 1 }}>
|
||||
<Tooltip
|
||||
title={!isManageGangClickable ? <Typography>Unlocked when reaching -54000 karma</Typography> : ""}
|
||||
title={!isManageGangClickable ? <Typography>Unlocked when reaching {GangConstants.GangKarmaRequirement} karma</Typography> : ""}
|
||||
>
|
||||
<span>
|
||||
<Button onClick={manageGang} disabled={!isManageGangClickable}>
|
||||
|
@ -6,6 +6,7 @@ export const GangConstants: {
|
||||
CyclesPerTerritoryAndPowerUpdate: number;
|
||||
AscensionMultiplierRatio: number;
|
||||
Names: string[];
|
||||
GangKarmaRequirement: number;
|
||||
} = {
|
||||
// Respect is divided by this to get rep gain
|
||||
GangRespectToReputationRatio: 75,
|
||||
@ -23,4 +24,5 @@ export const GangConstants: {
|
||||
FactionNames.NiteSec,
|
||||
FactionNames.TheBlackHand,
|
||||
],
|
||||
GangKarmaRequirement: -54000,
|
||||
};
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user