Fixed new Netscript1 Interpreter to work for functions returning Arrays/Objets. Untested. Also still needs new Hacknet Node implementation

This commit is contained in:
danielyxie
2018-07-10 23:41:26 -05:00
parent dcd6292ed2
commit 3ffc820519
7 changed files with 7294 additions and 4162 deletions
+11
View File
@@ -3254,6 +3254,17 @@ function NetscriptFunctions(workerScript) {
throw makeRuntimeRejectMsg(workerScript, "stopBladeburnerAction() 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");
},
getCurrentAction : function() {
if (workerScript.checkingRam) {
return updateStaticRam("getCurrentAction", CONSTANTS.ScriptBladeburnerApiBaseRamCost / 4);
}
updateDynamicRam("getCurrentAction", CONSTANTS.ScriptBladeburnerApiBaseRamCost / 2);
if (Player.bladeburner instanceof Bladeburner && (Player.bitNodeN === 7 || hasBladeburner2079SF)) {
return Player.bladeburner.resetAction();
}
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");
},
getActionTime : function(type="", name="") {
if (workerScript.checkingRam) {
return updateStaticRam("getActionTime", CONSTANTS.ScriptBladeburnerApiBaseRamCost);