From 622ba0a2bd562da88f9ea83e9b451dd1773bffd6 Mon Sep 17 00:00:00 2001 From: SagePtr Date: Sat, 29 Jan 2022 20:59:18 +0200 Subject: [PATCH] Better readable production equation --- src/Corporation/ui/IndustryProductEquation.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Corporation/ui/IndustryProductEquation.tsx b/src/Corporation/ui/IndustryProductEquation.tsx index 9ad32d4ae..60412b532 100644 --- a/src/Corporation/ui/IndustryProductEquation.tsx +++ b/src/Corporation/ui/IndustryProductEquation.tsx @@ -13,12 +13,12 @@ export function IndustryProductEquation(props: IProps): React.ReactElement { if (reqAmt === undefined) continue; reqs.push(String.raw`${reqAmt}\text{ }${reqMat}`); } - const prod = props.division.prodMats.slice(); + const prod = props.division.prodMats.map((p) => `1\\text{ }${p}`); if (props.division.makesProducts) { - prod.push(props.division.type); + prod.push("Products"); } return ( - {"\\(" + reqs.join("+") + `\\Rightarrow` + prod.map((p) => `1 \\text{${p}}`).join("+") + "\\)"} + {"\\(" + reqs.join("+") + `\\Rightarrow ` + prod.join("+") + "\\)"} ); }