GO: Various changes before 2.6.0 (#1120)

This commit is contained in:
Snarling
2024-02-26 08:05:10 -05:00
committed by GitHub
parent f6871f0911
commit 373ced2efe
62 changed files with 1626 additions and 2135 deletions
+2 -2
View File
@@ -63,7 +63,7 @@ import { findCrime } from "../Crime/CrimeHelpers";
export function NetscriptFormulas(): InternalAPI<IFormulas> {
const checkFormulasAccess = function (ctx: NetscriptContext): void {
if (!player.hasProgram(CompletedProgramName.formulas)) {
throw helpers.makeRuntimeErrorMsg(ctx, `Requires Formulas.exe to run.`);
throw helpers.errorMessage(ctx, `Requires Formulas.exe to run.`);
}
};
const formulasFunctions: InternalAPI<IFormulas> = {
@@ -316,7 +316,7 @@ export function NetscriptFormulas(): InternalAPI<IFormulas> {
checkFormulasAccess(ctx);
const upg = player.hashManager.getUpgrade(upgName);
if (!upg) {
throw helpers.makeRuntimeErrorMsg(ctx, `Invalid Hash Upgrade: ${upgName}`);
throw helpers.errorMessage(ctx, `Invalid Hash Upgrade: ${upgName}`);
}
return upg.getCost(level);
},