NETSCRIPT: Add undocumented function printRaw() (#277)

This is analagous to tprintRaw (enabled by ns.iKnowWhatImDoing()), but
for logs instead of the terminal. This provides a supported* method of
creating complicated UIs for scripts.

*No actual support, expressed or implied, is provided for use of this
function.
This commit is contained in:
David Walker
2023-01-05 17:30:34 -08:00
committed by GitHub
parent c42fde9379
commit 7b5080a42b
7 changed files with 23 additions and 11 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
* Instead, whenever the game is opened, WorkerScripts are re-created from
* RunningScript objects
*/
import type React from "react";
import { Environment } from "./Environment";
import { RamCostConstants } from "./RamCostGenerator";
@@ -180,7 +181,7 @@ export class WorkerScript {
}
}
print(txt: string): void {
print(txt: React.ReactNode): void {
this.scriptRef.log(txt);
}
}