mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 13:43:49 +01:00
Bug fix
This commit is contained in:
parent
b33b5c1089
commit
14e6b604b4
@ -248,7 +248,7 @@ function evaluate(exp, workerScript) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (server.requiredHackingSkill > Player.hacking_skill) {
|
if (server.requiredHackingSkill > Player.hacking_skill) {
|
||||||
workerScript.scriptRef.log("Cannot hack this server (" + server.hostaname + ") because user does not have root access");
|
workerScript.scriptRef.log("Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough");
|
||||||
reject("|" + workerScript.serverIp + "|" + workerScript.name + "|Script crashed because player's hacking skill is not high enough to hack " + server.hostname);
|
reject("|" + workerScript.serverIp + "|" + workerScript.name + "|Script crashed because player's hacking skill is not high enough to hack " + server.hostname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -701,7 +701,7 @@ function evaluate(exp, workerScript) {
|
|||||||
workerScript.scriptRef.log("Cannot getServerMoneyAvailable(). Invalid IP or hostname passed in: " + ip);
|
workerScript.scriptRef.log("Cannot getServerMoneyAvailable(). Invalid IP or hostname passed in: " + ip);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
workerScript.scriptRef.log("getServerMoneyAvailable() returned " + server.moneyAvailable);
|
workerScript.scriptRef.log("getServerMoneyAvailable() returned " + formatNumber(server.moneyAvailable, 2));
|
||||||
resolve(server.moneyAvailable);
|
resolve(server.moneyAvailable);
|
||||||
}, CONSTANTS.CodeInstructionRunTime);
|
}, CONSTANTS.CodeInstructionRunTime);
|
||||||
}, function(e) {
|
}, function(e) {
|
||||||
|
@ -360,7 +360,11 @@ var Terminal = {
|
|||||||
}
|
}
|
||||||
Terminal.commandHistoryIndex = Terminal.commandHistory.length;
|
Terminal.commandHistoryIndex = Terminal.commandHistory.length;
|
||||||
|
|
||||||
|
//Only split the first space
|
||||||
var commandArray = command.split(" ");
|
var commandArray = command.split(" ");
|
||||||
|
if (commandArray.length > 1) {
|
||||||
|
commandArray = [commandArray.shift(), commandArray.join(" ")];
|
||||||
|
}
|
||||||
|
|
||||||
if (commandArray.length == 0) {return;}
|
if (commandArray.length == 0) {return;}
|
||||||
|
|
||||||
@ -484,6 +488,16 @@ var Terminal = {
|
|||||||
|
|
||||||
/* Command parser */
|
/* Command parser */
|
||||||
switch (commandArray[0]) {
|
switch (commandArray[0]) {
|
||||||
|
case "alias":
|
||||||
|
if (commandArray.length == 1) {
|
||||||
|
printAliases();
|
||||||
|
} else if (commandArray.length == 2) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
post("Incorrect usage of alias command. Usage: alias [aliasname='value'"); return;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
case "analyze":
|
case "analyze":
|
||||||
if (commandArray.length != 1) {
|
if (commandArray.length != 1) {
|
||||||
post("Incorrect usage of analyze command. Usage: analyze"); return;
|
post("Incorrect usage of analyze command. Usage: analyze"); return;
|
||||||
|
Loading…
Reference in New Issue
Block a user