mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 05:05:47 +01:00
move to global scope
This commit is contained in:
parent
84b99c569a
commit
7d07f44b3e
@ -546,7 +546,6 @@ export const RamCosts: RamCostTree<Omit<NSFull, "args" | "enums">> = {
|
|||||||
// Easter egg function
|
// Easter egg function
|
||||||
break: 0,
|
break: 0,
|
||||||
},
|
},
|
||||||
printRaw: 0,
|
|
||||||
|
|
||||||
formulas: {
|
formulas: {
|
||||||
mockServer: 0,
|
mockServer: 0,
|
||||||
|
@ -4,8 +4,6 @@ import * as bcrypt from "bcryptjs";
|
|||||||
import { Apr1Events as devMenu } from "../ui/Apr1";
|
import { Apr1Events as devMenu } from "../ui/Apr1";
|
||||||
import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
|
import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
|
||||||
import { helpers } from "../Netscript/NetscriptHelpers";
|
import { helpers } from "../Netscript/NetscriptHelpers";
|
||||||
import { ReactNode } from "react";
|
|
||||||
import { Terminal } from "../Terminal";
|
|
||||||
|
|
||||||
export interface INetscriptExtra {
|
export interface INetscriptExtra {
|
||||||
heart: {
|
heart: {
|
||||||
@ -16,7 +14,6 @@ export interface INetscriptExtra {
|
|||||||
bypass(doc: Document): void;
|
bypass(doc: Document): void;
|
||||||
alterReality(): void;
|
alterReality(): void;
|
||||||
rainbow(guess: string): void;
|
rainbow(guess: string): void;
|
||||||
printRaw(node: ReactNode): void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function NetscriptExtra(): InternalAPI<INetscriptExtra> {
|
export function NetscriptExtra(): InternalAPI<INetscriptExtra> {
|
||||||
@ -78,9 +75,5 @@ export function NetscriptExtra(): InternalAPI<INetscriptExtra> {
|
|||||||
}
|
}
|
||||||
return tryGuess();
|
return tryGuess();
|
||||||
},
|
},
|
||||||
printRaw: () => (node: unknown) => {
|
|
||||||
// Just wraps the internal function to allow player use - players can use at own risk
|
|
||||||
Terminal.printRaw(node as ReactNode);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
import { Terminal as TTerminal } from "./Terminal/Terminal";
|
import { Terminal as TTerminal } from "./Terminal/Terminal";
|
||||||
|
import { ReactNode } from "react";
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
tprintRaw: (node: ReactNode) => void;
|
||||||
|
}
|
||||||
|
}
|
||||||
export const Terminal = new TTerminal();
|
export const Terminal = new TTerminal();
|
||||||
|
window["tprintRaw"] = Terminal.printRaw.bind(Terminal);
|
||||||
|
Loading…
Reference in New Issue
Block a user