Merge pull request #1422 from danielyxie/dev

fix bug with hacknet servers and grow
This commit is contained in:
hydroflame 2021-10-05 15:23:44 -04:00 committed by GitHub
commit 3891d0fae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -836,9 +836,8 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
}
const host = getServer(workerScript.serverIp);
if (!(host instanceof Server)) {
workerScript.log("grow", "Cannot be executed on this server.");
return false;
if (host === null) {
throw new Error("Workerscript host is null");
}
// No root access or skill level too low