make worker scripts and worker script executor time-aware.
[?]
Apr 28, 2020, 1:07 AM
MKHG4OQBVXNOJFRUKKI2KN7VXJHXDWZUUYKGF22TKTBYEUEFCC5ACDependencies
- [2]
DJDWBCCQadd missing "nop.js". killall.js: rename to kill.js. add `--script` and `--server` options. - [3]
HSNSECD5all: refactor. main.js: fix call to `void_kill_script_named_server_named`. - [4]
NQ22FUSWadd more options to `main.js`. update `README.md`. - [5]
2BKHJI2Sinit - [6]
3NFCZ6IPfixed the ram utilisation logic. added flags to `main.js` that can prevent the execution of helpers. - [7]
6MBUKAG6remove unneeded functions and comments. update readme. - [8]
CJBGAILAadd optional `--target` parameter for `main.js`. update `README.md`. - [9]
4ACCU75Nimprove and refactor scheduling logic. - [10]
SLSWBNYTadded ram utilisation logic to `ram.js` and `servers.js`. split and refactored redundant code into separate library files. - [11]
AXGQ7FMLsplit and refactor hacking logic to "hacker.js" and argument parsing and script execution logic to "main.js". update "README.md".
Change contents
- replacement in sbin/weaken.js at line 2
await ns.sleep(ns.args[2]), await ns.weaken(ns.args[1]);await ns.sleep(Date.now() + ns.args[2]), await ns.weaken(ns.args[1]); - replacement in sbin/hack.js at line 2
await ns.sleep(ns.args[2]), await ns.hack(ns.args[1]);await ns.sleep(Date.now() + ns.args[2]), await ns.hack(ns.args[1]); - replacement in sbin/grow.js at line 2
await ns.sleep(ns.args[2]), await ns.grow(ns.args[1]);await ns.sleep(Date.now() + ns.args[2]), await ns.grow(ns.args[1]); - replacement in bin/main.js at line 40
// maximum amount of jobs to spawn per cycle, used to prevent using up too much IRL RAMlet integer_job_cap = 1000;// maximum amount of jobs to execute per schedule, used to prevent using up too much IRL RAMlet integer_job_cap = 2000; - replacement in bin/main.js at line 43
let float_padding_seconds = 1;let float_padding_seconds = 0.5; - replacement in bin/main.js at line 52
// ram utilisiation threshold. upgrade ram when reached.// ram utilisiation threshold. upgrade ram or buy or replace servers when reached. - replacement in README.md at line 34
* SECONDS = The duration of delay between each job, in seconds. Should be a floating-point number > 0. Defaults to 0.4.* SECONDS = The duration of delay between each job, in seconds. Should be a floating-point number > 0. Defaults to 0.5. - replacement in README.md at line 42
* CAP = The maximum amount of jobs to start per cycle. Should be an integer > 0. Defaults to 2000.* CAP = The maximum amount of jobs to execute per schedule. Should be an integer > 0. Defaults to 2000. - replacement in README.md at line 58
* CAP = The maximum amount fraction of cash to steal from the target server per `hack` job. Should be an integer >= 0 <=1. Defaults to 0.96.* CAP = The maximum amount fraction of cash to steal from the target server per `hack` job. Should be an integer >= 0 <=1. Defaults to 0.9.