NC66CZ5JPP3RPFCWAJE2ZBPFLA5ILKBNGTQLXDCRIUTIEWE74R4AC // main.js - 9.1GB - TODO: Separate logic that requires source files so that they are only ran when you have the required source file - need a cheap way to check if you have source file? Maybe make a cache script that saves runtime constants like max money of servers to a cache file to potentially reduce RAM usage further. Maybe add functionality that allows on-the-fly hot loading of settings from a file.
// main.js - 8.7GB - TODO: Separate logic that requires source files so that they are only ran when you have the required source file - need a cheap way to check if you have source file? Maybe make a cache script that saves runtime constants like max money of servers to a cache file to potentially reduce RAM usage further. Maybe add functionality that allows on-the-fly hot loading of settings from a file.
const integer_threads_available = Math.trunc(float_server_used_ram_free / object_get_constants(ns).object_scripts.weaken.ram);
const integer_threads_available = Math.trunc(float_server_used_ram_free / object_get_constants(ns).object_scripts.object_weaken_script.ram);
const integer_threads_available = Math.trunc(float_server_used_ram_free / object_get_constants(ns).object_scripts.grow.ram);
const integer_threads_available = Math.trunc(float_server_used_ram_free / object_get_constants(ns).object_scripts.object_grow_script.ram);
const integer_threads_available = Math.trunc(float_server_used_ram_free / object_get_constants(ns).object_scripts.hack.ram);
const integer_threads_available = Math.trunc(float_server_used_ram_free / object_get_constants(ns).object_scripts.object_hack_script.ram);
const float_ram_required = (integer_threads_required_for_weaken_minimum_security_after_hack * object_scripts.weaken.ram) + (integer_threads_required_for_cash_grow_after_percentage_stolen * object_scripts.grow.ram) + (integer_threads_required_for_weaken_minimum_security_after_grow * object_scripts.weaken.ram);
const float_ram_required = (integer_threads_required_for_weaken_minimum_security_after_hack * object_scripts.object_weaken_script.ram) + (integer_threads_required_for_cash_grow_after_percentage_stolen * object_scripts.object_grow_script.ram) + (integer_threads_required_for_weaken_minimum_security_after_grow * object_scripts.object_weaken_script.ram);