mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-02-17 02:22:23 +01:00
Merge pull request #2070 from hexnaught/show-owned-in-buy-list-patch
feat(command:buy): show owned items in buy list
This commit is contained in:
@ -6,6 +6,7 @@ import { Terminal } from "../Terminal";
|
||||
import { SpecialServers } from "../Server/data/SpecialServers";
|
||||
import { Money } from "../ui/React/Money";
|
||||
import { DarkWebItem } from "./DarkWebItem";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
//Posts a "help" message if connected to DarkWeb
|
||||
export function checkIfConnectedToDarkweb(): void {
|
||||
@ -22,10 +23,17 @@ export function checkIfConnectedToDarkweb(): void {
|
||||
export function listAllDarkwebItems(): void {
|
||||
for (const key in DarkWebItems) {
|
||||
const item = DarkWebItems[key];
|
||||
|
||||
const cost = Player.getHomeComputer().programs.includes(item.program) ? (
|
||||
<span style={{ color: `green` }}>[OWNED]</span>
|
||||
) : (
|
||||
<Money money={item.price} />
|
||||
);
|
||||
|
||||
Terminal.printRaw(
|
||||
<>
|
||||
{item.program} - <Money money={item.price} /> - {item.description}
|
||||
</>,
|
||||
<Typography>
|
||||
<span>{item.program}</span> - <span>{cost}</span> - <span>{item.description}</span>
|
||||
</Typography>,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user