mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +01:00
Merge pull request #423 from Kline-/fix-getActionTime
Fix bladeburner.getActionTime returning null
This commit is contained in:
commit
72bd1f22c5
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user