mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 19:37:07 +02:00
This reverts commit 92b8b58588.
Accidental merge on my part - the code is in decent shape, but isn't meant to go in for 3.0.
This commit is contained in:
@@ -19,10 +19,6 @@ import { ScriptKey, scriptKey } from "../utils/helpers/scriptKey";
|
||||
|
||||
import type { LogBoxProperties } from "../ui/React/LogBoxManager";
|
||||
|
||||
import { StdIO } from "../Terminal/StdIO/StdIO";
|
||||
import { IOStream } from "../Terminal/StdIO/IOStream";
|
||||
import { getTerminalStdIO } from "../Terminal/StdIO/RedirectIO";
|
||||
|
||||
export class RunningScript {
|
||||
// Script arguments
|
||||
args: ScriptArg[] = [];
|
||||
@@ -74,17 +70,9 @@ export class RunningScript {
|
||||
// Cached key for ByArgs lookups. Will be overwritten by a correct ScriptKey in fromJSON or constructor
|
||||
scriptKey = "" as ScriptKey;
|
||||
|
||||
stdin: IOStream | null = null;
|
||||
|
||||
// Access to properties of the tail window. Can be used to get/set size, position, etc.
|
||||
tailProps = null as LogBoxProperties | null;
|
||||
|
||||
// Configuration for piping the script's tail output
|
||||
tailStdOut: StdIO | null = null;
|
||||
|
||||
// Configuration for piping the script's terminal output
|
||||
terminalStdOut: StdIO = getTerminalStdIO(null);
|
||||
|
||||
// The title, as shown in the script's log box. Defaults to the name + args,
|
||||
// but can be changed by the user. If it is set to a React element (only by the user),
|
||||
// that will not be persisted, and will be restored to default on load.
|
||||
@@ -123,16 +111,14 @@ export class RunningScript {
|
||||
|
||||
this.logs.push(logEntry);
|
||||
this.logUpd = true;
|
||||
|
||||
this.tailStdOut?.write?.(logEntry);
|
||||
}
|
||||
|
||||
displayLog(stdIO: StdIO): void {
|
||||
displayLog(): void {
|
||||
for (const log of this.logs) {
|
||||
if (typeof log === "string") {
|
||||
Terminal.print(log, stdIO);
|
||||
Terminal.print(log);
|
||||
} else {
|
||||
Terminal.printRaw(log, stdIO);
|
||||
Terminal.printRaw(log);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user