mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-10-23 10:13:13 +02:00
5ff2cd5357
Includes some bug fixes: * Fix sleeve shock internal/display discrepancy (0-100 vs 0-100) * Special error message if ns function called without a this * Change whitespace to pre-wrap for dialog box. * Fix bug where idle sleeves do not consume cycles but still recover shock from those cycles. Now they do not recover during idle. * attempted to tag commit as v2.2.0
19 lines
468 B
TypeScript
19 lines
468 B
TypeScript
import { AlertEvents } from "./AlertManager";
|
|
|
|
import React from "react";
|
|
import { Typography } from "@mui/material";
|
|
|
|
export function dialogBoxCreate(txt: string | JSX.Element, html = false): void {
|
|
AlertEvents.emit(
|
|
typeof txt !== "string" ? (
|
|
txt
|
|
) : html ? (
|
|
<div dangerouslySetInnerHTML={{ __html: txt }}></div>
|
|
) : (
|
|
<Typography component="span" style={{ whiteSpace: "pre-wrap" }}>
|
|
{txt}
|
|
</Typography>
|
|
),
|
|
);
|
|
}
|