mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
Added "Check Messages" button to dev menu
This commit is contained in:
@@ -10,6 +10,7 @@ import Button from "@mui/material/Button";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { IPlayer } from "../../PersonObjects/IPlayer";
|
||||
import { IRouter } from "../../ui/Router";
|
||||
import { checkForMessagesToSend } from "../../Message/MessageHelpers"
|
||||
|
||||
interface IProps {
|
||||
player: IPlayer;
|
||||
@@ -45,6 +46,10 @@ export function General(props: IProps): React.ReactElement {
|
||||
props.router.toBitVerse(false, false);
|
||||
}
|
||||
|
||||
function checkMessages(): void {
|
||||
checkForMessagesToSend();
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (error) throw new ReferenceError("Manually thrown error");
|
||||
}, [error]);
|
||||
@@ -88,6 +93,7 @@ export function General(props: IProps): React.ReactElement {
|
||||
<Button onClick={quickHackW0r1dD43m0n}>Quick w0rld_d34m0n</Button>
|
||||
<Button onClick={hackW0r1dD43m0n}>Hack w0rld_d34m0n</Button>
|
||||
<Button onClick={() => setError(true)}>Throw Error</Button>
|
||||
<Button onClick={checkMessages}>Check Messages</Button>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user