/** * React component for displaying all of the player's purchased (but not installed) * Augmentations on the Augmentations UI. */ import { List, ListItemText, Paper, Tooltip, Typography } from "@mui/material"; import * as React from "react"; import { Player } from "../../Player"; import { Augmentations } from "../Augmentations"; import { AugmentationNames } from "../data/AugmentationNames"; export function PurchasedAugmentations(): React.ReactElement { const augs: React.ReactElement[] = []; // Only render the last NeuroFlux (there are no findLastIndex btw) let nfgIndex = -1; for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) { if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) { nfgIndex = i; break; } } for (let i = 0; i < Player.queuedAugmentations.length; i++) { const ownedAug = Player.queuedAugmentations[i]; let displayName = ownedAug.name; if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue; const aug = Augmentations[ownedAug.name]; let level = null; if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) { level = ownedAug.level; displayName += ` - Level ${level}`; } augs.push( {(() => { const info = typeof aug.info === "string" ? {aug.info} : aug.info; const tooltip = ( <> {info}

{aug.stats} ); return tooltip; })()} } enterNextDelay={500} key={displayName} >
, ); } return ( {augs} ); }