Fix bladeburner.getActionTime returning null

This commit is contained in:
Matthew Goff 2018-08-04 16:52:45 -05:00
parent 7e311d0592
commit 9b099fcee9
No known key found for this signature in database
GPG Key ID: F92E45177D6E8F2E

@ -3424,12 +3424,7 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getCurrentAction", CONSTANTS.ScriptBladeburnerApiBaseRamCost / 4);
if (Player.bladeburner instanceof Bladeburner && (Player.bitNodeN === 7 || hasBladeburner2079SF)) {
let res = Player.bladeburner.getTypeAndNameFromActionId(Player.bladeburner.action);
if (res.type === "Idle" && res.name === "Idle") {
return null;
} else {
return res;
}
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");