Fix issue with 'Object.prototye' functions throwing errors during NetscriptJS RAM calculation. Fixed type with new Travel Confirmation setting loading to the correct initial value. Fixed Competition/Demand display for Products. Changed RAM for window/document access to be 100

This commit is contained in:
danielyxie
2018-06-14 14:51:06 -05:00
parent ec862ec747
commit 8620a4d30c
22 changed files with 739 additions and 623 deletions

View File

@@ -387,6 +387,34 @@ ls
Returns an array with the filenames of all files on the specified server (as strings). The returned array
is sorted in alphabetic order
ps
^^
.. js:function:: ps(hostname/ip=current ip)
:param string ip: Hostname or IP address of the target server.
If not specified, it will be the current server's IP by default
Returns an array with general information about all scripts running on the specified
target server. The information for each server is given in an object with
the following structure::
{
filename: Script name,
threads: Number of threads script is running with,
args: Script's arguments
}
Example usage (using :doc:`netscriptjs`)::
export async function main(ns) {
const ps = ns.ps("home");
for (const i in ps) {
ns.tprint(ps[i].filename + ' ' + ps[i].threads);
ns.tprint(ps[i].args);
}
}
hasRootAccess
^^^^^^^^^^^^^