mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 20:55:44 +01:00
getScriptRam now optionally take hostname/ip or default to localhost
This commit is contained in:
parent
8dba456b65
commit
577f73dce7
@ -782,10 +782,10 @@ scriptKill
|
||||
getScriptRam
|
||||
^^^^^^^^^^^^
|
||||
|
||||
.. js:function:: getScriptRam(scriptname, hostname/ip)
|
||||
.. js:function:: getScriptRam(scriptname[, hostname/ip])
|
||||
|
||||
:param string scriptname: Filename of script. This is case-sensitive.
|
||||
:param string hostname/ip: Hostname or IP of target server
|
||||
:param string hostname/ip: Hostname or IP of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.
|
||||
|
||||
Returns the amount of RAM required to run the specified script on the target server
|
||||
|
||||
|
@ -1994,7 +1994,7 @@ function NetscriptFunctions(workerScript) {
|
||||
}
|
||||
return suc;
|
||||
},
|
||||
getScriptRam : function (scriptname, ip) {
|
||||
getScriptRam : function (scriptname, ip=workerScript.serverIp) {
|
||||
if (workerScript.checkingRam) {
|
||||
if (workerScript.loadedFns.getScriptRam) {
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user