From 97eeef7d0d645a5df7c04c8d34239fdcd9448527 Mon Sep 17 00:00:00 2001 From: danielyxie Date: Thu, 31 Aug 2017 12:19:28 -0500 Subject: [PATCH] scp and donate for rep bug fixes --- dist/bundle.js | 1349 +++++++++++++++++++------------------ src/Faction.js | 2 +- src/NetscriptFunctions.js | 1 + src/Prestige.js | 5 +- src/StockMarket.js | 7 +- src/Terminal.js | 2 +- 6 files changed, 690 insertions(+), 676 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 1639162d6..634725eb3 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -60,7 +60,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 5); +/******/ return __webpack_require__(__webpack_require__.s = 4); /******/ }) /************************************************************************/ /******/ ([ @@ -76,7 +76,7 @@ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Constants_js__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__CreateProgram_js__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Crimes_js__ = __webpack_require__(36); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Faction_js__ = __webpack_require__(10); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Gang_js__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Location_js__ = __webpack_require__(15); @@ -89,7 +89,7 @@ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__utils_IPAddress_js__ = __webpack_require__(20); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_JSONReviver_js__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -3315,155 +3315,6 @@ let CONSTANTS = { /* 4 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { -"use strict"; -/* unused harmony export getIndicesOf */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertTimeMsToTimeElapsedString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return longestCommonStart; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isString; }); -/* unused harmony export isPositiveNumber */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return containsAllStrings; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return formatNumber; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return numOccurrences; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return numNetscriptOperators; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DialogBox_js__ = __webpack_require__(2); - - -//Netburner String helper functions - -//Searches for every occurence of searchStr within str and returns an array of the indices of -//all these occurences -function getIndicesOf(searchStr, str, caseSensitive) { - var searchStrLen = searchStr.length; - if (searchStrLen == 0) { - return []; - } - var startIndex = 0, index, indices = []; - if (!caseSensitive) { - str = str.toLowerCase(); - searchStr = searchStr.toLowerCase(); - } - while ((index = str.indexOf(searchStr, startIndex)) > -1) { - indices.push(index); - startIndex = index + searchStrLen; - } - return indices; -} - -//Replaces the character at an index with a new character -String.prototype.replaceAt=function(index, character) { - return this.substr(0, index) + character + this.substr(index+character.length); -} - -//Converts a date representing time in milliseconds to a string with the format -// H hours M minutes and S seconds -// e.g. 10000 -> "0 hours 0 minutes and 10 seconds" -// 120000 -> "0 0 hours 2 minutes and 0 seconds" -function convertTimeMsToTimeElapsedString(time) { - //Convert ms to seconds, since we only have second-level precision - time = Math.floor(time / 1000); - - var days = Math.floor(time / 86400); - time %= 86400; - - var hours = Math.floor(time / 3600); - time %= 3600; - - var minutes = Math.floor(time / 60); - time %= 60; - - var seconds = time; - - var res = ""; - if (days) {res += days + " days ";} - if (hours) {res += hours + " hours ";} - if (minutes) {res += minutes + " minutes ";} - res += seconds + " seconds "; - return res; -} - -//Finds the longest common starting substring in a set of strings -function longestCommonStart(strings) { - if (!containsAllStrings(strings)) {return;} - if (strings.length == 0) {return;} - - var A = strings.concat().sort(), - a1= A[0], a2= A[A.length-1], L= a1.length, i= 0; - while(i= 0) { - ++n; - pos += step; - } else break; - } - return n; -} - -//Counters the number of Netscript operators in a string -function numNetscriptOperators(string) { - var total = 0; - total += numOccurrences(string, "+"); - total += numOccurrences(string, "-"); - total += numOccurrences(string, "*"); - total += numOccurrences(string, "/"); - total += numOccurrences(string, "%"); - total += numOccurrences(string, "&&"); - total += numOccurrences(string, "||"); - total += numOccurrences(string, "<"); - total += numOccurrences(string, ">"); - total += numOccurrences(string, "<="); - total += numOccurrences(string, ">="); - total += numOccurrences(string, "=="); - total += numOccurrences(string, "!="); - if (isNaN(total)) { - Object(__WEBPACK_IMPORTED_MODULE_0__DialogBox_js__["a" /* dialogBoxCreate */])("ERROR in counting number of operators in script. This is a bug, please report to game developer"); - total = 0; - } - return total; -} - - - - -/***/ }), -/* 5 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Engine", function() { return Engine; }); @@ -3472,7 +3323,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_numeral_min_js__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_numeral_min_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__utils_numeral_min_js__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_StringHelperFunctions_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_LogBox_js__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ActiveScriptsUI_js__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Augmentations_js__ = __webpack_require__(16); @@ -4412,7 +4263,7 @@ let Engine = { if (Engine.Counters.stockTick <= 0) { if (__WEBPACK_IMPORTED_MODULE_21__Player_js__["a" /* Player */].hasWseAccount) { - Object(__WEBPACK_IMPORTED_MODULE_30__StockMarket_js__["j" /* updateStockPrices */])(); + Object(__WEBPACK_IMPORTED_MODULE_30__StockMarket_js__["k" /* updateStockPrices */])(); } Engine.Counters.stockTick = 30; } @@ -4420,7 +4271,7 @@ let Engine = { if (Engine.Counters.sCr <= 0) { //Assume 4Sig will always indicate state of market if (__WEBPACK_IMPORTED_MODULE_21__Player_js__["a" /* Player */].hasWseAccount) { - Object(__WEBPACK_IMPORTED_MODULE_30__StockMarket_js__["h" /* stockMarketCycle */])(); + Object(__WEBPACK_IMPORTED_MODULE_30__StockMarket_js__["i" /* stockMarketCycle */])(); } Engine.Counters.sCr = 1500; } @@ -5213,6 +5064,155 @@ window.onload = function() { /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(8))) +/***/ }), +/* 5 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export getIndicesOf */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertTimeMsToTimeElapsedString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return longestCommonStart; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isPositiveNumber; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return containsAllStrings; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return formatNumber; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return numOccurrences; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return numNetscriptOperators; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DialogBox_js__ = __webpack_require__(2); + + +//Netburner String helper functions + +//Searches for every occurence of searchStr within str and returns an array of the indices of +//all these occurences +function getIndicesOf(searchStr, str, caseSensitive) { + var searchStrLen = searchStr.length; + if (searchStrLen == 0) { + return []; + } + var startIndex = 0, index, indices = []; + if (!caseSensitive) { + str = str.toLowerCase(); + searchStr = searchStr.toLowerCase(); + } + while ((index = str.indexOf(searchStr, startIndex)) > -1) { + indices.push(index); + startIndex = index + searchStrLen; + } + return indices; +} + +//Replaces the character at an index with a new character +String.prototype.replaceAt=function(index, character) { + return this.substr(0, index) + character + this.substr(index+character.length); +} + +//Converts a date representing time in milliseconds to a string with the format +// H hours M minutes and S seconds +// e.g. 10000 -> "0 hours 0 minutes and 10 seconds" +// 120000 -> "0 0 hours 2 minutes and 0 seconds" +function convertTimeMsToTimeElapsedString(time) { + //Convert ms to seconds, since we only have second-level precision + time = Math.floor(time / 1000); + + var days = Math.floor(time / 86400); + time %= 86400; + + var hours = Math.floor(time / 3600); + time %= 3600; + + var minutes = Math.floor(time / 60); + time %= 60; + + var seconds = time; + + var res = ""; + if (days) {res += days + " days ";} + if (hours) {res += hours + " hours ";} + if (minutes) {res += minutes + " minutes ";} + res += seconds + " seconds "; + return res; +} + +//Finds the longest common starting substring in a set of strings +function longestCommonStart(strings) { + if (!containsAllStrings(strings)) {return;} + if (strings.length == 0) {return;} + + var A = strings.concat().sort(), + a1= A[0], a2= A[A.length-1], L= a1.length, i= 0; + while(i= 0) { + ++n; + pos += step; + } else break; + } + return n; +} + +//Counters the number of Netscript operators in a string +function numNetscriptOperators(string) { + var total = 0; + total += numOccurrences(string, "+"); + total += numOccurrences(string, "-"); + total += numOccurrences(string, "*"); + total += numOccurrences(string, "/"); + total += numOccurrences(string, "%"); + total += numOccurrences(string, "&&"); + total += numOccurrences(string, "||"); + total += numOccurrences(string, "<"); + total += numOccurrences(string, ">"); + total += numOccurrences(string, "<="); + total += numOccurrences(string, ">="); + total += numOccurrences(string, "=="); + total += numOccurrences(string, "!="); + if (isNaN(total)) { + Object(__WEBPACK_IMPORTED_MODULE_0__DialogBox_js__["a" /* dialogBoxCreate */])("ERROR in counting number of operators in script. This is a bug, please report to game developer"); + total = 0; + } + return total; +} + + + + /***/ }), /* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { @@ -16532,14 +16532,14 @@ function initBitNodeMultipliers() { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__BitNode_js__ = __webpack_require__(9); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Player_js__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__FactionInfo_js__ = __webpack_require__(44); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Settings_js__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_FactionInvitationBox_js__ = __webpack_require__(45); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__ = __webpack_require__(19); @@ -16561,7 +16561,7 @@ function factionInit() { $('#faction-donate-input').on('input', function() { if (__WEBPACK_IMPORTED_MODULE_4__engine_js__["Engine"].currentPage == __WEBPACK_IMPORTED_MODULE_4__engine_js__["Engine"].Page.Faction) { var val = document.getElementById("faction-donate-input").value; - if (isPositiveNumber(val)) { + if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["d" /* isPositiveNumber */])(val)) { var numMoneyDonate = Number(val); document.getElementById("faction-donate-rep-gain").innerHTML = "This donation will result in " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(numMoneyDonate/1000000 * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].faction_rep_mult, 3) + " reputation gain"; @@ -17020,7 +17020,7 @@ function displayFactionContent(factionName) { newDonateWorkButton.addEventListener("click", function() { var donateAmountVal = document.getElementById("faction-donate-input").value; - if (isPositiveNumber(donateAmountVal)) { + if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["d" /* isPositiveNumber */])(donateAmountVal)) { var numMoneyDonate = Number(donateAmountVal); if (__WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].money.lt(numMoneyDonate)) { Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You cannot afford to donate this much money!"); @@ -17888,7 +17888,7 @@ function initCreateProgramButtons() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return prestigeWorkerScripts; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ActiveScriptsUI_js__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NetscriptEnvironment_js__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NetscriptEvaluator_js__ = __webpack_require__(41); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Server_js__ = __webpack_require__(6); @@ -18112,7 +18112,7 @@ function updateOnlineScriptTimes(numCycles = 1) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Company_js__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Crimes_js__ = __webpack_require__(36); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Infiltration_js__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Server_js__ = __webpack_require__(6); @@ -18121,7 +18121,7 @@ function updateOnlineScriptTimes(numCycles = 1) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_IPAddress_js__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_YesNoBox_js__ = __webpack_require__(19); @@ -23300,7 +23300,7 @@ function getJobRequirementText(company, pos, tooltiptext=false) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Script; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AllServersMap; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__InteractiveTutorial_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NetscriptWorker_js__ = __webpack_require__(14); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Player_js__ = __webpack_require__(0); @@ -23309,7 +23309,7 @@ function getJobRequirementText(company, pos, tooltiptext=false) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__ = __webpack_require__(7); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_HelperFunctions_js__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -23470,75 +23470,75 @@ Script.prototype.updateRamUsage = function() { function calculateRamUsage(codeCopy) { codeCopy = codeCopy.replace(/\s/g,''); //Remove all whitespace var baseRam = 1.4; - var whileCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "while("); - var forCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "for("); - var ifCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "if("); - var hackCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "hack("); - var growCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "grow("); - var weakenCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "weaken("); - var scanCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "scan("); - var nukeCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "nuke("); - var brutesshCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "brutessh("); - var ftpcrackCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "ftpcrack("); - var relaysmtpCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "relaysmtp("); - var httpwormCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "httpworm("); - var sqlinjectCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "sqlinject("); - var runCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "run("); - var execCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "exec("); - var killCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "kill(") + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "killall("); - var scpCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "scp("); - var hasRootAccessCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "hasRootAccess("); - var getHostnameCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getHostname("); - var getHackingLevelCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getHackingLevel("); - var getServerCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerMoneyAvailable(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerMaxMoney(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerSecurityLevel(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerBaseSecurityLevel(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerGrowth(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerRequiredHackingLevel(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerNumPortsRequired(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getServerRam("); - var fileExistsCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "fileExists("); - var isRunningCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "isRunning("); - var numOperators = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["f" /* numNetscriptOperators */])(codeCopy); - var purchaseHacknetCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "purchaseHacknetNode("); - var hacknetnodesArrayCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "hacknetnodes["); - var hnUpgLevelCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, ".upgradeLevel("); - var hnUpgRamCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, ".upgradeRam()"); - var hnUpgCoreCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, ".upgradeCore()"); - var scriptGetStockCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getStockPrice(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getStockPosition("); - var scriptBuySellStockCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "buyStock(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "sellStock("); - var scriptPurchaseServerCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "purchaseServer(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "deleteServer("); - var scriptRoundCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "round("); - var scriptWriteCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "write("); - var scriptReadCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "read("); - var arbScriptCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "scriptRunning(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "scriptKill("); - var getScriptCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getScriptRam("); - var getHackTimeCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getHackTime(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getGrowTime(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getWeakenTime("); - var singFn1Count = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "universityCourse(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "gymWorkout(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "travelToCity(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "purchaseTor(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "purchaseProgram("); - var singFn2Count = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "upgradeHomeRam(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getUpgradeHomeRamCost(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "workForCompany(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "applyToCompany(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getCompanyRep(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "checkFactionInvitations(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "joinFaction(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "workForFaction(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getFactionRep("); - var singFn3Count = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "createProgram(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "getAugmentationCost(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "purchaseAugmentation(") + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numOccurrences */])(codeCopy, "installAugmentations("); + var whileCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "while("); + var forCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "for("); + var ifCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "if("); + var hackCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "hack("); + var growCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "grow("); + var weakenCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "weaken("); + var scanCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scan("); + var nukeCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "nuke("); + var brutesshCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "brutessh("); + var ftpcrackCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "ftpcrack("); + var relaysmtpCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "relaysmtp("); + var httpwormCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "httpworm("); + var sqlinjectCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sqlinject("); + var runCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "run("); + var execCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "exec("); + var killCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "kill(") + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "killall("); + var scpCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scp("); + var hasRootAccessCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "hasRootAccess("); + var getHostnameCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getHostname("); + var getHackingLevelCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getHackingLevel("); + var getServerCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerMoneyAvailable(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerMaxMoney(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerSecurityLevel(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerBaseSecurityLevel(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerGrowth(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerRequiredHackingLevel(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerNumPortsRequired(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerRam("); + var fileExistsCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "fileExists("); + var isRunningCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "isRunning("); + var numOperators = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* numNetscriptOperators */])(codeCopy); + var purchaseHacknetCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseHacknetNode("); + var hacknetnodesArrayCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "hacknetnodes["); + var hnUpgLevelCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, ".upgradeLevel("); + var hnUpgRamCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, ".upgradeRam()"); + var hnUpgCoreCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, ".upgradeCore()"); + var scriptGetStockCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStockPrice(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStockPosition("); + var scriptBuySellStockCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "buyStock(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sellStock("); + var scriptPurchaseServerCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseServer(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "deleteServer("); + var scriptRoundCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "round("); + var scriptWriteCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "write("); + var scriptReadCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "read("); + var arbScriptCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scriptRunning(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scriptKill("); + var getScriptCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getScriptRam("); + var getHackTimeCount = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getHackTime(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getGrowTime(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getWeakenTime("); + var singFn1Count = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "universityCourse(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "gymWorkout(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "travelToCity(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseTor(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseProgram("); + var singFn2Count = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "upgradeHomeRam(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getUpgradeHomeRamCost(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "workForCompany(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "applyToCompany(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getCompanyRep(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "checkFactionInvitations(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "joinFaction(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "workForFaction(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getFactionRep("); + var singFn3Count = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "createProgram(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getAugmentationCost(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseAugmentation(") + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "installAugmentations("); if (__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].bitNodeN != 4) { singFn1Count *= 10; @@ -24035,7 +24035,7 @@ function isValidIPAddress(ipaddress) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CreateProgram_js__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DarkWeb_js__ = __webpack_require__(38); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__HelpText_js__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__InteractiveTutorial_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Literature_js__ = __webpack_require__(39); @@ -24046,7 +24046,7 @@ function isValidIPAddress(ipaddress) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Script_js__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Server_js__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__SpecialServerIps_js__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_StringHelperFunctions_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_LogBox_js__ = __webpack_require__(26); @@ -24277,7 +24277,7 @@ function tabCompletion(command, arg, allPossibilities, index=0) { document.getElementById("terminal-input-text-box").value = val; document.getElementById("terminal-input-text-box").focus(); } else { - var longestStartSubstr = Object(__WEBPACK_IMPORTED_MODULE_15__utils_StringHelperFunctions_js__["e" /* longestCommonStart */])(allPossibilities); + var longestStartSubstr = Object(__WEBPACK_IMPORTED_MODULE_15__utils_StringHelperFunctions_js__["f" /* longestCommonStart */])(allPossibilities); //If the longest common starting substring of remaining possibilities is the same //as whatevers already in terminal, just list all possible options. Otherwise, //change the input in the terminal to the longest common starting substr @@ -25124,7 +25124,7 @@ let Terminal = { } } - var newScript = new Script(); + var newScript = new __WEBPACK_IMPORTED_MODULE_12__Script_js__["c" /* Script */](); newScript.filename = scriptname; newScript.code = sourceScript.code; newScript.ramUsage = sourceScript.ramUsage; @@ -25678,7 +25678,7 @@ let Terminal = { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return iTutorialNextStep; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return currITutorialStep; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return iTutorialIsRunning; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__ = __webpack_require__(1); @@ -31376,22 +31376,23 @@ function initMessages() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return initStockSymbols; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initStockMarket; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return initSymbolToStockMap; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return stockMarketCycle; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return stockMarketCycle; }); /* unused harmony export buyStock */ /* unused harmony export sellStock */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return updateStockPrices; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return updateStockPrices; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return displayStockMarketContent; }); /* unused harmony export updateStockTicker */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return updateStockPlayerPosition; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return updateStockPlayerPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return loadStockMarket; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return setStockMarketContentCreated; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Location_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_JSONReviver_js__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -31742,6 +31743,10 @@ function updateStockPrices() { } } +function setStockMarketContentCreated(b) { + stockMarketContentCreated = b; +} + var stockMarketContentCreated = false; function displayStockMarketContent() { if (__WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].hasWseAccount == null) {__WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].hasWseAccount = false;} @@ -32083,7 +32088,7 @@ function logBoxUpdateText() { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_LogBox_js__ = __webpack_require__(26); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -32441,7 +32446,7 @@ Environment.prototype = { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return loadAllGangs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AllGangs; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Faction_js__ = __webpack_require__(10); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Location_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Player_js__ = __webpack_require__(0); @@ -32450,7 +32455,7 @@ Environment.prototype = { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_numeral_min_js__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_numeral_min_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__utils_numeral_min_js__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_StringHelperFunctions_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_YesNoBox_js__ = __webpack_require__(19); @@ -33867,7 +33872,7 @@ function applySourceFile(srcFile) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__BitNode_js__ = __webpack_require__(9); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Company_js__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__CreateProgram_js__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Faction_js__ = __webpack_require__(10); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Location_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Message_js__ = __webpack_require__(24); @@ -33971,7 +33976,7 @@ function prestigeAugmentation() { if (__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].hasWseAccount) { Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["d" /* initStockMarket */])(); Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["f" /* initSymbolToStockMap */])(); - stockMarketContentCreated = false; + Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["h" /* setStockMarketContentCreated */])(false); var stockMarketList = document.getElementById("stock-market-list"); while(stockMarketList.firstChild) { stockMarketList.removeChild(stockMarketList.firstChild); @@ -34111,13 +34116,13 @@ function prestigeSourceFile() { /* unused harmony export getHacknetNode */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(9); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InteractiveTutorial_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_JSONReviver_js__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -34700,23 +34705,25 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @preserve /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__ = __webpack_require__(38); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Faction_js__ = __webpack_require__(10); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__HacknetNode_js__ = __webpack_require__(32); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Location_js__ = __webpack_require__(15); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Player_js__ = __webpack_require__(0); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Script_js__ = __webpack_require__(18); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Server_js__ = __webpack_require__(6); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Settings_js__ = __webpack_require__(12); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__StockMarket_js__ = __webpack_require__(25); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__NetscriptWorker_js__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__NetscriptEnvironment_js__ = __webpack_require__(28); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_decimal_js__ = __webpack_require__(23); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_decimal_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17__utils_decimal_js__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__utils_IPAddress_js__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__engine_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Faction_js__ = __webpack_require__(10); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__HacknetNode_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Location_js__ = __webpack_require__(15); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Player_js__ = __webpack_require__(0); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Script_js__ = __webpack_require__(18); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Server_js__ = __webpack_require__(6); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__Settings_js__ = __webpack_require__(12); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__SpecialServerIps_js__ = __webpack_require__(11); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__StockMarket_js__ = __webpack_require__(25); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__NetscriptWorker_js__ = __webpack_require__(14); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__ = __webpack_require__(41); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__NetscriptEnvironment_js__ = __webpack_require__(28); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_decimal_js__ = __webpack_require__(23); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_decimal_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18__utils_decimal_js__); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__utils_HelperFunctions_js__ = __webpack_require__(1); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__utils_IPAddress_js__ = __webpack_require__(20); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__ = __webpack_require__(5); + @@ -34745,21 +34752,21 @@ var hasSingularitySF = false; var singularitySFLvl = 1; function initSingularitySFFlags() { - for (var i = 0; i < __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].sourceFiles.length; ++i) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].sourceFiles[i].n === 4) { + for (var i = 0; i < __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].sourceFiles.length; ++i) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].sourceFiles[i].n === 4) { hasSingularitySF = true; - singularitySFLvl = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].sourceFiles[i].lvl; + singularitySFLvl = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].sourceFiles[i].lvl; } } } function NetscriptFunctions(workerScript) { return { - hacknetnodes : __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacknetNodes, + hacknetnodes : __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacknetNodes, scan : function(ip=workerScript.serverIp){ - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, 'Invalid IP or hostname passed into scan() command'); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, 'Invalid IP or hostname passed into scan() command'); } var out = []; for (var i = 0; i < server.serversOnNetwork.length; i++) { @@ -34774,40 +34781,40 @@ function NetscriptFunctions(workerScript) { }, hack : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Hack() call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Hack() call has incorrect number of arguments. Takes 1 argument"); } var threads = workerScript.scriptRef.threads; if (isNaN(threads) || threads < 1) {threads = 1;} - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping..."); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping..."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping..."); } //Calculate the hacking time - var hackingTime = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["i" /* scriptCalculateHackingTime */])(server); //This is in seconds + var hackingTime = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["i" /* scriptCalculateHackingTime */])(server); //This is in seconds //No root access or skill level too low if (server.hasAdminRights == false) { workerScript.scriptRef.log("Cannot hack this server (" + server.hostname + ") because user does not have root access"); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot hack this server (" + server.hostname + ") because user does not have root access"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot hack this server (" + server.hostname + ") because user does not have root access"); } - if (server.requiredHackingSkill > __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill) { + if (server.requiredHackingSkill > __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill) { workerScript.scriptRef.log("Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough"); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough"); } workerScript.scriptRef.log("Attempting to hack " + ip + " in " + hackingTime.toFixed(3) + " seconds (t=" + threads + ")"); //console.log("Hacking " + server.hostname + " after " + hackingTime.toString() + " seconds (t=" + threads + ")"); - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["d" /* netscriptDelay */])(hackingTime* 1000).then(function() { + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["d" /* netscriptDelay */])(hackingTime* 1000).then(function() { if (workerScript.env.stopFlag) {return Promise.reject(workerScript);} - var hackChance = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["h" /* scriptCalculateHackingChance */])(server); + var hackChance = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["h" /* scriptCalculateHackingChance */])(server); var rand = Math.random(); - var expGainedOnSuccess = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["f" /* scriptCalculateExpGain */])(server) * threads; + var expGainedOnSuccess = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["f" /* scriptCalculateExpGain */])(server) * threads; var expGainedOnFailure = (expGainedOnSuccess / 4); if (rand < hackChance) { //Success! - var moneyGained = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["j" /* scriptCalculatePercentMoneyHacked */])(server); + var moneyGained = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["j" /* scriptCalculatePercentMoneyHacked */])(server); moneyGained = Math.floor(server.moneyAvailable * moneyGained) * threads; //Over-the-top safety checks @@ -34819,33 +34826,33 @@ function NetscriptFunctions(workerScript) { server.moneyAvailable -= moneyGained; if (server.moneyAvailable < 0) {server.moneyAvailable = 0;} - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].gainMoney(moneyGained); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].gainMoney(moneyGained); workerScript.scriptRef.onlineMoneyMade += moneyGained; workerScript.scriptRef.recordHack(server.ip, moneyGained, threads); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].gainHackingExp(expGainedOnSuccess); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].gainHackingExp(expGainedOnSuccess); workerScript.scriptRef.onlineExpGained += expGainedOnSuccess; //console.log("Script successfully hacked " + server.hostname + " for $" + formatNumber(moneyGained, 2) + " and " + formatNumber(expGainedOnSuccess, 4) + " exp"); - workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(moneyGained, 2) + " and " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGainedOnSuccess, 4) + " exp (t=" + threads + ")"); + workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(moneyGained, 2) + " and " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGainedOnSuccess, 4) + " exp (t=" + threads + ")"); server.fortify(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ServerFortifyAmount * threads); return Promise.resolve(true); } else { //Player only gains 25% exp for failure? TODO Can change this later to balance - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].gainHackingExp(expGainedOnFailure); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].gainHackingExp(expGainedOnFailure); workerScript.scriptRef.onlineExpGained += expGainedOnFailure; //console.log("Script unsuccessful to hack " + server.hostname + ". Gained " + formatNumber(expGainedOnFailure, 4) + " exp"); - workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGainedOnFailure, 4) + " exp (t=" + threads + ")"); + workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGainedOnFailure, 4) + " exp (t=" + threads + ")"); return Promise.resolve(false); } }); }, sleep : function(time,log=true){ if (time === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "sleep() call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "sleep() call has incorrect number of arguments. Takes 1 argument"); } if (log) { workerScript.scriptRef.log("Sleeping for " + time + " milliseconds"); } - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["d" /* netscriptDelay */])(time).then(function() { + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["d" /* netscriptDelay */])(time).then(function() { return Promise.resolve(true); }); }, @@ -34853,37 +34860,37 @@ function NetscriptFunctions(workerScript) { var threads = workerScript.scriptRef.threads; if (isNaN(threads) || threads < 1) {threads = 1;} if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "grow() call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "grow() call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot grow(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot grow(). Invalid IP or hostname passed in: " + ip); } //No root access or skill level too low if (server.hasAdminRights == false) { workerScript.scriptRef.log("Cannot grow this server (" + server.hostname + ") because user does not have root access"); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot grow this server (" + server.hostname + ") because user does not have root access"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot grow this server (" + server.hostname + ") because user does not have root access"); } - var growTime = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["g" /* scriptCalculateGrowTime */])(server); + var growTime = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["g" /* scriptCalculateGrowTime */])(server); //console.log("Executing grow() on server " + server.hostname + " in " + formatNumber(growTime/1000, 3) + " seconds") - workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(growTime/1000, 3) + " seconds (t=" + threads + ")"); - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["d" /* netscriptDelay */])(growTime).then(function() { + workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(growTime/1000, 3) + " seconds (t=" + threads + ")"); + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["d" /* netscriptDelay */])(growTime).then(function() { if (workerScript.env.stopFlag) {return Promise.reject(workerScript);} server.moneyAvailable += (1 * threads); //It can be grown even if it has no money - var growthPercentage = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["j" /* processSingleServerGrowth */])(server, 450 * threads); + var growthPercentage = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["j" /* processSingleServerGrowth */])(server, 450 * threads); workerScript.scriptRef.recordGrow(server.ip, threads); - var expGain = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["f" /* scriptCalculateExpGain */])(server) * threads; + var expGain = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["f" /* scriptCalculateExpGain */])(server) * threads; if (growthPercentage == 1) { expGain = 0; } workerScript.scriptRef.log("Available money on " + server.hostname + " grown by " - + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(growthPercentage*100 - 100, 6) + "%. Gained " + - Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGain, 4) + " hacking exp (t=" + threads +")"); + + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(growthPercentage*100 - 100, 6) + "%. Gained " + + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGain, 4) + " hacking exp (t=" + threads +")"); workerScript.scriptRef.onlineExpGained += expGain; - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].gainHackingExp(expGain); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].gainHackingExp(expGain); return Promise.resolve(growthPercentage); }); }, @@ -34891,39 +34898,39 @@ function NetscriptFunctions(workerScript) { var threads = workerScript.scriptRef.threads; if (isNaN(threads) || threads < 1) {threads = 1;} if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "weaken() call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "weaken() call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot weaken(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot weaken(). Invalid IP or hostname passed in: " + ip); } //No root access or skill level too low if (server.hasAdminRights == false) { workerScript.scriptRef.log("Cannot weaken this server (" + server.hostname + ") because user does not have root access"); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot weaken this server (" + server.hostname + ") because user does not have root access"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot weaken this server (" + server.hostname + ") because user does not have root access"); } - var weakenTime = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["k" /* scriptCalculateWeakenTime */])(server); + var weakenTime = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["k" /* scriptCalculateWeakenTime */])(server); //console.log("Executing weaken() on server " + server.hostname + " in " + formatNumber(weakenTime/1000, 3) + " seconds") workerScript.scriptRef.log("Executing weaken() on server " + server.hostname + " in " + - Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(weakenTime/1000, 3) + " seconds (t=" + threads + ")"); - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["d" /* netscriptDelay */])(weakenTime).then(function() { + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(weakenTime/1000, 3) + " seconds (t=" + threads + ")"); + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["d" /* netscriptDelay */])(weakenTime).then(function() { if (workerScript.env.stopFlag) {return Promise.reject(workerScript);} server.weaken(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ServerWeakenAmount * threads); workerScript.scriptRef.recordWeaken(server.ip, threads); - var expGain = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["f" /* scriptCalculateExpGain */])(server) * threads; + var expGain = Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["f" /* scriptCalculateExpGain */])(server) * threads; workerScript.scriptRef.log("Server security level on " + server.hostname + " weakened to " + server.hackDifficulty + - ". Gained " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGain, 4) + " hacking exp (t=" + threads + ")"); + ". Gained " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGain, 4) + " hacking exp (t=" + threads + ")"); workerScript.scriptRef.onlineExpGained += expGain; - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].gainHackingExp(expGain); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].gainHackingExp(expGain); return Promise.resolve(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ServerWeakenAmount * threads); }); }, print : function(args){ if (args === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "print() call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "print() call has incorrect number of arguments. Takes 1 argument"); } workerScript.scriptRef.log(args.toString()); }, @@ -34932,18 +34939,18 @@ function NetscriptFunctions(workerScript) { }, nuke : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call nuke(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call nuke(). Invalid IP or hostname passed in: " + ip); } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].NukeProgram)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the NUKE.exe virus!"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].NukeProgram)) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the NUKE.exe virus!"); } if (server.openPortCount < server.numOpenPortsRequired) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Not enough ports opened to use NUKE.exe virus"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Not enough ports opened to use NUKE.exe virus"); } if (server.hasAdminRights) { workerScript.scriptRef.log("Already have root access to " + server.hostname); @@ -34955,16 +34962,16 @@ function NetscriptFunctions(workerScript) { }, brutessh : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot call brutessh(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call brutessh(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call brutessh(). Invalid IP or hostname passed in: " + ip); } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram)) { + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram)) { workerScript.scriptRef.log("You do not have the BruteSSH.exe program!"); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the BruteSSH.exe program!"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the BruteSSH.exe program!"); } if (!server.sshPortOpen) { workerScript.scriptRef.log("Executed BruteSSH.exe on " + server.hostname + " to open SSH port (22)"); @@ -34977,15 +34984,15 @@ function NetscriptFunctions(workerScript) { }, ftpcrack : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip); } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the FTPCrack.exe program!"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram)) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the FTPCrack.exe program!"); } if (!server.ftpPortOpen) { workerScript.scriptRef.log("Executed FTPCrack.exe on " + server.hostname + " to open FTP port (21)"); @@ -34998,15 +35005,15 @@ function NetscriptFunctions(workerScript) { }, relaysmtp : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip); } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the relaySMTP.exe program!"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram)) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the relaySMTP.exe program!"); } if (!server.smtpPortOpen) { workerScript.scriptRef.log("Executed relaySMTP.exe on " + server.hostname + " to open SMTP port (25)"); @@ -35019,15 +35026,15 @@ function NetscriptFunctions(workerScript) { }, httpworm : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot call httpworm(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call httpworm(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call httpworm(). Invalid IP or hostname passed in: " + ip); } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the HTTPWorm.exe program!"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram)) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the HTTPWorm.exe program!"); } if (!server.httpPortOpen) { workerScript.scriptRef.log("Executed HTTPWorm.exe on " + server.hostname + " to open HTTP port (80)"); @@ -35040,15 +35047,15 @@ function NetscriptFunctions(workerScript) { }, sqlinject : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip); } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the SQLInject.exe program!"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasProgram(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram)) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You do not have the SQLInject.exe program!"); } if (!server.sqlPortOpen) { workerScript.scriptRef.log("Executed SQLInject.exe on " + server.hostname + " to open SQL port (1433)"); @@ -35061,93 +35068,93 @@ function NetscriptFunctions(workerScript) { }, run : function(scriptname,threads = 1){ if (scriptname === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)"); } if (isNaN(threads) || threads < 1) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0"); } var argsForNewScript = []; for (var i = 2; i < arguments.length; ++i) { argsForNewScript.push(arguments[i]); } - var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(workerScript.serverIp); + var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(workerScript.serverIp); if (scriptServer == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server. This is a bug in the game. Report to game dev"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server. This is a bug in the game. Report to game dev"); } - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["e" /* runScriptFromScript */])(scriptServer, scriptname, argsForNewScript, workerScript, threads); + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["e" /* runScriptFromScript */])(scriptServer, scriptname, argsForNewScript, workerScript, threads); }, exec : function(scriptname,ip,threads = 1){ if (scriptname === undefined || ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)"); } if (isNaN(threads) || threads < 1) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument for thread count passed into exec(). Must be numeric and greater than 0"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument for thread count passed into exec(). Must be numeric and greater than 0"); } var argsForNewScript = []; for (var i = 3; i < arguments.length; ++i) { argsForNewScript.push(arguments[i]); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid hostname/ip passed into exec() command: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid hostname/ip passed into exec() command: " + ip); } - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["e" /* runScriptFromScript */])(server, scriptname, argsForNewScript, workerScript, threads); + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["e" /* runScriptFromScript */])(server, scriptname, argsForNewScript, workerScript, threads); }, kill : function(filename,ip){ if (filename === undefined || ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("kill() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "kill() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "kill() failed. Invalid IP or hostname passed in: " + ip); } var argsForKillTarget = []; for (var i = 2; i < arguments.length; ++i) { argsForKillTarget.push(arguments[i]); } - var runningScriptObj = Object(__WEBPACK_IMPORTED_MODULE_9__Script_js__["d" /* findRunningScript */])(filename, argsForKillTarget, server); + var runningScriptObj = Object(__WEBPACK_IMPORTED_MODULE_10__Script_js__["d" /* findRunningScript */])(filename, argsForKillTarget, server); if (runningScriptObj == null) { - workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__["f" /* printArray */])(argsForKillTarget)); + workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_19__utils_HelperFunctions_js__["f" /* printArray */])(argsForKillTarget)); return false; } - var res = Object(__WEBPACK_IMPORTED_MODULE_14__NetscriptWorker_js__["d" /* killWorkerScript */])(runningScriptObj, server.ip); + var res = Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptWorker_js__["d" /* killWorkerScript */])(runningScriptObj, server.ip); if (res) { - workerScript.scriptRef.log("Killing " + filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__["f" /* printArray */])(argsForKillTarget) + ". May take up to a few minutes for the scripts to die..."); + workerScript.scriptRef.log("Killing " + filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_19__utils_HelperFunctions_js__["f" /* printArray */])(argsForKillTarget) + ". May take up to a few minutes for the scripts to die..."); return true; } else { - workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__["f" /* printArray */])(argsForKillTarget)); + workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_19__utils_HelperFunctions_js__["f" /* printArray */])(argsForKillTarget)); return false; } }, killall : function(ip){ if (ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "killall() call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "killall() call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("killall() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "killall() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "killall() failed. Invalid IP or hostname passed in: " + ip); } for (var i = server.runningScripts.length-1; i >= 0; --i) { - Object(__WEBPACK_IMPORTED_MODULE_14__NetscriptWorker_js__["d" /* killWorkerScript */])(server.runningScripts[i], server.ip); + Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptWorker_js__["d" /* killWorkerScript */])(server.runningScripts[i], server.ip); } workerScript.scriptRef.log("killall(): Killing all scripts on " + server.hostname + ". May take a few minutes for the scripts to die"); return true; }, scp : function(scriptname,ip){ if (scriptname === undefined || ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "scp() call has incorrect number of arguments. Takes 2 arguments"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "scp() call has incorrect number of arguments. Takes 2 arguments"); } - var destServer = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var destServer = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (destServer == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid hostname/ip passed into scp() command: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid hostname/ip passed into scp() command: " + ip); } - var currServ = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(workerScript.serverIp); + var currServ = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(workerScript.serverIp); if (currServ == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer"); } var sourceScript = null; @@ -35175,7 +35182,7 @@ function NetscriptFunctions(workerScript) { } //Create new script if it does not already exist - var newScript = new __WEBPACK_IMPORTED_MODULE_9__Script_js__["c" /* Script */](); + var newScript = new __WEBPACK_IMPORTED_MODULE_10__Script_js__["c" /* Script */](); newScript.filename = scriptname; newScript.code = sourceScript.code; newScript.ramUsage = sourceScript.ramUsage; @@ -35186,112 +35193,112 @@ function NetscriptFunctions(workerScript) { }, hasRootAccess : function(ip){ if (ip===undefined){ - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "hasRootAccess() call has incorrect number of arguments. Takes 1 argument"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "hasRootAccess() call has incorrect number of arguments. Takes 1 argument"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null){ workerScript.scriptRef.log("hasRootAccess() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "hasRootAccess() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "hasRootAccess() failed. Invalid IP or hostname passed in: " + ip); } return server.hasAdminRights; }, getHostname : function(){ - var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(workerScript.serverIp); + var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(workerScript.serverIp); if (scriptServer == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server. This is a bug in the game. Report to game dev"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server. This is a bug in the game. Report to game dev"); } return scriptServer.hostname; }, getHackingLevel : function(){ - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].updateSkillLevels(); - workerScript.scriptRef.log("getHackingLevel() returned " + __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill); - return __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill; + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].updateSkillLevels(); + workerScript.scriptRef.log("getHackingLevel() returned " + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill); + return __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill; }, getServerMoneyAvailable : function(ip){ - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("Cannot getServerMoneyAvailable(). Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot getServerMoneyAvailable(). Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot getServerMoneyAvailable(). Invalid IP or hostname passed in: " + ip); } if (server.hostname == "home") { //Return player's money - workerScript.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $" + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.toNumber(), 2)); - return __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.toNumber(); + workerScript.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $" + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.toNumber(), 2)); + return __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.toNumber(); } - workerScript.scriptRef.log("getServerMoneyAvailable() returned " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.moneyAvailable, 2) + " for " + server.hostname); + workerScript.scriptRef.log("getServerMoneyAvailable() returned " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.moneyAvailable, 2) + " for " + server.hostname); return server.moneyAvailable; }, getServerSecurityLevel : function(ip){ - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip); } - workerScript.scriptRef.log("getServerSecurityLevel() returned " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.hackDifficulty, 3) + " for " + server.hostname); + workerScript.scriptRef.log("getServerSecurityLevel() returned " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.hackDifficulty, 3) + " for " + server.hostname); return server.hackDifficulty; }, getServerBaseSecurityLevel : function(ip){ - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip); } - workerScript.scriptRef.log("getServerBaseSecurityLevel() returned " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.baseDifficulty, 3) + " for " + server.hostname); + workerScript.scriptRef.log("getServerBaseSecurityLevel() returned " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.baseDifficulty, 3) + " for " + server.hostname); return server.baseDifficulty; }, getServerRequiredHackingLevel : function(ip){ - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip); } - workerScript.scriptRef.log("getServerRequiredHackingLevel returned " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.requiredHackingSkill, 0) + " for " + server.hostname); + workerScript.scriptRef.log("getServerRequiredHackingLevel returned " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.requiredHackingSkill, 0) + " for " + server.hostname); return server.requiredHackingSkill; }, getServerMaxMoney : function(ip){ - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip); } - workerScript.scriptRef.log("getServerMaxMoney() returned " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.moneyMax, 0) + " for " + server.hostname); + workerScript.scriptRef.log("getServerMaxMoney() returned " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.moneyMax, 0) + " for " + server.hostname); return server.moneyMax; }, getServerGrowth : function(ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerGrowth() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerGrowth() failed. Invalid IP or hostname passed in: " + ip); } - workerScript.scriptRef.log("getServerGrowth() returned " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.serverGrowth, 0) + " for " + server.hostname); + workerScript.scriptRef.log("getServerGrowth() returned " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.serverGrowth, 0) + " for " + server.hostname); return server.serverGrowth; }, getServerNumPortsRequired : function(ip){ - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip); } - workerScript.scriptRef.log("getServerNumPortsRequired() returned " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.numOpenPortsRequired, 0) + " for " + server.hostname); + workerScript.scriptRef.log("getServerNumPortsRequired() returned " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.numOpenPortsRequired, 0) + " for " + server.hostname); return server.numOpenPortsRequired; }, getServerRam : function(ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getServerRam() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerRam() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getServerRam() failed. Invalid IP or hostname passed in: " + ip); } - workerScript.scriptRef.log("getServerRam() returned [" + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.maxRam, 2) + "GB, " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.ramUsed, 2) + "GB]"); + workerScript.scriptRef.log("getServerRam() returned [" + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.maxRam, 2) + "GB, " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.ramUsed, 2) + "GB]"); return [server.maxRam, server.ramUsed]; }, fileExists : function(filename,ip=workerScript.serverIp){ if (filename === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("fileExists() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "fileExists() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "fileExists() failed. Invalid IP or hostname passed in: " + ip); } for (var i = 0; i < server.scripts.length; ++i) { if (filename == server.scripts[i].filename) { @@ -35307,48 +35314,48 @@ function NetscriptFunctions(workerScript) { }, isRunning : function(filename,ip){ if (filename === undefined || ip === undefined) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)"); } - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("isRunning() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "isRunning() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "isRunning() failed. Invalid IP or hostname passed in: " + ip); } var argsForTargetScript = []; for (var i = 2; i < arguments.length; ++i) { argsForTargetScript.push(arguments[i]); } - return (Object(__WEBPACK_IMPORTED_MODULE_9__Script_js__["d" /* findRunningScript */])(filename, argsForTargetScript, server) != null); + return (Object(__WEBPACK_IMPORTED_MODULE_10__Script_js__["d" /* findRunningScript */])(filename, argsForTargetScript, server) != null); }, - getNextHacknetNodeCost : __WEBPACK_IMPORTED_MODULE_6__HacknetNode_js__["b" /* getCostOfNextHacknetNode */], - purchaseHacknetNode : __WEBPACK_IMPORTED_MODULE_6__HacknetNode_js__["d" /* purchaseHacknet */], + getNextHacknetNodeCost : __WEBPACK_IMPORTED_MODULE_7__HacknetNode_js__["b" /* getCostOfNextHacknetNode */], + purchaseHacknetNode : __WEBPACK_IMPORTED_MODULE_7__HacknetNode_js__["d" /* purchaseHacknet */], getStockPrice : function(symbol) { - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasTixApiAccess) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasTixApiAccess) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()"); } - var stock = __WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; + var stock = __WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; if (stock == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); } return parseFloat(stock.price.toFixed(3)); }, getStockPosition : function(symbol) { - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasTixApiAccess) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasTixApiAccess) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()"); } - var stock = __WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; + var stock = __WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; if (stock == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); } return [stock.playerShares, stock.playerAvgPx]; }, buyStock : function(symbol, shares) { - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasTixApiAccess) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use buyStock()"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasTixApiAccess) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use buyStock()"); } - var stock = __WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; + var stock = __WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; if (stock == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); } if (shares == 0) {return false;} if (stock == null || shares < 0 || isNaN(shares)) { @@ -35358,32 +35365,32 @@ function NetscriptFunctions(workerScript) { shares = Math.round(shares); var totalPrice = stock.price * shares; - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission)) { - workerScript.scriptRef.log("Not enough money to purchase " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission)) { + workerScript.scriptRef.log("Not enough money to purchase " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + symbol + ". Need $" + - Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2).toString()); + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2).toString()); return false; } var origTotal = stock.playerShares * stock.playerAvgPx; - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission); var newTotal = origTotal + totalPrice; stock.playerShares += shares; stock.playerAvgPx = newTotal / stock.playerShares; - if (Engine.currentPage == Engine.Page.StockMarket) { - Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["i" /* updateStockPlayerPosition */])(stock); + if (__WEBPACK_IMPORTED_MODULE_5__engine_js__["Engine"].currentPage == __WEBPACK_IMPORTED_MODULE_5__engine_js__["Engine"].Page.StockMarket) { + Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["j" /* updateStockPlayerPosition */])(stock); } - workerScript.scriptRef.log("Bought " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" + - Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share"); + workerScript.scriptRef.log("Bought " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" + + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share"); return true; }, sellStock : function(symbol, shares) { - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hasTixApiAccess) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use sellStock()"); + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hasTixApiAccess) { + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use sellStock()"); } - var stock = __WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; + var stock = __WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["b" /* SymbolToStockMap */][symbol]; if (stock == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid stock symbol passed into getStockPrice()"); } if (shares == 0) {return false;} if (stock == null || shares < 0 || isNaN(shares)) { @@ -35393,7 +35400,7 @@ function NetscriptFunctions(workerScript) { if (shares > stock.playerShares) {shares = stock.playerShares;} if (shares == 0) {return false;} var gains = stock.price * shares - __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission; - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].gainMoney(gains); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].gainMoney(gains); //Calculate net profit and add to script stats var netProfit = ((stock.price - stock.playerAvgPx) * shares) - __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].StockMarketCommission; @@ -35404,12 +35411,12 @@ function NetscriptFunctions(workerScript) { if (stock.playerShares == 0) { stock.playerAvgPx = 0; } - if (Engine.currentPage == Engine.Page.StockMarket) { - Object(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["i" /* updateStockPlayerPosition */])(stock); + if (__WEBPACK_IMPORTED_MODULE_5__engine_js__["Engine"].currentPage == __WEBPACK_IMPORTED_MODULE_5__engine_js__["Engine"].Page.StockMarket) { + Object(__WEBPACK_IMPORTED_MODULE_14__StockMarket_js__["j" /* updateStockPlayerPosition */])(stock); } - workerScript.scriptRef.log("Sold " + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" + - Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share. Gained " + - "$" + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(gains, 2)); + workerScript.scriptRef.log("Sold " + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" + + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share. Gained " + + "$" + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(gains, 2)); return true; }, purchaseServer : function(hostname, ram) { @@ -35420,38 +35427,38 @@ function NetscriptFunctions(workerScript) { return ""; } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].purchasedServers.length >= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].PurchasedServerLimit) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].purchasedServers.length >= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].PurchasedServerLimit) { workerScript.scriptRef.log("Error: You have reached the maximum limit of " + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].PurchasedServerLimit + " servers. You cannot purchase any more."); return ""; } ram = Math.round(ram); - if (isNaN(ram) || !Object(__WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__["e" /* powerOfTwo */])(ram)) { + if (isNaN(ram) || !Object(__WEBPACK_IMPORTED_MODULE_19__utils_HelperFunctions_js__["e" /* powerOfTwo */])(ram)) { workerScript.scriptRef.log("Error: Invalid ram argument passed to purchaseServer(). Must be numeric and a power of 2"); return ""; } var cost = ram * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer; - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.lt(cost)) { - workerScript.scriptRef.log("Error: Not enough money to purchase server. Need $" + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(cost, 2)); + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.lt(cost)) { + workerScript.scriptRef.log("Error: Not enough money to purchase server. Need $" + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(cost, 2)); return ""; } - var newServ = new __WEBPACK_IMPORTED_MODULE_10__Server_js__["d" /* Server */](Object(__WEBPACK_IMPORTED_MODULE_19__utils_IPAddress_js__["a" /* createRandomIp */])(), hostnameStr, "", false, true, true, ram); - Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["a" /* AddToAllServers */])(newServ); + var newServ = new __WEBPACK_IMPORTED_MODULE_11__Server_js__["d" /* Server */](Object(__WEBPACK_IMPORTED_MODULE_20__utils_IPAddress_js__["a" /* createRandomIp */])(), hostnameStr, "", false, true, true, ram); + Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["a" /* AddToAllServers */])(newServ); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].purchasedServers.push(newServ.ip); - var homeComputer = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer(); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].purchasedServers.push(newServ.ip); + var homeComputer = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer(); homeComputer.serversOnNetwork.push(newServ.ip); newServ.serversOnNetwork.push(homeComputer.ip); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(cost); - workerScript.scriptRef.log("Purchased new server with hostname " + newServ.hostname + " for $" + Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["c" /* formatNumber */])(cost, 2)); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(cost); + workerScript.scriptRef.log("Purchased new server with hostname " + newServ.hostname + " for $" + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(cost, 2)); return newServ.hostname; }, deleteServer : function(hostname) { var hostnameStr = String(hostname); hostnameStr = hostnameStr.replace(/\s\s+/g, ''); - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["c" /* GetServerByHostname */])(hostnameStr); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["c" /* GetServerByHostname */])(hostnameStr); if (server == null) { workerScript.scriptRef.log("Error: Could not find server with hostname " + hostnameStr + ". deleteServer() failed"); return false; @@ -35479,10 +35486,10 @@ function NetscriptFunctions(workerScript) { //Delete from player's purchasedServers array var found = false; - for (var i = 0; i < __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].purchasedServers.length; ++i) { - if (ip == __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].purchasedServers[i]) { + for (var i = 0; i < __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].purchasedServers.length; ++i) { + if (ip == __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].purchasedServers[i]) { found = true; - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].purchasedServers.splice(i, 1); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].purchasedServers.splice(i, 1); break; } } @@ -35494,11 +35501,11 @@ function NetscriptFunctions(workerScript) { } //Delete from all servers - delete __WEBPACK_IMPORTED_MODULE_10__Server_js__["b" /* AllServers */][ip]; + delete __WEBPACK_IMPORTED_MODULE_11__Server_js__["b" /* AllServers */][ip]; //Delete from home computer found = false; - var homeComputer = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer(); + var homeComputer = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer(); for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) { if (ip == homeComputer.serversOnNetwork[i]) { homeComputer.serversOnNetwork.splice(i, 1); @@ -35519,33 +35526,33 @@ function NetscriptFunctions(workerScript) { if (!isNaN(port)) { //Port 1-10 if (port < 1 || port > 10) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Trying to write to invalid port: " + port + ". Only ports 1-10 are valid."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Trying to write to invalid port: " + port + ". Only ports 1-10 are valid."); } var portName = "Port" + String(port); - var port = __WEBPACK_IMPORTED_MODULE_14__NetscriptWorker_js__["a" /* NetscriptPorts */][portName]; + var port = __WEBPACK_IMPORTED_MODULE_15__NetscriptWorker_js__["a" /* NetscriptPorts */][portName]; if (port == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer"); } port.push(data); - if (port.length > __WEBPACK_IMPORTED_MODULE_11__Settings_js__["a" /* Settings */].MaxPortCapacity) { + if (port.length > __WEBPACK_IMPORTED_MODULE_12__Settings_js__["a" /* Settings */].MaxPortCapacity) { port.shift(); return true; } return false; } else { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument passed in for port: " + port + ". Must be a number between 1 and 10"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument passed in for port: " + port + ". Must be a number between 1 and 10"); } }, read : function(port) { if (!isNaN(port)) { //Port 1-10 if (port < 1 || port > 10) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Trying to write to invalid port: " + port + ". Only ports 1-10 are valid."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Trying to write to invalid port: " + port + ". Only ports 1-10 are valid."); } var portName = "Port" + String(port); - var port = __WEBPACK_IMPORTED_MODULE_14__NetscriptWorker_js__["a" /* NetscriptPorts */][portName]; + var port = __WEBPACK_IMPORTED_MODULE_15__NetscriptWorker_js__["a" /* NetscriptPorts */][portName]; if (port == null) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer"); } if (port.length == 0) { return "NULL PORT DATA"; @@ -35553,14 +35560,14 @@ function NetscriptFunctions(workerScript) { return port.shift(); } } else { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument passed in for port: " + port + ". Must be a number between 1 and 10"); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Invalid argument passed in for port: " + port + ". Must be a number between 1 and 10"); } }, scriptRunning : function(scriptname, ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("scriptRunning() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "scriptRunning() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "scriptRunning() failed. Invalid IP or hostname passed in: " + ip); } for (var i = 0; i < server.runningScripts.length; ++i) { if (server.runningScripts[i].filename == scriptname) { @@ -35570,25 +35577,25 @@ function NetscriptFunctions(workerScript) { return false; }, scriptKill : function(scriptname, ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("scriptKill() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "scriptKill() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "scriptKill() failed. Invalid IP or hostname passed in: " + ip); } var suc = false; for (var i = 0; i < server.runningScripts.length; ++i) { if (server.runningScripts[i].filename == scriptname) { - Object(__WEBPACK_IMPORTED_MODULE_14__NetscriptWorker_js__["d" /* killWorkerScript */])(server.runningScripts[i], server.ip); + Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptWorker_js__["d" /* killWorkerScript */])(server.runningScripts[i], server.ip); suc = true; } } return suc; }, getScriptRam : function (scriptname, ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getScriptRam() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getScriptRam() failed. Invalid IP or hostname passed in: " + ip); } for (var i = 0; i < server.scripts.length; ++i) { if (server.scripts[i].filename == scriptname) { @@ -35598,63 +35605,63 @@ function NetscriptFunctions(workerScript) { return 0; }, getHackTime : function(ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getHackTime() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getHackTime() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getHackTime() failed. Invalid IP or hostname passed in: " + ip); } - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["i" /* scriptCalculateHackingTime */])(server); //Returns seconds + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["i" /* scriptCalculateHackingTime */])(server); //Returns seconds }, getGrowTime : function(ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getGrowTime() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getGrowTime() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getGrowTime() failed. Invalid IP or hostname passed in: " + ip); } - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["g" /* scriptCalculateGrowTime */])(server) / 1000; //Returns seconds + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["g" /* scriptCalculateGrowTime */])(server) / 1000; //Returns seconds }, getWeakenTime : function(ip) { - var server = Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["e" /* getServer */])(ip); + var server = Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["e" /* getServer */])(ip); if (server == null) { workerScript.scriptRef.log("getWeakenTime() failed. Invalid IP or hostname passed in: " + ip); - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getWeakenTime() failed. Invalid IP or hostname passed in: " + ip); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "getWeakenTime() failed. Invalid IP or hostname passed in: " + ip); } - return Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["k" /* scriptCalculateWeakenTime */])(server) / 1000; //Returns seconds + return Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["k" /* scriptCalculateWeakenTime */])(server) / 1000; //Returns seconds }, /* Singularity Functions */ universityCourse(universityName, className) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 1)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); return false; } } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) { - var txt = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].singularityStopWork(); + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].isWorking) { + var txt = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].singularityStopWork(); workerScript.scriptRef.log(txt); } var costMult, expMult; switch(universityName.toLowerCase()) { - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].AevumSummitUniversity.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Aevum) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].AevumSummitUniversity.toLowerCase(): + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Aevum) { workerScript.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"); return false; } costMult = 4; expMult = 3; break; - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Sector12RothmanUniversity.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Sector12) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Sector12RothmanUniversity.toLowerCase(): + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Sector12) { workerScript.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"); return false; } costMult = 3; expMult = 2; break; - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].VolhavenZBInstituteOfTechnology.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Volhaven) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].VolhavenZBInstituteOfTechnology.toLowerCase(): + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Volhaven) { workerScript.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"); return false; } @@ -35690,58 +35697,58 @@ function NetscriptFunctions(workerScript) { workerScript.scriptRef.log("Invalid class name: " + className + ". universityCourse() failed"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startClass(costMult, expMult, task); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startClass(costMult, expMult, task); workerScript.scriptRef.log("Started " + task + " at " + universityName); return true; }, gymWorkout(gymName, stat) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 1)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); return false; } } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) { - var txt = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].singularityStopWork(); + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].isWorking) { + var txt = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].singularityStopWork(); workerScript.scriptRef.log(txt); } var costMult, expMult; switch(gymName.toLowerCase()) { - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].AevumCrushFitnessGym.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Aevum) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].AevumCrushFitnessGym.toLowerCase(): + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Aevum) { workerScript.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"); return false; } costMult = 2; expMult = 1.5; break; - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].AevumSnapFitnessGym.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Aevum) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].AevumSnapFitnessGym.toLowerCase(): + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Aevum) { workerScript.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"); return false; } costMult = 6; expMult = 4; break; - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Sector12IronGym.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Sector12) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Sector12IronGym.toLowerCase(): + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Sector12) { workerScript.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"); return false; } costMult = 1; expMult = 1; break; - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Sector12PowerhouseGym.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Sector12) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Sector12PowerhouseGym.toLowerCase(): + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Sector12) { workerScript.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"); return false; } costMult = 10; expMult = 7.5; break; - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].VolhavenMilleniumFitnessGym: - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Volhaven) { + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].VolhavenMilleniumFitnessGym: + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Volhaven) { workerScript.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"); return false; } @@ -35756,19 +35763,19 @@ function NetscriptFunctions(workerScript) { switch(stat.toLowerCase()) { case "strength".toLowerCase(): case "str".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymStrength); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymStrength); break; case "defense".toLowerCase(): case "def".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymDefense); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymDefense); break; case "dexterity".toLowerCase(): case "dex".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymDexterity); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymDexterity); break; case "agility".toLowerCase(): case "agi".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymAgility); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymAgility); break; default: workerScript.scriptRef.log("Invalid stat: " + stat + ". gymWorkout() failed"); @@ -35779,22 +35786,22 @@ function NetscriptFunctions(workerScript) { }, travelToCity(cityname) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 1)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); return false; } } switch(cityname) { - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Aevum: - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Chongqing: - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Sector12: - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].NewTokyo: - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Ishima: - case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Volhaven: - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(200000); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city = cityname; + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Aevum: + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Chongqing: + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Sector12: + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].NewTokyo: + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Ishima: + case __WEBPACK_IMPORTED_MODULE_8__Location_js__["a" /* Locations */].Volhaven: + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(200000); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].city = cityname; workerScript.scriptRef.log("Traveled to " + cityname); return true; default: @@ -35804,44 +35811,44 @@ function NetscriptFunctions(workerScript) { }, purchaseTor() { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 1)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); return false; } } - if (__WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__["a" /* SpecialServerIps */]["Darkweb Server"] != null) { + if (__WEBPACK_IMPORTED_MODULE_13__SpecialServerIps_js__["a" /* SpecialServerIps */]["Darkweb Server"] != null) { workerScript.scriptRef.log("You already have a TOR router! purchaseTor() failed"); return false; } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.lt(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].TorRouterCost)) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.lt(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].TorRouterCost)) { workerScript.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].TorRouterCost); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].TorRouterCost); - var darkweb = new __WEBPACK_IMPORTED_MODULE_10__Server_js__["d" /* Server */](Object(__WEBPACK_IMPORTED_MODULE_19__utils_IPAddress_js__["a" /* createRandomIp */])(), "darkweb", "", false, false, false, 1); - Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["a" /* AddToAllServers */])(darkweb); - __WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__["a" /* SpecialServerIps */].addIp("Darkweb Server", darkweb.ip); + var darkweb = new __WEBPACK_IMPORTED_MODULE_11__Server_js__["d" /* Server */](Object(__WEBPACK_IMPORTED_MODULE_20__utils_IPAddress_js__["a" /* createRandomIp */])(), "darkweb", "", false, false, false, 1); + Object(__WEBPACK_IMPORTED_MODULE_11__Server_js__["a" /* AddToAllServers */])(darkweb); + __WEBPACK_IMPORTED_MODULE_13__SpecialServerIps_js__["a" /* SpecialServerIps */].addIp("Darkweb Server", darkweb.ip); document.getElementById("location-purchase-tor").setAttribute("class", "a-link-button-inactive"); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().serversOnNetwork.push(darkweb.ip); - darkweb.serversOnNetwork.push(__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().ip); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().serversOnNetwork.push(darkweb.ip); + darkweb.serversOnNetwork.push(__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().ip); workerScript.scriptRef.log("You have purchased a Tor router!"); return true; }, purchaseProgram(programName) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 1)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run."); return false; } } - if (__WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__["a" /* SpecialServerIps */]["Darkweb Server"] == null) { + if (__WEBPACK_IMPORTED_MODULE_13__SpecialServerIps_js__["a" /* SpecialServerIps */]["Darkweb Server"] == null) { workerScript.scriptRef.log("ERROR: You do not have TOR router. purchaseProgram() failed."); return false; } @@ -35849,9 +35856,9 @@ function NetscriptFunctions(workerScript) { switch(programName.toLowerCase()) { case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram.toLowerCase(): var price = Object(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["d" /* parseDarkwebItemPrice */])(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["a" /* DarkWebItems */].BruteSSHProgram); - if (price > 0 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.gt(price)) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(price); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram); + if (price > 0 && __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.gt(price)) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(price); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram); workerScript.scriptRef.log("You have purchased the BruteSSH.exe program. The new program " + "can be found on your home computer."); } else { @@ -35860,9 +35867,9 @@ function NetscriptFunctions(workerScript) { return true; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram.toLowerCase(): var price = Object(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["d" /* parseDarkwebItemPrice */])(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["a" /* DarkWebItems */].FTPCrackProgram); - if (price > 0 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.gt(price)) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(price); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram); + if (price > 0 && __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.gt(price)) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(price); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram); workerScript.scriptRef.log("You have purchased the FTPCrack.exe program. The new program " + "can be found on your home computer."); } else { @@ -35871,9 +35878,9 @@ function NetscriptFunctions(workerScript) { return true; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram.toLowerCase(): var price = Object(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["d" /* parseDarkwebItemPrice */])(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["a" /* DarkWebItems */].RelaySMTPProgram); - if (price > 0 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.gt(price)) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(price); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram); + if (price > 0 && __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.gt(price)) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(price); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram); workerScript.scriptRef.log("You have purchased the relaySMTP.exe program. The new program " + "can be found on your home computer."); } else { @@ -35882,9 +35889,9 @@ function NetscriptFunctions(workerScript) { return true; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram.toLowerCase(): var price = Object(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["d" /* parseDarkwebItemPrice */])(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["a" /* DarkWebItems */].HTTPWormProgram); - if (price > 0 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.gt(price)) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(price); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram); + if (price > 0 && __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.gt(price)) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(price); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram); workerScript.scriptRef.log("You have purchased the HTTPWorm.exe program. The new program " + "can be found on your home computer."); } else { @@ -35893,9 +35900,9 @@ function NetscriptFunctions(workerScript) { return true; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram.toLowerCase(): var price = Object(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["d" /* parseDarkwebItemPrice */])(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["a" /* DarkWebItems */].SQLInjectProgram); - if (price > 0 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.gt(price)) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(price); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram); + if (price > 0 && __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.gt(price)) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(price); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram); workerScript.scriptRef.log("You have purchased the SQLInject.exe program. The new program " + "can be found on your home computer."); } else { @@ -35904,9 +35911,9 @@ function NetscriptFunctions(workerScript) { return true; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV1.toLowerCase(): var price = Object(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["d" /* parseDarkwebItemPrice */])(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["a" /* DarkWebItems */].DeepScanV1Program); - if (price > 0 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.gt(price)) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(price); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV1); + if (price > 0 && __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.gt(price)) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(price); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV1); workerScript.scriptRef.log("You have purchased the DeepscanV1.exe program. The new program " + "can be found on your home computer."); } else { @@ -35915,9 +35922,9 @@ function NetscriptFunctions(workerScript) { return true; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV2.toLowerCase(): var price = Object(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["d" /* parseDarkwebItemPrice */])(__WEBPACK_IMPORTED_MODULE_4__DarkWeb_js__["a" /* DarkWebItems */].DeepScanV2Program); - if (price > 0 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.gt(price)) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(price); - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV2); + if (price > 0 && __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.gt(price)) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(price); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().programs.push(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV2); workerScript.scriptRef.log("You have purchased the DeepscanV2.exe program. The new program " + "can be found on your home computer."); } else { @@ -35931,15 +35938,15 @@ function NetscriptFunctions(workerScript) { return true; }, upgradeHomeRam() { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } //Calculate how many times ram has been upgraded (doubled) - var currentRam = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().maxRam; + var currentRam = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().maxRam; var numUpgrades = Math.log2(currentRam); //Calculate cost @@ -35948,29 +35955,29 @@ function NetscriptFunctions(workerScript) { var mult = Math.pow(1.55, numUpgrades); cost = cost * mult; - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].money.lt(cost)) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].money.lt(cost)) { workerScript.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"); return false; } - var homeComputer = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer(); + var homeComputer = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer(); homeComputer.maxRam *= 2; - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].loseMoney(cost); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].loseMoney(cost); workerScript.scriptRef.log("Purchased additional RAM for home computer! It now has " + homeComputer.maxRam + "GB of RAM."); return true; }, getUpgradeHomeRamCost() { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } //Calculate how many times ram has been upgraded (doubled) - var currentRam = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].getHomeComputer().maxRam; + var currentRam = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].getHomeComputer().maxRam; var numUpgrades = Math.log2(currentRam); //Calculate cost @@ -35980,35 +35987,35 @@ function NetscriptFunctions(workerScript) { return cost * mult; }, workForCompany() { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].companyPosition == "" || !(__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].companyPosition instanceof __WEBPACK_IMPORTED_MODULE_1__Company_js__["c" /* CompanyPosition */])) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].companyPosition == "" || !(__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].companyPosition instanceof __WEBPACK_IMPORTED_MODULE_1__Company_js__["c" /* CompanyPosition */])) { workerScript.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"); return false; } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) { - var txt = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].singularityStopWork(); + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].isWorking) { + var txt = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].singularityStopWork(); workerScript.scriptRef.log(txt); } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].companyPosition.isPartTimeJob()) { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startWorkPartTime(); + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].companyPosition.isPartTimeJob()) { + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startWorkPartTime(); } else { - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startWork(); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startWork(); } - workerScript.scriptRef.log("Began working at " + __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].companyName + " as a " + __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].companyPosition.positionName); + workerScript.scriptRef.log("Began working at " + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].companyName + " as a " + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].companyPosition.positionName); return true; }, applyToCompany(companyName, field) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } @@ -36018,68 +36025,68 @@ function NetscriptFunctions(workerScript) { return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].location = companyName; + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].location = companyName; var res; switch (field.toLowerCase()) { case "software": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForSoftwareJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForSoftwareJob(true); break; case "software consultant": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForSoftwareConsultantJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForSoftwareConsultantJob(true); break; case "it": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForItJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForItJob(true); break; case "security engineer": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForSecurityEngineerJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForSecurityEngineerJob(true); break; case "network engineer": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForNetworkEngineerJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForNetworkEngineerJob(true); break; case "business": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForBusinessJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForBusinessJob(true); break; case "business consultant": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForBusinessConsultantJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForBusinessConsultantJob(true); break; case "security": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForSecurityJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForSecurityJob(true); break; case "agent": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForAgentJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForAgentJob(true); break; case "employee": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForEmployeeJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForEmployeeJob(true); break; case "part-time employee": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForPartTimeEmployeeJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForPartTimeEmployeeJob(true); break; case "waiter": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForWaiterJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForWaiterJob(true); break; case "part-time waiter": - res = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].applyForPartTimeWaiterJob(true); + res = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].applyForPartTimeWaiterJob(true); break; default: workerScript.scriptRef.log("ERROR: Invalid job passed into applyToCompany: " + field + ". applyToCompany() failed"); return false; } //The Player object's applyForJob function can return string with special error messages - if (Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["d" /* isString */])(res)) { + if (Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["e" /* isString */])(res)) { workerScript.scriptRef.log(res); return false; } if (res) { - workerScript.scriptRef.log("You were offered a new job at " + companyName + " as a " + __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].companyPosition.positionName); + workerScript.scriptRef.log("You were offered a new job at " + companyName + " as a " + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].companyPosition.positionName); } else { workerScript.scriptRef.log("You failed to get a new job/promotion at " + companyName + " in the " + field + " field."); } return res; }, getCompanyRep(companyName) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } @@ -36092,69 +36099,69 @@ function NetscriptFunctions(workerScript) { return company.playerReputation; }, checkFactionInvitations() { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } //Make a copy of Player.factionInvitations - return __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].factionInvitations.slice(); + return __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].factionInvitations.slice(); }, joinFaction(name) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } - if (!Object(__WEBPACK_IMPORTED_MODULE_5__Faction_js__["d" /* factionExists */])(name)) { + if (!Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["d" /* factionExists */])(name)) { workerScript.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."); return false; } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].factionInvitations.includes(name)) { + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].factionInvitations.includes(name)) { workerScript.scriptRef.log("ERROR: Cannot join " + name + " Faction because you have not been invited. joinFaction() failed"); return false; } - var index = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].factionInvitations.indexOf(name); + var index = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].factionInvitations.indexOf(name); if (index === -1) { //Redundant and should never happen... workerScript.scriptRef.log("ERROR: Cannot join " + name + " Faction because you have not been invited. joinFaction() failed"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].factionInvitations.splice(index, 1); - var fac = __WEBPACK_IMPORTED_MODULE_5__Faction_js__["b" /* Factions */][name]; - Object(__WEBPACK_IMPORTED_MODULE_5__Faction_js__["h" /* joinFaction */])(fac); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].factionInvitations.splice(index, 1); + var fac = __WEBPACK_IMPORTED_MODULE_6__Faction_js__["b" /* Factions */][name]; + Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["h" /* joinFaction */])(fac); workerScript.scriptRef.log("Joined the " + name + " faction."); return true; }, workForFaction(name, type) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return false; } } - if (!Object(__WEBPACK_IMPORTED_MODULE_5__Faction_js__["d" /* factionExists */])(name)) { + if (!Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["d" /* factionExists */])(name)) { workerScript.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."); return false; } - if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].factions.includes(name)) { + if (!__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].factions.includes(name)) { workerScript.scriptRef.log("ERROR: workForFaction() failed because you are not a member of " + name); return false; } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) { - var txt = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].singularityStopWork(); + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].isWorking) { + var txt = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].singularityStopWork(); workerScript.scriptRef.log(txt); } - var fac = __WEBPACK_IMPORTED_MODULE_5__Faction_js__["b" /* Factions */][name]; + var fac = __WEBPACK_IMPORTED_MODULE_6__Faction_js__["b" /* Factions */][name]; //Arrays listing factions that allow each time of work var hackAvailable = ["Illuminati", "Daedalus", "The Covenant", "ECorp", "MegaCorp", "Bachman & Associates", "Blade Industries", "NWO", "Clarke Incorporated", @@ -36184,7 +36191,7 @@ function NetscriptFunctions(workerScript) { workerScript.scriptRef.log("ERROR: Cannot carry out hacking contracts for " + fac.name + ". workForFaction() failed"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startFactionHackWork(fac); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startFactionHackWork(fac); workerScript.scriptRef.log("Started carrying out hacking contracts for " + fac.name); return true; case "field": @@ -36194,7 +36201,7 @@ function NetscriptFunctions(workerScript) { workerScript.scriptRef.log("ERROR: Cannot carry out field missions for " + fac.name + ". workForFaction() failed"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startFactionFieldWork(fac); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startFactionFieldWork(fac); workerScript.scriptRef.log("Started carrying out field missions for " + fac.name); return true; case "security": @@ -36204,7 +36211,7 @@ function NetscriptFunctions(workerScript) { workerScript.scriptRef.log("ERROR: Cannot serve as security detail for " + fac.name + ". workForFaction() failed"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startFactionSecurityWork(fac); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startFactionSecurityWork(fac); workerScript.scriptRef.log("Started serving as security details for " + fac.name); return true; default: @@ -36213,99 +36220,99 @@ function NetscriptFunctions(workerScript) { return true; }, getFactionRep(name) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 2)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run."); return -1; } } - if (!Object(__WEBPACK_IMPORTED_MODULE_5__Faction_js__["d" /* factionExists */])(name)) { + if (!Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["d" /* factionExists */])(name)) { workerScript.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."); return -1; } - return __WEBPACK_IMPORTED_MODULE_5__Faction_js__["b" /* Factions */][name].playerReputation; + return __WEBPACK_IMPORTED_MODULE_6__Faction_js__["b" /* Factions */][name].playerReputation; }, createProgram(name) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 3)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); return false; } } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) { - var txt = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].singularityStopWork(); + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].isWorking) { + var txt = __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].singularityStopWork(); workerScript.scriptRef.log(txt); } switch(name.toLowerCase()) { case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].NukeProgram.toLowerCase(): - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].NukeProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes, 1); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].NukeProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes, 1); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 50) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 50) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create BruteSSH (level 50 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes * 2, 50); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].BruteSSHProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes * 2, 50); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 100) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 100) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create FTPCrack (level 100 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 100); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].FTPCrackProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 100); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 250) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 250) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create relaySMTP (level 250 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 250); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 250); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 500) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 500) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create HTTPWorm (level 500 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer4Hours, 500); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].HTTPWormProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer4Hours, 500); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 750) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 750) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create SQLInject (level 750 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours, 750); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].SQLInjectProgram, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours, 750); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV1.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 75) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 75) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV1 (level 75 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV1, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 75); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV1, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 75); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV2.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 400) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 400) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV2 (level 400 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV2, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 400); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].DeepscanV2, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 400); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].ServerProfiler.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 75) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 75) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create ServerProfiler (level 75 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].ServerProfiler, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 75); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].ServerProfiler, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 75); break; case __WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].AutoLink.toLowerCase(): - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].hacking_skill < 25) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].hacking_skill < 25) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create AutoLink (level 25 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].AutoLink, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 25); + __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_3__CreateProgram_js__["a" /* Programs */].AutoLink, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 25); break; default: workerScript.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: " + name); @@ -36315,9 +36322,9 @@ function NetscriptFunctions(workerScript) { return true; }, getAugmentationCost(name) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 3)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); return false; } } @@ -36331,15 +36338,15 @@ function NetscriptFunctions(workerScript) { return [aug.baseRepRequirement, aug.baseCost]; }, purchaseAugmentation(faction, name) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 3)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); return false; } } - var fac = __WEBPACK_IMPORTED_MODULE_5__Faction_js__["b" /* Factions */][faction]; - if (fac === null || !(fac instanceof __WEBPACK_IMPORTED_MODULE_5__Faction_js__["a" /* Faction */])) { + var fac = __WEBPACK_IMPORTED_MODULE_6__Faction_js__["b" /* Factions */][faction]; + if (fac === null || !(fac instanceof __WEBPACK_IMPORTED_MODULE_6__Faction_js__["a" /* Faction */])) { workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: " + faction); return false; } @@ -36355,14 +36362,14 @@ function NetscriptFunctions(workerScript) { return false; } - for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].queuedAugmentations.length; ++j) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].queuedAugmentations[j].name === aug.name) { + for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].queuedAugmentations.length; ++j) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].queuedAugmentations[j].name === aug.name) { workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name); return false; } } - for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].augmentations.length; ++j) { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].augmentations[j].name === aug.name) { + for (var j = 0; j < __WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].augmentations.length; ++j) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].augmentations[j].name === aug.name) { workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name); return false; } @@ -36373,23 +36380,23 @@ function NetscriptFunctions(workerScript) { return false; } - var res = Object(__WEBPACK_IMPORTED_MODULE_5__Faction_js__["k" /* purchaseAugmentation */])(aug, fac, true); + var res = Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["k" /* purchaseAugmentation */])(aug, fac, true); workerScript.scriptRef.log(res); - if (Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["d" /* isString */])(res) && res.startsWith("You purchased")) { + if (Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["e" /* isString */])(res) && res.startsWith("You purchased")) { return true; } else { return false; } }, installAugmentations() { - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].bitNodeN != 4) { if (!(hasSingularitySF && singularitySFLvl >= 3)) { - throw Object(__WEBPACK_IMPORTED_MODULE_15__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); + throw Object(__WEBPACK_IMPORTED_MODULE_16__NetscriptEvaluator_js__["c" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run."); return false; } } - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].queuedAugmentations.length === 0) { + if (__WEBPACK_IMPORTED_MODULE_9__Player_js__["a" /* Player */].queuedAugmentations.length === 0) { workerScript.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"); return false; } @@ -36790,7 +36797,7 @@ function substituteAliases(origCommand) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__SpecialServerIps_js__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Terminal_js__ = __webpack_require__(21); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -37329,7 +37336,7 @@ function initLiterature() { /* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return redPillFlag; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return hackWorldDaemon; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(9); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Prestige_js__ = __webpack_require__(31); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__SourceFile_js__ = __webpack_require__(30); @@ -37683,7 +37690,7 @@ function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Script_js__ = __webpack_require__(18); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_IPAddress_js__ = __webpack_require__(20); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -37719,7 +37726,7 @@ function evaluate(exp, workerScript) { evaluateProgPromise.then(function(w) { resolve(workerScript); }, function(e) { - if (Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["d" /* isString */])(e)) { + if (Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["e" /* isString */])(e)) { workerScript.errorMessage = e; reject(workerScript); } else if (e instanceof __WEBPACK_IMPORTED_MODULE_4__NetscriptWorker_js__["b" /* WorkerScript */]) { @@ -38330,7 +38337,7 @@ function runScriptFromScript(server, scriptname, args, workerScript, threads=1) } function isScriptErrorMessage(msg) { - if (!Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["d" /* isString */])(msg)) {return false;} + if (!Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["e" /* isString */])(msg)) {return false;} let splitMsg = msg.split("|"); if (splitMsg.length != 4){ return false; @@ -38405,12 +38412,12 @@ function scriptCalculateWeakenTime(server) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return beginInfiltration; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_InfiltrationBox_js__ = __webpack_require__(43); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_StringHelperFunctions_js__ = __webpack_require__(5); @@ -39230,7 +39237,7 @@ function getInfiltrationEscapeChance(inst) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DialogBox_js__ = __webpack_require__(2); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__HelperFunctions_js__ = __webpack_require__(1); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StringHelperFunctions_js__ = __webpack_require__(5); @@ -43463,7 +43470,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Alias_js__ = __webpack_require__(37); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Company_js__ = __webpack_require__(17); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js__ = __webpack_require__(3); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__engine_js__ = __webpack_require__(5); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__engine_js__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Faction_js__ = __webpack_require__(10); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Gang_js__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__HacknetNode_js__ = __webpack_require__(32); @@ -43478,7 +43485,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__utils_GameOptions_js__ = __webpack_require__(33); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__utils_HelperFunctions_js__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_JSONReviver_js__ = __webpack_require__(7); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_StringHelperFunctions_js__ = __webpack_require__(4); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_StringHelperFunctions_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__utils_decimal_js__ = __webpack_require__(23); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__utils_decimal_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19__utils_decimal_js__); diff --git a/src/Faction.js b/src/Faction.js index 966db64d3..ca7c389d1 100644 --- a/src/Faction.js +++ b/src/Faction.js @@ -11,7 +11,7 @@ import {factionInvitationBoxCreate} from "../utils/FactionInvitation import {clearEventListeners} from "../utils/HelperFunctions.js"; import {Reviver, Generic_toJSON, Generic_fromJSON} from "../utils/JSONReviver.js"; -import {formatNumber} from "../utils/StringHelperFunctions.js"; +import {formatNumber, isPositiveNumber} from "../utils/StringHelperFunctions.js"; import {yesNoBoxCreate, yesNoBoxGetYesButton, yesNoBoxGetNoButton, yesNoBoxClose} from "../utils/YesNoBox.js"; diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 33543a28b..3e6e0c2e8 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -5,6 +5,7 @@ import {Companies, Company, CompanyPosition, import {CONSTANTS} from "./Constants.js"; import {Programs} from "./CreateProgram.js"; import {parseDarkwebItemPrice, DarkWebItems} from "./DarkWeb.js"; +import {Engine} from "./engine.js"; import {Factions, Faction, joinFaction, factionExists, purchaseAugmentation} from "./Faction.js"; import {getCostOfNextHacknetNode, diff --git a/src/Prestige.js b/src/Prestige.js index a4759ec8b..a625ec434 100644 --- a/src/Prestige.js +++ b/src/Prestige.js @@ -20,7 +20,8 @@ import {SpecialServerIps, SpecialServerIpsMap, prestigeSpecialServerIps, SpecialServerNames} from "./SpecialServerIps.js"; import {initStockMarket, initSymbolToStockMap, - stockMarketContentCreated} from "./StockMarket.js"; + stockMarketContentCreated, + setStockMarketContentCreated} from "./StockMarket.js"; import {Terminal, postNetburnerText} from "./Terminal.js"; import Decimal from '../utils/decimal.js'; @@ -99,7 +100,7 @@ function prestigeAugmentation() { if (Player.hasWseAccount) { initStockMarket(); initSymbolToStockMap(); - stockMarketContentCreated = false; + setStockMarketContentCreated(false); var stockMarketList = document.getElementById("stock-market-list"); while(stockMarketList.firstChild) { stockMarketList.removeChild(stockMarketList.firstChild); diff --git a/src/StockMarket.js b/src/StockMarket.js index 5fa077bbe..5f06a2daa 100644 --- a/src/StockMarket.js +++ b/src/StockMarket.js @@ -349,6 +349,10 @@ function updateStockPrices() { } } +function setStockMarketContentCreated(b) { + stockMarketContentCreated = b; +} + var stockMarketContentCreated = false; function displayStockMarketContent() { if (Player.hasWseAccount == null) {Player.hasWseAccount = false;} @@ -607,4 +611,5 @@ function updateStockPlayerPosition(stock) { export {StockMarket, StockSymbols, SymbolToStockMap, initStockSymbols, initStockMarket, initSymbolToStockMap, stockMarketCycle, buyStock, sellStock, updateStockPrices, displayStockMarketContent, - updateStockTicker, updateStockPlayerPosition, loadStockMarket}; + updateStockTicker, updateStockPlayerPosition, loadStockMarket, + setStockMarketContentCreated}; diff --git a/src/Terminal.js b/src/Terminal.js index bfa45b6f8..638ab1787 100644 --- a/src/Terminal.js +++ b/src/Terminal.js @@ -17,7 +17,7 @@ import {killWorkerScript, addWorkerScript} from "./NetscriptWorker.js"; import {Player} from "./Player.js"; import {hackWorldDaemon} from "./RedPill.js"; import {findRunningScript, RunningScript, - AllServersMap} from "./Script.js"; + AllServersMap, Script} from "./Script.js"; import {AllServers, GetServerByHostname, getServer, Server} from "./Server.js"; import {SpecialServerIps,