isBusy() now returns true if you are in a hacking mission

This commit is contained in:
danielyxie 2019-07-13 22:44:53 -07:00 committed by danielyxie
parent 91ee65a101
commit 916ef06913
4 changed files with 17 additions and 4 deletions

@ -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.

@ -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

@ -234,6 +234,9 @@ export let CONSTANTS: IMap<any> = {
* 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

@ -2752,7 +2752,7 @@ function NetscriptFunctions(workerScript) {
return;
}
}
return Player.isWorking;
return Player.isWorking || inMission;
},
stopAction: function() {
updateDynamicRam("stopAction", getRamCost("stopAction"));