From b1b560b6c6edb4f0b33c098ec0094a24dfc18cc4 Mon Sep 17 00:00:00 2001
From: catloversg <152669316+catloversg@users.noreply.github.com>
Date: Sun, 11 May 2025 12:40:28 +0700
Subject: [PATCH] BUGFIX: BitVerse does not show all BN multipliers in some
cases (#2045)
---
...rner.bitnodemultipliers.manualhackmoney.md | 2 +-
markdown/bitburner.bitnodemultipliers.md | 2 +-
src/BitNode/BitNodeMultipliers.ts | 2 +-
.../ui/BitnodeMultipliersDescription.tsx | 53 +++++++++++++------
src/BitNode/ui/PortalModal.tsx | 4 +-
src/ScriptEditor/NetscriptDefinitions.d.ts | 2 +-
src/ui/CharacterStats.tsx | 2 +-
7 files changed, 43 insertions(+), 24 deletions(-)
diff --git a/markdown/bitburner.bitnodemultipliers.manualhackmoney.md b/markdown/bitburner.bitnodemultipliers.manualhackmoney.md
index 33fd52eb4..091f4c7cc 100644
--- a/markdown/bitburner.bitnodemultipliers.manualhackmoney.md
+++ b/markdown/bitburner.bitnodemultipliers.manualhackmoney.md
@@ -4,7 +4,7 @@
## BitNodeMultipliers.ManualHackMoney property
-Influences how much money the player actually gains when they hack a server via the terminal. This is different from ScriptHackMoney. When the player hack a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount.
+Influences how much money the player actually gains when they hack a server via the terminal. This is different from ScriptHackMoney. When the player hacks a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount.
**Signature:**
diff --git a/markdown/bitburner.bitnodemultipliers.md b/markdown/bitburner.bitnodemultipliers.md
index 26e5ec822..01d5b8afe 100644
--- a/markdown/bitburner.bitnodemultipliers.md
+++ b/markdown/bitburner.bitnodemultipliers.md
@@ -51,7 +51,7 @@ interface BitNodeMultipliers
| [HomeComputerRamCost](./bitburner.bitnodemultipliers.homecomputerramcost.md) | | number | Influences how much money it costs to upgrade your home computer's RAM |
| [InfiltrationMoney](./bitburner.bitnodemultipliers.infiltrationmoney.md) | | number | Influences how much money is gained when the player infiltrates a company. |
| [InfiltrationRep](./bitburner.bitnodemultipliers.infiltrationrep.md) | | number | Influences how much rep the player can gain from factions when selling stolen documents and secrets |
-| [ManualHackMoney](./bitburner.bitnodemultipliers.manualhackmoney.md) | | number | Influences how much money the player actually gains when they hack a server via the terminal. This is different from ScriptHackMoney. When the player hack a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount. |
+| [ManualHackMoney](./bitburner.bitnodemultipliers.manualhackmoney.md) | | number | Influences how much money the player actually gains when they hack a server via the terminal. This is different from ScriptHackMoney. When the player hacks a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount. |
| [PurchasedServerCost](./bitburner.bitnodemultipliers.purchasedservercost.md) | | number | Influence how much it costs to purchase a server |
| [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 |
diff --git a/src/BitNode/BitNodeMultipliers.ts b/src/BitNode/BitNodeMultipliers.ts
index f132e9f55..10a07b6c9 100644
--- a/src/BitNode/BitNodeMultipliers.ts
+++ b/src/BitNode/BitNodeMultipliers.ts
@@ -116,7 +116,7 @@ export class BitNodeMultipliers {
/**
* Influences how much money the player actually gains when they hack a server via the terminal. This is different
- * from ScriptHackMoney. When the player hack a server via the terminal, the amount of money in that server is
+ * from ScriptHackMoney. When the player hacks a server via the terminal, the amount of money in that server is
* reduced, but they do not gain that same amount.
*/
ManualHackMoney = 1;
diff --git a/src/BitNode/ui/BitnodeMultipliersDescription.tsx b/src/BitNode/ui/BitnodeMultipliersDescription.tsx
index 2d0b5798d..7b622a9b5 100644
--- a/src/BitNode/ui/BitnodeMultipliersDescription.tsx
+++ b/src/BitNode/ui/BitnodeMultipliersDescription.tsx
@@ -25,11 +25,14 @@ import { canAccessBitNodeFeature } from "../BitNodeUtils";
interface IProps {
n: number;
level?: number;
+ hideMultsIfCannotAccessFeature: boolean;
}
-export function BitnodeMultiplierDescription({ n, level }: IProps): React.ReactElement {
+export function BitNodeMultiplierDescription({ n, level, hideMultsIfCannotAccessFeature }: IProps): React.ReactElement {
const [open, setOpen] = React.useState(false);
- if (n === 1) return <>>;
+ if (n === 1) {
+ return <>>;
+ }
return (
@@ -38,13 +41,17 @@ export function BitnodeMultiplierDescription({ n, level }: IProps): React.ReactE
{open ? : }
-
+
);
}
-export const BitNodeMultipliersDisplay = ({ n, level }: IProps): React.ReactElement => {
+export const BitNodeMultipliersDisplay = ({ n, level, hideMultsIfCannotAccessFeature }: IProps): React.ReactElement => {
// If a level argument has been provided, use that as the multiplier level
// If not, then we have to assume that we want the next level up from the
// current node's source file, so we get the min of that, the SF's max level,
@@ -64,10 +71,10 @@ export const BitNodeMultipliersDisplay = ({ n, level }: IProps): React.ReactElem
-
-
-
-
+
+
+
+
);
@@ -130,6 +137,10 @@ interface IMultsProps {
mults: BitNodeMultipliers;
}
+interface IEndGameMultsProps extends IMultsProps {
+ hideMultsIfCannotAccessFeature: boolean;
+}
+
function GeneralMults({ mults }: IMultsProps): React.ReactElement {
const rows: IBNMultRows = {
WorldDaemonDifficulty: { name: `${SpecialServers.WorldDaemon} Difficulty` },
@@ -265,7 +276,7 @@ function HackingMults({ mults }: IMultsProps): React.ReactElement {
ManualHackMoney: {
name: "Money Gained From Manual Hack",
color: Settings.theme.money,
- tooltipText: `Influences how much money the player actually gains when they hack a server via the terminal. This is different from "Stolen Money From Hack". When the player hack a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount.`,
+ tooltipText: `Influences how much money the player actually gains when they hack a server via the terminal. This is different from "Stolen Money From Hack". When the player hacks a server via the terminal, the amount of money in that server is reduced, but they do not gain that same amount.`,
},
ScriptHackMoney: {
name: "Stolen Money From Hack",
@@ -315,8 +326,10 @@ function InfiltrationMults({ mults }: IMultsProps): React.ReactElement {
return ;
}
-function BladeburnerMults({ mults }: IMultsProps): React.ReactElement {
- if (!Player.canAccessBladeburner()) return <>>;
+function BladeburnerMults({ mults, hideMultsIfCannotAccessFeature }: IEndGameMultsProps): React.ReactElement {
+ if (!Player.canAccessBladeburner() && hideMultsIfCannotAccessFeature) {
+ return <>>;
+ }
if (mults.BladeburnerRank === 0) {
const rows: IBNMultRows = {
@@ -334,8 +347,10 @@ function BladeburnerMults({ mults }: IMultsProps): React.ReactElement {
return ;
}
-function StanekMults({ mults }: IMultsProps): React.ReactElement {
- if (!Player.canAccessCotMG()) return <>>;
+function StanekMults({ mults, hideMultsIfCannotAccessFeature }: IEndGameMultsProps): React.ReactElement {
+ if (!Player.canAccessCotMG() && hideMultsIfCannotAccessFeature) {
+ return <>>;
+ }
const extraSize = mults.StaneksGiftExtraSize.toFixed(5);
const rows: IBNMultRows = {
@@ -349,8 +364,10 @@ function StanekMults({ mults }: IMultsProps): React.ReactElement {
return ;
}
-function GangMults({ mults }: IMultsProps): React.ReactElement {
- if (!canAccessBitNodeFeature(2)) return <>>;
+function GangMults({ mults, hideMultsIfCannotAccessFeature }: IEndGameMultsProps): React.ReactElement {
+ if (!canAccessBitNodeFeature(2) && hideMultsIfCannotAccessFeature) {
+ return <>>;
+ }
const rows: IBNMultRows = {
GangSoftcap: {
@@ -363,8 +380,10 @@ function GangMults({ mults }: IMultsProps): React.ReactElement {
return ;
}
-function CorporationMults({ mults }: IMultsProps): React.ReactElement {
- if (!Player.canAccessCorporation()) return <>>;
+function CorporationMults({ mults, hideMultsIfCannotAccessFeature }: IEndGameMultsProps): React.ReactElement {
+ if (!Player.canAccessCorporation() && hideMultsIfCannotAccessFeature) {
+ return <>>;
+ }
if (mults.CorporationSoftcap < 0.15) {
const rows: IBNMultRows = {
diff --git a/src/BitNode/ui/PortalModal.tsx b/src/BitNode/ui/PortalModal.tsx
index d1962ecb7..21ef06a80 100644
--- a/src/BitNode/ui/PortalModal.tsx
+++ b/src/BitNode/ui/PortalModal.tsx
@@ -7,7 +7,7 @@ import { BitNodes } from "../BitNode";
import { Modal } from "../../ui/React/Modal";
import Typography from "@mui/material/Typography";
import Button from "@mui/material/Button";
-import { BitnodeMultiplierDescription } from "./BitnodeMultipliersDescription";
+import { BitNodeMultiplierDescription } from "./BitnodeMultipliersDescription";
import { BitNodeAdvancedOptions } from "./BitNodeAdvancedOptions";
import { JSONMap } from "../../Types/Jsonable";
@@ -105,7 +105,7 @@ export function PortalModal(props: IProps): React.ReactElement {
{bitNode.info}
-
+
BitNode Multipliers
-
+
)}