diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index c66bbf021..5653bf590 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -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)
" + "* When an Infiltration is finished, you will now return back to the company's page, rather than the city
" + "* Infiltration faction reputation selector now remembers your last choice
" + + "* Significantly increased the amount of money gained from Infiltration
" + "* Bug Fix: Copying a NetscriptJS script to another server using scp now properly takes into account " + "the script's changes.
" + - "* Bug Fix: Fixed an issue where game would not load in Edge due to incompatible features
" + + "* Bug Fix: Fixed an issue where game would not load in Edge due to incompatible features
" + "* 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); diff --git a/doc/build/doctrees/changelog.doctree b/doc/build/doctrees/changelog.doctree index 37624c987..d2c4b659e 100644 Binary files a/doc/build/doctrees/changelog.doctree and b/doc/build/doctrees/changelog.doctree differ diff --git a/doc/build/doctrees/environment.pickle b/doc/build/doctrees/environment.pickle index 92f02c914..3fc861454 100644 Binary files a/doc/build/doctrees/environment.pickle and b/doc/build/doctrees/environment.pickle differ diff --git a/doc/build/doctrees/index.doctree b/doc/build/doctrees/index.doctree index 2dcb2117e..b529b68d8 100644 Binary files a/doc/build/doctrees/index.doctree and b/doc/build/doctrees/index.doctree differ diff --git a/doc/build/doctrees/netscript.doctree b/doc/build/doctrees/netscript.doctree index 0f19db9ed..674a4b449 100644 Binary files a/doc/build/doctrees/netscript.doctree and b/doc/build/doctrees/netscript.doctree differ diff --git a/doc/build/doctrees/netscriptbladeburnerapi.doctree b/doc/build/doctrees/netscriptbladeburnerapi.doctree index c479d4fd1..f9b1b19e1 100644 Binary files a/doc/build/doctrees/netscriptbladeburnerapi.doctree and b/doc/build/doctrees/netscriptbladeburnerapi.doctree differ diff --git a/doc/build/doctrees/netscriptfunctions.doctree b/doc/build/doctrees/netscriptfunctions.doctree index f6ffe075b..2540e9bd6 100644 Binary files a/doc/build/doctrees/netscriptfunctions.doctree and b/doc/build/doctrees/netscriptfunctions.doctree differ diff --git a/doc/build/doctrees/netscripthacknetnodeapi.doctree b/doc/build/doctrees/netscripthacknetnodeapi.doctree index 987e64106..2deecc153 100644 Binary files a/doc/build/doctrees/netscripthacknetnodeapi.doctree and b/doc/build/doctrees/netscripthacknetnodeapi.doctree differ diff --git a/doc/build/doctrees/netscriptjs.doctree b/doc/build/doctrees/netscriptjs.doctree index e15b49ef9..23da6ced5 100644 Binary files a/doc/build/doctrees/netscriptjs.doctree and b/doc/build/doctrees/netscriptjs.doctree differ diff --git a/doc/build/doctrees/netscriptsingularityfunctions.doctree b/doc/build/doctrees/netscriptsingularityfunctions.doctree index 38389ed6c..200fec04f 100644 Binary files a/doc/build/doctrees/netscriptsingularityfunctions.doctree and b/doc/build/doctrees/netscriptsingularityfunctions.doctree differ diff --git a/doc/build/doctrees/shortcuts.doctree b/doc/build/doctrees/shortcuts.doctree index f03255524..c34f9b14e 100644 Binary files a/doc/build/doctrees/shortcuts.doctree and b/doc/build/doctrees/shortcuts.doctree differ diff --git a/doc/build/doctrees/terminal.doctree b/doc/build/doctrees/terminal.doctree index 22c316aab..305c53b75 100644 Binary files a/doc/build/doctrees/terminal.doctree and b/doc/build/doctrees/terminal.doctree differ diff --git a/doc/build/html/_sources/netscriptbladeburnerapi.rst.txt b/doc/build/html/_sources/netscriptbladeburnerapi.rst.txt index dd535f5cc..2faf8b12e 100644 --- a/doc/build/html/_sources/netscriptbladeburnerapi.rst.txt +++ b/doc/build/html/_sources/netscriptbladeburnerapi.rst.txt @@ -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(); diff --git a/doc/build/html/_sources/netscriptfunctions.rst.txt b/doc/build/html/_sources/netscriptfunctions.rst.txt index d9d803b91..d2443c0da 100644 --- a/doc/build/html/_sources/netscriptfunctions.rst.txt +++ b/doc/build/html/_sources/netscriptfunctions.rst.txt @@ -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 ^^^^^^^^^^^ diff --git a/doc/build/html/genindex.html b/doc/build/html/genindex.html index 9e623a7f3..b67d2ad73 100644 --- a/doc/build/html/genindex.html +++ b/doc/build/html/genindex.html @@ -311,10 +311,12 @@

J

diff --git a/doc/build/html/index.html b/doc/build/html/index.html index 93295a80f..7c00fe511 100644 --- a/doc/build/html/index.html +++ b/doc/build/html/index.html @@ -235,6 +235,7 @@ secrets that you've been searching for.

  • switchCity
  • getStamina
  • joinBladeburnerFaction
  • +
  • joinBladeburnerDivision
  • Examples
  • diff --git a/doc/build/html/netscript.html b/doc/build/html/netscript.html index c7122a25f..002826722 100644 --- a/doc/build/html/netscript.html +++ b/doc/build/html/netscript.html @@ -236,6 +236,7 @@ to reach out to the developer!

  • switchCity
  • getStamina
  • joinBladeburnerFaction
  • +
  • joinBladeburnerDivision
  • Examples
  • diff --git a/doc/build/html/netscriptbladeburnerapi.html b/doc/build/html/netscriptbladeburnerapi.html index cada0ce3d..ecb1b12b5 100644 --- a/doc/build/html/netscriptbladeburnerapi.html +++ b/doc/build/html/netscriptbladeburnerapi.html @@ -483,6 +483,18 @@ you are already a member.

    Returns false otherwise.

    + +
    +

    joinBladeburnerDivision

    +
    +
    +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

    @@ -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() {
  • switchCity
  • getStamina
  • joinBladeburnerFaction
  • +
  • joinBladeburnerDivision
  • Examples
  • diff --git a/doc/build/html/netscriptfunctions.html b/doc/build/html/netscriptfunctions.html index 3113b39fd..da00e0957 100644 --- a/doc/build/html/netscriptfunctions.html +++ b/doc/build/html/netscriptfunctions.html @@ -1402,7 +1402,8 @@ true if one or more scripts were successfully killed, and false if none were.

    -

    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.

    diff --git a/doc/build/html/netscripthacknetnodeapi.html b/doc/build/html/netscripthacknetnodeapi.html index 77de61c4f..aa0e31450 100644 --- a/doc/build/html/netscripthacknetnodeapi.html +++ b/doc/build/html/netscripthacknetnodeapi.html @@ -275,6 +275,7 @@ Nodes to a level of at least 75, RAM to at least 8GB, and number of cores to at

    Contents:

    diff --git a/doc/build/html/netscriptjs.html b/doc/build/html/netscriptjs.html index 41ada4f08..acecb3add 100644 --- a/doc/build/html/netscriptjs.html +++ b/doc/build/html/netscriptjs.html @@ -273,6 +273,7 @@ NetscriptJS and report any serious exploits.

  • Hacknet Node API
  • Trade Information eXchange (TIX) API
  • Singularity Functions
  • +
  • Bladeburner API
  • Miscellaneous
  • diff --git a/doc/build/html/netscriptsingularityfunctions.html b/doc/build/html/netscriptsingularityfunctions.html index fc1603124..402ea1e0b 100644 --- a/doc/build/html/netscriptsingularityfunctions.html +++ b/doc/build/html/netscriptsingularityfunctions.html @@ -24,7 +24,7 @@ - + @@ -35,7 +35,7 @@