mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 05:05:47 +01:00
CORP: Change some number formatting to look better (#764)
changed formatCorpStat to formatBigNumber to make big numbers readable
This commit is contained in:
parent
b7fdcdf35d
commit
7c82221a13
@ -9,7 +9,7 @@ import { SellProductModal } from "./modals/SellProductModal";
|
|||||||
import { ProductMarketTaModal } from "./modals/ProductMarketTaModal";
|
import { ProductMarketTaModal } from "./modals/ProductMarketTaModal";
|
||||||
import { CancelProductModal } from "./modals/CancelProductModal";
|
import { CancelProductModal } from "./modals/CancelProductModal";
|
||||||
|
|
||||||
import { formatBigNumber, formatCorpStat, formatMoney, formatPercent } from "../../ui/formatNumber";
|
import { formatBigNumber, formatMoney, formatPercent } from "../../ui/formatNumber";
|
||||||
|
|
||||||
import { isString } from "../../utils/helpers/string";
|
import { isString } from "../../utils/helpers/string";
|
||||||
import { Money } from "../../ui/React/Money";
|
import { Money } from "../../ui/React/Money";
|
||||||
@ -67,7 +67,7 @@ export function ProductElem(props: IProductProps): React.ReactElement {
|
|||||||
// Limit Production button
|
// Limit Production button
|
||||||
const productionLimit = product.cityData[city].productionLimit;
|
const productionLimit = product.cityData[city].productionLimit;
|
||||||
const limitProductionButtonText =
|
const limitProductionButtonText =
|
||||||
"Limit Production" + (productionLimit !== null ? " (" + formatCorpStat(productionLimit) + ")" : "");
|
"Limit Production" + (productionLimit !== null ? " (" + formatBigNumber(productionLimit) + ")" : "");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Paper>
|
<Paper>
|
||||||
@ -109,29 +109,29 @@ export function ProductElem(props: IProductProps): React.ReactElement {
|
|||||||
title={
|
title={
|
||||||
<Typography>
|
<Typography>
|
||||||
Effective rating is calculated from product rating and the quality of materials used <br />
|
Effective rating is calculated from product rating and the quality of materials used <br />
|
||||||
Rating: {formatCorpStat(product.rating)} <br /> <br />
|
Rating: {formatBigNumber(product.rating)} <br /> <br />
|
||||||
Quality: {formatCorpStat(product.stats.quality)} <br />
|
Quality: {formatBigNumber(product.stats.quality)} <br />
|
||||||
Performance: {formatCorpStat(product.stats.performance)} <br />
|
Performance: {formatBigNumber(product.stats.performance)} <br />
|
||||||
Durability: {formatCorpStat(product.stats.durability)} <br />
|
Durability: {formatBigNumber(product.stats.durability)} <br />
|
||||||
Reliability: {formatCorpStat(product.stats.reliability)} <br />
|
Reliability: {formatBigNumber(product.stats.reliability)} <br />
|
||||||
Aesthetics: {formatCorpStat(product.stats.aesthetics)} <br />
|
Aesthetics: {formatBigNumber(product.stats.aesthetics)} <br />
|
||||||
Features: {formatCorpStat(product.stats.features)}
|
Features: {formatBigNumber(product.stats.features)}
|
||||||
{corp.unlocks.has(CorpUnlockName.MarketResearchDemand) && (
|
{corp.unlocks.has(CorpUnlockName.MarketResearchDemand) && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
{"Demand: " + formatCorpStat(product.demand)}
|
{"Demand: " + formatBigNumber(product.demand)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{corp.unlocks.has(CorpUnlockName.MarketDataCompetition) && (
|
{corp.unlocks.has(CorpUnlockName.MarketDataCompetition) && (
|
||||||
<>
|
<>
|
||||||
<br />
|
<br />
|
||||||
{"Competition: " + formatCorpStat(product.competition)}
|
{"Competition: " + formatBigNumber(product.competition)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography>Effective rating: {formatCorpStat(product.cityData[city].effectiveRating)}</Typography>
|
<Typography>Effective rating: {formatBigNumber(product.cityData[city].effectiveRating)}</Typography>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Box>
|
</Box>
|
||||||
<Box display="flex">
|
<Box display="flex">
|
||||||
|
Loading…
Reference in New Issue
Block a user