more work on wrapping formulas

This commit is contained in:
Olivier Gagnon
2022-05-24 17:51:48 -04:00
parent 324f752d8a
commit 0da2e74d12
4 changed files with 53 additions and 7 deletions
+1 -5
View File
@@ -41,11 +41,7 @@ import { favorToRep as calculateFavorToRep, repToFavor as calculateRepToFavor }
import { repFromDonation } from "../Faction/formulas/donation";
import { InternalAPI, NetscriptContext } from "../Netscript/APIWrapper";
export function NetscriptFormulas(
player: IPlayer,
workerScript: WorkerScript,
helper: INetscriptHelper,
): InternalAPI<IFormulas> {
export function NetscriptFormulas(player: IPlayer, helper: INetscriptHelper): InternalAPI<IFormulas> {
const checkFormulasAccess = function (ctx: NetscriptContext): void {
if (!player.hasProgram(Programs.Formulas.name)) {
throw helper.makeRuntimeErrorMsg(`formulas.${ctx.function}`, `Requires Formulas.exe to run.`);