API: Rename BN multiplier RepToDonateToFaction to FavorToDonateToFaction (#2178)

This commit is contained in:
catloversg
2025-06-03 15:21:59 +07:00
committed by GitHub
parent bdc08cf992
commit 2cabb98095
11 changed files with 28 additions and 16 deletions

View File

@@ -1,13 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [RepToDonateToFaction](./bitburner.bitnodemultipliers.reptodonatetofaction.md)
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [BitNodeMultipliers](./bitburner.bitnodemultipliers.md) &gt; [FavorToDonateToFaction](./bitburner.bitnodemultipliers.favortodonatetofaction.md)
## BitNodeMultipliers.RepToDonateToFaction property
## BitNodeMultipliers.FavorToDonateToFaction property
Influences the minimum favor the player must have with a faction before they can donate to gain rep.
**Signature:**
```typescript
RepToDonateToFaction: number;
FavorToDonateToFaction: number;
```

View File

@@ -39,6 +39,7 @@ interface BitNodeMultipliers
| [FactionPassiveRepGain](./bitburner.bitnodemultipliers.factionpassiverepgain.md) | | number | Influences how much rep the player gains in each faction simply by being a member. |
| [FactionWorkExpGain](./bitburner.bitnodemultipliers.factionworkexpgain.md) | | number | Influences the experience gained for each ability when the player completes work for a Faction. |
| [FactionWorkRepGain](./bitburner.bitnodemultipliers.factionworkrepgain.md) | | number | Influences how much rep the player gains when performing work for a faction or donating to it. |
| [FavorToDonateToFaction](./bitburner.bitnodemultipliers.favortodonatetofaction.md) | | number | Influences the minimum favor the player must have with a faction before they can donate to gain rep. |
| [FourSigmaMarketDataApiCost](./bitburner.bitnodemultipliers.foursigmamarketdataapicost.md) | | number | Influences how much it costs to unlock the stock market's 4S Market Data API |
| [FourSigmaMarketDataCost](./bitburner.bitnodemultipliers.foursigmamarketdatacost.md) | | number | Influences how much it costs to unlock the stock market's 4S Market Data (NOT API) |
| [GangSoftcap](./bitburner.bitnodemultipliers.gangsoftcap.md) | | number | Influences the respect gain and money gain of your gang. |
@@ -56,7 +57,6 @@ interface BitNodeMultipliers
| [PurchasedServerLimit](./bitburner.bitnodemultipliers.purchasedserverlimit.md) | | number | Influences the maximum number of purchased servers you can have |
| [PurchasedServerMaxRam](./bitburner.bitnodemultipliers.purchasedservermaxram.md) | | number | Influences the maximum allowed RAM for a purchased server |
| [PurchasedServerSoftcap](./bitburner.bitnodemultipliers.purchasedserversoftcap.md) | | number | Influence how much it costs to purchase a server |
| [RepToDonateToFaction](./bitburner.bitnodemultipliers.reptodonatetofaction.md) | | number | Influences the minimum favor the player must have with a faction before they can donate to gain rep. |
| [ScriptHackMoney](./bitburner.bitnodemultipliers.scripthackmoney.md) | | number | Influences how much money is stolen from a server when the player performs a hack against it. |
| [ScriptHackMoneyGain](./bitburner.bitnodemultipliers.scripthackmoneygain.md) | | number | Influences how much money the player actually gains when a script hacks a server. This is different from ScriptHackMoney. When a script hacks a server, the amount of money in that server is reduced, but the player does not gain that same amount. |
| [ServerGrowthRate](./bitburner.bitnodemultipliers.servergrowthrate.md) | | number | Influences the growth percentage per cycle against a server. |

View File

@@ -347,7 +347,7 @@ export const achievements: Record<AchievementId, Achievement> = {
Icon: "donation",
Condition: () =>
Object.values(Factions).some(
(f) => f.favor >= Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.RepToDonateToFaction),
(f) => f.favor >= Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.FavorToDonateToFaction),
),
},
TRAVEL: {

View File

@@ -592,7 +592,7 @@ export function getBitNodeMultipliers(n: number, lvl: number): BitNodeMultiplier
HacknetNodeMoney: 0.25,
ScriptHackMoney: 0.2,
RepToDonateToFaction: 0.5,
FavorToDonateToFaction: 0.5,
AugmentationMoneyCost: 3,
AugmentationRepCost: 3,
@@ -751,7 +751,7 @@ export function getBitNodeMultipliers(n: number, lvl: number): BitNodeMultiplier
ScriptHackMoneyGain: 0,
CodingContractMoney: 0,
RepToDonateToFaction: 0,
FavorToDonateToFaction: 0,
InfiltrationMoney: 0,
@@ -930,7 +930,7 @@ export function getBitNodeMultipliers(n: number, lvl: number): BitNodeMultiplier
FactionPassiveRepGain: dec,
FactionWorkRepGain: dec,
RepToDonateToFaction: inc,
FavorToDonateToFaction: inc,
AugmentationMoneyCost: inc,
AugmentationRepCost: inc,

View File

@@ -134,7 +134,7 @@ export class BitNodeMultipliers {
PurchasedServerMaxRam = 1;
/** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */
RepToDonateToFaction = 1;
FavorToDonateToFaction = 1;
/** Influences how much money is stolen from a server when the player performs a hack against it. */
ScriptHackMoney = 1;

View File

@@ -195,7 +195,7 @@ function StockMults({ mults }: IMultsProps): React.ReactElement {
function FactionMults({ mults }: IMultsProps): React.ReactElement {
const rows: IBNMultRows = {
RepToDonateToFaction: { name: "Favor to Donate" },
FavorToDonateToFaction: { name: "Favor to Donate" },
FactionWorkRepGain: {
name: "Work Reputation",
color: Settings.theme.rep,

View File

@@ -122,6 +122,7 @@ import nsDoc_bitburner_bitnodemultipliers_dexteritylevelmultiplier_md from "../.
import nsDoc_bitburner_bitnodemultipliers_factionpassiverepgain_md from "../../markdown/bitburner.bitnodemultipliers.factionpassiverepgain.md?raw";
import nsDoc_bitburner_bitnodemultipliers_factionworkexpgain_md from "../../markdown/bitburner.bitnodemultipliers.factionworkexpgain.md?raw";
import nsDoc_bitburner_bitnodemultipliers_factionworkrepgain_md from "../../markdown/bitburner.bitnodemultipliers.factionworkrepgain.md?raw";
import nsDoc_bitburner_bitnodemultipliers_favortodonatetofaction_md from "../../markdown/bitburner.bitnodemultipliers.favortodonatetofaction.md?raw";
import nsDoc_bitburner_bitnodemultipliers_foursigmamarketdataapicost_md from "../../markdown/bitburner.bitnodemultipliers.foursigmamarketdataapicost.md?raw";
import nsDoc_bitburner_bitnodemultipliers_foursigmamarketdatacost_md from "../../markdown/bitburner.bitnodemultipliers.foursigmamarketdatacost.md?raw";
import nsDoc_bitburner_bitnodemultipliers_gangsoftcap_md from "../../markdown/bitburner.bitnodemultipliers.gangsoftcap.md?raw";
@@ -140,7 +141,6 @@ import nsDoc_bitburner_bitnodemultipliers_purchasedservercost_md from "../../mar
import nsDoc_bitburner_bitnodemultipliers_purchasedserverlimit_md from "../../markdown/bitburner.bitnodemultipliers.purchasedserverlimit.md?raw";
import nsDoc_bitburner_bitnodemultipliers_purchasedservermaxram_md from "../../markdown/bitburner.bitnodemultipliers.purchasedservermaxram.md?raw";
import nsDoc_bitburner_bitnodemultipliers_purchasedserversoftcap_md from "../../markdown/bitburner.bitnodemultipliers.purchasedserversoftcap.md?raw";
import nsDoc_bitburner_bitnodemultipliers_reptodonatetofaction_md from "../../markdown/bitburner.bitnodemultipliers.reptodonatetofaction.md?raw";
import nsDoc_bitburner_bitnodemultipliers_scripthackmoney_md from "../../markdown/bitburner.bitnodemultipliers.scripthackmoney.md?raw";
import nsDoc_bitburner_bitnodemultipliers_scripthackmoneygain_md from "../../markdown/bitburner.bitnodemultipliers.scripthackmoneygain.md?raw";
import nsDoc_bitburner_bitnodemultipliers_servergrowthrate_md from "../../markdown/bitburner.bitnodemultipliers.servergrowthrate.md?raw";
@@ -1642,6 +1642,8 @@ AllPages["nsDoc/bitburner.bitnodemultipliers.factionworkexpgain.md"] =
nsDoc_bitburner_bitnodemultipliers_factionworkexpgain_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.factionworkrepgain.md"] =
nsDoc_bitburner_bitnodemultipliers_factionworkrepgain_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.favortodonatetofaction.md"] =
nsDoc_bitburner_bitnodemultipliers_favortodonatetofaction_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.foursigmamarketdataapicost.md"] =
nsDoc_bitburner_bitnodemultipliers_foursigmamarketdataapicost_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.foursigmamarketdatacost.md"] =
@@ -1673,8 +1675,6 @@ AllPages["nsDoc/bitburner.bitnodemultipliers.purchasedservermaxram.md"] =
nsDoc_bitburner_bitnodemultipliers_purchasedservermaxram_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.purchasedserversoftcap.md"] =
nsDoc_bitburner_bitnodemultipliers_purchasedserversoftcap_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.reptodonatetofaction.md"] =
nsDoc_bitburner_bitnodemultipliers_reptodonatetofaction_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.scripthackmoney.md"] =
nsDoc_bitburner_bitnodemultipliers_scripthackmoney_md;
AllPages["nsDoc/bitburner.bitnodemultipliers.scripthackmoneygain.md"] =

View File

@@ -14,7 +14,7 @@ export function donationForRep(rep: number, person: IPerson): number {
}
export function favorNeededToDonate(): number {
return Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.RepToDonateToFaction);
return Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.FavorToDonateToFaction);
}
export function canDonate(amt: number): boolean {

View File

@@ -1687,7 +1687,7 @@ export const ns: InternalAPI<NSFull> = {
return true;
},
getFavorToDonate: () => () => {
return Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.RepToDonateToFaction);
return Math.floor(CONSTANTS.BaseFavorToDonate * currentNodeMults.FavorToDonateToFaction);
},
getPlayer: () => () => {
const data = {

View File

@@ -746,7 +746,7 @@ interface BitNodeMultipliers {
/** Influences the maximum allowed RAM for a purchased server */
PurchasedServerMaxRam: number;
/** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */
RepToDonateToFaction: number;
FavorToDonateToFaction: number;
/** Influences how much money is stolen from a server when the player performs a hack against it. */
ScriptHackMoney: number;
/**

View File

@@ -179,5 +179,17 @@ export const breakingChanges300: VersionBreakingChange = {
'It has been automatically replaced with "ns.stock.has4SDataTixApi()".',
showPopUp: false,
},
{
brokenAPIs: [
{
name: "ns.getBitNodeMultipliers().RepToDonateToFaction",
migration: { searchValue: "RepToDonateToFaction", replaceValue: "FavorToDonateToFaction" },
},
],
info:
"ns.getBitNodeMultipliers().RepToDonateToFaction was removed.\n" +
'It has been automatically replaced with "ns.getBitNodeMultipliers().FavorToDonateToFaction".',
showPopUp: false,
},
],
};