hacker.js: minor refactor.
[?]
May 17, 2020, 10:53 AM
U2SGR33GHWKKY4LEVFP3GYLFOSX7NAJN7HIKW4SDNY6G2JVX42SACDependencies
- [2]
OCNYDSXAhacker.js: fix sleep time. - [3]
JS52JD4Qweaken_manager.js: add. lib_server_used.js: move to lib_ram_script. lib_ps: delete. main.js, hacker.js, lib_ram_script.js: refactor. README.md: update. - [4]
2BKHJI2Sinit
Change contents
- edit in sbin/hacker.js at line 960
// makes and runs a schedule, returns the the time it'll take to finish in milliseconds. - edit in sbin/hacker.js at line 962
// makes and runs a schedule, returns the the time it'll take to finish in milliseconds. - edit in sbin/hacker.js at line 993
// makes and runs a schedule, sleeps for the length of the sum of the paddings of the previous schedule, repeats. - replacement in sbin/hacker.js at line 995
// makes and runs a schedule, sleeps for the length of the sum of the paddings of the previous schedule, repeats.const void_runner_loop = async function (ns,integer_job_cap,float_precision,float_steal_cap,float_padding_seconds,string_server_target) {const integer_time_start = Date.now();return ((array_schedule = array_make_schedule_hacking(ns,integer_job_cap,float_precision,float_steal_cap,float_padding_seconds,string_server_target)),array_schedule.length > 0? void_schedule_hacking_runner(ns, array_schedule): await ns.sleep(1e3 * float_padding_seconds),integer_time_start);}; - edit in sbin/hacker.js at line 1021
integer_time_start, - replacement in sbin/hacker.js at line 1023
string_server_target = string_server_target_argument,integer_time_start;for (string_server_target = string_server_target_argument;for (;;) - replacement in sbin/hacker.js at line 1026[3.33672]→[3.33672:33956](∅→∅),[3.33956]→[2.11:50](∅→∅),[2.50]→[3.33956:34009](∅→∅),[3.33956]→[3.33956:34009](∅→∅)
(string_server_target = string_get_server_hackable_by_score_position(ns,1,string_method_score_correction,float_multiplier_factor_skill,float_multiplier_factor_max_cash,float_multiplier_factor_growth));;)integer_time_start = Date.now(),d.string_server_target = string_server_target,(string_server_target = string_get_server_hackable_by_score_position(ns,1,string_method_score_correction,float_multiplier_factor_skill,float_multiplier_factor_max_cash,float_multiplier_factor_growth)),// tell cyclic_weaken.js what to target(d.string_server_target = string_server_target), - replacement in sbin/hacker.js at line 1037
? ((array_schedule = array_make_schedule_hacking(? (integer_time_start = await void_runner_loop( - replacement in sbin/hacker.js at line 1044
)),array_schedule.length > 0? void_schedule_hacking_runner(ns, array_schedule): await ns.sleep(1e3 * float_padding_seconds)): (await ns.sleep((array_schedule.length * float_padding_seconds * 1e3) - integer_time_start + Date.now()),(array_schedule = array_make_schedule_hacking()): (await ns.sleep(array_schedule.length * float_padding_seconds * 1e3 -integer_time_start +Date.now()),(integer_time_start = await void_runner_loop( - replacement in sbin/hacker.js at line 1057
)),array_schedule.length > 0? void_schedule_hacking_runner(ns, array_schedule): await ns.sleep(1e3 * float_padding_seconds));)));