Merge pull request #1449 from danielyxie/dev

fix ram miscalc
This commit is contained in:
hydroflame 2021-10-09 15:08:02 -04:00 committed by GitHub
commit c82fa9dc38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -101,7 +101,7 @@ function removeWorkerScript(workerScript: WorkerScript, rerenderUi = true): void
// Recalculate ram used on that server
server.ramUsed = 0;
for (const rs of server.runningScripts) server.ramUsed += rs.ramUsage;
for (const rs of server.runningScripts) server.ramUsed += rs.ramUsage * rs.threads;
// Delete script from global pool (workerScripts)
const res = workerScripts.delete(workerScript.pid);

@ -489,7 +489,7 @@ export class Sleeve extends Person {
cyclesUsed = 0;
}
}
console.log(cyclesUsed);
this.currentTaskTime += time;
// Shock gradually goes towards 100