mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 12:45:45 +01:00
UI: Clean up typesetting of Corp ingredient formulas (#819)
This commit is contained in:
parent
3f0c10adf4
commit
7f575eb34c
@ -11,11 +11,11 @@ export function IndustryProductEquation(props: IProps): React.ReactElement {
|
|||||||
const reqs = [];
|
const reqs = [];
|
||||||
for (const [reqMat, reqAmt] of getRecordEntries(props.division.requiredMaterials)) {
|
for (const [reqMat, reqAmt] of getRecordEntries(props.division.requiredMaterials)) {
|
||||||
if (!reqAmt) continue;
|
if (!reqAmt) continue;
|
||||||
reqs.push(String.raw`${reqAmt}\text{ }${reqMat}`);
|
reqs.push(String.raw`${reqAmt}\;\textit{${reqMat}}`);
|
||||||
}
|
}
|
||||||
const prod = props.division.producedMaterials.map((p) => `1\\text{ }${p}`);
|
const prod = props.division.producedMaterials.map((p) => `1\\;\\textit{${p}}`);
|
||||||
if (props.division.makesProducts) {
|
if (props.division.makesProducts) {
|
||||||
prod.push("Products");
|
prod.push("\\textit{Products}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return <MathJax>{"\\(" + reqs.join("+") + `\\Rightarrow ` + prod.join("+") + "\\)"}</MathJax>;
|
return <MathJax>{"\\(" + reqs.join("+") + `\\Rightarrow ` + prod.join("+") + "\\)"}</MathJax>;
|
||||||
|
Loading…
Reference in New Issue
Block a user