MISC: move server constants into their own constant (#1075)

This commit is contained in:
Caldwell
2024-02-10 10:13:42 +01:00
committed by GitHub
parent fd5b0f8241
commit 4d551915b3
13 changed files with 56 additions and 48 deletions
+2 -1
View File
@@ -38,6 +38,7 @@ import { Engine } from "../engine";
import { resolveFilePath, FilePath } from "../Paths/FilePath";
import { hasScriptExtension, ScriptFilePath } from "../Paths/ScriptFilePath";
import { CustomBoundary } from "../ui/Components/CustomBoundary";
import { ServerConstants } from "../Server/data/Constants";
export const helpers = {
string,
@@ -540,7 +541,7 @@ function hack(ctx: NetscriptContext, hostname: string, manual: boolean, opts: un
expGainedOnSuccess,
)} exp (t=${formatThreads(threads)})`,
);
server.fortify(CONSTANTS.ServerFortifyAmount * Math.min(threads, maxThreadNeeded));
server.fortify(ServerConstants.ServerFortifyAmount * Math.min(threads, maxThreadNeeded));
if (stock) {
influenceStockThroughServerHack(server, moneyDrained);
}