From 758b0e1127bc4b8484510f25715680cadf9e22f3 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 8 Apr 2022 01:02:36 -0400 Subject: [PATCH] fix home ram tooltip --- src/Locations/ui/RamButton.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Locations/ui/RamButton.tsx b/src/Locations/ui/RamButton.tsx index 57ecebde7..aa1433d87 100644 --- a/src/Locations/ui/RamButton.tsx +++ b/src/Locations/ui/RamButton.tsx @@ -11,6 +11,7 @@ import { Money } from "../../ui/React/Money"; import { numeralWrapper } from "../../ui/numeralFormat"; import { MathJaxWrapper } from "../../MathJaxWrapper"; +import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers"; type IProps = { p: IPlayer; @@ -30,9 +31,13 @@ export function RamButton(props: IProps): React.ReactElement { props.rerender(); } + const bnMult = BitNodeMultipliers.HomeComputerRamCost === 1 ? "" : `\\cdot ${BitNodeMultipliers.HomeComputerRamCost}`; + console.log(BitNodeMultipliers.HomeComputerRamCost); return ( {`\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)`}} + title={ + {`\\(\\large{cost = ram \\cdot 3.2 \\cdot 10^4 \\cdot 1.58^{log_2{(ram)}}} ${bnMult}\\)`} + } >