Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISC: Always add script's earnings to its parent #1754

Conversation

catloversg
Copy link
Contributor

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);
  }
}

@d0sboots d0sboots merged commit e3c10e9 into bitburner-official:dev Nov 7, 2024
5 checks passed
@catloversg catloversg deleted the pull-request/misc/always-add-script's-earnings-to-its-parent branch November 7, 2024 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants