mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
@@ -734,8 +734,9 @@ export class Bladeburner {
|
||||
for (const skill of Object.values(Skills)) {
|
||||
const level = this.getSkillLevel(skill.name);
|
||||
if (!level) continue;
|
||||
for (const [name, mult] of getRecordEntries(skill.mults)) {
|
||||
this.skillMultipliers[name] = clampNumber(this.getSkillMult(name) * (1 + mult / 100), 0);
|
||||
for (const [name, baseMult] of getRecordEntries(skill.mults)) {
|
||||
const mult = baseMult * level;
|
||||
this.skillMultipliers[name] = clampNumber(this.getSkillMult(name) + mult / 100, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import React from "react";
|
||||
import { Box, Tab, Tabs } from "@mui/material";
|
||||
|
||||
@@ -6,7 +8,6 @@ import { ContractPage } from "./ContractPage";
|
||||
import { OperationPage } from "./OperationPage";
|
||||
import { BlackOpPage } from "./BlackOpPage";
|
||||
import { SkillPage } from "./SkillPage";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
|
||||
interface IProps {
|
||||
bladeburner: Bladeburner;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
import type { BlackOperation } from "../Actions/BlackOperation";
|
||||
|
||||
import React from "react";
|
||||
import { Paper, Typography } from "@mui/material";
|
||||
|
||||
@@ -6,8 +9,6 @@ import { formatNumberNoSuffix } from "../../ui/formatNumber";
|
||||
import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions";
|
||||
import { createProgressBarText } from "../../utils/helpers/createProgressBarText";
|
||||
import { TeamSizeButton } from "./TeamSizeButton";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { BlackOperation } from "../Actions/BlackOperation";
|
||||
import { CopyableText } from "../../ui/React/CopyableText";
|
||||
import { SuccessChance } from "./SuccessChance";
|
||||
import { StartButton } from "./StartButton";
|
||||
@@ -41,18 +42,16 @@ export function BlackOpElem({ bladeburner, blackOp }: BlackOpElemProps): React.R
|
||||
<Paper sx={{ my: 1, p: 1 }}>
|
||||
{isActive ? (
|
||||
<>
|
||||
<>
|
||||
<CopyableText value={blackOp.name} />
|
||||
<Typography>
|
||||
(IN PROGRESS - {formatNumberNoSuffix(computedActionTimeCurrent, 0)} /{" "}
|
||||
{formatNumberNoSuffix(bladeburner.actionTimeToComplete, 0)})
|
||||
</Typography>
|
||||
<Typography>
|
||||
{createProgressBarText({
|
||||
progress: computedActionTimeCurrent / bladeburner.actionTimeToComplete,
|
||||
})}
|
||||
</Typography>
|
||||
</>
|
||||
<CopyableText value={blackOp.name} />
|
||||
<Typography>
|
||||
(IN PROGRESS - {formatNumberNoSuffix(computedActionTimeCurrent, 0)} /{" "}
|
||||
{formatNumberNoSuffix(bladeburner.actionTimeToComplete, 0)})
|
||||
</Typography>
|
||||
<Typography>
|
||||
{createProgressBarText({
|
||||
progress: computedActionTimeCurrent / bladeburner.actionTimeToComplete,
|
||||
})}
|
||||
</Typography>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
import React from "react";
|
||||
import { blackOpsArray } from "../data/BlackOperations";
|
||||
import { BlackOperation } from "../Actions/BlackOperation";
|
||||
import { BlackOpElem } from "./BlackOpElem";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
|
||||
interface BlackOpListProps {
|
||||
bladeburner: Bladeburner;
|
||||
}
|
||||
|
||||
export function BlackOpList({ bladeburner }: BlackOpListProps): React.ReactElement {
|
||||
const blackOps = blackOpsArray.slice(0, bladeburner.numBlackOpsComplete + 1);
|
||||
|
||||
return (
|
||||
<>
|
||||
{blackOps.map((blackOp: BlackOperation) => (
|
||||
<BlackOpElem key={blackOp.name} bladeburner={bladeburner} blackOp={blackOp} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import * as React from "react";
|
||||
import { Button, Typography } from "@mui/material";
|
||||
import { FactionName } from "@enums";
|
||||
import { BlackOpList } from "./BlackOpList";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { BlackOpElem } from "./BlackOpElem";
|
||||
import { Router } from "../../ui/GameRoot";
|
||||
import { Page } from "../../ui/Router";
|
||||
import { CorruptableText } from "../../ui/React/CorruptableText";
|
||||
@@ -13,6 +14,8 @@ interface BlackOpPageProps {
|
||||
}
|
||||
|
||||
export function BlackOpPage({ bladeburner }: BlackOpPageProps): React.ReactElement {
|
||||
const blackOps = blackOpsArray.slice(0, bladeburner.numBlackOpsComplete + 1);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Typography>
|
||||
@@ -34,7 +37,11 @@ export function BlackOpPage({ bladeburner }: BlackOpPageProps): React.ReactEleme
|
||||
<CorruptableText content="Destroy w0rld_d34mon" spoiler={false}></CorruptableText>
|
||||
</Button>
|
||||
) : (
|
||||
<BlackOpList bladeburner={bladeburner} />
|
||||
<>
|
||||
{blackOps.map((blackOp) => (
|
||||
<BlackOpElem key={blackOp.name} bladeburner={bladeburner} blackOp={blackOp} />
|
||||
))}
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Console } from "./Console";
|
||||
import { AllPages } from "./AllPages";
|
||||
|
||||
import { Player } from "@player";
|
||||
import Box from "@mui/material/Box";
|
||||
import { Box } from "@mui/material";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
|
||||
export function BladeburnerRoot(): React.ReactElement {
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import React, { useState, useRef, useEffect } from "react";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { KEY } from "../../utils/helpers/keyCodes";
|
||||
|
||||
import Paper from "@mui/material/Paper";
|
||||
import List from "@mui/material/List";
|
||||
import ListItem from "@mui/material/ListItem";
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import TextField from "@mui/material/TextField";
|
||||
import { Box, List, ListItem, Paper, TextField, Typography } from "@mui/material";
|
||||
import { Theme } from "@mui/material/styles";
|
||||
import makeStyles from "@mui/styles/makeStyles";
|
||||
import createStyles from "@mui/styles/createStyles";
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
import type { Contract } from "../Actions/Contract";
|
||||
|
||||
import React from "react";
|
||||
import { createProgressBarText } from "../../utils/helpers/createProgressBarText";
|
||||
import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { Player } from "@player";
|
||||
import { SuccessChance } from "./SuccessChance";
|
||||
import { CopyableText } from "../../ui/React/CopyableText";
|
||||
@@ -9,10 +11,8 @@ import { ActionLevel } from "./ActionLevel";
|
||||
import { Autolevel } from "./Autolevel";
|
||||
import { StartButton } from "./StartButton";
|
||||
import { formatNumberNoSuffix, formatBigNumber } from "../../ui/formatNumber";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import { Paper, Typography } from "@mui/material";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
import { Contract } from "../Actions/Contract";
|
||||
import { getEnumHelper } from "../../utils/EnumHelper";
|
||||
|
||||
interface ContractElemProps {
|
||||
@@ -35,8 +35,11 @@ export function ContractElem({ bladeburner, action }: ContractElemProps): React.
|
||||
<Paper sx={{ my: 1, p: 1 }}>
|
||||
{isActive ? (
|
||||
<>
|
||||
<CopyableText value={action.name} /> (IN PROGRESS - {formatNumberNoSuffix(computedActionTimeCurrent, 0)} /{" "}
|
||||
{formatNumberNoSuffix(bladeburner.actionTimeToComplete, 0)})
|
||||
<CopyableText value={action.name} />
|
||||
<Typography>
|
||||
(IN PROGRESS - {formatNumberNoSuffix(computedActionTimeCurrent, 0)} /{" "}
|
||||
{formatNumberNoSuffix(bladeburner.actionTimeToComplete, 0)})
|
||||
</Typography>
|
||||
<Typography>
|
||||
{createProgressBarText({
|
||||
progress: computedActionTimeCurrent / bladeburner.actionTimeToComplete,
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import React from "react";
|
||||
import { BladeContractName } from "@enums";
|
||||
import { ContractElem } from "./ContractElem";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
|
||||
export function ContractList({ bladeburner }: { bladeburner: Bladeburner }): React.ReactElement {
|
||||
const names = Object.values(BladeContractName);
|
||||
return (
|
||||
<>
|
||||
{names.map((name) => (
|
||||
<ContractElem key={name} bladeburner={bladeburner} action={bladeburner.contracts[name]} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { ContractList } from "./ContractList";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
interface IProps {
|
||||
import * as React from "react";
|
||||
import { ContractElem } from "./ContractElem";
|
||||
import { Typography } from "@mui/material";
|
||||
|
||||
interface ContractPageProps {
|
||||
bladeburner: Bladeburner;
|
||||
}
|
||||
|
||||
export function ContractPage(props: IProps): React.ReactElement {
|
||||
export function ContractPage({ bladeburner }: ContractPageProps): React.ReactElement {
|
||||
const contracts = Object.values(bladeburner.contracts);
|
||||
return (
|
||||
<>
|
||||
<Typography>
|
||||
@@ -18,7 +20,9 @@ export function ContractPage(props: IProps): React.ReactElement {
|
||||
You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more
|
||||
difficult, but grant more rank, experience, and money.
|
||||
</Typography>
|
||||
<ContractList bladeburner={props.bladeburner} />
|
||||
{contracts.map((contract) => (
|
||||
<ContractElem key={contract.name} bladeburner={bladeburner} action={contract} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
import type { GeneralAction } from "../Actions/GeneralAction";
|
||||
|
||||
import React from "react";
|
||||
import { createProgressBarText } from "../../utils/helpers/createProgressBarText";
|
||||
import { formatNumberNoSuffix } from "../../ui/formatNumber";
|
||||
import { convertTimeMsToTimeElapsedString } from "../../utils/StringHelperFunctions";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { Player } from "@player";
|
||||
import { CopyableText } from "../../ui/React/CopyableText";
|
||||
|
||||
import { StartButton } from "./StartButton";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Box from "@mui/material/Box";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import { Box, Paper, Typography } from "@mui/material";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
|
||||
interface GeneralActionElemProps {
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import React from "react";
|
||||
import { GeneralActionElem } from "./GeneralActionElem";
|
||||
import { GeneralActions } from "../data/GeneralActions";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
|
||||
interface GeneralActionListProps {
|
||||
bladeburner: Bladeburner;
|
||||
}
|
||||
|
||||
export function GeneralActionList({ bladeburner }: GeneralActionListProps): React.ReactElement {
|
||||
const actions = Object.values(GeneralActions);
|
||||
return (
|
||||
<>
|
||||
{actions.map((action) => (
|
||||
<GeneralActionElem key={action.name} bladeburner={bladeburner} action={action} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,17 +1,22 @@
|
||||
import * as React from "react";
|
||||
import { GeneralActionList } from "./GeneralActionList";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
interface IProps {
|
||||
import * as React from "react";
|
||||
import { Typography } from "@mui/material";
|
||||
import { GeneralActionElem } from "./GeneralActionElem";
|
||||
import { GeneralActions } from "../data/GeneralActions";
|
||||
|
||||
interface GeneralActionPageProps {
|
||||
bladeburner: Bladeburner;
|
||||
}
|
||||
|
||||
export function GeneralActionPage(props: IProps): React.ReactElement {
|
||||
export function GeneralActionPage({ bladeburner }: GeneralActionPageProps): React.ReactElement {
|
||||
const actions = Object.values(GeneralActions);
|
||||
return (
|
||||
<>
|
||||
<Typography>These are generic actions that will assist you in your Bladeburner duties.</Typography>
|
||||
<GeneralActionList bladeburner={props.bladeburner} />
|
||||
{actions.map((action) => (
|
||||
<GeneralActionElem key={action.name} bladeburner={bladeburner} action={action} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import React from "react";
|
||||
import { Tooltip, Typography } from "@mui/material";
|
||||
import { killIcon } from "../data/Icons";
|
||||
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
|
||||
export function KillIcon(): React.ReactElement {
|
||||
return <Tooltip title={<Typography>This action involves retirement</Typography>}>{killIcon}</Tooltip>;
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
import React from "react";
|
||||
import { BladeOperationName } from "@enums";
|
||||
import { OperationElem } from "./OperationElem";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
|
||||
export function OperationList({ bladeburner }: { bladeburner: Bladeburner }): React.ReactElement {
|
||||
const names = Object.values(BladeOperationName);
|
||||
return (
|
||||
<>
|
||||
{names.map((name) => (
|
||||
<OperationElem key={name} bladeburner={bladeburner} operation={bladeburner.operations[name]} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,13 +1,15 @@
|
||||
import * as React from "react";
|
||||
import { OperationList } from "./OperationList";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
interface IProps {
|
||||
import * as React from "react";
|
||||
import { OperationElem } from "./OperationElem";
|
||||
import { Typography } from "@mui/material";
|
||||
|
||||
interface OperationPageProps {
|
||||
bladeburner: Bladeburner;
|
||||
}
|
||||
|
||||
export function OperationPage(props: IProps): React.ReactElement {
|
||||
export function OperationPage({ bladeburner }: OperationPageProps): React.ReactElement {
|
||||
const operations = Object.values(bladeburner.operations);
|
||||
return (
|
||||
<>
|
||||
<Typography>
|
||||
@@ -27,7 +29,9 @@ export function OperationPage(props: IProps): React.ReactElement {
|
||||
You can unlock higher-level operations by successfully completing them. Higher-level operations are more
|
||||
difficult, but grant more rank and experience.
|
||||
</Typography>
|
||||
<OperationList bladeburner={props.bladeburner} />
|
||||
{operations.map((operation) => (
|
||||
<OperationElem key={operation.name} bladeburner={bladeburner} operation={operation} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import React, { useMemo } from "react";
|
||||
import { CopyableText } from "../../ui/React/CopyableText";
|
||||
import { formatBigNumber } from "../../ui/formatNumber";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import Box from "@mui/material/Box";
|
||||
import Paper from "@mui/material/Paper";
|
||||
import { Box, IconButton, Paper, Typography } from "@mui/material";
|
||||
import AddIcon from "@mui/icons-material/Add";
|
||||
import CloseIcon from "@mui/icons-material/Close";
|
||||
import { Skill } from "../Skill";
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import React from "react";
|
||||
import { BladeburnerConstants } from "../data/Constants";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { formatBigNumber } from "../../ui/formatNumber";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { Typography } from "@mui/material";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
import { SkillElem } from "./SkillElem";
|
||||
import { Skills } from "../data/Skills";
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import React, { useState } from "react";
|
||||
import { Box, Button, Paper, Tooltip, Typography } from "@mui/material";
|
||||
import { Player } from "@player";
|
||||
@@ -10,8 +12,6 @@ import { formatNumberNoSuffix, formatPopulation, formatBigNumber } from "../../u
|
||||
import { Factions } from "../../Faction/Factions";
|
||||
import { Router } from "../../ui/GameRoot";
|
||||
import { Page } from "../../ui/Router";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import { TravelModal } from "./TravelModal";
|
||||
|
||||
interface StatsProps {
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { BlackOperation, Operation } from "../Actions";
|
||||
import React, { useState } from "react";
|
||||
import { TeamSizeModal } from "./TeamSizeModal";
|
||||
import { formatNumberNoSuffix } from "../../ui/formatNumber";
|
||||
import Button from "@mui/material/Button";
|
||||
import { Button } from "@mui/material";
|
||||
|
||||
interface TeamSizeButtonProps {
|
||||
action: Operation | BlackOperation;
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
import type { Bladeburner } from "../Bladeburner";
|
||||
|
||||
import React from "react";
|
||||
import { Button, Typography } from "@mui/material";
|
||||
import { CityName } from "@enums";
|
||||
import { Bladeburner } from "../Bladeburner";
|
||||
import { WorldMap } from "../../ui/React/WorldMap";
|
||||
import { Modal } from "../../ui/React/Modal";
|
||||
import { Settings } from "../../Settings/Settings";
|
||||
|
||||
interface IProps {
|
||||
interface TravelModalProps {
|
||||
bladeburner: Bladeburner;
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
export function TravelModal(props: IProps): React.ReactElement {
|
||||
export function TravelModal({ bladeburner, open, onClose }: TravelModalProps): React.ReactElement {
|
||||
function travel(city: CityName): void {
|
||||
props.bladeburner.city = city;
|
||||
props.onClose();
|
||||
bladeburner.city = city;
|
||||
onClose();
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal open={props.open} onClose={props.onClose}>
|
||||
<Modal open={open} onClose={onClose}>
|
||||
<>
|
||||
<Typography>
|
||||
Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in
|
||||
@@ -32,7 +33,7 @@ export function TravelModal(props: IProps): React.ReactElement {
|
||||
</Button>
|
||||
))
|
||||
) : (
|
||||
<WorldMap currentCity={props.bladeburner.city} onTravel={travel} />
|
||||
<WorldMap currentCity={bladeburner.city} onTravel={travel} />
|
||||
)}
|
||||
</>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user