mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 00:32:51 +02:00
MISC: move server constants into their own constant (#1075)
This commit is contained in:
@@ -10,6 +10,7 @@ import { workerScripts } from "../Netscript/WorkerScripts";
|
||||
import { scriptKey } from "../utils/helpers/scriptKey";
|
||||
|
||||
import type { ScriptFilePath } from "../Paths/ScriptFilePath";
|
||||
import { ServerConstants } from "../Server/data/Constants";
|
||||
|
||||
export function scriptCalculateOfflineProduction(runningScript: RunningScript): void {
|
||||
//The Player object stores the last update time from when we were online
|
||||
@@ -83,7 +84,7 @@ export function scriptCalculateOfflineProduction(runningScript: RunningScript):
|
||||
);
|
||||
runningScript.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);
|
||||
const coreBonus = 1 + (host.cpuCores - 1) / 16;
|
||||
serv.weaken(CONSTANTS.ServerWeakenAmount * timesWeakened * coreBonus);
|
||||
serv.weaken(ServerConstants.ServerWeakenAmount * timesWeakened * coreBonus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user