floor thread count

This commit is contained in:
Olivier Gagnon 2021-12-29 02:51:41 -05:00
parent 04f2cfe522
commit 383e56e9c8

@ -610,7 +610,7 @@ export function updateOnlineScriptTimes(numCycles = 1): void {
export function loadAllRunningScripts(): void {
const skipScriptLoad = window.location.href.toLowerCase().indexOf("?noscripts") !== -1;
if (skipScriptLoad) {
Terminal.warn('Skipped loading player scripts during startup');
Terminal.warn("Skipped loading player scripts during startup");
console.info("Skipping the load of any scripts during startup");
}
for (const server of GetAllServers()) {
@ -687,7 +687,7 @@ export function runScriptFromScript(
// Check for admin rights and that there is enough RAM availble to run
const script = server.scripts[i];
let ramUsage = script.ramUsage;
threads = Math.round(Number(threads));
threads = Math.floor(Number(threads));
if (threads === 0) {
return 0;
}