mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 02:32:55 +02:00
rm SourceFileFlags
This commit is contained in:
@@ -6,7 +6,6 @@ import { BitNodeMultipliers } from "../BitNode/BitNodeMultipliers";
|
||||
import { HacknetServerConstants } from "../Hacknet/data/Constants";
|
||||
import { getPurchaseServerLimit } from "../Server/ServerPurchases";
|
||||
import { Settings } from "../Settings/Settings";
|
||||
import { SourceFileFlags } from "../SourceFile/SourceFileFlags";
|
||||
import { MoneySourceTracker } from "../utils/MoneySourceTracker";
|
||||
import { convertTimeMsToTimeElapsedString } from "../utils/StringHelperFunctions";
|
||||
import { use } from "./Context";
|
||||
@@ -44,6 +43,7 @@ interface MultTableProps {
|
||||
}
|
||||
|
||||
function MultiplierTable(props: MultTableProps): React.ReactElement {
|
||||
const player = use.Player();
|
||||
return (
|
||||
<Table sx={{ display: "table", width: "100%", mb: (props.noMargin ?? false) === true ? 0 : 2 }}>
|
||||
<TableBody>
|
||||
@@ -52,7 +52,7 @@ function MultiplierTable(props: MultTableProps): React.ReactElement {
|
||||
value = data[1] as number,
|
||||
modded = data[2] as number | null;
|
||||
|
||||
if (modded && modded !== value && SourceFileFlags[5] > 0) {
|
||||
if (modded && modded !== value && player.sourceFileLvl(5) > 0) {
|
||||
return (
|
||||
<StatsRow key={mult} name={mult} color={props.color} data={{}}>
|
||||
<>
|
||||
@@ -88,7 +88,7 @@ function CurrentBitNode(): React.ReactElement {
|
||||
<Box>
|
||||
<Paper sx={{ p: 1 }}>
|
||||
<Typography variant="h5">
|
||||
BitNode {player.bitNodeN}: {BitNodes[index].name} (Level {lvl})
|
||||
BitNode {player.bitNodeN}: {BitNodes[index].name} (Level {lvl + 1})
|
||||
</Typography>
|
||||
<Typography sx={{ whiteSpace: "pre-wrap", overflowWrap: "break-word" }}>{BitNodes[index].info}</Typography>
|
||||
</Paper>
|
||||
@@ -270,11 +270,13 @@ export function CharacterStats(): React.ReactElement {
|
||||
data={{ content: `${player.purchasedServers.length} / ${getPurchaseServerLimit()}` }}
|
||||
/>
|
||||
<StatsRow
|
||||
name={`Hacknet ${player.bitNodeN === 9 || SourceFileFlags[9] > 0 ? "Servers" : "Nodes"} owned`}
|
||||
name={`Hacknet ${player.bitNodeN === 9 || player.sourceFileLvl(9) > 0 ? "Servers" : "Nodes"} owned`}
|
||||
color={Settings.theme.primary}
|
||||
data={{
|
||||
content: `${player.hacknetNodes.length}${
|
||||
player.bitNodeN === 9 || SourceFileFlags[9] > 0 ? ` / ${HacknetServerConstants.MaxServers}` : ""
|
||||
player.bitNodeN === 9 || player.sourceFileLvl(9) > 0
|
||||
? ` / ${HacknetServerConstants.MaxServers}`
|
||||
: ""
|
||||
}`,
|
||||
}}
|
||||
/>
|
||||
@@ -320,7 +322,7 @@ export function CharacterStats(): React.ReactElement {
|
||||
color={Settings.theme.cha}
|
||||
data={{ level: player.charisma, exp: player.charisma_exp }}
|
||||
/>
|
||||
{player.intelligence > 0 && (player.bitNodeN === 5 || SourceFileFlags[5] > 0) && (
|
||||
{player.intelligence > 0 && (player.bitNodeN === 5 || player.sourceFileLvl(5) > 0) && (
|
||||
<StatsRow
|
||||
name="Intelligence"
|
||||
color={Settings.theme.int}
|
||||
@@ -335,7 +337,7 @@ export function CharacterStats(): React.ReactElement {
|
||||
<Paper sx={{ p: 1 }}>
|
||||
<Typography variant="h5" color="primary" sx={{ display: "flex", alignItems: "center", flexWrap: "wrap" }}>
|
||||
Multipliers
|
||||
{SourceFileFlags[5] > 0 && (
|
||||
{player.sourceFileLvl(5) > 0 && (
|
||||
<Tooltip
|
||||
title={
|
||||
<Typography>
|
||||
|
||||
Reference in New Issue
Block a user