diff --git a/doc/source/netscript/singularityfunctions/installAugmentations.rst b/doc/source/netscript/singularityfunctions/installAugmentations.rst index 38a862674..0064844ba 100644 --- a/doc/source/netscript/singularityfunctions/installAugmentations.rst +++ b/doc/source/netscript/singularityfunctions/installAugmentations.rst @@ -11,4 +11,7 @@ installAugmentations() Netscript Function This function will automatically install your Augmentations, resetting the game as usual. - It will return true if successful, and false otherwise. + This function will return false if it was not able to install Augmentations. + + If this function successfully installs Augmentations, then it has no return value because + all scripts are immediately terminated. diff --git a/doc/source/netscript/singularityfunctions/isBusy.rst b/doc/source/netscript/singularityfunctions/isBusy.rst index 1bccaa2fe..87d509a7f 100644 --- a/doc/source/netscript/singularityfunctions/isBusy.rst +++ b/doc/source/netscript/singularityfunctions/isBusy.rst @@ -5,5 +5,12 @@ isBusy() Netscript Function If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function. - Returns a boolean indicating whether or not the player is currently performing an 'action'. These actions include - working for a company/faction, studying at a univeristy, working out at a gym, creating a program, or committing a crime. + Returns a boolean indicating whether or not the player is currently performing an 'action'. + These actions include: + + * Working for a company/faction + * Studying at a univeristy + * Working out at a gym + * Creating a program + * Committing a crime + * Carrying out a Hacking Mission diff --git a/src/Constants.ts b/src/Constants.ts index c6730a8b7..bcf91e0a8 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -234,6 +234,9 @@ export let CONSTANTS: IMap = { * run() and exec() now return the PID of the newly-executed scripts, rather than a boolean ** (A PID is just a positive integer) * run(), exec(), and spawn() no longer need to be await-ed in NetscriptJS + * Script parsing and RAM calculations now support ES9 + * installAugmentations() no longer has a return value since it causes all scripts to die + * isBusy() now returns true if you are in a Hacking Mission * Bug fix: workForFaction() function now properly accounts for disabled logs * Bug fix: RAM should now be properly calculated when running a callback script with installAugmentations() * Bug fix: Fixed bug that caused scripts killed by exit()/spawn() to "clean up" twice diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 8641a2f8a..239dade64 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -2752,7 +2752,7 @@ function NetscriptFunctions(workerScript) { return; } } - return Player.isWorking; + return Player.isWorking || inMission; }, stopAction: function() { updateDynamicRam("stopAction", getRamCost("stopAction"));