Move entire ns object to top-level

This commit is contained in:
Snarling
2022-08-09 15:41:47 -04:00
parent 589b9df2a7
commit 931ea730a5
18 changed files with 2169 additions and 2110 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { IPlayer } from "../PersonObjects/IPlayer";
import { Player as player } from "../Player";
import { calculateServerGrowth } from "../Server/formulas/grow";
import {
calculateMoneyGainRate,
@@ -44,7 +44,7 @@ import { repFromDonation } from "../Faction/formulas/donation";
import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
import { helpers } from "../Netscript/NetscriptHelpers";
export function NetscriptFormulas(player: IPlayer): InternalAPI<IFormulas> {
export function NetscriptFormulas(): InternalAPI<IFormulas> {
const checkFormulasAccess = function (ctx: NetscriptContext): void {
if (!player.hasProgram(Programs.Formulas.name)) {
throw helpers.makeRuntimeErrorMsg(ctx, `Requires Formulas.exe to run.`);