From 905d37ef934242e84e86e5c7109d7dc61c2a7008 Mon Sep 17 00:00:00 2001 From: LJ <23249107+LJNeon@users.noreply.github.com> Date: Thu, 13 Feb 2025 22:35:55 -0700 Subject: [PATCH] Add donationToFavor() to docs (#1960) --- ...urner.reputationformulas.donationforrep.md | 25 +++++++++++++++++++ markdown/bitburner.reputationformulas.md | 1 + 2 files changed, 26 insertions(+) create mode 100644 markdown/bitburner.reputationformulas.donationforrep.md diff --git a/markdown/bitburner.reputationformulas.donationforrep.md b/markdown/bitburner.reputationformulas.donationforrep.md new file mode 100644 index 000000000..b41b33df1 --- /dev/null +++ b/markdown/bitburner.reputationformulas.donationforrep.md @@ -0,0 +1,25 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [ReputationFormulas](./bitburner.reputationformulas.md) > [donationForRep](./bitburner.reputationformulas.donationforrep.md) + +## ReputationFormulas.donationForRep() method + +Calculate the donation needed to gain an amount of reputation. + +**Signature:** + +```typescript +donationForRep(reputation: number, player: Person): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| reputation | number | Amount of reputation | +| player | [Person](./bitburner.person.md) | Player info, typically from [getPlayer](./bitburner.ns.getplayer.md) | + +**Returns:** + +number + diff --git a/markdown/bitburner.reputationformulas.md b/markdown/bitburner.reputationformulas.md index 398e67e50..c147e27c2 100644 --- a/markdown/bitburner.reputationformulas.md +++ b/markdown/bitburner.reputationformulas.md @@ -18,5 +18,6 @@ interface ReputationFormulas | --- | --- | | [calculateFavorToRep(favor)](./bitburner.reputationformulas.calculatefavortorep.md) | Calculate the total required amount of faction reputation to reach a target favor. | | [calculateRepToFavor(rep)](./bitburner.reputationformulas.calculatereptofavor.md) | Calculate the resulting faction favor of a total amount of reputation. (Faction favor is gained whenever you install an Augmentation.) | +| [donationForRep(reputation, player)](./bitburner.reputationformulas.donationforrep.md) | Calculate the donation needed to gain an amount of reputation. | | [repFromDonation(amount, player)](./bitburner.reputationformulas.repfromdonation.md) | Calculate how much rep would be gained. |