mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
BUGFIX: BitVerse does not show all BN multipliers in some cases (#2045)
This commit is contained in:
@@ -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:**
|
||||
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 (
|
||||
<Box component={Paper} sx={{ mt: 1, p: 1 }}>
|
||||
@@ -38,13 +41,17 @@ export function BitnodeMultiplierDescription({ n, level }: IProps): React.ReactE
|
||||
{open ? <ExpandLess color="primary" /> : <ExpandMore color="primary" />}
|
||||
</ListItemButton>
|
||||
<Collapse in={open}>
|
||||
<BitNodeMultipliersDisplay n={n} level={level} />
|
||||
<BitNodeMultipliersDisplay
|
||||
n={n}
|
||||
level={level}
|
||||
hideMultsIfCannotAccessFeature={hideMultsIfCannotAccessFeature}
|
||||
/>
|
||||
</Collapse>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
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
|
||||
<CrimeMults n={n} mults={mults} />
|
||||
<InfiltrationMults n={n} mults={mults} />
|
||||
<CompanyMults n={n} mults={mults} />
|
||||
<GangMults n={n} mults={mults} />
|
||||
<CorporationMults n={n} mults={mults} />
|
||||
<BladeburnerMults n={n} mults={mults} />
|
||||
<StanekMults n={n} mults={mults} />
|
||||
<GangMults n={n} mults={mults} hideMultsIfCannotAccessFeature={hideMultsIfCannotAccessFeature} />
|
||||
<CorporationMults n={n} mults={mults} hideMultsIfCannotAccessFeature={hideMultsIfCannotAccessFeature} />
|
||||
<BladeburnerMults n={n} mults={mults} hideMultsIfCannotAccessFeature={hideMultsIfCannotAccessFeature} />
|
||||
<StanekMults n={n} mults={mults} hideMultsIfCannotAccessFeature={hideMultsIfCannotAccessFeature} />
|
||||
<GoMults n={n} mults={mults} />
|
||||
</Box>
|
||||
);
|
||||
@@ -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 <BNMultTable sectionName="Infiltration" rowData={rows} mults={mults} />;
|
||||
}
|
||||
|
||||
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 <BNMultTable sectionName="Bladeburner" rowData={rows} mults={mults} />;
|
||||
}
|
||||
|
||||
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 <BNMultTable sectionName="Stanek's Gift" rowData={rows} mults={mults} />;
|
||||
}
|
||||
|
||||
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 <BNMultTable sectionName="Gang" rowData={rows} mults={mults} />;
|
||||
}
|
||||
|
||||
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 = {
|
||||
|
||||
@@ -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 {
|
||||
<br />
|
||||
<br />
|
||||
<Typography component="div">{bitNode.info}</Typography>
|
||||
<BitnodeMultiplierDescription n={props.n} level={newLevel} />
|
||||
<BitNodeMultiplierDescription n={props.n} level={newLevel} hideMultsIfCannotAccessFeature={false} />
|
||||
<BitNodeAdvancedOptions
|
||||
targetBitNode={props.n}
|
||||
currentSourceFiles={currentSourceFiles}
|
||||
|
||||
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
2
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@@ -744,7 +744,7 @@ interface BitNodeMultipliers {
|
||||
InfiltrationRep: 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
|
||||
* 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: number;
|
||||
|
||||
@@ -594,7 +594,7 @@ export function CharacterStats(): React.ReactElement {
|
||||
{canAccessBitNodeFeature(5) && (
|
||||
<Paper sx={{ p: 1, mb: 1 }}>
|
||||
<Typography variant="h5">BitNode Multipliers</Typography>
|
||||
<BitNodeMultipliersDisplay n={Player.bitNodeN} />
|
||||
<BitNodeMultipliersDisplay n={Player.bitNodeN} hideMultsIfCannotAccessFeature={true} />
|
||||
</Paper>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user