merge base

This commit is contained in:
phyzical
2022-04-27 19:00:42 +08:00
18 changed files with 528 additions and 291 deletions
@@ -1,5 +1,4 @@
import { StaticAugmentations } from "../../Augmentation/StaticAugmentations";
import { AugmentationNames } from "../../Augmentation/data/AugmentationNames";
import { GraftableAugmentation } from "./GraftableAugmentation";
import { IPlayer } from "../IPlayer";
@@ -7,8 +6,7 @@ export const getGraftingAvailableAugs = (player: IPlayer): string[] => {
const augs: string[] = [];
for (const [augName, aug] of Object.entries(StaticAugmentations)) {
if (augName === AugmentationNames.NeuroFluxGovernor || augName === AugmentationNames.TheRedPill || aug.isSpecial)
continue;
if (aug.isSpecial) continue;
augs.push(augName);
}
+33 -29
View File
@@ -140,37 +140,41 @@ export const GraftingRoot = (): React.ReactElement => {
</>
}
/>
<Typography color={Settings.theme.info}>
<b>Time to Graft:</b>{" "}
{convertTimeMsToTimeElapsedString(
calculateGraftingTimeWithBonus(player, GraftableAugmentations[selectedAug]),
)}
{/* Use formula so the displayed creation time is accurate to player bonus */}
</Typography>
{selectedAugmentation.prereqs.length > 0 && (
<AugPreReqsChecklist player={player} aug={selectedAugmentation} />
)}
<Box sx={{ maxHeight: 330, overflowY: "scroll" }}>
<Typography color={Settings.theme.info}>
<b>Time to Graft:</b>{" "}
{convertTimeMsToTimeElapsedString(
calculateGraftingTimeWithBonus(player, GraftableAugmentations[selectedAug]),
)}
{/* Use formula so the displayed creation time is accurate to player bonus */}
</Typography>
<br />
<Typography sx={{ maxHeight: 305, overflowY: "scroll" }}>
{(() => {
const info =
typeof selectedAugmentation.info === "string" ? (
<span>{selectedAugmentation.info}</span>
) : (
selectedAugmentation.info
{selectedAugmentation.prereqs.length > 0 && (
<AugPreReqsChecklist player={player} aug={selectedAugmentation} />
)}
<br />
<Typography>
{(() => {
const info =
typeof selectedAugmentation.info === "string" ? (
<span>{selectedAugmentation.info}</span>
) : (
selectedAugmentation.info
);
const tooltip = (
<>
{info}
<br />
<br />
{selectedAugmentation.stats}
</>
);
const tooltip = (
<>
{info}
<br />
<br />
{selectedAugmentation.stats}
</>
);
return tooltip;
})()}
</Typography>
return tooltip;
})()}
</Typography>
</Box>
</Box>
</Paper>
) : (