add optional `--target` parameter for `main.js`. update `README.md`.
[?]
Apr 14, 2020, 8:54 PM
CJBGAILAK7G3WXYUBNUZMUMM3U5CPHWVK6ZAJWYBL4IOB5SZN32ACDependencies
- [2]
VMXI7PS4added action cap. improved scoring system. fixed parts of security and cash predictors. made lshw loopable. - [3]
2BKHJI2Sinit - [4]
3TYF4BJStarget only hackable servers. replace servers continually. - [5]
6MBUKAG6remove unneeded functions and comments. update readme.
Change contents
- replacement in lib/lib.js at line 827
const array_make_schedule = function(ns, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds) {const array_make_schedule = function(ns, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds, string_server_target_argument) { - replacement in lib/lib.js at line 833
const string_server_target = string_get_server_rooted_hackable_with_score_biggest(ns);let string_server_target = string_server_target_argument;if (string_server_target_argument === null) {string_server_target = string_get_server_rooted_hackable_with_score_biggest(ns);} - replacement in lib/lib.js at line 1004
export const void_schedule_runner = async function(ns, string_servers_bought_name, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds) {export const void_schedule_runner = async function(ns, string_servers_bought_name, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds, string_server_target) { - replacement in lib/lib.js at line 1019
const array_schedule = array_make_schedule(ns, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds);const array_schedule = array_make_schedule(ns, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds, string_server_target); - edit in bin/main.js at line 8
const array_arguments = Array.from(ns.args); - edit in bin/main.js at line 21
// targetlet string_server_target = null;// argument parsingfor (let integer_indices_0 = 0; integer_indices_0 < array_arguments.length; ++integer_indices_0) {const string_argument = array_arguments[integer_indices_0];if ((string_argument === "--target") ||(string_argument === "-t")) {string_server_target = array_arguments[integer_indices_0 + 1];}} - replacement in bin/main.js at line 41
integer_time_finishes = await void_schedule_runner(ns, string_servers_bought_name, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds) + Date.now();integer_time_finishes = await void_schedule_runner(ns, string_servers_bought_name, integer_action_cap, float_precision, float_steal_cap, float_padding_seconds, string_server_target) + Date.now(); - replacement in README.md at line 7
### `main.js` (15.70 GB)### `main.js [-t SERVER]` (15.70 GB) - edit in README.md at line 15
* Optionally, target the a named server instead of picking one by itself. - replacement in README.md at line 17
### `killall.js` (3.05 GB)### `killall.js [SCRIPT1 [SCRIPT2 ...]]` (3.05 GB) - edit in README.md at line 20
* Optionally, kill named scripts passed as arguments instead. - replacement in README.md at line 22
### `lshw.js [-s INTERVAL] <SERVER1 ...>` (2.45 GB)### `lshw.js [-s INTERVAL] <SERVER1 [SERVER2 ...]>` (2.45 GB) - edit in README.md at line 33
For scripts that don't take arguments: - edit in README.md at line 36
The above will start the main daemon script. - edit in README.md at line 38
For scripts that take arguments: - replacement in README.md at line 41
The above will cause the terminal to output up-to-date information about the "home" "foodnstuff" servers every second.The above will cause the terminal to output up-to-date information about the "home" and "foodnstuff" servers every second.```run killall.js grow.js hack.js```The above will kill all `grow.js` and `hack.js` scripts running on any servers that they are running on.