Merge pull request #1379 from danielyxie/netscript-functions-ts

all typescript
This commit is contained in:
hydroflame 2021-09-24 21:50:09 -04:00 committed by GitHub
commit 7b6f9293c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 831 additions and 549 deletions

26
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -40,14 +40,14 @@ export class WorkerScript {
/** /**
* Stores names of all functions that have logging disabled * Stores names of all functions that have logging disabled
*/ */
disableLogs: IMap<string> = {}; disableLogs: IMap<boolean> = {};
/** /**
* Used for dynamic RAM calculation. Stores names of all functions that have * Used for dynamic RAM calculation. Stores names of all functions that have
* already been checked by this script. * already been checked by this script.
* TODO: Could probably just combine this with loadedFns? * TODO: Could probably just combine this with loadedFns?
*/ */
dynamicLoadedFns: IMap<string> = {}; dynamicLoadedFns: IMap<boolean> = {};
/** /**
* Tracks dynamic RAM usage * Tracks dynamic RAM usage

@ -12,7 +12,7 @@ import { AllServers } from "../Server/AllServers";
import { compareArrays } from "../../utils/helpers/compareArrays"; import { compareArrays } from "../../utils/helpers/compareArrays";
import { roundToTwo } from "../../utils/helpers/roundToTwo"; import { roundToTwo } from "../../utils/helpers/roundToTwo";
export function killWorkerScript(runningScriptObj: RunningScript, serverIp: string, rerenderUi: boolean): boolean; export function killWorkerScript(runningScriptObj: RunningScript, serverIp: string, rerenderUi?: boolean): boolean;
export function killWorkerScript(workerScript: WorkerScript): boolean; export function killWorkerScript(workerScript: WorkerScript): boolean;
export function killWorkerScript(pid: number): boolean; export function killWorkerScript(pid: number): boolean;
export function killWorkerScript( export function killWorkerScript(

@ -1,2 +0,0 @@
import { WorkerScript } from "./Netscript/WorkerScript";
export declare function NetscriptFunctions(workerScript: WorkerScript): any;

File diff suppressed because it is too large Load Diff

@ -206,7 +206,7 @@ export interface IPlayer {
regenerateHp(amt: number): void; regenerateHp(amt: number): void;
recordMoneySource(amt: number, source: string): void; recordMoneySource(amt: number, source: string): void;
setMoney(amt: number): void; setMoney(amt: number): void;
singularityStopWork(): void; singularityStopWork(): string;
startBladeburner(p: any): void; startBladeburner(p: any): void;
startFactionWork(router: IRouter, faction: Faction): void; startFactionWork(router: IRouter, faction: Faction): void;
startClass(router: IRouter, costMult: number, expMult: number, className: string): void; startClass(router: IRouter, costMult: number, expMult: number, className: string): void;

@ -213,7 +213,7 @@ export class PlayerObject implements IPlayer {
regenerateHp: (amt: number) => void; regenerateHp: (amt: number) => void;
recordMoneySource: (amt: number, source: string) => void; recordMoneySource: (amt: number, source: string) => void;
setMoney: (amt: number) => void; setMoney: (amt: number) => void;
singularityStopWork: () => void; singularityStopWork: () => string;
startBladeburner: (p: any) => void; startBladeburner: (p: any) => void;
startFactionWork: (router: IRouter, faction: Faction) => void; startFactionWork: (router: IRouter, faction: Faction) => void;
startClass: (router: IRouter, costMult: number, expMult: number, className: string) => void; startClass: (router: IRouter, costMult: number, expMult: number, className: string) => void;