Currently, we only add the script's earnings to its parent script if the script quits "gracefully". This PR changes that behavior. Now we always do that.
MRE:
hack.js
/** @param {NS} ns */
export async function main(ns) {
await ns.hack("n00dles");
throw new Error("error");
}
test.js
/** @param {NS} ns */
export async function main(ns) {
ns.tail();
while (true) {
ns.exec("hack.js", "home");
await ns.sleep(1000);
}
}
Currently, we only add the script's earnings to its parent script if the script quits "gracefully". This PR changes that behavior. Now we always do that.
MRE: hack.js
test.js