document learn js and make getServer not require sf5

This commit is contained in:
Olivier Gagnon
2021-10-11 16:18:05 -04:00
parent 010f43e5d4
commit dd61fd6efb
6 changed files with 12 additions and 16 deletions
-3
View File
@@ -1579,9 +1579,6 @@ function NetscriptFunctions(workerScript: WorkerScript): NS {
},
getServer: function (ip: any): any {
updateDynamicRam("getServer", getRamCost("getServer"));
if (SourceFileFlags[5] <= 0 && Player.bitNodeN !== 5) {
throw makeRuntimeErrorMsg("getServer", "Requires Source-File 5 to run.");
}
const server = safeGetServer(ip, "getServer");
const copy = Object.assign({}, server);
// These fields should be hidden.