mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
TYPESAFETY: CompanyName (#650)
This commit is contained in:
@@ -2,6 +2,8 @@ import React from "react";
|
||||
|
||||
import { Typography, Table, TableBody, TableCell, TableRow } from "@mui/material";
|
||||
|
||||
import { Player } from "@player";
|
||||
|
||||
import { CONSTANTS } from "../../../Constants";
|
||||
|
||||
import {
|
||||
@@ -141,8 +143,10 @@ export function EarningsElement(props: IProps): React.ReactElement {
|
||||
];
|
||||
}
|
||||
|
||||
if (isSleeveCompanyWork(props.sleeve.currentWork)) {
|
||||
const rates = props.sleeve.currentWork.getGainRates(props.sleeve);
|
||||
companyWork: if (isSleeveCompanyWork(props.sleeve.currentWork)) {
|
||||
const job = Player.jobs[props.sleeve.currentWork.companyName];
|
||||
if (!job) break companyWork;
|
||||
const rates = props.sleeve.currentWork.getGainRates(props.sleeve, job);
|
||||
data = [
|
||||
[`Money:`, <MoneyRate key="money-rate" money={CYCLES_PER_SEC * rates.money} />],
|
||||
[`Hacking Exp:`, `${formatExp(CYCLES_PER_SEC * rates.hackExp)} / sec`],
|
||||
|
||||
Reference in New Issue
Block a user