UI: Change description and add tooltip for HackMoney-related multipliers (#1823)

* UI: Change description and add tooltip for HackMoney-related multipliers

* Update based on feedback
This commit is contained in:
catloversg 2024-12-18 17:51:25 +07:00 committed by GitHub
parent 9c4b0c004c
commit e6078ab1df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 60 additions and 31 deletions

@ -4,7 +4,7 @@
## BitNodeMultipliers.ManualHackMoney property
Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal.
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.
**Signature:**

@ -51,14 +51,14 @@ 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 can be stolen from a server when the player performs a hack against it through the Terminal. |
| [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. |
| [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 |
| [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 can be stolen from a server when a script performs a hack against it. |
| [ScriptHackMoneyGain](./bitburner.bitnodemultipliers.scripthackmoneygain.md) | | number | The amount of money actually gained when a script hacks a server. This is different than the above because you can reduce the amount of money but not gain that same amount. |
| [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. |
| [ServerMaxMoney](./bitburner.bitnodemultipliers.servermaxmoney.md) | | number | Influences the maximum money that a server can grow to. |
| [ServerStartingMoney](./bitburner.bitnodemultipliers.serverstartingmoney.md) | | number | Influences the initial money that a server starts with. |

@ -4,7 +4,7 @@
## BitNodeMultipliers.ScriptHackMoney property
Influences how much money can be stolen from a server when a script performs a hack against it.
Influences how much money is stolen from a server when the player performs a hack against it.
**Signature:**

@ -4,7 +4,7 @@
## BitNodeMultipliers.ScriptHackMoneyGain property
The amount of money actually gained when a script hacks a server. This is different than the above because you can reduce the amount of money but not gain that same amount.
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.
**Signature:**

@ -115,8 +115,9 @@ export class BitNodeMultipliers {
InfiltrationRep = 1;
/**
* Influences how much money can be stolen from a server when the player performs a hack against it through
* the Terminal.
* 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 = 1;
@ -135,12 +136,12 @@ export class BitNodeMultipliers {
/** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */
RepToDonateToFaction = 1;
/** Influences how much money can be stolen from a server when a script performs a hack against it. */
/** Influences how much money is stolen from a server when the player performs a hack against it. */
ScriptHackMoney = 1;
/**
* The amount of money actually gained when a script hacks a server. This is
* different than the above because you can reduce the amount of money but
* 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.
*/
ScriptHackMoneyGain = 1;

@ -1,6 +1,15 @@
import React from "react";
import { uniqueId } from "lodash";
import { Box, Collapse, ListItemButton, ListItemText, Paper, Table, TableBody, Typography } from "@mui/material";
import {
Box,
Collapse,
ListItemButton,
ListItemText,
Paper,
Table,
TableBody,
Tooltip,
Typography,
} from "@mui/material";
import ExpandLess from "@mui/icons-material/ExpandLess";
import ExpandMore from "@mui/icons-material/ExpandMore";
@ -70,6 +79,7 @@ type IBNMultRows = PartialRecord<
name: string;
content?: string;
color?: string;
tooltipText?: string;
}
>;
@ -82,14 +92,26 @@ interface IBNMultTableProps {
const BNMultTable = (props: IBNMultTableProps): React.ReactElement => {
const rowsArray = getRecordEntries(props.rowData)
.filter(([key]) => props.mults[key] !== defaultMultipliers[key])
.map(([key, value]) => (
<StatsRow
key={uniqueId()}
name={value.name}
data={{ content: value.content ?? `${(props.mults[key] * 100).toFixed(3)}%` }}
color={value.color ?? Settings.theme.primary}
/>
));
.map(([key, value]) => {
const name = value.tooltipText ? (
<Tooltip title={<span>{value.tooltipText}</span>}>
<span>
{value.name}
<sup>(*)</sup>
</span>
</Tooltip>
) : (
value.name
);
return (
<StatsRow
key={`${props.sectionName}-${value.name}`}
name={name}
data={{ content: value.content ?? `${(props.mults[key] * 100).toFixed(3)}%` }}
color={value.color ?? Settings.theme.primary}
/>
);
});
return rowsArray.length > 0 ? (
<span style={{ display: "inline-block", width: "100%", marginBottom: "16px" }}>
@ -241,16 +263,19 @@ function HackingMults({ mults }: IMultsProps): React.ReactElement {
ServerStartingSecurity: { name: "Server Starting Security" },
ServerWeakenRate: { name: "Server Weaken Rate" },
ManualHackMoney: {
name: "Manual Hack Money",
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.`,
},
ScriptHackMoney: {
name: "Script Hack Money",
name: "Stolen Money From Hack",
color: Settings.theme.money,
tooltipText: "Influences how much money is stolen from a server when the player performs a hack against it.",
},
ScriptHackMoneyGain: {
name: "Money Gained From Hack",
name: "Money Gained From Script Hack",
color: Settings.theme.money,
tooltipText: `Influences how much money the player actually gains when a script hacks a server. This is different from "Stolen Money From Hack". When a script hacks a server, the amount of money in that server is reduced, but the player does not gain that same amount.`,
},
};

@ -728,8 +728,9 @@ interface BitNodeMultipliers {
/** Influences how much rep the player can gain from factions when selling stolen documents and secrets */
InfiltrationRep: number;
/**
* Influences how much money can be stolen from a server when the player performs a hack against it through
* the Terminal.
* 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: number;
/** Influence how much it costs to purchase a server */
@ -742,11 +743,11 @@ interface BitNodeMultipliers {
PurchasedServerMaxRam: number;
/** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */
RepToDonateToFaction: number;
/** Influences how much money can be stolen from a server when a script performs a hack against it. */
/** Influences how much money is stolen from a server when the player performs a hack against it. */
ScriptHackMoney: number;
/**
* The amount of money actually gained when a script hacks a server. This is
* different than the above because you can reduce the amount of money but
* 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.
*/
ScriptHackMoneyGain: number;

@ -109,7 +109,9 @@ function CurrentBitNode(): React.ReactElement {
<Typography variant="h5">
BitNode {Player.bitNodeN}: {BitNodes[index].name} (Level {lvl})
</Typography>
<Typography sx={{ whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>{BitNodes[index].info}</Typography>
<Typography component="div" sx={{ whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>
{BitNodes[index].info}
</Typography>
</Paper>
);
}

@ -12,7 +12,7 @@ interface ITableRowData {
}
interface IProps {
name: string;
name: string | React.ReactElement;
color: string;
data?: ITableRowData;
children?: React.ReactElement;