mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 14:12:27 +01:00
bugfix
This commit is contained in:
parent
de9fb24156
commit
4d80813707
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -531,6 +531,8 @@ function createAndAddWorkerScript(runningScriptObj: RunningScript, server: BaseS
|
||||
// Once the code finishes (either resolved or rejected, doesnt matter), set its
|
||||
// running status to false
|
||||
p.then(function (w: WorkerScript) {
|
||||
w.running = false;
|
||||
w.env.stopFlag = true;
|
||||
// On natural death, the earnings are transfered to the parent if it still exists.
|
||||
if (parent !== undefined) {
|
||||
if (parent.running) {
|
||||
@ -571,8 +573,6 @@ function createAndAddWorkerScript(runningScriptObj: RunningScript, server: BaseS
|
||||
w.log("", () => "Script killed");
|
||||
return; // Already killed, so stop here
|
||||
}
|
||||
w.running = false;
|
||||
w.env.stopFlag = true;
|
||||
} else if (isScriptErrorMessage(w)) {
|
||||
dialogBoxCreate("Script runtime unknown error. This is a bug please contact game developer");
|
||||
console.error(
|
||||
|
@ -52,6 +52,7 @@ export function runScript(
|
||||
}
|
||||
// Check for admin rights and that there is enough RAM availble to run
|
||||
const script = server.scripts[i];
|
||||
script.server = player.getCurrentServer().hostname;
|
||||
const ramUsage = script.ramUsage * numThreads;
|
||||
const ramAvailable = server.maxRam - server.ramUsed;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user