split NetscriptFunctions

This commit is contained in:
Olivier Gagnon
2021-10-14 03:22:02 -04:00
parent e245c2d3a7
commit d3fc6a9d48
11 changed files with 1654 additions and 1381 deletions

View File

@@ -2654,3 +2654,10 @@ export function setMult(this: IPlayer, name: string, mult: number): void {
if (!this.hasOwnProperty(name)) return;
(this as any)[name] = mult;
}
export function sourceFileLvl(this: IPlayer, n: number): number {
for (const sf of this.sourceFiles) {
if (sf.n === n) return sf.lvl;
}
return 0;
}