mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 23:38:35 +02:00
Fix bug where sometimes Active Scripts UI wouldnt fully update after an Augmentation reset. This most likely happened because the player has too many scripts running, and they all get added to task queue to get deleted
This commit is contained in:
@@ -182,10 +182,10 @@ function deleteActiveScriptsItem(workerscript) {
|
||||
}
|
||||
|
||||
//Update the ActiveScriptsItems array
|
||||
function updateActiveScriptsItems() {
|
||||
function updateActiveScriptsItems(maxTasks=100) {
|
||||
//Run tasks that need to be done sequentially (adding items, creating/deleting server panels)
|
||||
//We'll limit this to 50 at a time in case someone decides to start a bunch of scripts all at once...
|
||||
let numTasks = Math.min(100, ActiveScriptsTasks.length);
|
||||
let numTasks = Math.min(maxTasks, ActiveScriptsTasks.length);
|
||||
for (let i = 0; i < numTasks; ++i) {
|
||||
let task = ActiveScriptsTasks.shift();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user