mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-20 14:43:48 +01:00
Updated documentation
This commit is contained in:
parent
3213032427
commit
30b9624e1f
11
dist/engine.bundle.js
vendored
11
dist/engine.bundle.js
vendored
@ -3106,7 +3106,7 @@ let CONSTANTS = {
|
||||
|
||||
//Infiltration constants
|
||||
InfiltrationBribeBaseAmount: 100e3, //Amount per clearance level
|
||||
InfiltrationMoneyValue: 3e3, //Convert "secret" value to money
|
||||
InfiltrationMoneyValue: 5e3, //Convert "secret" value to money
|
||||
InfiltrationRepValue: 1.4, //Convert "secret" value to faction reputation
|
||||
|
||||
//Stock market constants
|
||||
@ -3502,9 +3502,10 @@ let CONSTANTS = {
|
||||
"* Bug Fix: Crime Success rates were being calculated incorrectly (by Github user hydroflame)<br>" +
|
||||
"* When an Infiltration is finished, you will now return back to the company's page, rather than the city<br>" +
|
||||
"* Infiltration faction reputation selector now remembers your last choice<br>" +
|
||||
"* Significantly increased the amount of money gained from Infiltration<br>" +
|
||||
"* Bug Fix: Copying a NetscriptJS script to another server using scp now properly takes into account " +
|
||||
"the script's changes.<br>" +
|
||||
"* Bug Fix: Fixed an issue where game would not load in Edge due to incompatible features<br>" +
|
||||
"* Bug Fix: Fixed an issue where game would not load in Edge due to incompatible features<br>" +
|
||||
"* travelToCity() Singularity function no longer grants Intelligence exp"
|
||||
|
||||
|
||||
@ -9766,7 +9767,7 @@ function processSingleServerGrowth(server, numCycles) {
|
||||
if (server.moneyMax && server.moneyAvailable > server.moneyMax) {
|
||||
server.moneyAvailable = server.moneyMax;
|
||||
}
|
||||
|
||||
|
||||
// if there was any growth at all, increase security
|
||||
if(oldMoneyAvailable !== server.moneyAvailable) {
|
||||
//Growing increases server security twice as much as hacking
|
||||
@ -15776,7 +15777,7 @@ function addWorkerScript(runningScriptObj, server) {
|
||||
} else {
|
||||
runningScriptObj.threads = 1;
|
||||
}
|
||||
var ramUsage = runningScriptObj.scriptRef.ramUsage * threads;
|
||||
var ramUsage = Object(_utils_HelperFunctions__WEBPACK_IMPORTED_MODULE_11__["roundToTwo"])(runningScriptObj.scriptRef.ramUsage * threads);
|
||||
var ramAvailable = server.maxRam - server.ramUsed;
|
||||
if (ramUsage > ramAvailable) {
|
||||
Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_10__["dialogBoxCreate"])("Not enough RAM to run script " + runningScriptObj.filename + " with args " +
|
||||
@ -15785,7 +15786,7 @@ function addWorkerScript(runningScriptObj, server) {
|
||||
"your changes to the script.)");
|
||||
return;
|
||||
}
|
||||
server.ramUsed += ramUsage;
|
||||
server.ramUsed = Object(_utils_HelperFunctions__WEBPACK_IMPORTED_MODULE_11__["roundToTwo"])(server.ramUsed + ramUsage);
|
||||
|
||||
//Create the WorkerScript
|
||||
var s = new WorkerScript(runningScriptObj);
|
||||
|
BIN
doc/build/doctrees/changelog.doctree
vendored
BIN
doc/build/doctrees/changelog.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/environment.pickle
vendored
BIN
doc/build/doctrees/environment.pickle
vendored
Binary file not shown.
BIN
doc/build/doctrees/index.doctree
vendored
BIN
doc/build/doctrees/index.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/netscript.doctree
vendored
BIN
doc/build/doctrees/netscript.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/netscriptbladeburnerapi.doctree
vendored
BIN
doc/build/doctrees/netscriptbladeburnerapi.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/netscriptfunctions.doctree
vendored
BIN
doc/build/doctrees/netscriptfunctions.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/netscripthacknetnodeapi.doctree
vendored
BIN
doc/build/doctrees/netscripthacknetnodeapi.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/netscriptjs.doctree
vendored
BIN
doc/build/doctrees/netscriptjs.doctree
vendored
Binary file not shown.
Binary file not shown.
BIN
doc/build/doctrees/shortcuts.doctree
vendored
BIN
doc/build/doctrees/shortcuts.doctree
vendored
Binary file not shown.
BIN
doc/build/doctrees/terminal.doctree
vendored
BIN
doc/build/doctrees/terminal.doctree
vendored
Binary file not shown.
@ -285,6 +285,18 @@ joinBladeburnerFaction
|
||||
|
||||
Returns false otherwise.
|
||||
|
||||
joinBladeburnerDivision
|
||||
-----------------------
|
||||
|
||||
.. js:function:: joinBladeburnerDivision()
|
||||
|
||||
Attempts to join the Bladeburner division.
|
||||
|
||||
Returns true if you successfully join the Bladeburner division, or if you
|
||||
are already a member.
|
||||
|
||||
Returns false otherwise
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@ -327,11 +339,13 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
|
||||
this.fieldAnalysis = {
|
||||
inProgress: params.startFieldAnalysis ? true : false,
|
||||
cyclesRemaining: FIELD_ANALYSIS_DURATION,
|
||||
cyclesSince: FIELD_ANALYSIS_INTERVAL
|
||||
cyclesRemaining: params.startFieldAnalysis ? FIELD_ANALYSIS_DURATION : 0,
|
||||
cyclesSince: params.startFieldAnalysis ? FIELD_ANALYSIS_INTERVAL : 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BladeburnerHandler.prototype.getStaminaPercentage = function() {
|
||||
var res = this.getStamina();
|
||||
return 100 * (res[0] / res[1]);
|
||||
@ -360,7 +374,7 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
this.startAction("general", "Field Analysis");
|
||||
this.ns.print("handler is doing field analyis for " +
|
||||
(this.fieldAnalysis.cyclesRemaining+1) + " more mins");
|
||||
return;
|
||||
return 31; //Field Analysis Time + 1
|
||||
}
|
||||
} else {
|
||||
++(this.fieldAnalysis.cyclesSince);
|
||||
@ -377,10 +391,12 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
if (staminaPerc < 55) {
|
||||
this.ns.print("handler is starting training due to low stamina percentage");
|
||||
this.startAction("general", "Training");
|
||||
return 31; //Training time + 1
|
||||
} else {
|
||||
var action = this.chooseAction();
|
||||
this.ns.print("handler chose " + action.name + " " + action.type + " through chooseAction()");
|
||||
this.startAction(action.type, action.name);
|
||||
return (this.getActionTime(action.type, action.name) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,12 +439,10 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
|
||||
|
||||
BladeburnerHandler.prototype.process = async function() {
|
||||
this.handle();
|
||||
await this.ns.sleep(60000);
|
||||
}
|
||||
await this.ns.sleep(this.handle() * 1000);
|
||||
}
|
||||
|
||||
export async function main(ns) {
|
||||
ns.disableLog("sleep");
|
||||
export async function main(ns) {
|
||||
//Check if Bladeburner is available. This'll throw a runtime error if it's not
|
||||
ns.bladeburner.getContractNames();
|
||||
|
||||
|
@ -846,7 +846,8 @@ getScriptRam
|
||||
:param string scriptname: Filename of script. This is case-sensitive.
|
||||
: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
|
||||
Returns the amount of RAM required to run the specified script on the target server. Returns
|
||||
0 if the script does not exist.
|
||||
|
||||
getHackTime
|
||||
^^^^^^^^^^^
|
||||
|
4
doc/build/html/genindex.html
vendored
4
doc/build/html/genindex.html
vendored
@ -311,10 +311,12 @@
|
||||
<h2 id="J">J</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="netscriptbladeburnerapi.html#joinBladeburnerFaction">joinBladeburnerFaction() (built-in function)</a>
|
||||
<li><a href="netscriptbladeburnerapi.html#joinBladeburnerDivision">joinBladeburnerDivision() (built-in function)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="netscriptbladeburnerapi.html#joinBladeburnerFaction">joinBladeburnerFaction() (built-in function)</a>
|
||||
</li>
|
||||
<li><a href="netscriptsingularityfunctions.html#joinFaction">joinFaction() (built-in function)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
|
1
doc/build/html/index.html
vendored
1
doc/build/html/index.html
vendored
@ -235,6 +235,7 @@ secrets that you've been searching for.</p>
|
||||
<li class="toctree-l3"><a class="reference internal" href="netscriptbladeburnerapi.html#switchcity">switchCity</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="netscriptbladeburnerapi.html#getstamina">getStamina</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="netscriptbladeburnerapi.html#joinbladeburnerfaction">joinBladeburnerFaction</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="netscriptbladeburnerapi.html#joinbladeburnerdivision">joinBladeburnerDivision</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="netscriptbladeburnerapi.html#examples">Examples</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
1
doc/build/html/netscript.html
vendored
1
doc/build/html/netscript.html
vendored
@ -236,6 +236,7 @@ to reach out to the developer!</p>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html#switchcity">switchCity</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html#getstamina">getStamina</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html#joinbladeburnerfaction">joinBladeburnerFaction</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html#joinbladeburnerdivision">joinBladeburnerDivision</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html#examples">Examples</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
31
doc/build/html/netscriptbladeburnerapi.html
vendored
31
doc/build/html/netscriptbladeburnerapi.html
vendored
@ -483,6 +483,18 @@ you are already a member.</p>
|
||||
<p>Returns false otherwise.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="joinbladeburnerdivision">
|
||||
<h2>joinBladeburnerDivision<a class="headerlink" href="#joinbladeburnerdivision" title="Permalink to this headline">¶</a></h2>
|
||||
<dl class="function">
|
||||
<dt id="joinBladeburnerDivision">
|
||||
<code class="descname">joinBladeburnerDivision</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#joinBladeburnerDivision" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Attempts to join the Bladeburner division.</p>
|
||||
<p>Returns true if you successfully join the Bladeburner division, or if you
|
||||
are already a member.</p>
|
||||
<p>Returns false otherwise</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
@ -524,11 +536,13 @@ function BladeburnerHandler(ns, params) {
|
||||
|
||||
this.fieldAnalysis = {
|
||||
inProgress: params.startFieldAnalysis ? true : false,
|
||||
cyclesRemaining: FIELD_ANALYSIS_DURATION,
|
||||
cyclesSince: FIELD_ANALYSIS_INTERVAL
|
||||
cyclesRemaining: params.startFieldAnalysis ? FIELD_ANALYSIS_DURATION : 0,
|
||||
cyclesSince: params.startFieldAnalysis ? FIELD_ANALYSIS_INTERVAL : 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BladeburnerHandler.prototype.getStaminaPercentage = function() {
|
||||
var res = this.getStamina();
|
||||
return 100 * (res[0] / res[1]);
|
||||
@ -557,7 +571,7 @@ BladeburnerHandler.prototype.handle = function() {
|
||||
this.startAction("general", "Field Analysis");
|
||||
this.ns.print("handler is doing field analyis for " +
|
||||
(this.fieldAnalysis.cyclesRemaining+1) + " more mins");
|
||||
return;
|
||||
return 31; //Field Analysis Time + 1
|
||||
}
|
||||
} else {
|
||||
++(this.fieldAnalysis.cyclesSince);
|
||||
@ -574,10 +588,12 @@ BladeburnerHandler.prototype.handle = function() {
|
||||
if (staminaPerc < 55) {
|
||||
this.ns.print("handler is starting training due to low stamina percentage");
|
||||
this.startAction("general", "Training");
|
||||
return 31; //Training time + 1
|
||||
} else {
|
||||
var action = this.chooseAction();
|
||||
this.ns.print("handler chose " + action.name + " " + action.type + " through chooseAction()");
|
||||
this.startAction(action.type, action.name);
|
||||
return (this.getActionTime(action.type, action.name) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -620,12 +636,10 @@ BladeburnerHandler.prototype.chooseAction = function() {
|
||||
|
||||
|
||||
BladeburnerHandler.prototype.process = async function() {
|
||||
this.handle();
|
||||
await this.ns.sleep(60000);
|
||||
}
|
||||
await this.ns.sleep(this.handle() * 1000);
|
||||
}
|
||||
|
||||
export async function main(ns) {
|
||||
ns.disableLog("sleep");
|
||||
export async function main(ns) {
|
||||
//Check if Bladeburner is available. This'll throw a runtime error if it's not
|
||||
ns.bladeburner.getContractNames();
|
||||
|
||||
@ -690,6 +704,7 @@ BladeburnerHandler.prototype.process = async function() {
|
||||
<li class="toctree-l3"><a class="reference internal" href="#switchcity">switchCity</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#getstamina">getStamina</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#joinbladeburnerfaction">joinBladeburnerFaction</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#joinbladeburnerdivision">joinBladeburnerDivision</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#examples">Examples</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
3
doc/build/html/netscriptfunctions.html
vendored
3
doc/build/html/netscriptfunctions.html
vendored
@ -1402,7 +1402,8 @@ true if one or more scripts were successfully killed, and false if none were.</p
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Returns the amount of RAM required to run the specified script on the target server</p>
|
||||
<p>Returns the amount of RAM required to run the specified script on the target server. Returns
|
||||
0 if the script does not exist.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
3
doc/build/html/netscripthacknetnodeapi.html
vendored
3
doc/build/html/netscripthacknetnodeapi.html
vendored
@ -275,6 +275,7 @@ Nodes to a level of at least 75, RAM to at least 8GB, and number of cores to at
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="netscript.html"> Netscript</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptjs.html"> NetscriptJS (Netscript 2.0)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptdatatypes.html"> Data Types and Variables</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptoperators.html"> Operators</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptloopsandconditionals.html"> Loops and Conditionals</a></li>
|
||||
@ -292,11 +293,13 @@ Nodes to a level of at least 75, RAM to at least 8GB, and number of cores to at
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptixapi.html"> Trade Information eXchange (TIX) API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html"> Singularity Functions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html"> Bladeburner API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a></li>
|
||||
</ul>
|
||||
|
||||
<div role="search">
|
||||
|
1
doc/build/html/netscriptjs.html
vendored
1
doc/build/html/netscriptjs.html
vendored
@ -273,6 +273,7 @@ NetscriptJS and report any serious exploits.</p>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscripthacknetnodeapi.html"> Hacknet Node API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptixapi.html"> Trade Information eXchange (TIX) API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptsingularityfunctions.html"> Singularity Functions</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html"> Bladeburner API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Netscript Miscellaneous" href="netscriptmisc.html" />
|
||||
<link rel="next" title="Netscript Bladeburner API" href="netscriptbladeburnerapi.html" />
|
||||
<link rel="prev" title="Netscript Trade Information eXchange (TIX) API" href="netscriptixapi.html" />
|
||||
</head>
|
||||
<body>
|
||||
@ -35,7 +35,7 @@
|
||||
<div class="rel" role="navigation" aria-label="related navigation">
|
||||
<a href="netscriptixapi.html" title="Netscript Trade Information eXchange (TIX) API"
|
||||
accesskey="P">previous</a> |
|
||||
<a href="netscriptmisc.html" title="Netscript Miscellaneous"
|
||||
<a href="netscriptbladeburnerapi.html" title="Netscript Bladeburner API"
|
||||
accesskey="N">next</a> |
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a>
|
||||
@ -779,6 +779,7 @@ This script will be run with no arguments and 1 thread. It must be located on yo
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="reference internal" href="netscript.html"> Netscript</a><ul class="current">
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptjs.html"> NetscriptJS (Netscript 2.0)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptdatatypes.html"> Data Types and Variables</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptoperators.html"> Operators</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptloopsandconditionals.html"> Loops and Conditionals</a></li>
|
||||
@ -818,10 +819,13 @@ This script will be run with no arguments and 1 thread. It must be located on yo
|
||||
<li class="toctree-l3"><a class="reference internal" href="#installaugmentations">installAugmentations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptbladeburnerapi.html"> Bladeburner API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="netscriptmisc.html"> Miscellaneous</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="terminal.html"> Terminal</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a></li>
|
||||
</ul>
|
||||
|
||||
<div role="search">
|
||||
@ -844,7 +848,7 @@ This script will be run with no arguments and 1 thread. It must be located on yo
|
||||
<div role="navigation" aria-label="related navigaton">
|
||||
<a href="netscriptixapi.html" title="Netscript Trade Information eXchange (TIX) API"
|
||||
>previous</a> |
|
||||
<a href="netscriptmisc.html" title="Netscript Miscellaneous"
|
||||
<a href="netscriptbladeburnerapi.html" title="Netscript Bladeburner API"
|
||||
>next</a> |
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a>
|
||||
|
BIN
doc/build/html/objects.inv
vendored
BIN
doc/build/html/objects.inv
vendored
Binary file not shown.
2
doc/build/html/searchindex.js
vendored
2
doc/build/html/searchindex.js
vendored
File diff suppressed because one or more lines are too long
6
doc/build/html/shortcuts.html
vendored
6
doc/build/html/shortcuts.html
vendored
@ -24,6 +24,7 @@
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Changelog" href="changelog.html" />
|
||||
<link rel="prev" title="Terminal" href="terminal.html" />
|
||||
</head>
|
||||
<body>
|
||||
@ -34,6 +35,8 @@
|
||||
<div class="rel" role="navigation" aria-label="related navigation">
|
||||
<a href="terminal.html" title="Terminal"
|
||||
accesskey="P">previous</a> |
|
||||
<a href="changelog.html" title="Changelog"
|
||||
accesskey="N">next</a> |
|
||||
<a href="genindex.html" title="General Index"
|
||||
accesskey="I">index</a>
|
||||
</div>
|
||||
@ -268,6 +271,7 @@ as well as your browser's shortcuts</strong></p>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#misc-shortcuts">Misc Shortcuts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a></li>
|
||||
</ul>
|
||||
|
||||
<div role="search">
|
||||
@ -290,6 +294,8 @@ as well as your browser's shortcuts</strong></p>
|
||||
<div role="navigation" aria-label="related navigaton">
|
||||
<a href="terminal.html" title="Terminal"
|
||||
>previous</a> |
|
||||
<a href="changelog.html" title="Changelog"
|
||||
>next</a> |
|
||||
<a href="genindex.html" title="General Index"
|
||||
>index</a>
|
||||
</div>
|
||||
|
1
doc/build/html/terminal.html
vendored
1
doc/build/html/terminal.html
vendored
@ -469,6 +469,7 @@ thread count and how much RAM they are using in total.</p>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="shortcuts.html"> Keyboard Shortcuts</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="changelog.html"> Changelog</a></li>
|
||||
</ul>
|
||||
|
||||
<div role="search">
|
||||
|
@ -285,6 +285,18 @@ joinBladeburnerFaction
|
||||
|
||||
Returns false otherwise.
|
||||
|
||||
joinBladeburnerDivision
|
||||
-----------------------
|
||||
|
||||
.. js:function:: joinBladeburnerDivision()
|
||||
|
||||
Attempts to join the Bladeburner division.
|
||||
|
||||
Returns true if you successfully join the Bladeburner division, or if you
|
||||
are already a member.
|
||||
|
||||
Returns false otherwise
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@ -327,11 +339,13 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
|
||||
this.fieldAnalysis = {
|
||||
inProgress: params.startFieldAnalysis ? true : false,
|
||||
cyclesRemaining: FIELD_ANALYSIS_DURATION,
|
||||
cyclesSince: FIELD_ANALYSIS_INTERVAL
|
||||
cyclesRemaining: params.startFieldAnalysis ? FIELD_ANALYSIS_DURATION : 0,
|
||||
cyclesSince: params.startFieldAnalysis ? FIELD_ANALYSIS_INTERVAL : 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
BladeburnerHandler.prototype.getStaminaPercentage = function() {
|
||||
var res = this.getStamina();
|
||||
return 100 * (res[0] / res[1]);
|
||||
@ -360,7 +374,7 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
this.startAction("general", "Field Analysis");
|
||||
this.ns.print("handler is doing field analyis for " +
|
||||
(this.fieldAnalysis.cyclesRemaining+1) + " more mins");
|
||||
return;
|
||||
return 31; //Field Analysis Time + 1
|
||||
}
|
||||
} else {
|
||||
++(this.fieldAnalysis.cyclesSince);
|
||||
@ -377,10 +391,12 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
if (staminaPerc < 55) {
|
||||
this.ns.print("handler is starting training due to low stamina percentage");
|
||||
this.startAction("general", "Training");
|
||||
return 31; //Training time + 1
|
||||
} else {
|
||||
var action = this.chooseAction();
|
||||
this.ns.print("handler chose " + action.name + " " + action.type + " through chooseAction()");
|
||||
this.startAction(action.type, action.name);
|
||||
return (this.getActionTime(action.type, action.name) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,12 +439,10 @@ identifier by attaching the Bladeburner API functions to an object::
|
||||
|
||||
|
||||
BladeburnerHandler.prototype.process = async function() {
|
||||
this.handle();
|
||||
await this.ns.sleep(60000);
|
||||
}
|
||||
await this.ns.sleep(this.handle() * 1000);
|
||||
}
|
||||
|
||||
export async function main(ns) {
|
||||
ns.disableLog("sleep");
|
||||
export async function main(ns) {
|
||||
//Check if Bladeburner is available. This'll throw a runtime error if it's not
|
||||
ns.bladeburner.getContractNames();
|
||||
|
||||
|
@ -846,7 +846,8 @@ getScriptRam
|
||||
:param string scriptname: Filename of script. This is case-sensitive.
|
||||
: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
|
||||
Returns the amount of RAM required to run the specified script on the target server. Returns
|
||||
0 if the script does not exist.
|
||||
|
||||
getHackTime
|
||||
^^^^^^^^^^^
|
||||
|
@ -105,7 +105,7 @@ let CONSTANTS = {
|
||||
|
||||
//Infiltration constants
|
||||
InfiltrationBribeBaseAmount: 100e3, //Amount per clearance level
|
||||
InfiltrationMoneyValue: 3e3, //Convert "secret" value to money
|
||||
InfiltrationMoneyValue: 5e3, //Convert "secret" value to money
|
||||
InfiltrationRepValue: 1.4, //Convert "secret" value to faction reputation
|
||||
|
||||
//Stock market constants
|
||||
@ -501,9 +501,10 @@ let CONSTANTS = {
|
||||
"* Bug Fix: Crime Success rates were being calculated incorrectly (by Github user hydroflame)<br>" +
|
||||
"* When an Infiltration is finished, you will now return back to the company's page, rather than the city<br>" +
|
||||
"* Infiltration faction reputation selector now remembers your last choice<br>" +
|
||||
"* Significantly increased the amount of money gained from Infiltration<br>" +
|
||||
"* Bug Fix: Copying a NetscriptJS script to another server using scp now properly takes into account " +
|
||||
"the script's changes.<br>" +
|
||||
"* Bug Fix: Fixed an issue where game would not load in Edge due to incompatible features<br>" +
|
||||
"* Bug Fix: Fixed an issue where game would not load in Edge due to incompatible features<br>" +
|
||||
"* travelToCity() Singularity function no longer grants Intelligence exp"
|
||||
|
||||
|
||||
|
@ -14,7 +14,8 @@ import {Settings} from "./Settings";
|
||||
|
||||
import {parse} from "../utils/acorn";
|
||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||
import {compareArrays, printArray} from "../utils/HelperFunctions";
|
||||
import {compareArrays, printArray,
|
||||
roundToTwo} from "../utils/HelperFunctions";
|
||||
|
||||
function WorkerScript(runningScriptObj) {
|
||||
this.name = runningScriptObj.filename;
|
||||
@ -292,7 +293,7 @@ function addWorkerScript(runningScriptObj, server) {
|
||||
} else {
|
||||
runningScriptObj.threads = 1;
|
||||
}
|
||||
var ramUsage = runningScriptObj.scriptRef.ramUsage * threads;
|
||||
var ramUsage = roundToTwo(runningScriptObj.scriptRef.ramUsage * threads);
|
||||
var ramAvailable = server.maxRam - server.ramUsed;
|
||||
if (ramUsage > ramAvailable) {
|
||||
dialogBoxCreate("Not enough RAM to run script " + runningScriptObj.filename + " with args " +
|
||||
@ -301,7 +302,7 @@ function addWorkerScript(runningScriptObj, server) {
|
||||
"your changes to the script.)");
|
||||
return;
|
||||
}
|
||||
server.ramUsed += ramUsage;
|
||||
server.ramUsed = roundToTwo(server.ramUsed + ramUsage);
|
||||
|
||||
//Create the WorkerScript
|
||||
var s = new WorkerScript(runningScriptObj);
|
||||
|
@ -818,7 +818,7 @@ function processSingleServerGrowth(server, numCycles) {
|
||||
if (server.moneyMax && server.moneyAvailable > server.moneyMax) {
|
||||
server.moneyAvailable = server.moneyMax;
|
||||
}
|
||||
|
||||
|
||||
// if there was any growth at all, increase security
|
||||
if(oldMoneyAvailable !== server.moneyAvailable) {
|
||||
//Growing increases server security twice as much as hacking
|
||||
|
Loading…
Reference in New Issue
Block a user