mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
v0.44.1 Minor Update - Added Augs to Duplicate Sleeves and updated documentation
This commit is contained in:
@@ -17,72 +17,10 @@ In :ref:`netscriptjs`::
|
||||
ns.codingcontract.getDescription("foo.cct", "home");
|
||||
ns.codingcontract.attempt(1, "foo.cct", "foodnstuff");
|
||||
|
||||
attempt
|
||||
-------
|
||||
.. toctree::
|
||||
|
||||
.. js:function:: attempt(answer, fn[, hostname/ip=current ip])
|
||||
|
||||
:param answer: Solution for the contract
|
||||
:param string fn: Filename of the contract
|
||||
:param string hostname/ip: Hostname or IP of the server containing the contract.
|
||||
Optional. Defaults to current server if not provided
|
||||
|
||||
Attempts to solve the Coding Contract with the provided solution.
|
||||
|
||||
:returns: Boolean indicating whether the solution was correct
|
||||
|
||||
getContractType
|
||||
---------------
|
||||
|
||||
.. js:function:: getContractType(fn[, hostname/ip=current ip])
|
||||
|
||||
:param string fn: Filename of the contract
|
||||
:param string hostname/ip: Hostname or IP of the server containing the contract.
|
||||
Optional. Defaults to current server if not provided
|
||||
|
||||
Returns a name describing the type of problem posed by the Coding Contract.
|
||||
(e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)
|
||||
|
||||
:returns: A string with the contract's problem type
|
||||
|
||||
getDescription
|
||||
--------------
|
||||
|
||||
.. js:function:: getDescription(fn[, hostname/ip=current ip])
|
||||
|
||||
:param string fn: Filename of the contract
|
||||
:param string hostname/ip: Hostname or IP of the server containing the contract.
|
||||
Optional. Defaults to current server if not provided
|
||||
|
||||
Get the full text description for the problem posed by the Coding Contract
|
||||
|
||||
:returns: A string with the contract's text description
|
||||
|
||||
getData
|
||||
-------
|
||||
|
||||
.. js:function:: getData(fn[, hostname/ip=current ip])
|
||||
|
||||
:param string fn: Filename of the contract
|
||||
:param string hostname/ip: Hostname or IP of the server containing the contract.
|
||||
Optional. Defaults to current server if not provided
|
||||
|
||||
Get the data associated with the specific Coding Contract. Note that this is
|
||||
not the same as the contract's description. This is just the data that
|
||||
the contract wants you to act on in order to solve
|
||||
|
||||
:returns: The specified contract's data
|
||||
|
||||
getNumTriesRemaining
|
||||
--------------------
|
||||
|
||||
.. js:function:: getNumTriesRemaining(fn[, hostname/ip=current ip])
|
||||
|
||||
:param string fn: Filename of the contract
|
||||
:param string hostname/ip: Hostname or IP of the server containing the contract.
|
||||
Optional. Defaults to current server if not provided
|
||||
|
||||
Get the number of tries remaining on the contract before it
|
||||
self-destructs.
|
||||
|
||||
:returns: Number indicating how many attempts are remaining
|
||||
attempt() <codingcontractapi/attempt>
|
||||
getContractType() <codingcontractapi/getContractType>
|
||||
getDescription() <codingcontractapi/getDescription>
|
||||
getData() <codingcontractapi/getData>
|
||||
getNumTriesRemaining() <codingcontractapi/getNumTriesRemaining>
|
||||
|
||||
Reference in New Issue
Block a user