mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
tail box close on soft reset
This commit is contained in:
parent
6e71258a53
commit
f17870926b
@ -28,6 +28,7 @@ import { dialogBoxCreate } from "./ui/React/DialogBox";
|
|||||||
|
|
||||||
import { ProgramsSeen } from "./Programs/ui/ProgramsRoot";
|
import { ProgramsSeen } from "./Programs/ui/ProgramsRoot";
|
||||||
import { InvitationsSeen } from "./Faction/ui/FactionsRoot";
|
import { InvitationsSeen } from "./Faction/ui/FactionsRoot";
|
||||||
|
import { LogBoxClearEvents } from "./ui/React/LogBoxManager";
|
||||||
|
|
||||||
const BitNode8StartingMoney = 250e6;
|
const BitNode8StartingMoney = 250e6;
|
||||||
|
|
||||||
@ -85,11 +86,12 @@ export function prestigeAugmentation(): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop a Terminal action if there is onerror
|
// Stop a Terminal action if there is one.
|
||||||
if (Terminal.action !== null) {
|
if (Terminal.action !== null) {
|
||||||
Terminal.finishAction(Router, Player, true);
|
Terminal.finishAction(Router, Player, true);
|
||||||
}
|
}
|
||||||
Terminal.clear();
|
Terminal.clear();
|
||||||
|
LogBoxClearEvents.emit();
|
||||||
|
|
||||||
// Re-initialize things - This will update any changes
|
// Re-initialize things - This will update any changes
|
||||||
initFactions(); // Factions must be initialized before augmentations
|
initFactions(); // Factions must be initialized before augmentations
|
||||||
|
@ -19,6 +19,7 @@ import { Theme } from "@mui/material";
|
|||||||
let layerCounter = 0;
|
let layerCounter = 0;
|
||||||
|
|
||||||
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
|
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
|
||||||
|
export const LogBoxClearEvents = new EventEmitter<[]>();
|
||||||
|
|
||||||
interface Log {
|
interface Log {
|
||||||
id: string;
|
id: string;
|
||||||
@ -46,6 +47,13 @@ export function LogBoxManager(): React.ReactElement {
|
|||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
useEffect(() =>
|
||||||
|
LogBoxClearEvents.subscribe(() => {
|
||||||
|
logs = [];
|
||||||
|
rerender();
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
function close(id: string): void {
|
function close(id: string): void {
|
||||||
logs = logs.filter((l) => l.id !== id);
|
logs = logs.filter((l) => l.id !== id);
|
||||||
rerender();
|
rerender();
|
||||||
|
Loading…
Reference in New Issue
Block a user