Bladeburner API Improvements: Added getCurrentAction(). getSkillLevel() now fails if no argument is passed

This commit is contained in:
danielyxie
2018-07-12 00:01:52 -05:00
parent 3ffc820519
commit e97861f42b
4 changed files with 25 additions and 6 deletions
+2 -2
View File
@@ -3258,9 +3258,9 @@ function NetscriptFunctions(workerScript) {
if (workerScript.checkingRam) {
return updateStaticRam("getCurrentAction", CONSTANTS.ScriptBladeburnerApiBaseRamCost / 4);
}
updateDynamicRam("getCurrentAction", CONSTANTS.ScriptBladeburnerApiBaseRamCost / 2);
updateDynamicRam("getCurrentAction", CONSTANTS.ScriptBladeburnerApiBaseRamCost / 4);
if (Player.bladeburner instanceof Bladeburner && (Player.bitNodeN === 7 || hasBladeburner2079SF)) {
return Player.bladeburner.resetAction();
return Player.bladeburner.getTypeAndNameFromActionId(Player.bladeburner.action);
}
throw makeRuntimeRejectMsg(workerScript, "getCurrentAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");