mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 16:13:49 +01:00
24 lines
880 B
ReStructuredText
24 lines
880 B
ReStructuredText
growthAnalyze() Netscript Function
|
|
==================================
|
|
|
|
.. js:function:: growthAnalyze(hostname, growthAmount)
|
|
|
|
:RAM cost: 1 GB
|
|
:param string hostname: Hostname of server to analyze.
|
|
:param number growthAmount: Multiplicative factor by which the server is
|
|
grown. Decimal form. Must be >= 1.
|
|
:returns: The amount of :doc:`grow<grow>` threads needed to grow the specified
|
|
server by the specified amount.
|
|
|
|
Example:
|
|
|
|
.. code-block:: javascript
|
|
|
|
// How many grow threads are needed to double the current money on 'foodnstuff'
|
|
growthAnalyze("foodnstuff", 2); // returns: 5124
|
|
|
|
If this returns 5124, then this means you need to call :doc:`grow<grow>`
|
|
5124 times in order to double the money (or once with 5124 threads).
|
|
|
|
**Warning**: The value returned by this function isn't necessarily a whole number.
|