Added getServerMaxRam and getServerUsedRam, deprecated getServerRam

This commit is contained in:
Olivier Gagnon
2021-05-03 01:07:46 -04:00
parent 9951c8b18f
commit 4d9439a007
8 changed files with 75 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
getServerMaxRam() Netscript Function
====================================
.. js:function:: getServerMaxRam(hostname)
:RAM cost: 0.05 GB
:param string hostname: Hostname of target server.
:returns: Total ram available on that server. In GB.
Example:
.. code-block:: javascript
maxRam = getServerMaxRam("helios"); // returns: 16
print("helios has "+maxRam + "GB");