Move heart.break out of Extra.ts (#1133)

This commit is contained in:
Snarling 2024-03-04 18:36:14 -05:00 committed by GitHub
parent d801743842
commit 4f4c6fe7e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 6 deletions

@ -1763,6 +1763,7 @@ export const ns: InternalAPI<NSFull> = {
ctx.workerScript.print(wrapUserNode(value));
},
flags: Flags,
heart: { break: () => () => Player.karma },
...NetscriptExtra(),
};

@ -7,9 +7,6 @@ import { helpers } from "../Netscript/NetscriptHelpers";
import { RamCostConstants } from "../Netscript/RamCostGenerator";
export interface INetscriptExtra {
heart: {
break(): number;
};
openDevMenu(): void;
exploit(): void;
bypass(doc: Document): void;
@ -19,9 +16,6 @@ export interface INetscriptExtra {
export function NetscriptExtra(): InternalAPI<INetscriptExtra> {
return {
heart: {
break: () => () => Player.karma,
},
openDevMenu: () => () => devMenu.emit(),
exploit: () => () => Player.giveExploit(Exploit.UndocumentedFunctionCall),
bypass: (ctx) => (doc) => {