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)); ctx.workerScript.print(wrapUserNode(value));
}, },
flags: Flags, flags: Flags,
heart: { break: () => () => Player.karma },
...NetscriptExtra(), ...NetscriptExtra(),
}; };

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