alainbryden / bitburner-scripts

My own scripts for playing bitburner
MIT License
607 stars 272 forks source link

daemon.js: Preferred server order is messed up when home has insufficient RAM to appear in the list at all #428

Closed alainbryden closed 2 weeks ago

alainbryden commented 2 weeks ago

The routine for arbitrarily executing HGW scripts on any host will either shift the home server to the front or back of the list depending on the context.

In cases though where available home ram is low, it gets filtered out of this list entirely. When this happens, our index lookup returns -1, but we nevertheless use this to splice, and end up moving the last server in the list (typically n00dles) to the front, which may or may not be the root cause of other reported bugs like #391