mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-08 00:27:47 +02:00
REFACTOR: Change repNeededToDonate to favorNeededToDonate (#2134)
It was wrong and confusing.
This commit is contained in:
@@ -13,7 +13,7 @@ export function donationForRep(rep: number, person: IPerson): number {
|
||||
return (rep * CONSTANTS.DonateMoneyToRepDivisor) / person.mults.faction_rep / currentNodeMults.FactionWorkRepGain;
|
||||
}
|
||||
|
||||
export function repNeededToDonate(): number {
|
||||
export function favorNeededToDonate(): number {
|
||||
return Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.RepToDonateToFaction);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { FactionName, FactionWorkType } from "@enums";
|
||||
import { GangButton } from "./GangButton";
|
||||
import { FactionWork } from "../../Work/FactionWork";
|
||||
import { useCycleRerender } from "../../ui/React/hooks";
|
||||
import { repNeededToDonate } from "../formulas/donation";
|
||||
import { favorNeededToDonate } from "../formulas/donation";
|
||||
|
||||
type FactionRootProps = {
|
||||
faction: Faction;
|
||||
@@ -103,7 +103,7 @@ function MainPage({ faction, rerender, onAugmentations }: IMainProps): React.Rea
|
||||
|
||||
// Flags for whether special options (gang, sleeve purchases, donate, etc.)
|
||||
// should be shown
|
||||
const favorToDonate = repNeededToDonate();
|
||||
const favorToDonate = favorNeededToDonate();
|
||||
const canDonate = faction.favor >= favorToDonate;
|
||||
const canPurchaseSleeves = faction.name === FactionName.TheCovenant && Player.bitNodeN === 10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user