mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 04:35:46 +01:00
add hoop before exposing
This commit is contained in:
parent
7d07f44b3e
commit
41b6f0b87b
@ -546,6 +546,7 @@ export const RamCosts: RamCostTree<Omit<NSFull, "args" | "enums">> = {
|
||||
// Easter egg function
|
||||
break: 0,
|
||||
},
|
||||
iKnowWhatImDoing: 0,
|
||||
|
||||
formulas: {
|
||||
mockServer: 0,
|
||||
|
@ -4,6 +4,7 @@ import * as bcrypt from "bcryptjs";
|
||||
import { Apr1Events as devMenu } from "../ui/Apr1";
|
||||
import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
|
||||
import { helpers } from "../Netscript/NetscriptHelpers";
|
||||
import { Terminal } from "../Terminal";
|
||||
|
||||
export interface INetscriptExtra {
|
||||
heart: {
|
||||
@ -14,6 +15,7 @@ export interface INetscriptExtra {
|
||||
bypass(doc: Document): void;
|
||||
alterReality(): void;
|
||||
rainbow(guess: string): void;
|
||||
iKnowWhatImDoing(): void;
|
||||
}
|
||||
|
||||
export function NetscriptExtra(): InternalAPI<INetscriptExtra> {
|
||||
@ -75,5 +77,10 @@ export function NetscriptExtra(): InternalAPI<INetscriptExtra> {
|
||||
}
|
||||
return tryGuess();
|
||||
},
|
||||
iKnowWhatImDoing: (ctx) => () => {
|
||||
helpers.log(ctx, () => "Unlocking unsupported feature: window.tprintRaw");
|
||||
// @ts-ignore window has no tprintRaw property defined
|
||||
window.tprintRaw = Terminal.printRaw.bind(Terminal);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -1,9 +1,2 @@
|
||||
import { Terminal as TTerminal } from "./Terminal/Terminal";
|
||||
import { ReactNode } from "react";
|
||||
declare global {
|
||||
interface Window {
|
||||
tprintRaw: (node: ReactNode) => void;
|
||||
}
|
||||
}
|
||||
export const Terminal = new TTerminal();
|
||||
window["tprintRaw"] = Terminal.printRaw.bind(Terminal);
|
||||
|
Loading…
Reference in New Issue
Block a user