Merge pull request #1461 from danielyxie/dev

document learn js and make getServer not require sf5
This commit is contained in:
hydroflame 2021-10-11 16:18:17 -04:00 committed by GitHub
commit c460458587
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 16 deletions

16
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

@ -6,8 +6,6 @@ getServer() Netscript Function
:RAM cost: 2 GB
:param string hostname: Hostname of the server, defaults to host server.
If you are not in BitNode-5, then you must have Source-File 5-1 in order to run this function.
This function is meant to be used in conjunction with the :doc:`formulas API<../netscriptformulasapi>`.
Returns an object with the Server's stats. The object has the following properties::

@ -15,6 +15,7 @@ help you learn some basic programming concepts.
Here are some good tutorials for learning programming/JavaScript as a beginner:
* `Learn-JS <http://www.learn-js.org/en/Welcome>`_
* `programiz <https://www.programiz.com/javascript/get-started>`_
* `Speaking JavaScript <http://speakingjs.com/es5/index.html>`_
This is a bit on the longer side. You can skip all of the historical
background stuff. Recommended chapters: 1, 7-18

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -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.