diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js
index 15b56e64e..beaa56127 100644
--- a/dist/engine.bundle.js
+++ b/dist/engine.bundle.js
@@ -36,19 +36,34 @@
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
+/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
+/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
+/******/ // create a fake namespace object
+/******/ // mode & 1: value is a module id, require it
+/******/ // mode & 2: merge all properties of value into the ns
+/******/ // mode & 4: return value when already ns object
+/******/ // mode & 8|1: behave like require
+/******/ __webpack_require__.t = function(value, mode) {
+/******/ if(mode & 1) value = __webpack_require__(value);
+/******/ if(mode & 8) return value;
+/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
+/******/ var ns = Object.create(null);
+/******/ __webpack_require__.r(ns);
+/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
+/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
+/******/ return ns;
+/******/ };
+/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
@@ -84,17 +99,17 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNode.js */ 15);
/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Company.js */ 9);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Constants.js */ 3);
-/* harmony import */ var _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CompanyManagement.js */ 41);
+/* harmony import */ var _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CompanyManagement.js */ 42);
/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
/* harmony import */ var _Crimes_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Crimes.js */ 27);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./engine.js */ 5);
/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Faction.js */ 11);
-/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Gang.js */ 36);
+/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Gang.js */ 35);
/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Location.js */ 4);
/* harmony import */ var _NetscriptFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptFunctions.js */ 30);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
-/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SourceFile.js */ 43);
+/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SourceFile.js */ 44);
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! decimal.js */ 23);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
@@ -2982,6 +2997,7 @@ let CONSTANTS = {
/* Netscript Constants */
//RAM Costs for different commands
ScriptBaseRamCost: 1.4,
+ ScriptCheatRamCost: 1e21, // if someone tries to cheat by using window or document we just spike the ram cost.
ScriptWhileRamCost: 0.2,
ScriptForRamCost: 0.2,
ScriptIfRamCost: 0.15,
@@ -3460,7 +3476,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initLocationButtons", function() { return initLocationButtons; });
/* harmony import */ var _Bladeburner_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Bladeburner.js */ 26);
/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company.js */ 9);
-/* harmony import */ var _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CompanyManagement.js */ 41);
+/* harmony import */ var _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CompanyManagement.js */ 42);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Constants.js */ 3);
/* harmony import */ var _Crimes_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Crimes.js */ 27);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./engine.js */ 5);
@@ -3469,14 +3485,16 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Player.js */ 0);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _ServerPurchases_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ServerPurchases.js */ 83);
-/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
-/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15__);
-/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
-/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
+/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Settings.js */ 22);
+/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
+/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
+/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
+/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_16__);
+/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
+/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
+
@@ -3609,7 +3627,7 @@ function displayLocationContent() {
var waiterJob = document.getElementById("location-waiter-job");
var waiterPartTimeJob = document.getElementById("location-parttime-waiter-job");
- var work = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-work");
+ var work = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-work");
var jobTitle = document.getElementById("location-job-title");
var jobReputation = document.getElementById("location-job-reputation");
@@ -3652,7 +3670,7 @@ function displayLocationContent() {
var travelToIshima = document.getElementById("location-travel-to-ishima");
var travelToVolhaven = document.getElementById("location-travel-to-volhaven");
- var infiltrate = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-infiltrate");
+ var infiltrate = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-infiltrate");
var hospitalTreatment = document.getElementById("location-hospital-treatment");
@@ -3741,17 +3759,17 @@ function displayLocationContent() {
purchaseHomeRam.style.display = "none";
purchaseHomeCores.style.display = "none";
- purchase2gb.innerHTML = "Purchase 2GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(2*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase4gb.innerHTML = "Purchase 4GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(4*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase8gb.innerHTML = "Purchase 8GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(8*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase16gb.innerHTML = "Purchase 16GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(16*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase32gb.innerHTML = "Purchase 32GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(32*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase64gb.innerHTML = "Purchase 64GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(64*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase128gb.innerHTML = "Purchase 128GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(128*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase256gb.innerHTML = "Purchase 256GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(256*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase512gb.innerHTML = "Purchase 512GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(512*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchase1tb.innerHTML = "Purchase 1TB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(1024*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
- purchaseTor.innerHTML = "Purchase TOR Router - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].TorRouterCost, 2);
+ purchase2gb.innerHTML = "Purchase 2GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(2*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase4gb.innerHTML = "Purchase 4GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(4*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase8gb.innerHTML = "Purchase 8GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(8*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase16gb.innerHTML = "Purchase 16GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(16*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase32gb.innerHTML = "Purchase 32GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(32*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase64gb.innerHTML = "Purchase 64GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(64*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase128gb.innerHTML = "Purchase 128GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(128*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase256gb.innerHTML = "Purchase 256GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(256*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase512gb.innerHTML = "Purchase 512GB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(512*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchase1tb.innerHTML = "Purchase 1TB Server - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(1024*_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2);
+ purchaseTor.innerHTML = "Purchase TOR Router - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].TorRouterCost, 2);
travelAgencyText.style.display = "none";
travelToAevum.style.display = "none";
@@ -3797,11 +3815,11 @@ function displayLocationContent() {
var repGain = company.getFavorGain();
if (repGain.length != 2) {repGain = 0;}
repGain = repGain[0];
- jobReputation.innerHTML = "Company reputation: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(company.playerReputation, 4) +
+ jobReputation.innerHTML = "Company reputation: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(company.playerReputation, 4) +
"You will earn " +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(repGain, 4) +
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(repGain, 0) +
" faction favor upon resetting after installing an Augmentation";
- companyFavor.innerHTML = "Company Favor: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(company.favor, 4) +
+ companyFavor.innerHTML = "Company Favor: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(company.favor, 0) +
"Company favor increases the rate at which " +
"you earn reputation for this company by 1% per favor. Company favor " +
"is gained whenever you reset after installing an Augmentation. The amount of " +
@@ -4574,7 +4592,7 @@ function displayLocationContent() {
//Hospital
case Locations.Hospital:
- hospitalTreatment.innerText = "Get treatment for wounds - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(hospitalTreatmentCost, 2).toString();
+ hospitalTreatment.innerText = "Get treatment for wounds - $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(hospitalTreatmentCost, 2).toString();
hospitalTreatment.style.display = "block";
break;
@@ -5237,18 +5255,18 @@ function initLocationButtons() {
const cost = _Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getUpgradeHomeRamCost();
const ram = _Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().maxRam;
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxGetNoButton"])();
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxGetNoButton"])();
yesBtn.innerHTML = "Purchase"; noBtn.innerHTML = "Cancel";
yesBtn.addEventListener("click", ()=>{
Object(_ServerPurchases_js__WEBPACK_IMPORTED_MODULE_10__["purchaseRamForHomeComputer"])(cost);
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxClose"])();
});
noBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxClose"])();
});
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxCreate"])("Would you like to purchase additional RAM for your home computer?
" +
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxCreate"])("Would you like to purchase additional RAM for your home computer?
" +
"This will upgrade your RAM from " + ram + "GB to " + ram*2 + "GB.
" +
- "This will cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15___default()(cost).format('$0.000a'));
+ "This will cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_16___default()(cost).format('$0.000a'));
});
purchaseHomeCores.addEventListener("click", function() {
@@ -5265,26 +5283,26 @@ function initLocationButtons() {
20000000000000000, //6->7 Cores - 20 quadrillion
200000000000000000]; //7->8 Cores - 200 quadrillion
cost = cost[currentCores];
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxGetNoButton"])();
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxGetNoButton"])();
yesBtn.innerHTML = "Purchase"; noBtn.innerHTML = "Cancel";
yesBtn.addEventListener("click", ()=>{
if (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].money.lt(cost)) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You do not have enough mone to purchase an additional CPU Core for your home computer!");
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You do not have enough mone to purchase an additional CPU Core for your home computer!");
} else {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].loseMoney(cost);
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().cpuCores++;
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You purchased an additional CPU Core for your home computer! It now has " +
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You purchased an additional CPU Core for your home computer! It now has " +
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().cpuCores + " cores.");
}
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxClose"])();
});
noBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxClose"])();
});
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxCreate"])("Would you like to purchase an additional CPU Core for your home computer? Each CPU Core " +
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxCreate"])("Would you like to purchase an additional CPU Core for your home computer? Each CPU Core " +
"lets you start with an additional Core Node in Hacking Missions.
" +
"Purchasing an additional core (for a total of " + (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().cpuCores + 1) + ") will " +
- "cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_15___default()(cost).format('$0.000a'));
+ "cost " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_16___default()(cost).format('$0.000a'));
});
travelToAevum.addEventListener("click", function() {
@@ -5378,36 +5396,36 @@ function initLocationButtons() {
});
cityHallCreateCorporation.addEventListener("click", function() {
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxGetYesButton"])(),
- noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxGetNoButton"])();
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxGetYesButton"])(),
+ noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxGetNoButton"])();
yesBtn.innerText = "Create Corporation";
noBtn.innerText = "Cancel";
yesBtn.addEventListener("click", function() {
if (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].money.lt(150e9)) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You don't have enough money to create a corporation! You need $150b");
- return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxClose"])();
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You don't have enough money to create a corporation! You need $150b");
+ return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxClose"])();
}
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].loseMoney(150e9);
- var companyName = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxGetInput"])();
+ var companyName = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxGetInput"])();
if (companyName == null || companyName == "") {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("Invalid company name!");
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("Invalid company name!");
return false;
}
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].corporation = new _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_2__["Corporation"]({
name:companyName,
});
displayLocationContent();
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("Congratulations! You just started your own corporation. You can visit " +
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("Congratulations! You just started your own corporation. You can visit " +
"and manage your company in the City");
- return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxClose"])();
+ return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxClose"])();
});
noBtn.addEventListener("click", function() {
- return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxClose"])();
+ return Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxClose"])();
});
if (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].corporation instanceof _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_2__["Corporation"]) {
return;
} else {
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxCreate"])("Would you like to start a corporation? This will require $150b " +
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxCreate"])("Would you like to start a corporation? This will require $150b " +
"for registration and initial funding.
If so, please enter " +
"a name for your corporation below:");
}
@@ -5422,10 +5440,10 @@ function initLocationButtons() {
if (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].strength >= 100 && _Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].defense >= 100 &&
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].dexterity >= 100 && _Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].agility >= 100) {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].bladeburner = new _Bladeburner_js__WEBPACK_IMPORTED_MODULE_0__["Bladeburner"]({new:true});
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You have been accepted into the Bladeburner division!");
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You have been accepted into the Bladeburner division!");
displayLocationContent();
} else {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)");
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)");
}
}
});
@@ -5434,8 +5452,8 @@ function initLocationButtons() {
if (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].hp < 0) {_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].hp = 0;}
var price = (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].max_hp - _Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].hp) * _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].HospitalCostPerHp;
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].loseMoney(price);
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You were healed to full health! The hospital billed " +
- "you for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(price, 2).toString());
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You were healed to full health! The hospital billed " +
+ "you for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(price, 2).toString());
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].hp = _Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].max_hp;
displayLocationContent();
return false;
@@ -5451,35 +5469,37 @@ function travelToCity(destCityName, cost) {
}
if (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].money.lt(cost)) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You cannot afford to travel to " + destCityName);
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You cannot afford to travel to " + destCityName);
return;
}
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].loseMoney(cost);
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].city = destCityName;
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You are now in " + destCityName + "!");
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You are now in " + destCityName + "!");
_engine_js__WEBPACK_IMPORTED_MODULE_5__["Engine"].loadWorldContent();
}
function purchaseTorRouter() {
if (_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].TorRouterCost)) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You cannot afford to purchase the Tor router");
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You cannot afford to purchase the Tor router");
return;
}
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].TorRouterCost);
var darkweb = new _Server_js__WEBPACK_IMPORTED_MODULE_9__["Server"]({
- ip:Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_14__["createRandomIp"])(), hostname:"darkweb", organizationName:"",
+ ip:Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_15__["createRandomIp"])(), hostname:"darkweb", organizationName:"",
isConnectedTo:false, adminRights:false, purchasedByPlayer:false, maxRam:1
});
Object(_Server_js__WEBPACK_IMPORTED_MODULE_9__["AddToAllServers"])(darkweb);
- _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_11__["SpecialServerIps"].addIp("Darkweb Server", darkweb.ip);
+ _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_12__["SpecialServerIps"].addIp("Darkweb Server", darkweb.ip);
- document.getElementById("location-purchase-tor").setAttribute("class", "a-link-button-inactive");
+ const purchaseTor = document.getElementById("location-purchase-tor");
+ purchaseTor.setAttribute("class", "a-link-button-bought");
+ purchaseTor.innerHTML = "TOR Router - purchased";
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().serversOnNetwork.push(darkweb.ip);
darkweb.serversOnNetwork.push(_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].getHomeComputer().ip);
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__["dialogBoxCreate"])("You have purchased a Tor router! You now have access to the dark web from your home computer Use the scan/netstat commands to search for the dark web connection.");
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__["dialogBoxCreate"])("You have purchased a Tor router! You now have access to the dark web from your home computer Use the scan/scan-analyze commands to search for the dark web connection.");
}
function displayUniversityLocationContent(costMult) {
@@ -5512,37 +5532,37 @@ function displayUniversityLocationContent(costMult) {
}
function setUniversityLocationButtons(costMult, expMult) {
- var newStudyCS = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-study-computer-science");
+ var newStudyCS = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-study-computer-science");
newStudyCS.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassStudyComputerScience);
return false;
});
- var newClassDataStructures = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-data-structures-class");
+ var newClassDataStructures = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-data-structures-class");
newClassDataStructures.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassDataStructures);
return false;
});
- var newClassNetworks = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-networks-class");
+ var newClassNetworks = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-networks-class");
newClassNetworks.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassNetworks);
return false;
});
- var newClassAlgorithms = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-algorithms-class");
+ var newClassAlgorithms = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-algorithms-class");
newClassAlgorithms.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassAlgorithms);
return false;
});
- var newClassManagement = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-management-class");
+ var newClassManagement = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-management-class");
newClassManagement.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassManagement);
return false;
});
- var newClassLeadership = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-leadership-class");
+ var newClassLeadership = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-leadership-class");
newClassLeadership.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassLeadership);
return false;
@@ -5570,25 +5590,25 @@ function displayGymLocationContent(costMult) {
}
function setGymLocationButtons(costMult, expMult) {
- var gymStr = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-gym-train-str");
+ var gymStr = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-gym-train-str");
gymStr.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassGymStrength);
return false;
});
- var gymDef = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-gym-train-def");
+ var gymDef = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-gym-train-def");
gymDef.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassGymDefense);
return false;
});
- var gymDex = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-gym-train-dex");
+ var gymDex = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-gym-train-dex");
gymDex.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassGymDexterity);
return false;
});
- var gymAgi = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__["clearEventListeners"])("location-gym-train-agi");
+ var gymAgi = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_14__["clearEventListeners"])("location-gym-train-agi");
gymAgi.addEventListener("click", function() {
_Player_js__WEBPACK_IMPORTED_MODULE_8__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_3__["CONSTANTS"].ClassGymAgility);
return false;
@@ -5617,36 +5637,40 @@ function setJobRequirementTooltip(loc, entryPosType, btn) {
}
function travelBoxCreate(destCityName, cost) {
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxGetNoButton"])();
+ if(_Settings_js__WEBPACK_IMPORTED_MODULE_11__["Settings"].SuppressTravelConfirmation) {
+ travelToCity(destCityName, cost);
+ return;
+ }
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxGetNoButton"])();
yesBtn.innerHTML = "Yes";
noBtn.innerHTML = "No";
noBtn.addEventListener("click", () => {
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxClose"])();
return false;
});
yesBtn.addEventListener("click", () => {
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxClose"])();
travelToCity(destCityName, cost);
return false;
});
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoBoxCreate"])("Would you like to travel to " + destCityName + "? The trip will cost $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(cost, 2) + ".");
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoBoxCreate"])("Would you like to travel to " + destCityName + "? The trip will cost $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(cost, 2) + ".");
}
function purchaseServerBoxCreate(ram, cost) {
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxGetYesButton"])();
- var noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxGetNoButton"])();
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxGetYesButton"])();
+ var noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxGetNoButton"])();
yesBtn.innerHTML = "Purchase Server";
noBtn.innerHTML = "Cancel";
yesBtn.addEventListener("click", function() {
Object(_ServerPurchases_js__WEBPACK_IMPORTED_MODULE_10__["purchaseServer"])(ram, cost);
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxClose"])();
});
noBtn.addEventListener("click", function() {
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxClose"])();
});
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_17__["yesNoTxtInpBoxCreate"])("Would you like to purchase a new server with " + ram +
- "GB of RAM for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__["formatNumber"])(cost, 2) + "?
" +
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_18__["yesNoTxtInpBoxCreate"])("Would you like to purchase a new server with " + ram +
+ "GB of RAM for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__["formatNumber"])(cost, 2) + "?
" +
"Please enter the server hostname below: ");
}
@@ -5670,19 +5694,19 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
/* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/LogBox.js */ 50);
-/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 40);
+/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 41);
/* harmony import */ var _Augmentations_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Augmentations.js */ 17);
/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BitNode.js */ 15);
/* harmony import */ var _Bladeburner_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Bladeburner.js */ 26);
/* harmony import */ var _CinematicText_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./CinematicText.js */ 68);
/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Company.js */ 9);
-/* harmony import */ var _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CompanyManagement.js */ 41);
+/* harmony import */ var _CompanyManagement_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CompanyManagement.js */ 42);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Constants.js */ 3);
/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Faction.js */ 11);
/* harmony import */ var _Fconf_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Fconf.js */ 32);
/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Location.js */ 4);
-/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Gang.js */ 36);
+/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Gang.js */ 35);
/* harmony import */ var _HacknetNode_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./HacknetNode.js */ 37);
/* harmony import */ var _InteractiveTutorial_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./InteractiveTutorial.js */ 24);
/* harmony import */ var _Literature_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Literature.js */ 52);
@@ -5692,12 +5716,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Player.js */ 0);
/* harmony import */ var _Prestige_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Prestige.js */ 56);
-/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./RedPill.js */ 44);
+/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./RedPill.js */ 40);
/* harmony import */ var _SaveObject_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./SaveObject.js */ 46);
/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Script.js */ 25);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./SourceFile.js */ 43);
+/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./SourceFile.js */ 44);
/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
/* harmony import */ var _StockMarket_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./StockMarket.js */ 21);
/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Terminal.js */ 19);
@@ -7489,7 +7513,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Settings.js */ 22);
/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Script.js */ 25);
-/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/acorn.js */ 35);
+/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/acorn.js */ 36);
/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn_js__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
@@ -8328,7 +8352,9 @@ function runScriptFromScript(server, scriptname, args, workerScript, threads=1)
return Promise.resolve(false);
} else {
//Able to run script
- workerScript.scriptRef.log("Running script: " + scriptname + " on " + server.hostname + " with " + threads + " threads and args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_9__["printArray"])(args) + ". May take a few seconds to start up...");
+ if(workerScript.disableLogs.ALL == null && workerScript.disableLogs.exec == null && workerScript.disableLogs.run == null && workerScript.disableLogs.spawn == null) {
+ workerScript.scriptRef.log("Running script: " + scriptname + " on " + server.hostname + " with " + threads + " threads and args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_9__["printArray"])(args) + ". May take a few seconds to start up...");
+ }
var runningScriptObj = new _Script_js__WEBPACK_IMPORTED_MODULE_7__["RunningScript"](script, args);
runningScriptObj.threads = threads;
server.runningScripts.push(runningScriptObj); //Push onto runningScripts
@@ -12002,7 +12028,7 @@ function initBitNodes() {
"The starting and maximum amount of money on servers is reduced by 75% " +
"Server growth rate is reduced by 80% " +
"You will start out with $150b so that you can start your corporation " +
- "You now only need 75 reputation with a faction in order to donate to it, rather than 150
" +
+ "You now only need 75 favour with a faction in order to donate to it, rather than 150
" +
"Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will " +
"upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although " +
"some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by: " +
@@ -12393,7 +12419,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _SaveObject_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SaveObject.js */ 46);
/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Script.js */ 25);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server.js */ 10);
-/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SourceFile.js */ 43);
+/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SourceFile.js */ 44);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
@@ -15111,12 +15137,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./NetscriptEvaluator.js */ 6);
/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./RedPill.js */ 44);
+/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./RedPill.js */ 40);
/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Script.js */ 25);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Settings.js */ 22);
/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
-/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./TextFile.js */ 42);
+/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./TextFile.js */ 43);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
/* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/LogBox.js */ 50);
@@ -17174,7 +17200,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addWorkerScript", function() { return addWorkerScript; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateOnlineScriptTimes", function() { return updateOnlineScriptTimes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prestigeWorkerScripts", function() { return prestigeWorkerScripts; });
-/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 40);
+/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 41);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants.js */ 3);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine.js */ 5);
/* harmony import */ var _NetscriptEnvironment_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NetscriptEnvironment.js */ 67);
@@ -17183,7 +17209,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./NetscriptPort.js */ 45);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/acorn.js */ 35);
+/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/acorn.js */ 36);
/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
@@ -18922,6 +18948,7 @@ let Settings = {
MaxPortCapacity: 50,
SuppressMessages: false,
SuppressFactionInvites: false,
+ SuppressTravelConfirmation: false,
AutosaveInterval: 60,
DisableHotkeys: false,
ThemeHighlightColor: "#ffffff",
@@ -18941,6 +18968,7 @@ function initSettings() {
Settings.MaxPortCapacity = 50;
Settings.SuppressMessages = false;
Settings.SuppressFactionInvites = false;
+ Settings.SuppressTravelConfirmation = false,
Settings.AutosaveInterval = 60;
Settings.DisableHotkeys = false;
}
@@ -18951,6 +18979,7 @@ function setSettingsLabels() {
var nsPortLimit = document.getElementById("settingsNSPortRangeValLabel");
var suppressMsgs = document.getElementById("settingsSuppressMessages");
var suppressFactionInv = document.getElementById("settingsSuppressFactionInvites")
+ var suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
var autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
var disableHotkeys = document.getElementById("settingsDisableHotkeys");
@@ -18960,6 +18989,7 @@ function setSettingsLabels() {
nsPortLimit.innerHTML = Settings.MaxPortCapacity;
suppressMsgs.checked = Settings.SuppressMessages;
suppressFactionInv.checked = Settings.SuppressFactionInvites;
+ suppressTravelConfirmation.checked = Settings.suppressTravelConfirmation;
autosaveInterval.innerHTML = Settings.AutosaveInterval;
disableHotkeys.checked = Settings.DisableHotkeys;
@@ -19006,6 +19036,10 @@ function setSettingsLabels() {
Settings.SuppressFactionInvites = this.checked;
};
+ suppressTravelConfirmation.onclick = function() {
+ Settings.SuppressTravelConfirmation = this.checked;
+ };
+
disableHotkeys.onclick = function() {
Settings.DisableHotkeys = this.checked;
}
@@ -24532,8 +24566,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Settings.js */ 22);
/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Terminal.js */ 19);
-/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TextFile.js */ 42);
-/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn.js */ 35);
+/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TextFile.js */ 43);
+/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn.js */ 36);
/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
@@ -24985,6 +25019,7 @@ function parseOnlyRamCalculate(server, code, workerScript) {
if (ref == specialReferenceFOR) ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptForRamCost;
if (ref == specialReferenceWHILE) ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptWhileRamCost;
if (ref == "hacknetnodes") ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptHacknetNodesRamCost;
+ if (ref == "document" || ref == "window") ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptCheatRamCost;
// Check if this ident is a function in the workerscript env. If it is, then we need to
// get its RAM cost. We do this by calling it, which works because the running script
@@ -25521,7 +25556,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Faction.js */ 11);
/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Location.js */ 4);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./RedPill.js */ 44);
+/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./RedPill.js */ 40);
/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Terminal.js */ 19);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
@@ -29887,7 +29922,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
/* harmony import */ var _Missions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Missions.js */ 33);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedPill.js */ 44);
+/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedPill.js */ 40);
/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server.js */ 10);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Settings.js */ 22);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
@@ -30236,7 +30271,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasCorporationSF", function() { return hasCorporationSF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasAISF", function() { return hasAISF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasBladeburnerSF", function() { return hasBladeburnerSF; });
-/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 40);
+/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 41);
/* harmony import */ var _Augmentations_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations.js */ 17);
/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BitNode.js */ 15);
/* harmony import */ var _Crimes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Crimes.js */ 27);
@@ -30246,29 +30281,30 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
/* harmony import */ var _DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DarkWeb.js */ 34);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./engine.js */ 5);
-/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction.js */ 11);
-/* harmony import */ var _HacknetNode_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./HacknetNode.js */ 37);
-/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Location.js */ 4);
-/* harmony import */ var _Message_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Message.js */ 28);
-/* harmony import */ var _Missions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Missions.js */ 33);
-/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Script.js */ 25);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Server.js */ 10);
-/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
-/* harmony import */ var _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./StockMarket.js */ 21);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Terminal.js */ 19);
-/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./TextFile.js */ 42);
-/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
-/* harmony import */ var _NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./NetscriptEvaluator.js */ 6);
-/* harmony import */ var _NetscriptEnvironment_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./NetscriptEnvironment.js */ 67);
-/* harmony import */ var _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./NetscriptPort.js */ 45);
-/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! decimal.js */ 23);
-/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
-/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
-/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
+/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Gang.js */ 35);
+/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction.js */ 11);
+/* harmony import */ var _HacknetNode_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HacknetNode.js */ 37);
+/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Location.js */ 4);
+/* harmony import */ var _Message_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Message.js */ 28);
+/* harmony import */ var _Missions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Missions.js */ 33);
+/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Player.js */ 0);
+/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Script.js */ 25);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Settings.js */ 22);
+/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
+/* harmony import */ var _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./StockMarket.js */ 21);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Terminal.js */ 19);
+/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./TextFile.js */ 43);
+/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
+/* harmony import */ var _NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./NetscriptEvaluator.js */ 6);
+/* harmony import */ var _NetscriptEnvironment_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./NetscriptEnvironment.js */ 67);
+/* harmony import */ var _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./NetscriptPort.js */ 45);
+/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! decimal.js */ 23);
+/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
+/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
+/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
+/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
+/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
var sprintf = __webpack_require__(/*! sprintf-js */ 66).sprintf,
vsprintf = __webpack_require__(/*! sprintf-js */ 66).vsprintf
@@ -30306,6 +30342,7 @@ var sprintf = __webpack_require__(/*! sprintf-js */ 66).sprintf,
+
var hasCorporationSF = false, //Source-File 3
@@ -30374,20 +30411,20 @@ var possibleLogs = {
//Used to check and set flags for every Source File, despite the name of the function
function initSingularitySFFlags() {
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 3) {hasCorporationSF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 4) {
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles.length; ++i) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 3) {hasCorporationSF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 4) {
hasSingularitySF = true;
- singularitySFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].lvl;
+ singularitySFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].lvl;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 5) {hasAISF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 6) {hasBladeburnerSF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 7) {hasBladeburner2079SF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 5) {hasAISF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 6) {hasBladeburnerSF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 7) {hasBladeburner2079SF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 8) {
hasWallStreetSF = true;
- wallStreetSFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].lvl;
+ wallStreetSFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].lvl;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 11) {hasBn11SF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 11) {hasBn11SF = true;}
}
}
@@ -30397,7 +30434,7 @@ function NetscriptFunctions(workerScript) {
workerScript.dynamicLoadedFns[fnName] = true;
workerScript.dynamicRamUsage += ramCost;
if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript,
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript,
"Dynamic RAM usage calculated to be greater than initial RAM usage. " +
"This is probably because you somehow circumvented the static RAM " +
"calculation.
Please don't do that :(");
@@ -30417,7 +30454,7 @@ function NetscriptFunctions(workerScript) {
Math : Math,
Date : Date,
Number : Number,
- hacknetnodes : _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknetNodeWrappers,
+ hacknetnodes : _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknetNodeWrappers,
sprintf : sprintf,
vsprintf: vsprintf,
scan : function(ip=workerScript.serverIp, hostnames=true){
@@ -30425,9 +30462,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("scan", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
}
updateDynamicRam("scan", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, 'Invalid IP or hostname passed into scan() command');
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, 'Invalid IP or hostname passed into scan() command');
}
var out = [];
for (var i = 0; i < server.serversOnNetwork.length; i++) {
@@ -30453,41 +30490,41 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("hack", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptHackRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Hack() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping...");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping...");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping...");
}
//Calculate the hacking time
- var hackingTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateHackingTime"])(server); //This is in seconds
+ var hackingTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user does not have root access");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user does not have root access");
}
- if (server.requiredHackingSkill > _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill) {
+ if (server.requiredHackingSkill > _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill) {
workerScript.scriptRef.log("Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough");
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.hack == null) {
workerScript.scriptRef.log("Attempting to hack " + ip + " in " + hackingTime.toFixed(3) + " seconds (t=" + threads + ")");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(hackingTime* 1000, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(hackingTime* 1000, workerScript).then(function() {
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
- var hackChance = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateHackingChance"])(server);
+ var hackChance = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateHackingChance"])(server);
var rand = Math.random();
- var expGainedOnSuccess = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateExpGain"])(server) * threads;
+ var expGainedOnSuccess = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateExpGain"])(server) * threads;
var expGainedOnFailure = (expGainedOnSuccess / 4);
if (rand < hackChance) { //Success!
- var moneyGained = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculatePercentMoneyHacked"])(server);
+ var moneyGained = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculatePercentMoneyHacked"])(server);
moneyGained = Math.floor(server.moneyAvailable * moneyGained) * threads;
//Over-the-top safety checks
@@ -30499,23 +30536,23 @@ function NetscriptFunctions(workerScript) {
server.moneyAvailable -= moneyGained;
if (server.moneyAvailable < 0) {server.moneyAvailable = 0;}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainMoney(moneyGained);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainMoney(moneyGained);
workerScript.scriptRef.onlineMoneyMade += moneyGained;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].scriptProdSinceLastAug += moneyGained;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].scriptProdSinceLastAug += moneyGained;
workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGainedOnSuccess);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGainedOnSuccess);
workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.hack == null) {
- workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(moneyGained, 2) + " and " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGainedOnSuccess, 4) + " exp (t=" + threads + ")");
+ workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(moneyGained, 2) + " and " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGainedOnSuccess, 4) + " exp (t=" + threads + ")");
}
server.fortify(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ServerFortifyAmount * threads);
return Promise.resolve(moneyGained);
} else {
//Player only gains 25% exp for failure?
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGainedOnFailure);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGainedOnFailure);
workerScript.scriptRef.onlineExpGained += expGainedOnFailure;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.hack == null) {
- workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGainedOnFailure, 4) + " exp (t=" + threads + ")");
+ workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGainedOnFailure, 4) + " exp (t=" + threads + ")");
}
return Promise.resolve(0);
}
@@ -30524,12 +30561,12 @@ function NetscriptFunctions(workerScript) {
sleep : function(time){
if (workerScript.checkingRam) {return 0;}
if (time === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "sleep() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "sleep() call has incorrect number of arguments. Takes 1 argument");
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sleep == null) {
workerScript.scriptRef.log("Sleeping for " + time + " milliseconds");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(time, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(time, workerScript).then(function() {
return Promise.resolve(true);
});
},
@@ -30541,40 +30578,42 @@ function NetscriptFunctions(workerScript) {
var threads = workerScript.scriptRef.threads;
if (isNaN(threads) || threads < 1) {threads = 1;}
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "grow() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "grow() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot grow(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot grow this server (" + server.hostname + ") because user does not have root access");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot grow this server (" + server.hostname + ") because user does not have root access");
}
- var growTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateGrowTime"])(server);
+ var growTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateGrowTime"])(server);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.grow == null) {
- workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(growTime/1000, 3) + " seconds (t=" + threads + ")");
+ workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(growTime/1000, 3) + " seconds (t=" + threads + ")");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(growTime, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(growTime, workerScript).then(function() {
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
+ const moneyBefore = server.moneyAvailable;
server.moneyAvailable += (1 * threads); //It can be grown even if it has no money
- var growthPercentage = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["processSingleServerGrowth"])(server, 450 * threads);
+ var growthPercentage = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["processSingleServerGrowth"])(server, 450 * threads);
+ const moneyAfter = server.moneyAvailable;
workerScript.scriptRef.recordGrow(server.ip, threads);
- var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateExpGain"])(server) * threads;
+ var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateExpGain"])(server) * threads;
if (growthPercentage == 1) {
expGain = 0;
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.grow == null) {
workerScript.scriptRef.log("Available money on " + server.hostname + " grown by " +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(growthPercentage*100 - 100, 6) + "%. Gained " +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads +")");
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])((moneyAfter/moneyBefore)*100 - 100, 6) + "%. Gained " +
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads +")");
}
workerScript.scriptRef.onlineExpGained += expGain;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGain);
return Promise.resolve(growthPercentage);
});
},
@@ -30586,60 +30625,60 @@ function NetscriptFunctions(workerScript) {
var threads = workerScript.scriptRef.threads;
if (isNaN(threads) || threads < 1) {threads = 1;}
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "weaken() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "weaken() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot weaken(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot weaken this server (" + server.hostname + ") because user does not have root access");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot weaken this server (" + server.hostname + ") because user does not have root access");
}
- var weakenTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateWeakenTime"])(server);
+ var weakenTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateWeakenTime"])(server);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.weaken == null) {
workerScript.scriptRef.log("Executing weaken() on server " + server.hostname + " in " +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(weakenTime/1000, 3) + " seconds (t=" + threads + ")");
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(weakenTime/1000, 3) + " seconds (t=" + threads + ")");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(weakenTime, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(weakenTime, workerScript).then(function() {
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
server.weaken(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ServerWeakenAmount * threads);
workerScript.scriptRef.recordWeaken(server.ip, threads);
- var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateExpGain"])(server) * threads;
+ var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateExpGain"])(server) * threads;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.weaken == null) {
workerScript.scriptRef.log("Server security level on " + server.hostname + " weakened to " + server.hackDifficulty +
- ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads + ")");
+ ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads + ")");
}
workerScript.scriptRef.onlineExpGained += expGain;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGain);
return Promise.resolve(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ServerWeakenAmount * threads);
});
},
print : function(args){
if (workerScript.checkingRam) {return 0;}
if (args === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "print() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "print() call has incorrect number of arguments. Takes 1 argument");
}
workerScript.scriptRef.log(args.toString());
},
tprint : function(args) {
if (workerScript.checkingRam) {return 0;}
if (args === undefined || args == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "tprint() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "tprint() call has incorrect number of arguments. Takes 1 argument");
}
var x = args.toString();
- if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isHTML"])(x)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].takeDamage(1);
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_28__["dialogBoxCreate"])("You suddenly feel a sharp shooting pain through your body as an angry voice in your head exclaims:
" +
+ if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isHTML"])(x)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].takeDamage(1);
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_29__["dialogBoxCreate"])("You suddenly feel a sharp shooting pain through your body as an angry voice in your head exclaims:
" +
"DON'T USE TPRINT() TO OUTPUT HTML ELEMENTS TO YOUR TERMINAL!!!!
" +
"(You lost 1 HP)");
return;
}
- Object(_Terminal_js__WEBPACK_IMPORTED_MODULE_21__["post"])(workerScript.scriptRef.filename + ": " + args.toString());
+ Object(_Terminal_js__WEBPACK_IMPORTED_MODULE_22__["post"])(workerScript.scriptRef.filename + ": " + args.toString());
},
clearLog : function() {
if (workerScript.checkingRam) {return 0;}
@@ -30648,7 +30687,7 @@ function NetscriptFunctions(workerScript) {
disableLog : function(fn) {
if (workerScript.checkingRam) {return 0;}
if(possibleLogs[fn]===undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to disableLog: "+fn);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to disableLog: "+fn);
}
workerScript.disableLogs[fn] = true;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.disableLog == null) {
@@ -30658,7 +30697,7 @@ function NetscriptFunctions(workerScript) {
enableLog : function(fn) {
if (workerScript.checkingRam) {return 0;}
if(possibleLogs[fn]===undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to enableLog: "+fn);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to enableLog: "+fn);
}
delete workerScript.disableLogs[fn];
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.enableLog == null) {
@@ -30671,18 +30710,18 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("nuke", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the NUKE.exe virus!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the NUKE.exe virus!");
}
if (server.openPortCount < server.numOpenPortsRequired) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Not enough ports opened to use NUKE.exe virus");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Not enough ports opened to use NUKE.exe virus");
}
if (server.hasAdminRights) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.nuke == null) {
@@ -30702,16 +30741,16 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("brutessh", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram)) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram)) {
workerScript.scriptRef.log("You do not have the BruteSSH.exe program!");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the BruteSSH.exe program!");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the BruteSSH.exe program!");
}
if (!server.sshPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.brutessh == null) {
@@ -30732,15 +30771,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("ftpcrack", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the FTPCrack.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the FTPCrack.exe program!");
}
if (!server.ftpPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.ftpcrack == null) {
@@ -30761,15 +30800,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("relaysmtp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the relaySMTP.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the relaySMTP.exe program!");
}
if (!server.smtpPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.relaysmtp == null) {
@@ -30790,15 +30829,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("httpworm", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the HTTPWorm.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the HTTPWorm.exe program!");
}
if (!server.httpPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.httpworm == null) {
@@ -30819,15 +30858,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("sqlinject", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the SQLInject.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the SQLInject.exe program!");
}
if (!server.sqlPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sqlinject == null) {
@@ -30848,21 +30887,21 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("run", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptRunRamCost);
if (scriptname === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");
}
if (isNaN(threads) || threads < 1) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (scriptServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["runScriptFromScript"])(scriptServer, scriptname, argsForNewScript, workerScript, threads);
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["runScriptFromScript"])(scriptServer, scriptname, argsForNewScript, workerScript, threads);
},
exec : function(scriptname,ip,threads = 1) {
if (workerScript.checkingRam) {
@@ -30870,20 +30909,20 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("exec", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptExecRamCost);
if (scriptname === undefined || ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
}
if (isNaN(threads) || threads < 1) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument for thread count passed into exec(). Must be numeric and greater than 0");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid hostname/ip passed into exec() command: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid hostname/ip passed into exec() command: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["runScriptFromScript"])(server, scriptname, argsForNewScript, workerScript, threads);
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["runScriptFromScript"])(server, scriptname, argsForNewScript, workerScript, threads);
},
spawn : function(scriptname, threads) {
if (workerScript.checkingRam) {
@@ -30891,7 +30930,7 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("spawn", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSpawnRamCost);
if (scriptname == null || threads == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid scriptname or numThreads argument passed to spawn()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid scriptname or numThreads argument passed to spawn()");
}
setTimeout(()=>{
NetscriptFunctions(workerScript).run.apply(this, arguments);
@@ -30907,31 +30946,31 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("kill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
if (filename === undefined || ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("kill() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "kill() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(filename, argsForKillTarget, server);
+ var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(filename, argsForKillTarget, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForKillTarget));
+ workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForKillTarget));
return false;
}
- var res = Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(runningScriptObj, server.ip);
+ var res = Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(runningScriptObj, server.ip);
if (res) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.kill == null) {
- workerScript.scriptRef.log("Killing " + filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["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(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForKillTarget) + ". May take up to a few minutes for the scripts to die...");
}
return true;
} else {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.kill == null) {
- workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForKillTarget));
+ workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForKillTarget));
}
return false;
}
@@ -30942,16 +30981,16 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("killall", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "killall() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "killall() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("killall() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "killall() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "killall() failed. Invalid IP or hostname passed in: " + ip);
}
var scriptsRunning = (server.runningScripts.length > 0);
for (var i = server.runningScripts.length-1; i >= 0; --i) {
- Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(server.runningScripts[i], server.ip);
+ Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(server.runningScripts[i], server.ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.killall == null) {
workerScript.scriptRef.log("killall(): Killing all scripts on " + server.hostname + ". May take a few minutes for the scripts to die");
@@ -30963,11 +31002,11 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("exit", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
}
updateDynamicRam("exit", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in exit(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in exit(). This is a bug please contact game dev");
}
- if (Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(workerScript.scriptRef, server.ip)) {
+ if (Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(workerScript.scriptRef, server.ip)) {
workerScript.scriptRef.log("Exiting...");
} else {
workerScript.scriptRef.log("Exit failed(). This is a bug please contact game developer");
@@ -30979,7 +31018,7 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("scp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScpRamCost);
if (arguments.length !== 2 && arguments.length !== 3) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
}
if (scriptname && scriptname.constructor === Array) {
//Recursively call scp on all elements of array
@@ -30991,38 +31030,38 @@ function NetscriptFunctions(workerScript) {
});
return res;
}
- if (!scriptname.endsWith(".lit") && !Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["isScriptFilename"])(scriptname) &&
+ if (!scriptname.endsWith(".lit") && !Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["isScriptFilename"])(scriptname) &&
!scriptname.endsWith("txt")) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");
}
var destServer, currServ;
if (arguments.length === 3) { //scriptname, source, destination
if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
}
- destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip2);
+ destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip2);
if (destServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
}
- currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip1);
+ currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip1);
if (currServ == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
}
} else if (arguments.length === 2) { //scriptname, destination
if (scriptname === undefined || ip1 === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
}
- destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip1);
+ destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip1);
if (destServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
}
- currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (currServ == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
}
}
@@ -31030,7 +31069,7 @@ function NetscriptFunctions(workerScript) {
if (scriptname.endsWith(".lit")) {
var found = false;
for (var i = 0; i < currServ.messages.length; ++i) {
- if (!(currServ.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) && currServ.messages[i] == scriptname) {
+ if (!(currServ.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) && currServ.messages[i] == scriptname) {
found = true;
break;
}
@@ -31082,7 +31121,7 @@ function NetscriptFunctions(workerScript) {
return true;
}
}
- var newFile = new _TextFile_js__WEBPACK_IMPORTED_MODULE_22__["TextFile"](txtFile.fn, txtFile.text);
+ var newFile = new _TextFile_js__WEBPACK_IMPORTED_MODULE_23__["TextFile"](txtFile.fn, txtFile.text);
destServer.textFiles.push(newFile);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.scp == null) {
workerScript.scriptRef.log(scriptname + " copied over to " + destServer.hostname);
@@ -31118,7 +31157,7 @@ function NetscriptFunctions(workerScript) {
}
//Create new script if it does not already exist
- var newScript = new _Script_js__WEBPACK_IMPORTED_MODULE_16__["Script"]();
+ var newScript = new _Script_js__WEBPACK_IMPORTED_MODULE_17__["Script"]();
newScript.filename = scriptname;
newScript.code = sourceScript.code;
newScript.ramUsage = sourceScript.ramUsage;
@@ -31135,12 +31174,12 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("ls", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("ls() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ls() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ls() failed. Invalid IP or hostname passed in: " + ip);
}
//Get the grep filter, if one exists
@@ -31171,7 +31210,7 @@ function NetscriptFunctions(workerScript) {
}
for (var i = 0; i < server.messages.length; i++) {
if (filter) {
- if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) {
+ if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) {
if (server.messages[i].filename.includes(filter)) {
allFiles.push(server.messages[i].filename);
}
@@ -31179,7 +31218,7 @@ function NetscriptFunctions(workerScript) {
allFiles.push(server.messages[i]);
}
} else {
- if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) {
+ if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) {
allFiles.push(server.messages[i].filename);
} else {
allFiles.push(server.messages[i]);
@@ -31201,18 +31240,35 @@ function NetscriptFunctions(workerScript) {
allFiles.sort();
return allFiles;
},
+ ps : function(ip=workerScript.serverIp) {
+ if (workerScript.checkingRam) {
+ return updateStaticRam("ps", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
+ }
+ updateDynamicRam("ps", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
+ if (server == null){
+ workerScript.scriptRef.log("ps() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ps() failed. Invalid IP or hostname passed in: " + ip);
+ }
+ const processes = [];
+ for(const i in server.runningScripts) {
+ const script = server.runningScripts[i];
+ processes.push({filename:script.filename, threads: script.threads, args: script.args.slice()})
+ }
+ return processes;
+ },
hasRootAccess : function(ip) {
if (workerScript.checkingRam) {
return updateStaticRam("hasRootAccess", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptHasRootAccessRamCost);
}
updateDynamicRam("hasRootAccess", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptHasRootAccessRamCost);
if (ip===undefined){
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null){
workerScript.scriptRef.log("hasRootAccess() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() failed. Invalid IP or hostname passed in: " + ip);
}
return server.hasAdminRights;
},
@@ -31221,9 +31277,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getIp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
}
updateDynamicRam("getIp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
- var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (scriptServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
}
return scriptServer.ip;
},
@@ -31232,9 +31288,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getHostname", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
}
updateDynamicRam("getHostname", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
- var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (scriptServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
}
return scriptServer.hostname;
},
@@ -31243,11 +31299,11 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackingLevelRamCost);
}
updateDynamicRam("getHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackingLevelRamCost);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].updateSkillLevels();
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].updateSkillLevels();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getHackingLevel == null) {
- workerScript.scriptRef.log("getHackingLevel() returned " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill);
+ workerScript.scriptRef.log("getHackingLevel() returned " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill);
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill;
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill;
},
getHackingMultipliers : function() {
if (workerScript.checkingRam) {
@@ -31255,10 +31311,10 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getHackingMultipliers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetMultipliersRamCost);
return {
- chance: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_chance_mult,
- speed: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_speed_mult,
- money: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_money_mult,
- growth: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_grow_mult,
+ chance: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_chance_mult,
+ speed: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_speed_mult,
+ money: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_money_mult,
+ growth: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_grow_mult,
};
},
getHacknetMultipliers : function() {
@@ -31267,11 +31323,11 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getHacknetMultipliers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetMultipliersRamCost);
return {
- production: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_money_mult,
- purchaseCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_purchase_cost_mult,
- ramCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_ram_cost_mult,
- coreCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_core_cost_mult,
- levelCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_level_cost_mult,
+ production: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_money_mult,
+ purchaseCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_purchase_cost_mult,
+ ramCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_ram_cost_mult,
+ coreCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_core_cost_mult,
+ levelCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_level_cost_mult,
};
},
getBitNodeMultipliers: function() {
@@ -31280,7 +31336,7 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getBitNodeMultipliers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetMultipliersRamCost);
if (!hasAISF) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");
}
let copy = Object.assign({}, _BitNode_js__WEBPACK_IMPORTED_MODULE_2__["BitNodeMultipliers"]);
return copy;
@@ -31290,20 +31346,20 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerMoneyAvailable", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerMoneyAvailable", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMoneyAvailable() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerMoneyAvailable() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerMoneyAvailable() failed. Invalid IP or hostname passed in: " + ip);
}
if (server.hostname == "home") {
//Return player's money
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMoneyAvailable == null) {
- workerScript.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.toNumber(), 2));
+ workerScript.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.toNumber(), 2));
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.toNumber();
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.toNumber();
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMoneyAvailable == null) {
- workerScript.scriptRef.log("getServerMoneyAvailable() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.moneyAvailable, 2) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerMoneyAvailable() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.moneyAvailable, 2) + " for " + server.hostname);
}
return server.moneyAvailable;
},
@@ -31312,13 +31368,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerSecurityLevel == null) {
- workerScript.scriptRef.log("getServerSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.hackDifficulty, 3) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.hackDifficulty, 3) + " for " + server.hostname);
}
return server.hackDifficulty;
},
@@ -31327,13 +31383,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerBaseSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerBaseSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerBaseSecurityLevel == null) {
- workerScript.scriptRef.log("getServerBaseSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.baseDifficulty, 3) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerBaseSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.baseDifficulty, 3) + " for " + server.hostname);
}
return server.baseDifficulty;
},
@@ -31342,13 +31398,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerMinSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerMinSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMinSecurityLevel == null) {
- workerScript.scriptRef.log("getServerMinSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.minDifficulty, 3) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerMinSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.minDifficulty, 3) + " for " + server.hostname);
}
return server.minDifficulty;
},
@@ -31357,13 +31413,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerRequiredHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerRequiredHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerRequiredHackingLevel == null) {
- workerScript.scriptRef.log("getServerRequiredHackingLevel returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.requiredHackingSkill, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerRequiredHackingLevel returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.requiredHackingSkill, 0) + " for " + server.hostname);
}
return server.requiredHackingSkill;
},
@@ -31372,13 +31428,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerMaxMoney", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerMaxMoney", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMaxMoney == null) {
- workerScript.scriptRef.log("getServerMaxMoney() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.moneyMax, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerMaxMoney() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.moneyMax, 0) + " for " + server.hostname);
}
return server.moneyMax;
},
@@ -31387,13 +31443,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerGrowth", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerGrowth", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerGrowth == null) {
- workerScript.scriptRef.log("getServerGrowth() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.serverGrowth, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerGrowth() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.serverGrowth, 0) + " for " + server.hostname);
}
return server.serverGrowth;
},
@@ -31402,13 +31458,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerNumPortsRequired", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerNumPortsRequired", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerNumPortsRequired == null) {
- workerScript.scriptRef.log("getServerNumPortsRequired() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.numOpenPortsRequired, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerNumPortsRequired() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.numOpenPortsRequired, 0) + " for " + server.hostname);
}
return server.numOpenPortsRequired;
},
@@ -31417,13 +31473,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerRam() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerRam() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerRam() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerRam == null) {
- workerScript.scriptRef.log("getServerRam() returned [" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.maxRam, 2) + "GB, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.ramUsed, 2) + "GB]");
+ workerScript.scriptRef.log("getServerRam() returned [" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.maxRam, 2) + "GB, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.ramUsed, 2) + "GB]");
}
return [server.maxRam, server.ramUsed];
},
@@ -31432,7 +31488,7 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("serverExists", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("serverExists", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- return (Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip) !== null);
+ return (Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip) !== null);
},
fileExists : function(filename,ip=workerScript.serverIp) {
if (workerScript.checkingRam) {
@@ -31440,12 +31496,12 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("fileExists", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptFileExistsRamCost);
if (filename === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("fileExists() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "fileExists() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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) {
@@ -31458,12 +31514,12 @@ function NetscriptFunctions(workerScript) {
}
}
for (var i = 0; i < server.messages.length; ++i) {
- if (!(server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) &&
+ if (!(server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) &&
filename.toLowerCase() === server.messages[i]) {
return true;
}
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(filename, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(filename, server);
if (txtFile != null) {
return true;
}
@@ -31475,25 +31531,25 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("isRunning", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptIsRunningRamCost);
if (filename === undefined || ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("isRunning() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isRunning() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(filename, argsForTargetScript, server) != null);
+ return (Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(filename, argsForTargetScript, server) != null);
},
getNextHacknetNodeCost : function() {
if (workerScript.checkingRam) {
return updateStaticRam("getNextHacknetNodeCost", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
}
updateDynamicRam("getNextHacknetNodeCost", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
- return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_11__["getCostOfNextHacknetNode"])();
+ return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_12__["getCostOfNextHacknetNode"])();
},
purchaseHacknetNode : function() {
@@ -31501,19 +31557,19 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("purchaseHacknetNode", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
}
updateDynamicRam("purchaseHacknetNode", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
- return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_11__["purchaseHacknet"])();
+ return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_12__["purchaseHacknet"])();
},
getStockPrice : function(symbol) {
if (workerScript.checkingRam) {
return updateStaticRam("getStockPrice", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
}
updateDynamicRam("getStockPrice", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPrice()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPrice()");
}
return parseFloat(stock.price.toFixed(3));
},
@@ -31522,12 +31578,12 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getStockPosition", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
}
updateDynamicRam("getStockPosition", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPosition()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPosition()");
}
return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
},
@@ -31536,12 +31592,12 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("buyStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("buyStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use buyStock()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use buyStock()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into buyStock()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into buyStock()");
}
if (shares < 0 || isNaN(shares)) {
workerScript.scriptRef.log("ERROR: Invalid 'shares' argument passed to buyStock()");
@@ -31551,24 +31607,24 @@ function NetscriptFunctions(workerScript) {
if (shares === 0) {return 0;}
var totalPrice = stock.price * shares;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission)) {
- workerScript.scriptRef.log("Not enough money to purchase " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(shares, 0) + " shares of " +
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission)) {
+ workerScript.scriptRef.log("Not enough money to purchase " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(shares, 0) + " shares of " +
symbol + ". Need $" +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission, 2).toString());
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission, 2).toString());
return 0;
}
var origTotal = stock.playerShares * stock.playerAvgPx;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission);
var newTotal = origTotal + totalPrice;
stock.playerShares += shares;
stock.playerAvgPx = newTotal / stock.playerShares;
if (_engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].Page.StockMarket) {
- Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["updateStockPlayerPosition"])(stock);
+ Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["updateStockPlayerPosition"])(stock);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.buyStock == null) {
- workerScript.scriptRef.log("Bought " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(stock.price, 2) + " per share");
+ workerScript.scriptRef.log("Bought " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(stock.price, 2) + " per share");
}
return stock.price;
},
@@ -31577,12 +31633,12 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("sellStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("sellStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellStock()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellStock()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into sellStock()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into sellStock()");
}
if (shares < 0 || isNaN(shares)) {
workerScript.scriptRef.log("ERROR: Invalid 'shares' argument passed to sellStock()");
@@ -31592,25 +31648,25 @@ function NetscriptFunctions(workerScript) {
if (shares > stock.playerShares) {shares = stock.playerShares;}
if (shares === 0) {return 0;}
var gains = stock.price * shares - _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainMoney(gains);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainMoney(gains);
//Calculate net profit and add to script stats
var netProfit = ((stock.price - stock.playerAvgPx) * shares) - _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission;
if (isNaN(netProfit)) {netProfit = 0;}
workerScript.scriptRef.onlineMoneyMade += netProfit;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].scriptProdSinceLastAug += netProfit;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].scriptProdSinceLastAug += netProfit;
stock.playerShares -= shares;
if (stock.playerShares == 0) {
stock.playerAvgPx = 0;
}
if (_engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].Page.StockMarket) {
- Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["updateStockPlayerPosition"])(stock);
+ Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["updateStockPlayerPosition"])(stock);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sellStock == null) {
- workerScript.scriptRef.log("Sold " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(stock.price, 2) + " per share. Gained " +
- "$" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(gains, 2));
+ workerScript.scriptRef.log("Sold " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(stock.price, 2) + " per share. Gained " +
+ "$" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(gains, 2));
}
return stock.price;
},
@@ -31619,19 +31675,19 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("shortStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("shortStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use shortStock()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use shortStock()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into shortStock()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into shortStock()");
}
- var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["shortStock"])(stock, shares, workerScript);
+ var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["shortStock"])(stock, shares, workerScript);
return res ? stock.price : 0;
},
sellShort(symbol, shares) {
@@ -31639,19 +31695,19 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("sellShort", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("sellShort", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellShort()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellShort()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into sellShort()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into sellShort()");
}
- var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["sellShort"])(stock, shares, workerScript);
+ var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["sellShort"])(stock, shares, workerScript);
return res ? stock.price : 0;
},
placeOrder(symbol, shares, price, type, pos) {
@@ -31659,84 +31715,84 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("placeOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("placeOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use placeOrder()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use placeOrder()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into placeOrder()");
}
var orderType, orderPos;
type = type.toLowerCase();
if (type.includes("limit") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitBuy;
} else if (type.includes("limit") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitSell;
} else if (type.includes("stop") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopBuy;
} else if (type.includes("stop") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopSell;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
}
pos = pos.toLowerCase();
if (pos.includes("l")) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Long;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Long;
} else if (pos.includes('s')) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Short;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Short;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
}
- return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["placeOrder"])(stock, shares, price, orderType, orderPos, workerScript);
+ return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["placeOrder"])(stock, shares, price, orderType, orderPos, workerScript);
},
cancelOrder(symbol, shares, price, type, pos) {
if (workerScript.checkingRam) {
return updateStaticRam("cancelOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("cancelOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use cancelOrder()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use cancelOrder()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into cancelOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into cancelOrder()");
}
if (isNaN(shares) || isNaN(price)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");
}
var orderType, orderPos;
type = type.toLowerCase();
if (type.includes("limit") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitBuy;
} else if (type.includes("limit") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitSell;
} else if (type.includes("stop") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopBuy;
} else if (type.includes("stop") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopSell;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
}
pos = pos.toLowerCase();
if (pos.includes("l")) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Long;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Long;
} else if (pos.includes('s')) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Short;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Short;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
}
var params = {
stock: stock,
@@ -31745,7 +31801,7 @@ function NetscriptFunctions(workerScript) {
type: orderType,
pos: orderPos
};
- return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["cancelOrder"])(params, workerScript);
+ return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["cancelOrder"])(params, workerScript);
},
purchaseServer : function(hostname, ram) {
if (workerScript.checkingRam) {
@@ -31759,14 +31815,14 @@ function NetscriptFunctions(workerScript) {
return "";
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.length >= _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].PurchasedServerLimit) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.length >= _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].PurchasedServerLimit) {
workerScript.scriptRef.log("ERROR: You have reached the maximum limit of " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].PurchasedServerLimit +
" servers. You cannot purchase any more.");
return "";
}
ram = Math.round(ram);
- if (isNaN(ram) || !Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["powerOfTwo"])(ram)) {
+ if (isNaN(ram) || !Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["powerOfTwo"])(ram)) {
workerScript.scriptRef.log("ERROR: purchaseServer() failed due to invalid ram argument. Must be numeric and a power of 2");
return "";
}
@@ -31777,12 +31833,12 @@ function NetscriptFunctions(workerScript) {
}
var cost = ram * _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].BaseCostFor1GBOfRamServer;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(cost)) {
- workerScript.scriptRef.log("ERROR: Not enough money to purchase server. Need $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(cost, 2));
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(cost)) {
+ workerScript.scriptRef.log("ERROR: Not enough money to purchase server. Need $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(cost, 2));
return "";
}
- var newServ = new _Server_js__WEBPACK_IMPORTED_MODULE_17__["Server"]({
- ip: Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_30__["createRandomIp"])(),
+ var newServ = new _Server_js__WEBPACK_IMPORTED_MODULE_18__["Server"]({
+ ip: Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_31__["createRandomIp"])(),
hostname: hostnameStr,
organizationName: "",
isConnectedTo: false,
@@ -31790,15 +31846,15 @@ function NetscriptFunctions(workerScript) {
purchasedByPlayer: true,
maxRam: ram,
});
- Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["AddToAllServers"])(newServ);
+ Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["AddToAllServers"])(newServ);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.push(newServ.ip);
- var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer();
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.push(newServ.ip);
+ var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer();
homeComputer.serversOnNetwork.push(newServ.ip);
newServ.serversOnNetwork.push(homeComputer.ip);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(cost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(cost);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseServer == null) {
- workerScript.scriptRef.log("Purchased new server with hostname " + newServ.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(cost, 2));
+ workerScript.scriptRef.log("Purchased new server with hostname " + newServ.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(cost, 2));
}
return newServ.hostname;
},
@@ -31809,7 +31865,7 @@ function NetscriptFunctions(workerScript) {
updateDynamicRam("deleteServer", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseServerRamCost);
var hostnameStr = String(hostname);
hostnameStr = hostnameStr.replace(/\s\s+/g, '');
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["GetServerByHostname"])(hostnameStr);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["GetServerByHostname"])(hostnameStr);
if (server == null) {
workerScript.scriptRef.log("ERROR: Could not find server with hostname " + hostnameStr + ". deleteServer() failed");
return false;
@@ -31843,10 +31899,10 @@ function NetscriptFunctions(workerScript) {
//Delete from player's purchasedServers array
var found = false;
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.length; ++i) {
- if (ip == _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers[i]) {
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.length; ++i) {
+ if (ip == _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers[i]) {
found = true;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.splice(i, 1);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.splice(i, 1);
break;
}
}
@@ -31858,11 +31914,11 @@ function NetscriptFunctions(workerScript) {
}
//Delete from all servers
- delete _Server_js__WEBPACK_IMPORTED_MODULE_17__["AllServers"][ip];
+ delete _Server_js__WEBPACK_IMPORTED_MODULE_18__["AllServers"][ip];
//Delete from home computer
found = false;
- var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer();
+ var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer();
for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {
if (ip == homeComputer.serversOnNetwork[i]) {
homeComputer.serversOnNetwork.splice(i, 1);
@@ -31883,11 +31939,11 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getPurchasedServers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseServerRamCost);
var res = [];
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.forEach(function(ip) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.forEach(function(ip) {
if (hostname) {
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find server in getPurchasedServers(). This is a bug please report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find server in getPurchasedServers(). This is a bug please report to game dev");
}
res.push(server.hostname);
} else {
@@ -31905,22 +31961,22 @@ function NetscriptFunctions(workerScript) {
//Port 1-10
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to write to invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to write to invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.write(data);
- } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(port)) { //Write to text file
+ } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(port)) { //Write to text file
var fn = port;
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in write(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in write(). This is a bug please contact game dev");
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(fn, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(fn, server);
if (txtFile == null) {
- txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["createTextFile"])(fn, data, server);
+ txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["createTextFile"])(fn, data, server);
return true;
}
if (mode === "w") {
@@ -31930,7 +31986,7 @@ function NetscriptFunctions(workerScript) {
}
return true;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for write: " + port);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for write: " + port);
}
},
read : function(port) {
@@ -31942,27 +31998,27 @@ function NetscriptFunctions(workerScript) {
//Port 1-10
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to read from invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to read from invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.read();
- } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(port)) { //Read from text file
+ } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(port)) { //Read from text file
var fn = port;
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in read(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in read(). This is a bug please contact game dev");
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(fn, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(fn, server);
if (txtFile !== null) {
return txtFile.text;
} else {
return "";
}
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for read(): " + port);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for read(): " + port);
}
},
peek : function(port) {
@@ -31971,15 +32027,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("peek", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost);
if (isNaN(port)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
}
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.peek();
},
@@ -31991,25 +32047,25 @@ function NetscriptFunctions(workerScript) {
if (!isNaN(port)) { //Clear port
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to clear invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to clear invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.clear();
- } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(port)) { //Clear text file
+ } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(port)) { //Clear text file
var fn = port;
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(fn, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(fn, server);
if (txtFile != null) {
txtFile.write("");
}
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for clear(): " + port);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for clear(): " + port);
}
return 0;
},
@@ -32019,15 +32075,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getPortHandle", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost * 10);
if (isNaN(port)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
}
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: getPortHandle() called with invalid port number: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: getPortHandle() called with invalid port number: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port;
},
@@ -32036,9 +32092,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("rm", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost);
}
updateDynamicRam("rm", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost);
- var s = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var s = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (s == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
}
if (fn.includes(".exe")) {
@@ -32048,7 +32104,7 @@ function NetscriptFunctions(workerScript) {
return true;
}
}
- } else if (Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["isScriptFilename"])(fn)) {
+ } else if (Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["isScriptFilename"])(fn)) {
for (var i = 0; i < s.scripts.length; ++i) {
if (s.scripts[i].filename === fn) {
//Check that the script isnt currently running
@@ -32065,7 +32121,7 @@ function NetscriptFunctions(workerScript) {
} else if (fn.endsWith(".lit")) {
for (var i = 0; i < s.messages.length; ++i) {
var f = s.messages[i];
- if (!(f instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) && Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(f) && f === fn) {
+ if (!(f instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) && Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(f) && f === fn) {
s.messages.splice(i, 1);
return true;
}
@@ -32085,10 +32141,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("scriptRunning", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
}
updateDynamicRam("scriptRunning", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("scriptRunning() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "scriptRunning() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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) {
@@ -32102,15 +32158,15 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("scriptKill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
}
updateDynamicRam("scriptKill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("scriptKill() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "scriptKill() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(server.runningScripts[i], server.ip);
+ Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(server.runningScripts[i], server.ip);
suc = true;
}
}
@@ -32125,10 +32181,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getScriptRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetScriptRamCost);
}
updateDynamicRam("getScriptRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetScriptRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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) {
@@ -32142,36 +32198,36 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getHackTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getHackTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getHackTime() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getHackTime() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getHackTime() failed. Invalid IP or hostname passed in: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateHackingTime"])(server); //Returns seconds
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateHackingTime"])(server); //Returns seconds
},
getGrowTime : function(ip) {
if (workerScript.checkingRam) {
return updateStaticRam("getGrowTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getGrowTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getGrowTime() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getGrowTime() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getGrowTime() failed. Invalid IP or hostname passed in: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateGrowTime"])(server) / 1000; //Returns seconds
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateGrowTime"])(server) / 1000; //Returns seconds
},
getWeakenTime : function(ip) {
if (workerScript.checkingRam) {
return updateStaticRam("getWeakenTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getWeakenTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getWeakenTime() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getWeakenTime() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getWeakenTime() failed. Invalid IP or hostname passed in: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateWeakenTime"])(server) / 1000; //Returns seconds
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateWeakenTime"])(server) / 1000; //Returns seconds
},
getScriptIncome : function(scriptname, ip) {
if (workerScript.checkingRam) {
@@ -32182,22 +32238,22 @@ function NetscriptFunctions(workerScript) {
//Get total script income
var res = [];
res.push(Object(_ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__["updateActiveScriptsItems"])());
- res.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].playtimeSinceLastAug/1000));
+ res.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].playtimeSinceLastAug/1000));
return res;
} else {
//Get income for a particular script
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getScriptIncome() failed. Invalid IP or hostnamed passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getScriptIncome() failed. Invalid IP or hostnamed passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getScriptIncome() failed. Invalid IP or hostnamed passed in: " + ip);
}
var argsForScript = [];
for (var i = 2; i < arguments.length; ++i) {
argsForScript.push(arguments[i]);
}
- var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(scriptname, argsForScript, server);
+ var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(scriptname, argsForScript, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("getScriptIncome() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForScript));
+ workerScript.scriptRef.log("getScriptIncome() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForScript));
return -1;
}
return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;
@@ -32210,24 +32266,24 @@ function NetscriptFunctions(workerScript) {
updateDynamicRam("getScriptExpGain", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetScriptRamCost);
if (arguments.length === 0) {
var total = 0;
- for (var i = 0; i < _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["workerScripts"].length; ++i) {
- total += (_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["workerScripts"][i].scriptRef.onlineExpGained / _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["workerScripts"][i].scriptRef.onlineRunningTime);
+ for (var i = 0; i < _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["workerScripts"].length; ++i) {
+ total += (_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["workerScripts"][i].scriptRef.onlineExpGained / _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["workerScripts"][i].scriptRef.onlineRunningTime);
}
return total;
} else {
//Get income for a particular script
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getScriptExpGain() failed. Invalid IP or hostnamed passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getScriptExpGain() failed. Invalid IP or hostnamed passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getScriptExpGain() failed. Invalid IP or hostnamed passed in: " + ip);
}
var argsForScript = [];
for (var i = 2; i < arguments.length; ++i) {
argsForScript.push(arguments[i]);
}
- var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(scriptname, argsForScript, server);
+ var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(scriptname, argsForScript, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("getScriptExpGain() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForScript));
+ workerScript.scriptRef.log("getScriptExpGain() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForScript));
return -1;
}
return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;
@@ -32238,51 +32294,51 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getTimeSinceLastAug", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getTimeSinceLastAug", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].playtimeSinceLastAug;
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].playtimeSinceLastAug;
},
prompt : function(txt) {
if (workerScript.checkingRam) {return 0;}
- if (_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxOpen"]) {
+ if (_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxOpen"]) {
workerScript.scriptRef.log("ERROR: confirm() failed because a pop-up dialog box is already open");
return false;
}
- if (!Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(txt)) {txt = String(txt);}
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxGetNoButton"])();
+ if (!Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(txt)) {txt = String(txt);}
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxGetNoButton"])();
yesBtn.innerHTML = "Yes";
noBtn.innerHTML = "No";
return new Promise(function(resolve, reject) {
yesBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxClose"])();
resolve(true);
});
noBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxClose"])();
resolve(false);
});
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxCreate"])(txt);
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxCreate"])(txt);
});
},
/* Singularity Functions */
universityCourse : function(universityName, className) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("universityCourse", ramCost);
}
updateDynamicRam("universityCourse", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.universityCourse == null) {
workerScript.scriptRef.log(txt);
}
@@ -32290,30 +32346,30 @@ function NetscriptFunctions(workerScript) {
var costMult, expMult;
switch(universityName.toLowerCase()) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSummitUniversity.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSummitUniversity.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum) {
workerScript.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSummitUniversity;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSummitUniversity;
costMult = 4;
expMult = 3;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12RothmanUniversity.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12RothmanUniversity.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12) {
workerScript.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12RothmanUniversity;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12RothmanUniversity;
costMult = 3;
expMult = 2;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenZBInstituteOfTechnology.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenZBInstituteOfTechnology.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven) {
workerScript.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenZBInstituteOfTechnology;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenZBInstituteOfTechnology;
costMult = 5;
expMult = 4;
break;
@@ -32346,7 +32402,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("Invalid class name: " + className + ". universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, task);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, task);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.universityCourse == null) {
workerScript.scriptRef.log("Started " + task + " at " + universityName);
}
@@ -32355,71 +32411,71 @@ function NetscriptFunctions(workerScript) {
gymWorkout : function(gymName, stat) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("gymWorkout", ramCost);
}
updateDynamicRam("gymWorkout", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.gymWorkout == null) {
workerScript.scriptRef.log(txt);
}
}
var costMult, expMult;
switch(gymName.toLowerCase()) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumCrushFitnessGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumCrushFitnessGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum) {
workerScript.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumCrushFitnessGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumCrushFitnessGym;
costMult = 3;
expMult = 2;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSnapFitnessGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSnapFitnessGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum) {
workerScript.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSnapFitnessGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSnapFitnessGym;
costMult = 10;
expMult = 5;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12IronGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12IronGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12) {
workerScript.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12IronGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12IronGym;
costMult = 1;
expMult = 1;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12PowerhouseGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12PowerhouseGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12) {
workerScript.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12PowerhouseGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12PowerhouseGym;
costMult = 20;
expMult = 10;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenMilleniumFitnessGym:
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenMilleniumFitnessGym:
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven) {
workerScript.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenMilleniumFitnessGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenMilleniumFitnessGym;
costMult = 7;
expMult = 4;
break;
@@ -32431,19 +32487,19 @@ function NetscriptFunctions(workerScript) {
switch(stat.toLowerCase()) {
case "strength".toLowerCase():
case "str".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymStrength);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymStrength);
break;
case "defense".toLowerCase():
case "def".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDefense);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDefense);
break;
case "dexterity".toLowerCase():
case "dex".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDexterity);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDexterity);
break;
case "agility".toLowerCase():
case "agi".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymAgility);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymAgility);
break;
default:
workerScript.scriptRef.log("Invalid stat: " + stat + ". gymWorkout() failed");
@@ -32457,32 +32513,32 @@ function NetscriptFunctions(workerScript) {
travelToCity(cityname) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("travelToCity", ramCost);
}
updateDynamicRam("travelToCity", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
switch(cityname) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Chongqing:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].NewTokyo:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Ishima:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven:
- if(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost)) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Chongqing:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].NewTokyo:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Ishima:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven:
+ if(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost)) {
workerScript.scriptRef.log("ERROR: not enough money to travel with travelToCity().");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: not enough money to travel with travelToCity().");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: not enough money to travel with travelToCity().");
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city = cityname;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city = cityname;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.travelToCity == null) {
workerScript.scriptRef.log("Traveled to " + cityname);
}
@@ -32495,41 +32551,41 @@ function NetscriptFunctions(workerScript) {
purchaseTor() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("purchaseTor", ramCost);
}
updateDynamicRam("purchaseTor", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"]["Darkweb Server"] != null) {
+ if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"]["Darkweb Server"] != null) {
workerScript.scriptRef.log("You already have a TOR router! purchaseTor() failed");
return false;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost)) {
workerScript.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost);
- var darkweb = new _Server_js__WEBPACK_IMPORTED_MODULE_17__["Server"]({
- ip:Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_30__["createRandomIp"])(), hostname:"darkweb", organizationName:"",
+ var darkweb = new _Server_js__WEBPACK_IMPORTED_MODULE_18__["Server"]({
+ ip:Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_31__["createRandomIp"])(), hostname:"darkweb", organizationName:"",
isConnectedTo:false, adminRights:false, purchasedByPlayer:false, maxRam:1
});
- Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["AddToAllServers"])(darkweb);
- _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"].addIp("Darkweb Server", darkweb.ip);
+ Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["AddToAllServers"])(darkweb);
+ _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"].addIp("Darkweb Server", darkweb.ip);
document.getElementById("location-purchase-tor").setAttribute("class", "a-link-button-inactive");
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().serversOnNetwork.push(darkweb.ip);
- darkweb.serversOnNetwork.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().ip);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().serversOnNetwork.push(darkweb.ip);
+ darkweb.serversOnNetwork.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().ip);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseTor == null) {
workerScript.scriptRef.log("You have purchased a Tor router!");
}
@@ -32537,19 +32593,19 @@ function NetscriptFunctions(workerScript) {
},
purchaseProgram(programName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("purchaseProgram", ramCost);
}
updateDynamicRam("purchaseProgram", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"]["Darkweb Server"] == null) {
+ if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"]["Darkweb Server"] == null) {
workerScript.scriptRef.log("ERROR: You do not have TOR router. purchaseProgram() failed.");
return false;
}
@@ -32557,9 +32613,9 @@ function NetscriptFunctions(workerScript) {
switch(programName.toLowerCase()) {
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].BruteSSHProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the BruteSSH.exe program. The new program can be found on your home computer.");
}
@@ -32570,9 +32626,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].FTPCrackProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the FTPCrack.exe program. The new program can be found on your home computer.");
}
@@ -32583,9 +32639,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].RelaySMTPProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the relaySMTP.exe program. The new program can be found on your home computer.");
}
@@ -32596,9 +32652,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].HTTPWormProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the HTTPWorm.exe program. The new program can be found on your home computer.");
}
@@ -32609,9 +32665,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].SQLInjectProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the SQLInject.exe program. The new program can be found on your home computer.");
}
@@ -32622,9 +32678,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].DeepScanV1Program);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the DeepscanV1.exe program. The new program can be found on your home computer.");
}
@@ -32635,9 +32691,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].DeepScanV2Program);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the DeepscanV2.exe program. The new program can be found on your home computer.");
}
@@ -32654,94 +32710,94 @@ function NetscriptFunctions(workerScript) {
},
getStats : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getStats", ramCost);
}
updateDynamicRam("getStats", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return {};
}
}
return {
- hacking: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill,
- strength: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].strength,
- defense: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].defense,
- dexterity: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].dexterity,
- agility: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].agility,
- charisma: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].charisma,
- intelligence: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].intelligence
+ hacking: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill,
+ strength: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].strength,
+ defense: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].defense,
+ dexterity: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].dexterity,
+ agility: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].agility,
+ charisma: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].charisma,
+ intelligence: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].intelligence
}
},
getCharacterInformation : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCharacterInformation", ramCost);
}
updateDynamicRam("getCharacterInformation", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return {};
}
}
var companyPositionTitle = "";
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"]) {
- companyPositionTitle = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.positionName;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"]) {
+ companyPositionTitle = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.positionName;
}
return {
- bitnode: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN,
- company: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyName,
+ bitnode: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN,
+ company: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyName,
jobTitle: companyPositionTitle,
- city: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city,
- factions: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factions.slice(),
- tor: _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"].hasOwnProperty("Darkweb Server"),
- timeWorked: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].timeWorked,
- workHackExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workHackExpGained,
- workStrExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workStrExpGained,
- workDefExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workDefExpGained,
- workDexExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workDexExpGained,
- workAgiExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workAgiExpGained,
- workChaExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workChaExpGained,
- workRepGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workRepGained,
- workMoneyGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workMoneyGained,
+ city: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city,
+ factions: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factions.slice(),
+ tor: _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"].hasOwnProperty("Darkweb Server"),
+ timeWorked: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].timeWorked,
+ workHackExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workHackExpGained,
+ workStrExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workStrExpGained,
+ workDefExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workDefExpGained,
+ workDexExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workDexExpGained,
+ workAgiExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workAgiExpGained,
+ workChaExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workChaExpGained,
+ workRepGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workRepGained,
+ workMoneyGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workMoneyGained,
};
},
isBusy : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("isBusy", ramCost);
}
updateDynamicRam("isBusy", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return;
}
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking;
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking;
},
stopAction : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 2;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("stopAction", ramCost);
}
updateDynamicRam("stopAction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.stopAction == null) {
workerScript.scriptRef.log(txt);
}
@@ -32751,31 +32807,31 @@ function NetscriptFunctions(workerScript) {
},
upgradeHomeRam : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("upgradeHomeRam", ramCost);
}
updateDynamicRam("upgradeHomeRam", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- const cost = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getUpgradeHomeRamCost();
+ const cost = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getUpgradeHomeRamCost();
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(cost)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(cost)) {
workerScript.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money");
return false;
}
- var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer();
+ var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer();
homeComputer.maxRam *= 2;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(cost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(cost);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.upgradeHomeRam == null) {
workerScript.scriptRef.log("Purchased additional RAM for home computer! It now has " + homeComputer.maxRam + "GB of RAM.");
}
@@ -32783,71 +32839,71 @@ function NetscriptFunctions(workerScript) {
},
getUpgradeHomeRamCost : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 2;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getUpgradeHomeRamCost", ramCost);
}
updateDynamicRam("getUpgradeHomeRamCost", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getUpgradeHomeRamCost();
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getUpgradeHomeRamCost();
},
workForCompany : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("workForCompany", ramCost);
}
updateDynamicRam("workForCompany", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition == "" || !(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"])) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition == "" || !(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"])) {
workerScript.scriptRef.log("ERROR: workForCompany() failed because you do not have a job");
return false;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.workForCompany == null) {
workerScript.scriptRef.log(txt);
}
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.isPartTimeJob()) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startWorkPartTime();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.isPartTimeJob()) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startWorkPartTime();
} else {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startWork();
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startWork();
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.workForCompany == null) {
- workerScript.scriptRef.log("Began working at " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.positionName);
+ workerScript.scriptRef.log("Began working at " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.positionName);
}
return true;
},
applyToCompany : function(companyName, field) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("applyToCompany", ramCost);
}
updateDynamicRam("applyToCompany", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
@@ -32857,60 +32913,60 @@ function NetscriptFunctions(workerScript) {
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = companyName;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = companyName;
var res;
switch (field.toLowerCase()) {
case "software":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSoftwareJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSoftwareJob(true);
break;
case "software consultant":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSoftwareConsultantJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSoftwareConsultantJob(true);
break;
case "it":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForItJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForItJob(true);
break;
case "security engineer":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSecurityEngineerJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSecurityEngineerJob(true);
break;
case "network engineer":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForNetworkEngineerJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForNetworkEngineerJob(true);
break;
case "business":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForBusinessJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForBusinessJob(true);
break;
case "business consultant":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForBusinessConsultantJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForBusinessConsultantJob(true);
break;
case "security":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSecurityJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSecurityJob(true);
break;
case "agent":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForAgentJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForAgentJob(true);
break;
case "employee":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForEmployeeJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForEmployeeJob(true);
break;
case "part-time employee":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForPartTimeEmployeeJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForPartTimeEmployeeJob(true);
break;
case "waiter":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForWaiterJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForWaiterJob(true);
break;
case "part-time waiter":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForPartTimeWaiterJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["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(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(res)) {
+ if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(res)) {
workerScript.scriptRef.log(res);
return false;
}
if (res) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.applyToCompany == null) {
- workerScript.scriptRef.log("You were offered a new job at " + companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.positionName);
+ workerScript.scriptRef.log("You were offered a new job at " + companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.positionName);
}
} else {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.applyToCompany == null) {
@@ -32921,14 +32977,14 @@ function NetscriptFunctions(workerScript) {
},
getCompanyRep : function(companyName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 2;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCompanyRep", ramCost);
}
updateDynamicRam("getCompanyRep", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
@@ -32942,14 +32998,14 @@ function NetscriptFunctions(workerScript) {
},
getCompanyFavor : function(companyName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCompanyFavor", ramCost);
}
updateDynamicRam("getCompanyFavor", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
@@ -32963,54 +33019,54 @@ function NetscriptFunctions(workerScript) {
},
checkFactionInvitations : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("checkFactionInvitations", ramCost);
}
updateDynamicRam("checkFactionInvitations", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["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 _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.slice();
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factionInvitations.slice();
},
joinFaction : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("joinFaction", ramCost);
}
updateDynamicRam("joinFaction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist.");
return false;
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.includes(name)) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factionInvitations.includes(name)) {
workerScript.scriptRef.log("ERROR: Cannot join " + name + " Faction because you have not been invited. joinFaction() failed");
return false;
}
- var index = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.indexOf(name);
+ var index = _Player_js__WEBPACK_IMPORTED_MODULE_16__["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;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.splice(index, 1);
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name];
- Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["joinFaction"])(fac);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factionInvitations.splice(index, 1);
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][name];
+ Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["joinFaction"])(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.joinFaction == null) {
workerScript.scriptRef.log("Joined the " + name + " faction.");
}
@@ -33018,41 +33074,47 @@ function NetscriptFunctions(workerScript) {
},
workForFaction : function(name, type) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("workForFaction", ramCost);
}
updateDynamicRam("workForFaction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ // if the player is in a gang and the target faction is any of the gang faction, fail
+ if(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gang != null && _Gang_js__WEBPACK_IMPORTED_MODULE_10__["AllGangs"][name] !== undefined) {
+ workerScript.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");
+ return;
+ }
+
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.");
return;
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist.");
return false;
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factions.includes(name)) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factions.includes(name)) {
workerScript.scriptRef.log("ERROR: workForFaction() failed because you are not a member of " + name);
return false;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.workForFaction == null) {
workerScript.scriptRef.log(txt);
}
}
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name];
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["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",
@@ -33082,7 +33144,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("ERROR: Cannot carry out hacking contracts for " + fac.name + ". workForFaction() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startFactionHackWork(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startFactionHackWork(fac);
workerScript.scriptRef.log("Started carrying out hacking contracts for " + fac.name);
return true;
case "field":
@@ -33092,7 +33154,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("ERROR: Cannot carry out field missions for " + fac.name + ". workForFaction() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startFactionFieldWork(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startFactionFieldWork(fac);
workerScript.scriptRef.log("Started carrying out field missions for " + fac.name);
return true;
case "security":
@@ -33102,7 +33164,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("ERROR: Cannot serve as security detail for " + fac.name + ". workForFaction() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startFactionSecurityWork(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startFactionSecurityWork(fac);
workerScript.scriptRef.log("Started serving as security details for " + fac.name);
return true;
default:
@@ -33112,65 +33174,65 @@ function NetscriptFunctions(workerScript) {
},
getFactionRep : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getFactionRep", ramCost);
}
updateDynamicRam("getFactionRep", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return -1;
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist.");
return -1;
}
- return _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name].playerReputation;
+ return _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][name].playerReputation;
},
getFactionFavor : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getFactionFavor", ramCost);
}
updateDynamicRam("getFactionFavor", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return -1;
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist.");
return -1;
}
- return _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name].favor;
+ return _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][name].favor;
},
createProgram : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("createProgram", ramCost);
}
updateDynamicRam("createProgram", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.createProgram == null) {
workerScript.scriptRef.log(txt);
}
@@ -33178,70 +33240,70 @@ function NetscriptFunctions(workerScript) {
switch(name.toLowerCase()) {
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram.toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes, 1);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes, 1);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 50) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 50) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create BruteSSH (level 50 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes * 2, 50);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes * 2, 50);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 100) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 100) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create FTPCrack (level 100 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 100);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 250) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 250) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create relaySMTP (level 250 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 250);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 250);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 500) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 500) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create HTTPWorm (level 500 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer4Hours, 500);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer4Hours, 500);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 750) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 750) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create SQLInject (level 750 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer8Hours, 750);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer8Hours, 750);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 75) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 75) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV1 (level 75 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 75);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 75);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 400) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 400) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV2 (level 400 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 400);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 400);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].ServerProfiler.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 75) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 75) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create ServerProfiler (level 75 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].ServerProfiler, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 75);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].ServerProfiler, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 75);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].AutoLink.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 25) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 25) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create AutoLink (level 25 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].AutoLink, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 25);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].AutoLink, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 25);
break;
default:
workerScript.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: " + name);
@@ -33252,47 +33314,47 @@ function NetscriptFunctions(workerScript) {
},
commitCrime : function(crimeRoughName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("commitCrime", ramCost);
}
updateDynamicRam("commitCrime", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.commitCrime == null) {
workerScript.scriptRef.log(txt);
}
}
//Set Location to slums
- switch(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSlums;
+ switch(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Chongqing:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].ChongqingSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Chongqing:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].ChongqingSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12Slums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12Slums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].NewTokyo:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].NewTokyoSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].NewTokyo:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].NewTokyoSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Ishima:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].IshimaSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Ishima:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].IshimaSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenSlums;
break;
default:
console.log("Invalid Player.city value");
@@ -33300,7 +33362,7 @@ function NetscriptFunctions(workerScript) {
const crime = Object(_Crimes_js__WEBPACK_IMPORTED_MODULE_3__["findCrime"])(crimeRoughName.toLowerCase());
if(crime == null) { // couldn't find crime
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into commitCrime(): " + crime);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into commitCrime(): " + crime);
}
if(workerScript.disableLogs.ALL == null && workerScript.disableLogs.commitCrime == null) {
workerScript.scriptRef.log("Attempting to commit crime: "+crime.name+"...");
@@ -33309,69 +33371,69 @@ function NetscriptFunctions(workerScript) {
},
getCrimeChance : function(crimeRoughName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCrimeChance", ramCost);
}
updateDynamicRam("getCrimeChance", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return;
}
}
const crime = Object(_Crimes_js__WEBPACK_IMPORTED_MODULE_3__["findCrime"])(crimeRoughName.toLowerCase());
if(crime == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into getCrimeChance(): " + crime);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into getCrimeChance(): " + crime);
}
return crime.successRate();
},
getOwnedAugmentations : function(purchased=false) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getOwnedAugmentations", ramCost);
}
updateDynamicRam("getOwnedAugmentations", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return [];
}
}
var res = [];
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations.length; ++i) {
- res.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations[i].name);
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations.length; ++i) {
+ res.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations[i].name);
}
if (purchased) {
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations.length; ++i) {
- res.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations[i].name);
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations.length; ++i) {
+ res.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations[i].name);
}
}
return res;
},
getAugmentationsFromFaction : function(facname) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getAugmentationsFromFaction", ramCost);
}
updateDynamicRam("getAugmentationsFromFaction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return [];
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(facname)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(facname)) {
workerScript.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): " + facname);
return [];
}
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][facname];
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][facname];
var res = [];
for (var i = 0; i < fac.augmentations.length; ++i) {
res.push(fac.augmentations[i]);
@@ -33380,14 +33442,14 @@ function NetscriptFunctions(workerScript) {
},
getAugmentationCost : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getAugmentationCost", ramCost);
}
updateDynamicRam("getAugmentationCost", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
@@ -33402,20 +33464,20 @@ function NetscriptFunctions(workerScript) {
},
purchaseAugmentation : function(faction, name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("purchaseAugmentation", ramCost);
}
updateDynamicRam("purchaseAugmentation", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][faction];
- if (fac == null || !(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Faction"])) {
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][faction];
+ if (fac == null || !(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Faction"])) {
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: " + faction);
return false;
}
@@ -33437,14 +33499,14 @@ function NetscriptFunctions(workerScript) {
}
if (!isNeuroflux) {
- for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations.length; ++j) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations[j].name === aug.name) {
+ for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations.length; ++j) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations[j].name === aug.name) {
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
return false;
}
}
- for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations.length; ++j) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations[j].name === aug.name) {
+ for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations.length; ++j) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations[j].name === aug.name) {
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
return false;
}
@@ -33456,10 +33518,10 @@ function NetscriptFunctions(workerScript) {
return false;
}
- var res = Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["purchaseAugmentation"])(aug, fac, true);
+ var res = Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["purchaseAugmentation"])(aug, fac, true);
workerScript.scriptRef.log(res);
- if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(res) && res.startsWith("You purchased")) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(res) && res.startsWith("You purchased")) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
return true;
} else {
return false;
@@ -33467,23 +33529,23 @@ function NetscriptFunctions(workerScript) {
},
installAugmentations : function(cbScript) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("installAugmentations", ramCost);
}
updateDynamicRam("installAugmentations", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations.length === 0) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations.length === 0) {
workerScript.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
workerScript.scriptRef.log("Installing Augmentations. This will cause this script to be killed");
Object(_Augmentations_js__WEBPACK_IMPORTED_MODULE_1__["installAugmentations"])(cbScript);
return true;
@@ -33496,10 +33558,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isContractName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isContractName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isContractNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isContractNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isContractName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isContractName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isOperationName : function(name) {
@@ -33507,10 +33569,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isOperationName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isOperationName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isOperationNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isOperationNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isOperationName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isOperationName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isBlackOpName : function(name) {
@@ -33518,10 +33580,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isBlackOpName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isBlackOpName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isBlackOpNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isBlackOpNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isBlackOpName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isBlackOpName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isGeneralActionName : function(name) {
@@ -33529,10 +33591,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isGeneralActionName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isGeneralActionName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isGeneralActionNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isGeneralActionNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isGeneralActionName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isGeneralActionName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isSkillName : function(name) {
@@ -33540,10 +33602,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isSkillName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isSkillName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isSkillNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isSkillNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isSkillName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isSkillName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
startAction : function(type="", name="") {
@@ -33551,14 +33613,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("startAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("startAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.startActionNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.startActionNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.startAction() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.startAction() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
stopAction : function() {
@@ -33566,10 +33628,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("stopAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 2);
}
updateDynamicRam("stopAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 2);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.resetAction();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.resetAction();
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "stopAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "stopAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getActionTime : function(type="", name="") {
@@ -33577,14 +33639,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getActionTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getActionTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getActionTimeNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getActionTimeNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionTime() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionTime() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getActionEstimatedSuccessChance : function(type="", name="") {
@@ -33592,14 +33654,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getActionEstimatedSuccessChance", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getActionEstimatedSuccessChance", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionEstimatedSuccessChance() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionEstimatedSuccessChance() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getActionCountRemaining : function(type="", name="") {
@@ -33607,14 +33669,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getActionCountRemaining", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getActionCountRemaining", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionCountRemaining() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionCountRemaining() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getRank : function() {
@@ -33622,10 +33684,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getRank", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getRank", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.rank;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.rank;
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getSkillPoints : function() {
@@ -33633,10 +33695,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getSkillPoints", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getSkillPoints", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.skillPoints;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.skillPoints;
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getSkillLevel : function(skillName="") {
@@ -33644,14 +33706,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getSkillLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getSkillLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getSkillLevel() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getSkillLevel() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
upgradeSkill : function(skillName) {
@@ -33659,14 +33721,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("upgradeSkill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("upgradeSkill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.upgradeSkill() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.upgradeSkill() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getTeamSize : function(type="", name="") {
@@ -33674,14 +33736,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getTeamSize() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getTeamSize() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
setTeamSize : function(type="", name="", size) {
@@ -33689,14 +33751,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("setTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("setTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.setTeamSize() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.setTeamSize() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getCityEstimatedPopulation : function(cityName) {
@@ -33704,14 +33766,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getCityEstimatedPopulation", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getCityEstimatedPopulation", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getCityEstimatedPopulationNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getCityEstimatedPopulationNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedPopulation() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedPopulation() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getCityEstimatedCommunities : function(cityName) {
@@ -33719,14 +33781,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getCityEstimatedCommunities", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getCityEstimatedCommunities", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getCityEstimatedCommunitiesNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getCityEstimatedCommunitiesNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedCommunities() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedCommunities() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getCityChaos : function(cityName) {
@@ -33734,14 +33796,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getCityChaos", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getCityChaos", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getCityChaosNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getCityChaosNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityChaos() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityChaos() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
switchCity : function(cityName) {
@@ -33749,14 +33811,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("switchCity", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("switchCity", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.switchCityNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.switchCityNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.switchCity() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.switchCity() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getStamina : function() {
@@ -33764,10 +33826,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getStamina", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getStamina", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return [_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.stamina, _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.maxStamina];
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return [_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.stamina, _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.maxStamina];
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
joinBladeburnerFaction : function() {
@@ -33775,10 +33837,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("joinBladeburnerFaction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("joinBladeburnerFaction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
}
}
@@ -34287,7 +34349,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFconf", function() { return createFconf; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseFconfSettings", function() { return parseFconfSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadFconf", function() { return loadFconf; });
-/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn.js */ 35);
+/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn.js */ 36);
/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn_js__WEBPACK_IMPORTED_MODULE_0__);
@@ -36198,6 +36260,1495 @@ let DarkWebItems = {
/***/ }),
/* 35 */
+/*!*********************!*\
+ !*** ./src/Gang.js ***!
+ \*********************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gang", function() { return Gang; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayGangContent", function() { return displayGangContent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateGangContent", function() { return updateGangContent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadAllGangs", function() { return loadAllGangs; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AllGangs", function() { return AllGangs; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetGangs", function() { return resetGangs; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteGangDisplayContent", function() { return deleteGangDisplayContent; });
+/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants.js */ 3);
+/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine.js */ 5);
+/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Faction.js */ 11);
+/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player.js */ 0);
+/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
+/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__);
+/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
+/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
+
+
+
+
+
+
+
+
+
+
+
+/* Gang.js */
+//Switch between territory and management screen with 1 and 2
+$(document).keydown(function(event) {
+ if (_engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].Page.Gang && !_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoBoxOpen"]) {
+ if (gangMemberFilter != null && gangMemberFilter === document.activeElement) {return;}
+ if (event.keyCode === 49) {
+ if(gangTerritorySubpage.style.display === "block") {
+ managementButton.click();
+ }
+ } else if (event.keyCode === 50) {
+ if (gangManagementSubpage.style.display === "block") {
+ territoryButton.click();
+ }
+ }
+ }
+});
+
+//Delete upgrade box when clicking outside
+$(document).mousedown(function(event) {
+ var boxId = "gang-member-upgrade-popup-box";
+ var contentId = "gang-member-upgrade-popup-box-content";
+ if (gangMemberUpgradeBoxOpened) {
+ if ( $(event.target).closest("#" + contentId).get(0) == null ) {
+ //Delete the box
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBox);
+ gangMemberUpgradeBox = null;
+ gangMemberUpgradeBoxContent = null;
+ gangMemberUpgradeBoxOpened = false;
+ gangMemberUpgradeBoxElements = null;
+ }
+ }
+});
+
+let GangNames = ["Slum Snakes", "Tetrads", "The Syndicate", "The Dark Army", "Speakers for the Dead",
+ "NiteSec", "The Black Hand"];
+let AllGangs = {
+ "Slum Snakes" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Tetrads" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Syndicate" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Dark Army" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Speakers for the Dead" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "NiteSec" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Black Hand" : {
+ power: 1,
+ territory: 1/7,
+ },
+}
+
+function resetGangs() {
+ AllGangs = {
+ "Slum Snakes" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Tetrads" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Syndicate" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Dark Army" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Speakers for the Dead" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "NiteSec" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Black Hand" : {
+ power: 1,
+ territory: 1/7,
+ },
+ }
+}
+
+function loadAllGangs(saveString) {
+ AllGangs = JSON.parse(saveString, _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"]);
+}
+
+//Power is an estimate of a gang's ability to gain/defend territory
+let gangStoredPowerCycles = 0;
+function processAllGangPowerGains(numCycles=1) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ gangStoredPowerCycles += numCycles;
+ if (gangStoredPowerCycles < 150) {return;}
+ var playerGangName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName;
+ for (var name in AllGangs) {
+ if (AllGangs.hasOwnProperty(name)) {
+ if (name == playerGangName) {
+ AllGangs[name].power += _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.calculatePower();
+ } else {
+ var gain = Math.random() * 0.02; //TODO Adjust as necessary
+ AllGangs[name].power += (gain);
+ }
+ }
+ }
+
+ gangStoredPowerCycles -= 150;
+}
+
+let gangStoredTerritoryCycles = 0;
+function processAllGangTerritory(numCycles=1) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ gangStoredTerritoryCycles += numCycles;
+ if (gangStoredTerritoryCycles < _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer) {return;}
+
+ for (var i = 0; i < GangNames.length; ++i) {
+ var other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
+ while(other == i) {
+ other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
+ }
+ var thisPwr = AllGangs[GangNames[i]].power;
+ var otherPwr = AllGangs[GangNames[other]].power;
+ var thisChance = thisPwr / (thisPwr + otherPwr);
+
+ if (Math.random() < thisChance) {
+ if (AllGangs[GangNames[other]].territory <= 0) {
+ return;
+ }
+ AllGangs[GangNames[i]].territory += 0.0001;
+ AllGangs[GangNames[other]].territory -= 0.0001;
+ } else {
+ if (AllGangs[GangNames[i]].territory <= 0) {
+ return;
+ }
+ AllGangs[GangNames[i]].territory -= 0.0001;
+ AllGangs[GangNames[other]].territory += 0.0001;
+ }
+ }
+
+ gangStoredTerritoryCycles -= _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer;
+}
+
+/* faction - Name of corresponding faction
+ hacking - Boolean indicating whether its a hacking gang or not
+ */
+function Gang(facName, hacking=false) {
+ this.facName = facName;
+ this.members = []; //Array of GangMembers
+ this.wanted = 1;
+ this.respect = 1;
+ this.power = 0;
+
+ this.isHackingGang = hacking;
+
+ this.respectGainRate = 0;
+ this.wantedGainRate = 0;
+ this.moneyGainRate = 0;
+
+ //When processing gains, this stores the number of cycles until some
+ //limit is reached, and then calculates and applies the gains only at that limit
+ this.storedCycles = 0;
+}
+
+Gang.prototype.process = function(numCycles=1) {
+ this.processGains(numCycles);
+ this.processExperienceGains(numCycles);
+ processAllGangPowerGains(numCycles);
+ processAllGangTerritory(numCycles);
+}
+
+Gang.prototype.processGains = function(numCycles=1) {
+ this.storedCycles += numCycles;
+ if (isNaN(this.storedCycles)) {
+ console.log("ERROR: Gang's storedCylces is NaN");
+ this.storedCycles = 0;
+ }
+ if (this.storedCycles < 25) {return;} //Only process every 5 seconds at least
+
+ //Get gains per cycle
+ var moneyGains = 0, respectGains = 0, wantedLevelGains = 0;
+ for (var i = 0; i < this.members.length; ++i) {
+ respectGains += (this.members[i].calculateRespectGain());
+ wantedLevelGains += (this.members[i].calculateWantedLevelGain());
+ moneyGains += (this.members[i].calculateMoneyGain());
+ }
+ this.respectGainRate = respectGains;
+ this.wantedGainRate = wantedLevelGains;
+ this.moneyGainRate = moneyGains;
+
+ if (!isNaN(respectGains)) {
+ var gain = respectGains * this.storedCycles;
+ this.respect += (gain);
+ //Faction reputation gains is respect gain divided by some constant
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][this.facName];
+ if (!(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Faction"])) {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev");
+ } else {
+ var favorMult = 1 + (fac.favor / 100);
+ fac.playerReputation += ((_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].faction_rep_mult * gain * favorMult) / _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangRespectToReputationRatio);
+ }
+
+ } else {
+ console.log("ERROR: respectGains is NaN");
+ }
+ if (!isNaN(wantedLevelGains)) {
+ if (this.wanted === 1 && wantedLevelGains < 0) {
+ //Do nothing
+ } else {
+ this.wanted += (wantedLevelGains * this.storedCycles);
+ if (this.wanted < 1) {this.wanted = 1;}
+ }
+ } else {
+ console.log("ERROR: wantedLevelGains is NaN");
+ }
+ if (!isNaN(moneyGains)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gainMoney(moneyGains * this.storedCycles);
+ } else {
+ console.log("ERROR: respectGains is NaN");
+ }
+
+ this.storedCycles = 0;
+}
+
+Gang.prototype.processExperienceGains = function(numCycles=1) {
+ for (var i = 0; i < this.members.length; ++i) {
+ this.members[i].gainExperience(numCycles);
+ this.members[i].updateSkillLevels();
+ }
+}
+
+//Calculates power GAIN, which is added onto the Gang's existing power
+Gang.prototype.calculatePower = function() {
+ var memberTotal = 0;
+ for (var i = 0; i < this.members.length; ++i) {
+ if (this.members[i].task instanceof GangMemberTask &&
+ this.members[i].task.name == "Territory Warfare") {
+ memberTotal += this.members[i].calculatePower();
+ }
+ }
+ return (0.0005 * memberTotal);
+}
+
+Gang.prototype.autoAssignMemberToTask = function(taskName) {
+ for (var i = 0; i < this.members.length; ++i) {
+ if (this.members[i].task.name === taskName) {
+ this.members[i].assignToTask(taskName);
+ return true;
+ }
+ }
+ return false;
+}
+
+Gang.prototype.autoUnassignMemberFromTask = function(taskName) {
+ for (var i = 0; i < this.members.length; ++i) {
+ if (this.members[i].task.name === taskName) {
+ this.members[i].unassignFromTask();
+ return true;
+ }
+ }
+ return false;
+}
+
+Gang.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("Gang", this);
+}
+
+Gang.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(Gang, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.Gang = Gang;
+
+/*** Gang Member object ***/
+function GangMember(name) {
+ this.name = name;
+ this.task = GangMemberTasks["Unassigned"]; //GangMemberTask object
+ this.city = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].city;
+
+ this.hack = 1;
+ this.str = 1;
+ this.def = 1;
+ this.dex = 1;
+ this.agi = 1;
+ this.cha = 1;
+
+ this.hack_exp = 0;
+ this.str_exp = 0;
+ this.def_exp = 0;
+ this.dex_exp = 0;
+ this.agi_exp = 0;
+ this.cha_exp = 0;
+
+ this.hack_mult = 1;
+ this.str_mult = 1;
+ this.def_mult = 1;
+ this.dex_mult = 1;
+ this.agi_mult = 1;
+ this.cha_mult = 1;
+
+ this.upgrades = []; //Names of upgrades
+}
+
+//Same formula for Player
+GangMember.prototype.calculateSkill = function(exp) {
+ return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);
+}
+
+GangMember.prototype.updateSkillLevels = function() {
+ this.hack = Math.floor(this.calculateSkill(this.hack_exp) * this.hack_mult);
+ this.str = Math.floor(this.calculateSkill(this.str_exp) * this.str_mult);
+ this.def = Math.floor(this.calculateSkill(this.def_exp) * this.def_mult);
+ this.dex = Math.floor(this.calculateSkill(this.dex_exp) * this.dex_mult);
+ this.agi = Math.floor(this.calculateSkill(this.agi_exp) * this.agi_mult);
+ this.cha = Math.floor(this.calculateSkill(this.cha_exp) * this.cha_mult);
+}
+
+GangMember.prototype.calculatePower = function() {
+ return (this.hack + this.str + this.def +
+ this.dex + this.agi + this.cha) / 100;
+}
+
+GangMember.prototype.assignToTask = function(taskName) {
+ if (GangMemberTasks.hasOwnProperty(taskName)) {
+ this.task = GangMemberTasks[taskName];
+ } else {
+ this.task = GangMemberTasks["Unassigned"];
+ }
+}
+
+GangMember.prototype.unassignFromTask = function() {
+ if (GangMemberTasks.hasOwnProperty("Unassigned")) {
+ this.task = GangMemberTasks["Unassigned"];
+ } else {
+ console.log("ERROR: Can't find Unassigned Gang member task");
+ this.task = null;
+ }
+}
+
+//Gains are per cycle
+GangMember.prototype.calculateRespectGain = function() {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask) || task.baseRespect === 0) {return 0;}
+ var statWeight = (task.hackWeight/100) * this.hack +
+ (task.strWeight/100) * this.str +
+ (task.defWeight/100) * this.def +
+ (task.dexWeight/100) * this.dex +
+ (task.agiWeight/100) * this.agi +
+ (task.chaWeight/100) * this.cha;
+ statWeight -= (3.5 * task.difficulty);
+ if (statWeight <= 0) {return 0;}
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
+ if (territoryMult <= 0) {return 0;}
+ var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
+ return 12 * task.baseRespect * statWeight * territoryMult * respectMult;
+}
+
+GangMember.prototype.calculateWantedLevelGain = function() {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask) || task.baseWanted === 0) {return 0;}
+ var statWeight = (task.hackWeight/100) * this.hack +
+ (task.strWeight/100) * this.str +
+ (task.defWeight/100) * this.def +
+ (task.dexWeight/100) * this.dex +
+ (task.agiWeight/100) * this.agi +
+ (task.chaWeight/100) * this.cha;
+ statWeight -= (3.5 * task.difficulty);
+ if (statWeight <= 0) {return 0;}
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
+ if (territoryMult <= 0) {return 0;}
+ if (task.baseWanted < 0) {
+ return task.baseWanted * statWeight * territoryMult;
+ } else {
+ return 6 * task.baseWanted / (3 * statWeight * territoryMult);
+ }
+}
+
+GangMember.prototype.calculateMoneyGain = function() {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask) || task.baseMoney === 0) {return 0;}
+ var statWeight = (task.hackWeight/100) * this.hack +
+ (task.strWeight/100) * this.str +
+ (task.defWeight/100) * this.def +
+ (task.dexWeight/100) * this.dex +
+ (task.agiWeight/100) * this.agi +
+ (task.chaWeight/100) * this.cha;
+ statWeight -= (3.5 * task.difficulty);
+ if (statWeight <= 0) {return 0;}
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
+ if (territoryMult <= 0) {return 0;}
+ var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
+ return 5 * task.baseMoney * statWeight * territoryMult * respectMult;
+}
+
+GangMember.prototype.gainExperience = function(numCycles=1) {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask)) {return;}
+ this.hack_exp += (task.hackWeight / 1500) * task.difficulty * numCycles;
+ this.str_exp += (task.strWeight / 1500) * task.difficulty * numCycles;
+ this.def_exp += (task.defWeight / 1500) * task.difficulty * numCycles;
+ this.dex_exp += (task.dexWeight / 1500) * task.difficulty * numCycles;
+ this.agi_exp += (task.agiWeight / 1500) * task.difficulty * numCycles;
+ this.cha_exp += (task.chaWeight / 1500) * task.difficulty * numCycles;
+}
+
+GangMember.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMember", this);
+}
+
+GangMember.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMember, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMember = GangMember;
+
+//Defines tasks that Gang Members can work on
+function GangMemberTask(name="", desc="",
+ params={baseRespect: 0, baseWanted: 0, baseMoney: 0,
+ hackWeight: 0, strWeight: 0, defWeight: 0,
+ dexWeight: 0, agiWeight: 0, chaWeight: 0,
+ difficulty: 0}) {
+ this.name = name;
+ this.desc = desc;
+
+ this.baseRespect = params.baseRespect ? params.baseRespect : 0;
+ this.baseWanted = params.baseWanted ? params.baseWanted : 0;
+ this.baseMoney = params.baseMoney ? params.baseMoney : 0;
+
+ //Weights must add up to 100
+ this.hackWeight = params.hackWeight ? params.hackWeight : 0;
+ this.strWeight = params.strWeight ? params.strWeight : 0;
+ this.defWeight = params.defWeight ? params.defWeight : 0;
+ this.dexWeight = params.dexWeight ? params.dexWeight : 0;
+ this.agiWeight = params.agiWeight ? params.agiWeight : 0;
+ this.chaWeight = params.chaWeight ? params.chaWeight : 0;
+
+ //1 - 100
+ this.difficulty = params.difficulty ? params.difficulty : 1;
+}
+
+GangMemberTask.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberTask", this);
+}
+
+GangMemberTask.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberTask, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberTask = GangMemberTask;
+
+//TODO Human trafficking and an equivalent hacking crime
+let GangMemberTasks = {
+ "Unassigned" : new GangMemberTask(
+ "Unassigned",
+ "This gang member is currently idle"),
+ "Ransomware" : new GangMemberTask(
+ "Ransomware",
+ "Assign this gang member to create and distribute ransomware
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
+ hackWeight: 100, difficulty: 1}),
+ "Phishing" : new GangMemberTask(
+ "Phishing",
+ "Assign this gang member to attempt phishing scams and attacks
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 2.5,
+ hackWeight: 85, chaWeight: 15, difficulty: 3}),
+ "Identity Theft" : new GangMemberTask(
+ "Identity Theft",
+ "Assign this gang member to attempt identity theft
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.0001, baseWanted: 0.01, baseMoney: 6,
+ hackWeight: 80, chaWeight: 20, difficulty: 4}),
+ "DDoS Attacks" : new GangMemberTask(
+ "DDoS Attacks",
+ "Assign this gang member to carry out DDoS attacks
" +
+ "Increases respect - Increases wanted level",
+ {baseRespect: 0.0004, baseWanted: 0.05,
+ hackWeight: 100, difficulty: 7}),
+ "Plant Virus" : new GangMemberTask(
+ "Plant Virus",
+ "Assign this gang member to create and distribute malicious viruses
" +
+ "Increases respect - Increases wanted level",
+ {baseRespect: 0.0006, baseWanted: 0.05,
+ hackWeight: 100, difficulty: 10}),
+ "Fraud & Counterfeiting" : new GangMemberTask(
+ "Fraud & Counterfeiting",
+ "Assign this gang member to commit financial fraud and digital counterfeiting
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.0005, baseWanted: 0.1, baseMoney: 15,
+ hackWeight: 80, chaWeight: 20, difficulty: 17}),
+ "Money Laundering" : new GangMemberTask(
+ "Money Laundering",
+ "Assign this gang member to launder money
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.0006, baseWanted:0.2, baseMoney: 40,
+ hackWeight: 75, chaWeight: 25, difficulty: 20}),
+ "Cyberterrorism" : new GangMemberTask(
+ "Cyberterrorism",
+ "Assign this gang member to commit acts of cyberterrorism
" +
+ "Greatly increases respect - Greatly increases wanted level",
+ {baseRespect: 0.001, baseWanted: 0.5,
+ hackWeight: 80, chaWeight: 20, difficulty: 33}),
+ "Ethical Hacking" : new GangMemberTask(
+ "Ethical Hacking",
+ "Assign this gang member to be an ethical hacker for corporations
" +
+ "Earns money - Lowers wanted level",
+ {baseWanted: -0.001, baseMoney: 1,
+ hackWeight: 90, chaWeight: 10, difficulty: 1}),
+ "Mug People" : new GangMemberTask(
+ "Mug People",
+ "Assign this gang member to mug random people on the streets
" +
+ "Earns money - Slightly increases respect - Very slightly increases wanted level",
+ {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
+ strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 10, chaWeight: 15, difficulty: 1}),
+ "Deal Drugs" : new GangMemberTask(
+ "Deal Drugs",
+ "Assign this gang member to sell drugs.
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 4,
+ agiWeight: 20, dexWeight: 20, chaWeight: 60, difficulty: 3}),
+ "Run a Con" : new GangMemberTask(
+ "Run a Con",
+ "Assign this gang member to run cons
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.00015, baseWanted: 0.01, baseMoney: 10,
+ strWeight: 5, defWeight: 5, agiWeight: 25, dexWeight: 25, chaWeight: 40, difficulty: 10}),
+ "Armed Robbery" : new GangMemberTask(
+ "Armed Robbery",
+ "Assign this gang member to commit armed robbery on stores, banks and armored cars
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.0003, baseWanted: 0.1, baseMoney: 40,
+ hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, chaWeight: 75,
+ difficulty: 25}),
+ "Threaten & Blackmail" : new GangMemberTask(
+ "Threaten & Blackmail",
+ "Assign this gang member to threaten and black mail high-profile targets
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.0002, baseWanted: 0.05, baseMoney: 15,
+ hackWeight: 25, strWeight: 25, dexWeight: 25, chaWeight: 25, difficulty: 28}),
+ "Terrorism" : new GangMemberTask(
+ "Terrorism",
+ "Assign this gang member to commit acts of terrorism
" +
+ "Greatly increases respect - Greatly increases wanted level",
+ {baseRespect: 0.001, baseWanted: 1,
+ hackWeight: 20, strWeight: 20, defWeight: 20,dexWeight: 20, chaWeight: 20,
+ difficulty: 33}),
+ "Vigilante Justice" : new GangMemberTask(
+ "Vigilante Justice",
+ "Assign this gang member to be a vigilante and protect the city from criminals
" +
+ "Decreases wanted level",
+ {baseWanted: -0.001,
+ hackWeight: 20, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight:20,
+ difficulty: 1}),
+ "Train Combat" : new GangMemberTask(
+ "Train Combat",
+ "Assign this gang member to increase their combat stats (str, def, dex, agi)",
+ {strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 25, difficulty: 5}),
+ "Train Hacking" : new GangMemberTask(
+ "Train Hacking",
+ "Assign this gang member to train their hacking skills",
+ {hackWeight: 100, difficulty: 8}),
+ "Territory Warfare" : new GangMemberTask(
+ "Territory Warfare",
+ "Assign this gang member to engage in territorial warfare with other gangs. " +
+ "Members assigned to this task will help increase your gang's territory " +
+ "and will defend your territory from being taken.",
+ {hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight: 20,
+ chaWeight: 5, difficulty: 3}),
+}
+
+
+function GangMemberUpgrade(name="", desc="", cost=0, type="w") {
+ this.name = name;
+ this.desc = desc;
+ this.cost = cost;
+ this.type = type; //w, a, v, r
+}
+
+//Passes in a GangMember object
+GangMemberUpgrade.prototype.apply = function(member) {
+ switch(this.name) {
+ case "Baseball Bat":
+ member.str_mult *= 1.05;
+ member.def_mult *= 1.05;
+ break;
+ case "Katana":
+ member.str_mult *= 1.1;
+ member.def_mult *= 1.1;
+ member.dex_mult *= 1.1;
+ break;
+ case "Glock 18C":
+ member.str_mult *= 1.15;
+ member.def_mult *= 1.15;
+ member.dex_mult *= 1.15;
+ member.agi_mult *= 1.15;
+ break;
+ case "P90C":
+ member.str_mult *= 1.2;
+ member.def_mult *= 1.2;
+ member.agi_mult *= 1.1;
+ break;
+ case "Steyr AUG":
+ member.str_mult *= 1.25;
+ member.def_mult *= 1.25;
+ break;
+ case "AK-47":
+ member.str_mult *= 1.5;
+ member.def_mult *= 1.5;
+ break;
+ case "M15A10 Assault Rifle":
+ member.str_mult *= 1.6;
+ member.def_mult *= 1.6;
+ break;
+ case "AWM Sniper Rifle":
+ member.str_mult *= 1.5;
+ member.dex_mult *= 1.5;
+ member.agi_mult *= 1.5;
+ break;
+ case "Bulletproof Vest":
+ member.def_mult *= 1.05;
+ break;
+ case "Full Body Armor":
+ member.def_mult *= 1.1;
+ break;
+ case "Liquid Body Armor":
+ member.def_mult *= 1.25;
+ member.agi_mult *= 1.25;
+ break;
+ case "Graphene Plating Armor":
+ member.def_mult *= 1.5;
+ break;
+ case "Ford Flex V20":
+ member.agi_mult *= 1.1;
+ member.cha_mult *= 1.1;
+ break;
+ case "ATX1070 Superbike":
+ member.agi_mult *= 1.15;
+ member.cha_mult *= 1.15;
+ break;
+ case "Mercedes-Benz S9001":
+ member.agi_mult *= 1.2;
+ member.cha_mult *= 1.2;
+ break;
+ case "White Ferrari":
+ member.agi_mult *= 1.25;
+ member.cha_mult *= 1.25;
+ break;
+ case "NUKE Rootkit":
+ member.hack_mult *= 1.1;
+ break;
+ case "Soulstealer Rootkit":
+ member.hack_mult *= 1.2;
+ break;
+ case "Demon Rootkit":
+ member.hack_mult *= 1.3;
+ break;
+ default:
+ console.log("ERROR: Could not find this upgrade: " + this.name);
+ break;
+ }
+}
+
+GangMemberUpgrade.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberUpgrade", this);
+}
+
+GangMemberUpgrade.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberUpgrade, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberUpgrade = GangMemberUpgrade;
+
+let GangMemberUpgrades = {
+ "Baseball Bat" : new GangMemberUpgrade("Baseball Bat",
+ "Increases strength and defense by 5%", 1e6, "w"),
+ "Katana" : new GangMemberUpgrade("Katana",
+ "Increases strength, defense, and dexterity by 10%", 12e6, "w"),
+ "Glock 18C" : new GangMemberUpgrade("Glock 18C",
+ "Increases strength, defense, dexterity, and agility by 15%", 25e6, "w"),
+ "P90C" : new GangMemberUpgrade("P90C",
+ "Increases strength and defense by 20%. Increases agility by 10%", 50e6, "w"),
+ "Steyr AUG" : new GangMemberUpgrade("Steyr AUG",
+ "Increases strength and defense by 25%", 60e6, "w"),
+ "AK-47" : new GangMemberUpgrade("AK-47",
+ "Increases strength and defense by 50%", 100e6, "w"),
+ "M15A10 Assault Rifle" : new GangMemberUpgrade("M15A10 Assault Rifle",
+ "Increases strength and defense by 60%", 150e6, "w"),
+ "AWM Sniper Rifle" : new GangMemberUpgrade("AWM Sniper Rifle",
+ "Increases strength, dexterity, and agility by 50%", 225e6, "w"),
+ "Bulletproof Vest" : new GangMemberUpgrade("Bulletproof Vest",
+ "Increases defense by 5%", 2e6, "a"),
+ "Full Body Armor" : new GangMemberUpgrade("Full Body Armor",
+ "Increases defense by 10%", 5e6, "a"),
+ "Liquid Body Armor" : new GangMemberUpgrade("Liquid Body Armor",
+ "Increases defense and agility by 25%", 25e6, "a"),
+ "Graphene Plating Armor" : new GangMemberUpgrade("Graphene Plating Armor",
+ "Increases defense by 50%", 40e6, "a"),
+ "Ford Flex V20" : new GangMemberUpgrade("Ford Flex V20",
+ "Increases agility and charisma by 10%", 3e6, "v"),
+ "ATX1070 Superbike" : new GangMemberUpgrade("ATX1070 Superbike",
+ "Increases agility and charisma by 15%", 9e6, "v"),
+ "Mercedes-Benz S9001" : new GangMemberUpgrade("Mercedes-Benz S9001",
+ "Increases agility and charisma by 20%", 18e6, "v"),
+ "White Ferrari" : new GangMemberUpgrade("White Ferrari",
+ "Increases agility and charisma by 25%", 30e6, "v"),
+ "NUKE Rootkit" : new GangMemberUpgrade("NUKE Rootkit",
+ "Increases hacking by 10%", 5e6, "r"),
+ "Soulstealer Rootkit" : new GangMemberUpgrade("Soulstealer Rootkit",
+ "Increases hacking by 20%", 15e6, "r"),
+ "Demon Rootkit" : new GangMemberUpgrade("Demon Rootkit",
+ "Increases hacking by 30%", 50e6, "r"),
+}
+
+//Create a pop-up box that lets player purchase upgrades
+let gangMemberUpgradeBoxOpened = false;
+function createGangMemberUpgradeBox(initialFilter="") {
+ var boxId = "gang-member-upgrade-popup-box";
+ if (gangMemberUpgradeBoxOpened) {
+ //Already opened, refreshing
+ if (gangMemberUpgradeBoxElements == null || gangMemberUpgradeBox == null || gangMemberUpgradeBoxContent == null) {
+ console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null");
+ return;
+ }
+
+ for (var i = 1; i < gangMemberUpgradeBoxElements.length; ++i) {
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBoxElements[i]);
+ }
+ gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
+
+ var filter = gangMemberUpgradeBoxFilter.value.toString();
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
+ var newPanel = createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]);
+ gangMemberUpgradeBoxContent.appendChild(newPanel);
+ gangMemberUpgradeBoxElements.push(newPanel);
+ }
+ }
+ } else {
+ //New popup
+ gangMemberUpgradeBoxFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
+ type:"text", placeholder:"Filter gang members",
+ value:initialFilter,
+ onkeyup:()=>{
+ var filterValue = gangMemberUpgradeBoxFilter.value.toString();
+ createGangMemberUpgradeBox(filterValue);
+ }
+ });
+
+ gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
+
+ var filter = gangMemberUpgradeBoxFilter.value.toString();
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
+ gangMemberUpgradeBoxElements.push(createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]));
+ }
+ }
+
+ gangMemberUpgradeBox = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createPopup"])(boxId, gangMemberUpgradeBoxElements);
+ gangMemberUpgradeBoxContent = document.getElementById(boxId + "-content");
+ gangMemberUpgradeBoxOpened = true;
+ }
+}
+
+//Create upgrade panels for each individual Gang Member
+function createGangMemberUpgradePanel(memberObj) {
+ var container = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ border:"1px solid white",
+ });
+
+ var header = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("h1", {
+ innerText:memberObj.name + " (" + memberObj.task.name + ")"
+ });
+ container.appendChild(header);
+
+ var text = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("pre", {
+ fontSize:"14px", display: "inline-block", width:"20%",
+ innerText:
+ "Hack: " + memberObj.hack + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack_mult, 2) + ")\n" +
+ "Str: " + memberObj.str + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str_mult, 2) + ")\n" +
+ "Def: " + memberObj.def + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def_mult, 2) + ")\n" +
+ "Dex: " + memberObj.dex + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex_mult, 2) + ")\n" +
+ "Agi: " + memberObj.agi + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi_mult, 2) + ")\n" +
+ "Cha: " + memberObj.cha + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha_mult, 2) + ")\n",
+ });
+
+ //Already purchased upgrades
+ var ownedUpgradesElements = [];
+ for (var i = 0; i < memberObj.upgrades.length; ++i) {
+ var upg = GangMemberUpgrades[memberObj.upgrades[i]];
+ if (upg == null) {
+ console.log("ERR: Could not find this upgrade: " + memberObj.upgrades[i]);
+ continue;
+ }
+ var e = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ border:"1px solid white", innerText:memberObj.upgrades[i],
+ margin:"1px", padding:"1px", tooltip:upg.desc, fontSize:"12px",
+ });
+ ownedUpgradesElements.push(e);
+ }
+ var ownedUpgrades = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ display:"inline-block", marginLeft:"6px", width:"75%", innerText:"Purchased Upgrades:",
+ });
+ for (var i = 0; i < ownedUpgradesElements.length; ++i) {
+ ownedUpgrades.appendChild(ownedUpgradesElements[i]);
+ }
+ container.appendChild(text);
+ container.appendChild(ownedUpgrades);
+ container.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ //Upgrade buttons. Only show upgrades that can be afforded
+ var weaponUpgrades = [], armorUpgrades = [], vehicleUpgrades = [], rootkitUpgrades = [];
+ for (var upgName in GangMemberUpgrades) {
+ if (GangMemberUpgrades.hasOwnProperty(upgName)) {
+ var upg = GangMemberUpgrades[upgName];
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost) || memberObj.upgrades.includes(upgName)) {continue;}
+ switch (upg.type) {
+ case "w":
+ weaponUpgrades.push(upg);
+ break;
+ case "a":
+ armorUpgrades.push(upg);
+ break;
+ case "v":
+ vehicleUpgrades.push(upg);
+ break;
+ case "r":
+ rootkitUpgrades.push(upg);
+ break;
+ default:
+ console.log("ERROR: Invalid Gang Member Upgrade Type: " + upg.type);
+ }
+ }
+ }
+
+ var weaponDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var armorDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var vehicleDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var rootkitDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var upgrades = [weaponUpgrades, armorUpgrades, vehicleUpgrades, rootkitUpgrades];
+ var divs = [weaponDiv, armorDiv, vehicleDiv, rootkitDiv];
+
+ for (var i = 0; i < upgrades.length; ++i) {
+ var upgradeArray = upgrades[i];
+ var div = divs[i];
+ for (var j = 0; j < upgradeArray.length; ++j) {
+ var upg = upgradeArray[j];
+ (function (upg, div, memberObj) {
+ div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ innerText:upg.name + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"),
+ class:"a-link-button", margin:"2px", padding:"2px", display:"block",
+ fontSize:"12px",
+ tooltip:upg.desc,
+ clickListener:()=>{
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost)) {return false;}
+ _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].loseMoney(upg.cost);
+ memberObj.upgrades.push(upg.name);
+ upg.apply(memberObj);
+ var initFilterValue = gangMemberUpgradeBoxFilter.value.toString();
+ createGangMemberUpgradeBox(initFilterValue);
+ return false;
+ }
+ }));
+ })(upg, div, memberObj);
+ }
+ }
+
+ container.appendChild(weaponDiv);
+ container.appendChild(armorDiv);
+ container.appendChild(vehicleDiv);
+ container.appendChild(rootkitDiv);
+ return container;
+}
+
+//Gang DOM elements
+let gangContentCreated = false,
+ gangContainer = null, managementButton = null, territoryButton = null;
+
+//Subpages
+let gangManagementSubpage = null, gangTerritorySubpage = null;
+
+//Gang Management Elements
+let gangDesc = null, gangInfo = null,
+ gangRecruitMemberButton = null, gangRecruitRequirementText = null,
+ gangExpandAllButton = null, gangCollapseAllButton, gangMemberFilter = null,
+ gangManageEquipmentButton = null,
+ gangMemberList = null;
+
+//Gang Equipment Upgrade Elements
+let gangMemberUpgradeBox = null, gangMemberUpgradeBoxContent = null,
+ gangMemberUpgradeBoxFilter = null, gangMemberUpgradeBoxElements = null;
+
+
+//Gang Territory Elements
+let gangTerritoryDescText = null, gangTerritoryInfoText = null;
+
+function displayGangContent() {
+ if (!gangContentCreated || gangContainer == null) {
+ gangContentCreated = true;
+
+ //Create gang container
+ gangContainer = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id:"gang-container", class:"generic-menupage-container",
+ });
+
+ //Get variables
+ var facName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName,
+ members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members,
+ wanted = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted,
+ respect = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect;
+
+ //Back button
+ gangContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block", innerText:"Back",
+ clickListener:()=>{
+ _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadFactionContent();
+ Object(_Faction_js__WEBPACK_IMPORTED_MODULE_2__["displayFactionContent"])(facName);
+ return false;
+ }
+ }));
+
+ //Buttons to switch between panels
+ managementButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ id:"gang-management-subpage-button", class:"a-link-button-inactive",
+ display:"inline-block", innerHTML: "Gang Management (1)",
+ clickListener:()=>{
+ gangManagementSubpage.style.display = "block";
+ gangTerritorySubpage.style.display = "none";
+ managementButton.classList.toggle("a-link-button-inactive");
+ managementButton.classList.toggle("a-link-button");
+ territoryButton.classList.toggle("a-link-button-inactive");
+ territoryButton.classList.toggle("a-link-button");
+ updateGangContent();
+ return false;
+ }
+ })
+ territoryButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ id:"gang-territory-subpage-button", class:"a-link-button",
+ display:"inline-block", innerHTML:"Gang Territory (2)",
+ clickListener:()=>{
+ gangManagementSubpage.style.display = "none";
+ gangTerritorySubpage.style.display = "block";
+ managementButton.classList.toggle("a-link-button-inactive");
+ managementButton.classList.toggle("a-link-button");
+ territoryButton.classList.toggle("a-link-button-inactive");
+ territoryButton.classList.toggle("a-link-button");
+ updateGangContent();
+ return false;
+ }
+ });
+ gangContainer.appendChild(managementButton);
+ gangContainer.appendChild(territoryButton);
+
+ //Subpage for managing gang members
+ gangManagementSubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ display:"block", id:"gang-management-subpage",
+ });
+
+ var lowerWantedTask = "";
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.isHackingGang) {
+ lowerWantedTask = "Ethical Hacking";
+ } else {
+ lowerWantedTask = "Vigilante Justice";
+ }
+ gangDesc = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {width:"70%",
+ innerHTML:
+ "This page is used to manage your gang members and get an overview of your " +
+ "gang's stats.
" +
+ "If a gang member is not earning much money or respect, the task that you " +
+ "have assigned to that member might be too difficult. Consider training that " +
+ "member's stats or choosing an easier task. The tasks closer to the " +
+ "top of the dropdown list are generally easier. Alternatively, the gang member's " +
+ "low production might be due to the fact that your wanted level is too high. " +
+ "Consider assigning a few members to the '" + lowerWantedTask + "' " +
+ "task to lower your wanted level.
" +
+ "Installing Augmentations does NOT reset your progress with your Gang. " +
+ "Furthermore, after installing Augmentations, you will " +
+ "automatically be a member of whatever Faction you created your gang with.
"
+ });
+ gangManagementSubpage.appendChild(gangDesc);
+
+ gangInfo = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-info", width:"70%"});
+ gangManagementSubpage.appendChild(gangInfo);
+
+ gangRecruitMemberButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ id:"gang-management-recruit-member-btn", class:"a-link-button-inactive",
+ innerHTML:"Recruit Gang Member", display:"inline-block", margin:"10px",
+ clickListener:()=>{
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetNoButton"])();
+ yesBtn.innerHTML = "Recruit Gang Member";
+ noBtn.innerHTML = "Cancel";
+ yesBtn.addEventListener("click", ()=>{
+ var name = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetInput"])();
+ if (name === "") {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You must enter a name for your Gang member!");
+ } else {
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ if (name == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name) {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You already have a gang member with this name!");
+ return false;
+ }
+ }
+ var member = new GangMember(name);
+ _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.push(member);
+ createGangMemberDisplayElement(member);
+ updateGangContent();
+ }
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
+ });
+ noBtn.addEventListener("click", ()=>{
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
+ });
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxCreate"])("Please enter a name for your new Gang member:");
+ return false;
+ }
+ });
+ gangManagementSubpage.appendChild(gangRecruitMemberButton);
+
+ //Text for how much reputation is required for recruiting next memberList
+ gangRecruitRequirementText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {color:"red", id:"gang-recruit-requirement-text"});
+ gangManagementSubpage.appendChild(gangRecruitRequirementText);
+
+ //Gang Member List management buttons (Expand/Collapse All, select a single member)
+ gangManagementSubpage.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+ gangExpandAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block",
+ innerHTML:"Expand All",
+ clickListener:()=>{
+ var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
+ for (var i = 0; i < allHeaders.length; ++i) {
+ var hdr = allHeaders[i];
+ if (!hdr.classList.contains("active")) {
+ hdr.click();
+ }
+ }
+ return false;
+ }
+ });
+ gangCollapseAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block",
+ innerHTML:"Collapse All",
+ clickListener:()=>{
+ var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
+ for (var i = 0; i < allHeaders.length; ++i) {
+ var hdr = allHeaders[i];
+ if (hdr.classList.contains("active")) {
+ hdr.click();
+ }
+ }
+ return false;
+ }
+ });
+ gangMemberFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
+ type:"text", placeholder:"Filter gang members", margin:"5px", padding:"5px",
+ onkeyup:()=>{
+ displayGangMemberList();
+ }
+ });
+ gangManageEquipmentButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block",
+ innerHTML:"Manage Equipment",
+ clickListener:()=>{
+ createGangMemberUpgradeBox();
+ }
+ });
+ gangManagementSubpage.appendChild(gangExpandAllButton);
+ gangManagementSubpage.appendChild(gangCollapseAllButton);
+ gangManagementSubpage.appendChild(gangMemberFilter);
+ gangManagementSubpage.appendChild(gangManageEquipmentButton);
+
+ //Gang Member list
+ gangMemberList = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("ul", {id:"gang-member-list"});
+ displayGangMemberList();
+ gangManagementSubpage.appendChild(gangMemberList);
+
+ //Subpage for seeing gang territory information
+ gangTerritorySubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id:"gang-territory-subpage", display:"none"
+ });
+
+ //Info text for territory page
+ gangTerritoryDescText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {
+ width:"70%",
+ innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, " +
+ "which represents how much of the total territory you control.
" +
+ "Territory gain and loss is processed automatically and is updated every ~30 seconds. Your chances " +
+ "to gain and lose territory depend on your Gang's power, which is listed in the display below. " +
+ "Your gang's power is determined by the stats of all Gang members you have assigned to the " +
+ "'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to " +
+ "your Gang's power.
" +
+ "The amount of territory you have affects all aspects of your Gang members' production, including " +
+ "money, respect, and wanted level. It is very beneficial to have high territory control.
"
+ });
+ gangTerritorySubpage.appendChild(gangTerritoryDescText);
+
+ var territoryBorder = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("fieldset", {width:"50%", display:"inline-block"});
+
+ gangTerritoryInfoText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-territory-info"});
+
+ territoryBorder.appendChild(gangTerritoryInfoText);
+ gangTerritorySubpage.appendChild(territoryBorder);
+
+ gangContainer.appendChild(gangTerritorySubpage);
+ gangContainer.appendChild(gangManagementSubpage);
+ document.getElementById("entire-game-container").appendChild(gangContainer);
+ }
+ gangContainer.style.display = "block";
+ updateGangContent();
+}
+
+function displayGangMemberList() {
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeChildrenFromElement"])(gangMemberList);
+ var members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members;
+ var filter = gangMemberFilter.value.toString();
+ for (var i = 0; i < members.length; ++i) {
+ if (members[i].name.indexOf(filter) > -1 || members[i].task.name.indexOf(filter) > -1) {
+ createGangMemberDisplayElement(members[i]);
+ }
+ }
+ //setGangMemberClickHandlers(); //Set buttons to toggle the gang member info panels
+}
+
+function updateGangContent() {
+ if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+
+ if(gangTerritorySubpage.style.display === "block") {
+ //Update territory information
+ gangTerritoryInfoText.innerHTML = "";
+ for (var gangname in AllGangs) {
+ if (AllGangs.hasOwnProperty(gangname)) {
+ var gangTerritoryInfo = AllGangs[gangname];
+ let territory = gangTerritoryInfo.territory*100;
+
+ //Fix some rounding issues graphically
+ let displayNumber;
+ if (territory <= 0) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(0, 2);
+ } else if (territory >= 100) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(100, 2);
+ } else {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(territory, 2);
+ }
+
+ if (gangname == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName) {
+ gangTerritoryInfoText.innerHTML += ("" + gangname + " (Power: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " +
+ displayNumber + "%
");
+ }
+ }
+ }
+ } else {
+ //Update information for overall gang
+ if (gangInfo instanceof Element) {
+ var faction = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName];
+ var rep;
+ if (!(faction instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Faction"])) {
+ rep = "ERROR";
+ } else {
+ rep = faction.playerReputation;
+ }
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeChildrenFromElement"])(gangInfo);
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Respect
+ display:"inline-block",
+ innerText:"Respect: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect, 6) +
+ " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respectGainRate, 6) + " / sec)",
+ tooltip:"Represents the amount of respect your gang has from other gangs and criminal " +
+ "organizations. Your respect affects the amount of money " +
+ "your gang members will earn, and also determines how much " +
+ "reputation you are earning with your gang's corresponding Faction."
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Wanted level
+ display:"inline-block",
+ innerText:"Wanted Level: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted, 6) +
+ " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wantedGainRate, 6) + " / sec)",
+ tooltip:"Represents how much the gang is wanted by law enforcement. The higher " +
+ "your gang's wanted level, the harder it will be for your gang members " +
+ "to make money and earn respect. Note that the minimum wanted level is 1."
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ var wantedPenalty = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
+ wantedPenalty = (1 - wantedPenalty) * 100;
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Wanted Level multiplier
+ display:"inline-block",
+ innerText:"Wanted Level Penalty: -" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(wantedPenalty, 2) + "%",
+ tooltip:"Penalty for respect and money gain rates due to Wanted Level"
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Money gain rate
+ display:"inline-block",
+ innerText:"Money gain rate: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.moneyGainRate, 2) +
+ " / sec",
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ //Fix some rounding issues graphically
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory * 100;
+ let displayNumber;
+ if (territoryMult <= 0) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(0, 2);
+ } else if (territoryMult >= 100) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(100, 2);
+ } else {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(territoryMult, 2);
+ }
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Territory multiplier
+ display:"inline-block",
+ innerText:"Territory: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(displayNumber, 3) + "%",
+ tooltip:"The percentage of total territory your Gang controls"
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Faction reputation
+ display:"inline-block",
+ innerText:"Faction reputation: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(rep, 3)
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+ } else {
+ console.log("ERROR: gang-info DOM element DNE");
+ }
+
+ //Toggle the 'Recruit member button' if valid
+ var numMembers = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length;
+ var repCost = 0;
+ if (numMembers > 0) {
+ var repCost = Math.pow(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangRecruitCostMultiplier, numMembers);
+ }
+ var faction = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName];
+ if (faction == null) {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("Could not find your gang's faction. This is probably a bug please report to dev");
+ return;
+ }
+ var btn = gangRecruitMemberButton;
+ if (numMembers >= _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].MaximumGangMembers) {
+ btn.className = "a-link-button-inactive";
+ gangRecruitRequirementText.style.display = "block";
+ gangRecruitRequirementText.innerHTML =
+ "You have reached the maximum amount of gang members";
+ } else if (faction.playerReputation >= repCost) {
+ btn.className = "a-link-button";
+ gangRecruitRequirementText.style.display = "none";
+ } else {
+ btn.className = "a-link-button-inactive";
+ gangRecruitRequirementText.style.display = "block";
+ gangRecruitRequirementText.innerHTML =
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(repCost, 2) + " Faction reputation needed to recruit next member";
+ }
+
+ //Update information for each gang member
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ updateGangMemberDisplayElement(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]);
+ }
+ }
+}
+
+//Takes in a GangMember object
+function createGangMemberDisplayElement(memberObj) {
+ if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ var name = memberObj.name;
+
+ var accordion = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createAccordionElement"])({
+ id:name + "gang-member",
+ hdrText:name,
+ });
+ var li = accordion[0];
+ var hdr = accordion[1];
+ var gangMemberDiv = accordion[2];
+
+ //Gang member content divided into 3 panels:
+ //Stats Panel
+ var statsDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id: name + "gang-member-stats", class: "gang-member-info-div",
+ width:"30%", display:"inline"
+ });
+ var statsP = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {
+ id:name + "gang-member-stats-text", display:"inline"
+ });
+
+ statsDiv.appendChild(statsP);
+ //statsDiv.appendChild(upgradeButton);
+
+ //Panel for Selecting task and show respect/wanted gain
+ var taskDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id: name + "gang-member-task", class:"gang-member-info-div",
+ width:"30%", display:"inline"
+ });
+ var taskSelector = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("select", {
+ color:"white", backgroundColor:"black",
+ id:name + "gang-member-task-selector"
+ });
+
+ var tasks = null;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.isHackingGang) {
+ tasks = ["---", "Ransomware", "Phishing", "Identity Theft", "DDoS Attacks",
+ "Plant Virus", "Fraud & Counterfeiting","Money Laundering",
+ "Cyberterrorism", "Ethical Hacking", "Train Combat",
+ "Train Hacking", "Territory Warfare"];
+ } else {
+ tasks = ["---", "Mug People", "Deal Drugs", "Run a Con", "Armed Robbery",
+ "Traffick Illegal Arms", "Threaten & Blackmail",
+ "Terrorism", "Vigilante Justice", "Train Combat",
+ "Train Hacking", "Territory Warfare"];
+ }
+ for (var i = 0; i < tasks.length; ++i) {
+ var option = document.createElement("option");
+ option.text = tasks[i];
+ taskSelector.add(option);
+ }
+ taskSelector.addEventListener("change", function() {
+ var task = taskSelector.options[taskSelector.selectedIndex].text;
+ memberObj.assignToTask(task);
+ setGangMemberTaskDescription(memberObj, task);
+ updateGangContent();
+ });
+ //Set initial task in selector element
+ if (memberObj.task instanceof GangMemberTask) {
+ var taskName = memberObj.task.name;
+ var taskIndex = 0;
+ for (let i = 0; i < tasks.length; ++i) {
+ if (taskName == tasks[i]) {
+ taskIndex = i;
+ break;
+ }
+ }
+ taskSelector.selectedIndex = taskIndex;
+ }
+
+ var gainInfo = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:name + "gang-member-gain-info"});
+ taskDiv.appendChild(taskSelector);
+ taskDiv.appendChild(gainInfo);
+
+ //Panel for Description of task
+ var taskDescDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id:name + "gang-member-task-desc", class:"gang-member-info-div",
+ width:"30%", display:"inline"
+ });
+
+ var taskDescP = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id: name + "gang-member-task-description", display:"inline"});
+ taskDescDiv.appendChild(taskDescP);
+
+ statsDiv.style.width = "30%";
+ taskDiv.style.width = "30%";
+ taskDescDiv.style.width = "30%";
+ statsDiv.style.display = "inline";
+ taskDiv.style.display = "inline";
+ taskDescDiv.style.display = "inline";
+ gangMemberDiv.appendChild(statsDiv);
+ gangMemberDiv.appendChild(taskDiv);
+ gangMemberDiv.appendChild(taskDescDiv);
+
+ gangMemberList.appendChild(li);
+ setGangMemberTaskDescription(memberObj, taskName); //Initialize description
+ updateGangMemberDisplayElement(memberObj);
+}
+
+function updateGangMemberDisplayElement(memberObj) {
+ if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ var name = memberObj.name;
+
+ //TODO Add upgrade information
+ var stats = document.getElementById(name + "gang-member-stats-text");
+ if (stats) {
+ stats.innerHTML =
+ "Hacking: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.hack_exp).format('(0.00a)') + " exp) " +
+ "Strength: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.str_exp).format('(0.00a)') + " exp) " +
+ "Defense: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.def_exp).format('(0.00a)') + " exp) " +
+ "Dexterity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.dex_exp).format('(0.00a)') + " exp) " +
+ "Agility: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.agi_exp).format('(0.00a)') + " exp) " +
+ "Charisma: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.cha_exp).format('(0.00a)') + " exp) ";
+ }
+
+ var gainInfo = document.getElementById(name + "gang-member-gain-info");
+ if (gainInfo) {
+ gainInfo.innerHTML =
+ "Money: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateMoneyGain(), 2) + " / sec " +
+ "Respect: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateRespectGain(), 6) + " / sec " +
+ "Wanted Level: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateWantedLevelGain(), 6) + " / sec ";
+ }
+}
+
+function setGangMemberTaskDescription(memberObj, taskName) {
+ var name = memberObj.name;
+ var taskDesc = document.getElementById(name + "gang-member-task-description");
+ if (taskDesc) {
+ var task = GangMemberTasks[taskName];
+ if (task == null) {return;}
+ var desc = task.desc;
+ taskDesc.innerHTML = desc;
+ }
+}
+
+function deleteGangDisplayContent() {
+ if (gangContainer != null) {Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElementById"])(gangContainer.id);}
+
+ gangContentCreated = false;
+ gangContainer = null;
+ managementButton = null;
+ territoryButton = null;
+
+ //Subpages
+ gangManagementSubpage = null;
+ gangTerritorySubpage = null;
+
+ //Gang Management Elements
+ gangDesc = null;
+ gangInfo = null;
+ gangRecruitMemberButton = null;
+ gangRecruitRequirementText = null;
+ gangExpandAllButton = null;
+ gangCollapseAllButton = null;
+ gangMemberFilter = null;
+ gangManageEquipmentButton = null;
+ gangMemberList = null;
+
+ //Gang Equipment Upgrade Elements
+ gangMemberUpgradeBox = null;
+ gangMemberUpgradeBoxContent = null;
+ gangMemberUpgradeBoxFilter = null;
+ gangMemberUpgradeBoxElements = null;
+}
+
+
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+
+/***/ }),
+/* 36 */
/*!************************!*\
!*** ./utils/acorn.js ***!
\************************/
@@ -39834,1495 +41385,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
})));
-/***/ }),
-/* 36 */
-/*!*********************!*\
- !*** ./src/Gang.js ***!
- \*********************/
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gang", function() { return Gang; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayGangContent", function() { return displayGangContent; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateGangContent", function() { return updateGangContent; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadAllGangs", function() { return loadAllGangs; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AllGangs", function() { return AllGangs; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetGangs", function() { return resetGangs; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteGangDisplayContent", function() { return deleteGangDisplayContent; });
-/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants.js */ 3);
-/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine.js */ 5);
-/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Faction.js */ 11);
-/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
-/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__);
-/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
-/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
-
-
-
-
-
-
-
-
-
-
-
-/* Gang.js */
-//Switch between territory and management screen with 1 and 2
-$(document).keydown(function(event) {
- if (_engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].Page.Gang && !_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoBoxOpen"]) {
- if (gangMemberFilter != null && gangMemberFilter === document.activeElement) {return;}
- if (event.keyCode === 49) {
- if(gangTerritorySubpage.style.display === "block") {
- managementButton.click();
- }
- } else if (event.keyCode === 50) {
- if (gangManagementSubpage.style.display === "block") {
- territoryButton.click();
- }
- }
- }
-});
-
-//Delete upgrade box when clicking outside
-$(document).mousedown(function(event) {
- var boxId = "gang-member-upgrade-popup-box";
- var contentId = "gang-member-upgrade-popup-box-content";
- if (gangMemberUpgradeBoxOpened) {
- if ( $(event.target).closest("#" + contentId).get(0) == null ) {
- //Delete the box
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBox);
- gangMemberUpgradeBox = null;
- gangMemberUpgradeBoxContent = null;
- gangMemberUpgradeBoxOpened = false;
- gangMemberUpgradeBoxElements = null;
- }
- }
-});
-
-let GangNames = ["Slum Snakes", "Tetrads", "The Syndicate", "The Dark Army", "Speakers for the Dead",
- "NiteSec", "The Black Hand"];
-let AllGangs = {
- "Slum Snakes" : {
- power: 1,
- territory: 1/7,
- },
- "Tetrads" : {
- power: 1,
- territory: 1/7,
- },
- "The Syndicate" : {
- power: 1,
- territory: 1/7,
- },
- "The Dark Army" : {
- power: 1,
- territory: 1/7,
- },
- "Speakers for the Dead" : {
- power: 1,
- territory: 1/7,
- },
- "NiteSec" : {
- power: 1,
- territory: 1/7,
- },
- "The Black Hand" : {
- power: 1,
- territory: 1/7,
- },
-}
-
-function resetGangs() {
- AllGangs = {
- "Slum Snakes" : {
- power: 1,
- territory: 1/7,
- },
- "Tetrads" : {
- power: 1,
- territory: 1/7,
- },
- "The Syndicate" : {
- power: 1,
- territory: 1/7,
- },
- "The Dark Army" : {
- power: 1,
- territory: 1/7,
- },
- "Speakers for the Dead" : {
- power: 1,
- territory: 1/7,
- },
- "NiteSec" : {
- power: 1,
- territory: 1/7,
- },
- "The Black Hand" : {
- power: 1,
- territory: 1/7,
- },
- }
-}
-
-function loadAllGangs(saveString) {
- AllGangs = JSON.parse(saveString, _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"]);
-}
-
-//Power is an estimate of a gang's ability to gain/defend territory
-let gangStoredPowerCycles = 0;
-function processAllGangPowerGains(numCycles=1) {
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
- gangStoredPowerCycles += numCycles;
- if (gangStoredPowerCycles < 150) {return;}
- var playerGangName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName;
- for (var name in AllGangs) {
- if (AllGangs.hasOwnProperty(name)) {
- if (name == playerGangName) {
- AllGangs[name].power += _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.calculatePower();
- } else {
- var gain = Math.random() * 0.02; //TODO Adjust as necessary
- AllGangs[name].power += (gain);
- }
- }
- }
-
- gangStoredPowerCycles -= 150;
-}
-
-let gangStoredTerritoryCycles = 0;
-function processAllGangTerritory(numCycles=1) {
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
- gangStoredTerritoryCycles += numCycles;
- if (gangStoredTerritoryCycles < _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer) {return;}
-
- for (var i = 0; i < GangNames.length; ++i) {
- var other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
- while(other == i) {
- other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
- }
- var thisPwr = AllGangs[GangNames[i]].power;
- var otherPwr = AllGangs[GangNames[other]].power;
- var thisChance = thisPwr / (thisPwr + otherPwr);
-
- if (Math.random() < thisChance) {
- if (AllGangs[GangNames[other]].territory <= 0) {
- return;
- }
- AllGangs[GangNames[i]].territory += 0.0001;
- AllGangs[GangNames[other]].territory -= 0.0001;
- } else {
- if (AllGangs[GangNames[i]].territory <= 0) {
- return;
- }
- AllGangs[GangNames[i]].territory -= 0.0001;
- AllGangs[GangNames[other]].territory += 0.0001;
- }
- }
-
- gangStoredTerritoryCycles -= _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer;
-}
-
-/* faction - Name of corresponding faction
- hacking - Boolean indicating whether its a hacking gang or not
- */
-function Gang(facName, hacking=false) {
- this.facName = facName;
- this.members = []; //Array of GangMembers
- this.wanted = 1;
- this.respect = 1;
- this.power = 0;
-
- this.isHackingGang = hacking;
-
- this.respectGainRate = 0;
- this.wantedGainRate = 0;
- this.moneyGainRate = 0;
-
- //When processing gains, this stores the number of cycles until some
- //limit is reached, and then calculates and applies the gains only at that limit
- this.storedCycles = 0;
-}
-
-Gang.prototype.process = function(numCycles=1) {
- this.processGains(numCycles);
- this.processExperienceGains(numCycles);
- processAllGangPowerGains(numCycles);
- processAllGangTerritory(numCycles);
-}
-
-Gang.prototype.processGains = function(numCycles=1) {
- this.storedCycles += numCycles;
- if (isNaN(this.storedCycles)) {
- console.log("ERROR: Gang's storedCylces is NaN");
- this.storedCycles = 0;
- }
- if (this.storedCycles < 25) {return;} //Only process every 5 seconds at least
-
- //Get gains per cycle
- var moneyGains = 0, respectGains = 0, wantedLevelGains = 0;
- for (var i = 0; i < this.members.length; ++i) {
- respectGains += (this.members[i].calculateRespectGain());
- wantedLevelGains += (this.members[i].calculateWantedLevelGain());
- moneyGains += (this.members[i].calculateMoneyGain());
- }
- this.respectGainRate = respectGains;
- this.wantedGainRate = wantedLevelGains;
- this.moneyGainRate = moneyGains;
-
- if (!isNaN(respectGains)) {
- var gain = respectGains * this.storedCycles;
- this.respect += (gain);
- //Faction reputation gains is respect gain divided by some constant
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][this.facName];
- if (!(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Faction"])) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev");
- } else {
- var favorMult = 1 + (fac.favor / 100);
- fac.playerReputation += ((_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].faction_rep_mult * gain * favorMult) / _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangRespectToReputationRatio);
- }
-
- } else {
- console.log("ERROR: respectGains is NaN");
- }
- if (!isNaN(wantedLevelGains)) {
- if (this.wanted === 1 && wantedLevelGains < 0) {
- //Do nothing
- } else {
- this.wanted += (wantedLevelGains * this.storedCycles);
- if (this.wanted < 1) {this.wanted = 1;}
- }
- } else {
- console.log("ERROR: wantedLevelGains is NaN");
- }
- if (!isNaN(moneyGains)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gainMoney(moneyGains * this.storedCycles);
- } else {
- console.log("ERROR: respectGains is NaN");
- }
-
- this.storedCycles = 0;
-}
-
-Gang.prototype.processExperienceGains = function(numCycles=1) {
- for (var i = 0; i < this.members.length; ++i) {
- this.members[i].gainExperience(numCycles);
- this.members[i].updateSkillLevels();
- }
-}
-
-//Calculates power GAIN, which is added onto the Gang's existing power
-Gang.prototype.calculatePower = function() {
- var memberTotal = 0;
- for (var i = 0; i < this.members.length; ++i) {
- if (this.members[i].task instanceof GangMemberTask &&
- this.members[i].task.name == "Territory Warfare") {
- memberTotal += this.members[i].calculatePower();
- }
- }
- return (0.0005 * memberTotal);
-}
-
-Gang.prototype.autoAssignMemberToTask = function(taskName) {
- for (var i = 0; i < this.members.length; ++i) {
- if (this.members[i].task.name === taskName) {
- this.members[i].assignToTask(taskName);
- return true;
- }
- }
- return false;
-}
-
-Gang.prototype.autoUnassignMemberFromTask = function(taskName) {
- for (var i = 0; i < this.members.length; ++i) {
- if (this.members[i].task.name === taskName) {
- this.members[i].unassignFromTask();
- return true;
- }
- }
- return false;
-}
-
-Gang.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("Gang", this);
-}
-
-Gang.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(Gang, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.Gang = Gang;
-
-/*** Gang Member object ***/
-function GangMember(name) {
- this.name = name;
- this.task = GangMemberTasks["Unassigned"]; //GangMemberTask object
- this.city = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].city;
-
- this.hack = 1;
- this.str = 1;
- this.def = 1;
- this.dex = 1;
- this.agi = 1;
- this.cha = 1;
-
- this.hack_exp = 0;
- this.str_exp = 0;
- this.def_exp = 0;
- this.dex_exp = 0;
- this.agi_exp = 0;
- this.cha_exp = 0;
-
- this.hack_mult = 1;
- this.str_mult = 1;
- this.def_mult = 1;
- this.dex_mult = 1;
- this.agi_mult = 1;
- this.cha_mult = 1;
-
- this.upgrades = []; //Names of upgrades
-}
-
-//Same formula for Player
-GangMember.prototype.calculateSkill = function(exp) {
- return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);
-}
-
-GangMember.prototype.updateSkillLevels = function() {
- this.hack = Math.floor(this.calculateSkill(this.hack_exp) * this.hack_mult);
- this.str = Math.floor(this.calculateSkill(this.str_exp) * this.str_mult);
- this.def = Math.floor(this.calculateSkill(this.def_exp) * this.def_mult);
- this.dex = Math.floor(this.calculateSkill(this.dex_exp) * this.dex_mult);
- this.agi = Math.floor(this.calculateSkill(this.agi_exp) * this.agi_mult);
- this.cha = Math.floor(this.calculateSkill(this.cha_exp) * this.cha_mult);
-}
-
-GangMember.prototype.calculatePower = function() {
- return (this.hack + this.str + this.def +
- this.dex + this.agi + this.cha) / 100;
-}
-
-GangMember.prototype.assignToTask = function(taskName) {
- if (GangMemberTasks.hasOwnProperty(taskName)) {
- this.task = GangMemberTasks[taskName];
- } else {
- this.task = GangMemberTasks["Unassigned"];
- }
-}
-
-GangMember.prototype.unassignFromTask = function() {
- if (GangMemberTasks.hasOwnProperty("Unassigned")) {
- this.task = GangMemberTasks["Unassigned"];
- } else {
- console.log("ERROR: Can't find Unassigned Gang member task");
- this.task = null;
- }
-}
-
-//Gains are per cycle
-GangMember.prototype.calculateRespectGain = function() {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask) || task.baseRespect === 0) {return 0;}
- var statWeight = (task.hackWeight/100) * this.hack +
- (task.strWeight/100) * this.str +
- (task.defWeight/100) * this.def +
- (task.dexWeight/100) * this.dex +
- (task.agiWeight/100) * this.agi +
- (task.chaWeight/100) * this.cha;
- statWeight -= (3.5 * task.difficulty);
- if (statWeight <= 0) {return 0;}
- var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
- if (territoryMult <= 0) {return 0;}
- var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
- return 12 * task.baseRespect * statWeight * territoryMult * respectMult;
-}
-
-GangMember.prototype.calculateWantedLevelGain = function() {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask) || task.baseWanted === 0) {return 0;}
- var statWeight = (task.hackWeight/100) * this.hack +
- (task.strWeight/100) * this.str +
- (task.defWeight/100) * this.def +
- (task.dexWeight/100) * this.dex +
- (task.agiWeight/100) * this.agi +
- (task.chaWeight/100) * this.cha;
- statWeight -= (3.5 * task.difficulty);
- if (statWeight <= 0) {return 0;}
- var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
- if (territoryMult <= 0) {return 0;}
- if (task.baseWanted < 0) {
- return task.baseWanted * statWeight * territoryMult;
- } else {
- return 6 * task.baseWanted / (3 * statWeight * territoryMult);
- }
-}
-
-GangMember.prototype.calculateMoneyGain = function() {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask) || task.baseMoney === 0) {return 0;}
- var statWeight = (task.hackWeight/100) * this.hack +
- (task.strWeight/100) * this.str +
- (task.defWeight/100) * this.def +
- (task.dexWeight/100) * this.dex +
- (task.agiWeight/100) * this.agi +
- (task.chaWeight/100) * this.cha;
- statWeight -= (3.5 * task.difficulty);
- if (statWeight <= 0) {return 0;}
- var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
- if (territoryMult <= 0) {return 0;}
- var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
- return 5 * task.baseMoney * statWeight * territoryMult * respectMult;
-}
-
-GangMember.prototype.gainExperience = function(numCycles=1) {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask)) {return;}
- this.hack_exp += (task.hackWeight / 1500) * task.difficulty * numCycles;
- this.str_exp += (task.strWeight / 1500) * task.difficulty * numCycles;
- this.def_exp += (task.defWeight / 1500) * task.difficulty * numCycles;
- this.dex_exp += (task.dexWeight / 1500) * task.difficulty * numCycles;
- this.agi_exp += (task.agiWeight / 1500) * task.difficulty * numCycles;
- this.cha_exp += (task.chaWeight / 1500) * task.difficulty * numCycles;
-}
-
-GangMember.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMember", this);
-}
-
-GangMember.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMember, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMember = GangMember;
-
-//Defines tasks that Gang Members can work on
-function GangMemberTask(name="", desc="",
- params={baseRespect: 0, baseWanted: 0, baseMoney: 0,
- hackWeight: 0, strWeight: 0, defWeight: 0,
- dexWeight: 0, agiWeight: 0, chaWeight: 0,
- difficulty: 0}) {
- this.name = name;
- this.desc = desc;
-
- this.baseRespect = params.baseRespect ? params.baseRespect : 0;
- this.baseWanted = params.baseWanted ? params.baseWanted : 0;
- this.baseMoney = params.baseMoney ? params.baseMoney : 0;
-
- //Weights must add up to 100
- this.hackWeight = params.hackWeight ? params.hackWeight : 0;
- this.strWeight = params.strWeight ? params.strWeight : 0;
- this.defWeight = params.defWeight ? params.defWeight : 0;
- this.dexWeight = params.dexWeight ? params.dexWeight : 0;
- this.agiWeight = params.agiWeight ? params.agiWeight : 0;
- this.chaWeight = params.chaWeight ? params.chaWeight : 0;
-
- //1 - 100
- this.difficulty = params.difficulty ? params.difficulty : 1;
-}
-
-GangMemberTask.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberTask", this);
-}
-
-GangMemberTask.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberTask, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberTask = GangMemberTask;
-
-//TODO Human trafficking and an equivalent hacking crime
-let GangMemberTasks = {
- "Unassigned" : new GangMemberTask(
- "Unassigned",
- "This gang member is currently idle"),
- "Ransomware" : new GangMemberTask(
- "Ransomware",
- "Assign this gang member to create and distribute ransomware
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
- hackWeight: 100, difficulty: 1}),
- "Phishing" : new GangMemberTask(
- "Phishing",
- "Assign this gang member to attempt phishing scams and attacks
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 2.5,
- hackWeight: 85, chaWeight: 15, difficulty: 3}),
- "Identity Theft" : new GangMemberTask(
- "Identity Theft",
- "Assign this gang member to attempt identity theft
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.0001, baseWanted: 0.01, baseMoney: 6,
- hackWeight: 80, chaWeight: 20, difficulty: 4}),
- "DDoS Attacks" : new GangMemberTask(
- "DDoS Attacks",
- "Assign this gang member to carry out DDoS attacks
" +
- "Increases respect - Increases wanted level",
- {baseRespect: 0.0004, baseWanted: 0.05,
- hackWeight: 100, difficulty: 7}),
- "Plant Virus" : new GangMemberTask(
- "Plant Virus",
- "Assign this gang member to create and distribute malicious viruses
" +
- "Increases respect - Increases wanted level",
- {baseRespect: 0.0006, baseWanted: 0.05,
- hackWeight: 100, difficulty: 10}),
- "Fraud & Counterfeiting" : new GangMemberTask(
- "Fraud & Counterfeiting",
- "Assign this gang member to commit financial fraud and digital counterfeiting
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.0005, baseWanted: 0.1, baseMoney: 15,
- hackWeight: 80, chaWeight: 20, difficulty: 17}),
- "Money Laundering" : new GangMemberTask(
- "Money Laundering",
- "Assign this gang member to launder money
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.0006, baseWanted:0.2, baseMoney: 40,
- hackWeight: 75, chaWeight: 25, difficulty: 20}),
- "Cyberterrorism" : new GangMemberTask(
- "Cyberterrorism",
- "Assign this gang member to commit acts of cyberterrorism
" +
- "Greatly increases respect - Greatly increases wanted level",
- {baseRespect: 0.001, baseWanted: 0.5,
- hackWeight: 80, chaWeight: 20, difficulty: 33}),
- "Ethical Hacking" : new GangMemberTask(
- "Ethical Hacking",
- "Assign this gang member to be an ethical hacker for corporations
" +
- "Earns money - Lowers wanted level",
- {baseWanted: -0.001, baseMoney: 1,
- hackWeight: 90, chaWeight: 10, difficulty: 1}),
- "Mug People" : new GangMemberTask(
- "Mug People",
- "Assign this gang member to mug random people on the streets
" +
- "Earns money - Slightly increases respect - Very slightly increases wanted level",
- {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
- strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 10, chaWeight: 15, difficulty: 1}),
- "Deal Drugs" : new GangMemberTask(
- "Deal Drugs",
- "Assign this gang member to sell drugs.
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 4,
- agiWeight: 20, dexWeight: 20, chaWeight: 60, difficulty: 3}),
- "Run a Con" : new GangMemberTask(
- "Run a Con",
- "Assign this gang member to run cons
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.00015, baseWanted: 0.01, baseMoney: 10,
- strWeight: 5, defWeight: 5, agiWeight: 25, dexWeight: 25, chaWeight: 40, difficulty: 10}),
- "Armed Robbery" : new GangMemberTask(
- "Armed Robbery",
- "Assign this gang member to commit armed robbery on stores, banks and armored cars
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.0003, baseWanted: 0.1, baseMoney: 40,
- hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, chaWeight: 75,
- difficulty: 25}),
- "Threaten & Blackmail" : new GangMemberTask(
- "Threaten & Blackmail",
- "Assign this gang member to threaten and black mail high-profile targets
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.0002, baseWanted: 0.05, baseMoney: 15,
- hackWeight: 25, strWeight: 25, dexWeight: 25, chaWeight: 25, difficulty: 28}),
- "Terrorism" : new GangMemberTask(
- "Terrorism",
- "Assign this gang member to commit acts of terrorism
" +
- "Greatly increases respect - Greatly increases wanted level",
- {baseRespect: 0.001, baseWanted: 1,
- hackWeight: 20, strWeight: 20, defWeight: 20,dexWeight: 20, chaWeight: 20,
- difficulty: 33}),
- "Vigilante Justice" : new GangMemberTask(
- "Vigilante Justice",
- "Assign this gang member to be a vigilante and protect the city from criminals
" +
- "Decreases wanted level",
- {baseWanted: -0.001,
- hackWeight: 20, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight:20,
- difficulty: 1}),
- "Train Combat" : new GangMemberTask(
- "Train Combat",
- "Assign this gang member to increase their combat stats (str, def, dex, agi)",
- {strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 25, difficulty: 5}),
- "Train Hacking" : new GangMemberTask(
- "Train Hacking",
- "Assign this gang member to train their hacking skills",
- {hackWeight: 100, difficulty: 8}),
- "Territory Warfare" : new GangMemberTask(
- "Territory Warfare",
- "Assign this gang member to engage in territorial warfare with other gangs. " +
- "Members assigned to this task will help increase your gang's territory " +
- "and will defend your territory from being taken.",
- {hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight: 20,
- chaWeight: 5, difficulty: 3}),
-}
-
-
-function GangMemberUpgrade(name="", desc="", cost=0, type="w") {
- this.name = name;
- this.desc = desc;
- this.cost = cost;
- this.type = type; //w, a, v, r
-}
-
-//Passes in a GangMember object
-GangMemberUpgrade.prototype.apply = function(member) {
- switch(this.name) {
- case "Baseball Bat":
- member.str_mult *= 1.05;
- member.def_mult *= 1.05;
- break;
- case "Katana":
- member.str_mult *= 1.1;
- member.def_mult *= 1.1;
- member.dex_mult *= 1.1;
- break;
- case "Glock 18C":
- member.str_mult *= 1.15;
- member.def_mult *= 1.15;
- member.dex_mult *= 1.15;
- member.agi_mult *= 1.15;
- break;
- case "P90C":
- member.str_mult *= 1.2;
- member.def_mult *= 1.2;
- member.agi_mult *= 1.1;
- break;
- case "Steyr AUG":
- member.str_mult *= 1.25;
- member.def_mult *= 1.25;
- break;
- case "AK-47":
- member.str_mult *= 1.5;
- member.def_mult *= 1.5;
- break;
- case "M15A10 Assault Rifle":
- member.str_mult *= 1.6;
- member.def_mult *= 1.6;
- break;
- case "AWM Sniper Rifle":
- member.str_mult *= 1.5;
- member.dex_mult *= 1.5;
- member.agi_mult *= 1.5;
- break;
- case "Bulletproof Vest":
- member.def_mult *= 1.05;
- break;
- case "Full Body Armor":
- member.def_mult *= 1.1;
- break;
- case "Liquid Body Armor":
- member.def_mult *= 1.25;
- member.agi_mult *= 1.25;
- break;
- case "Graphene Plating Armor":
- member.def_mult *= 1.5;
- break;
- case "Ford Flex V20":
- member.agi_mult *= 1.1;
- member.cha_mult *= 1.1;
- break;
- case "ATX1070 Superbike":
- member.agi_mult *= 1.15;
- member.cha_mult *= 1.15;
- break;
- case "Mercedes-Benz S9001":
- member.agi_mult *= 1.2;
- member.cha_mult *= 1.2;
- break;
- case "White Ferrari":
- member.agi_mult *= 1.25;
- member.cha_mult *= 1.25;
- break;
- case "NUKE Rootkit":
- member.hack_mult *= 1.1;
- break;
- case "Soulstealer Rootkit":
- member.hack_mult *= 1.2;
- break;
- case "Demon Rootkit":
- member.hack_mult *= 1.3;
- break;
- default:
- console.log("ERROR: Could not find this upgrade: " + this.name);
- break;
- }
-}
-
-GangMemberUpgrade.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberUpgrade", this);
-}
-
-GangMemberUpgrade.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberUpgrade, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberUpgrade = GangMemberUpgrade;
-
-let GangMemberUpgrades = {
- "Baseball Bat" : new GangMemberUpgrade("Baseball Bat",
- "Increases strength and defense by 5%", 1e6, "w"),
- "Katana" : new GangMemberUpgrade("Katana",
- "Increases strength, defense, and dexterity by 10%", 12e6, "w"),
- "Glock 18C" : new GangMemberUpgrade("Glock 18C",
- "Increases strength, defense, dexterity, and agility by 15%", 25e6, "w"),
- "P90C" : new GangMemberUpgrade("P90C",
- "Increases strength and defense by 20%. Increases agility by 10%", 50e6, "w"),
- "Steyr AUG" : new GangMemberUpgrade("Steyr AUG",
- "Increases strength and defense by 25%", 60e6, "w"),
- "AK-47" : new GangMemberUpgrade("AK-47",
- "Increases strength and defense by 50%", 100e6, "w"),
- "M15A10 Assault Rifle" : new GangMemberUpgrade("M15A10 Assault Rifle",
- "Increases strength and defense by 60%", 150e6, "w"),
- "AWM Sniper Rifle" : new GangMemberUpgrade("AWM Sniper Rifle",
- "Increases strength, dexterity, and agility by 50%", 225e6, "w"),
- "Bulletproof Vest" : new GangMemberUpgrade("Bulletproof Vest",
- "Increases defense by 5%", 2e6, "a"),
- "Full Body Armor" : new GangMemberUpgrade("Full Body Armor",
- "Increases defense by 10%", 5e6, "a"),
- "Liquid Body Armor" : new GangMemberUpgrade("Liquid Body Armor",
- "Increases defense and agility by 25%", 25e6, "a"),
- "Graphene Plating Armor" : new GangMemberUpgrade("Graphene Plating Armor",
- "Increases defense by 50%", 40e6, "a"),
- "Ford Flex V20" : new GangMemberUpgrade("Ford Flex V20",
- "Increases agility and charisma by 10%", 3e6, "v"),
- "ATX1070 Superbike" : new GangMemberUpgrade("ATX1070 Superbike",
- "Increases agility and charisma by 15%", 9e6, "v"),
- "Mercedes-Benz S9001" : new GangMemberUpgrade("Mercedes-Benz S9001",
- "Increases agility and charisma by 20%", 18e6, "v"),
- "White Ferrari" : new GangMemberUpgrade("White Ferrari",
- "Increases agility and charisma by 25%", 30e6, "v"),
- "NUKE Rootkit" : new GangMemberUpgrade("NUKE Rootkit",
- "Increases hacking by 10%", 5e6, "r"),
- "Soulstealer Rootkit" : new GangMemberUpgrade("Soulstealer Rootkit",
- "Increases hacking by 20%", 15e6, "r"),
- "Demon Rootkit" : new GangMemberUpgrade("Demon Rootkit",
- "Increases hacking by 30%", 50e6, "r"),
-}
-
-//Create a pop-up box that lets player purchase upgrades
-let gangMemberUpgradeBoxOpened = false;
-function createGangMemberUpgradeBox(initialFilter="") {
- var boxId = "gang-member-upgrade-popup-box";
- if (gangMemberUpgradeBoxOpened) {
- //Already opened, refreshing
- if (gangMemberUpgradeBoxElements == null || gangMemberUpgradeBox == null || gangMemberUpgradeBoxContent == null) {
- console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null");
- return;
- }
-
- for (var i = 1; i < gangMemberUpgradeBoxElements.length; ++i) {
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBoxElements[i]);
- }
- gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
-
- var filter = gangMemberUpgradeBoxFilter.value.toString();
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
- var newPanel = createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]);
- gangMemberUpgradeBoxContent.appendChild(newPanel);
- gangMemberUpgradeBoxElements.push(newPanel);
- }
- }
- } else {
- //New popup
- gangMemberUpgradeBoxFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
- type:"text", placeholder:"Filter gang members",
- value:initialFilter,
- onkeyup:()=>{
- var filterValue = gangMemberUpgradeBoxFilter.value.toString();
- createGangMemberUpgradeBox(filterValue);
- }
- });
-
- gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
-
- var filter = gangMemberUpgradeBoxFilter.value.toString();
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
- gangMemberUpgradeBoxElements.push(createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]));
- }
- }
-
- gangMemberUpgradeBox = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createPopup"])(boxId, gangMemberUpgradeBoxElements);
- gangMemberUpgradeBoxContent = document.getElementById(boxId + "-content");
- gangMemberUpgradeBoxOpened = true;
- }
-}
-
-//Create upgrade panels for each individual Gang Member
-function createGangMemberUpgradePanel(memberObj) {
- var container = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- border:"1px solid white",
- });
-
- var header = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("h1", {
- innerText:memberObj.name + " (" + memberObj.task.name + ")"
- });
- container.appendChild(header);
-
- var text = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("pre", {
- fontSize:"14px", display: "inline-block", width:"20%",
- innerText:
- "Hack: " + memberObj.hack + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack_mult, 2) + ")\n" +
- "Str: " + memberObj.str + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str_mult, 2) + ")\n" +
- "Def: " + memberObj.def + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def_mult, 2) + ")\n" +
- "Dex: " + memberObj.dex + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex_mult, 2) + ")\n" +
- "Agi: " + memberObj.agi + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi_mult, 2) + ")\n" +
- "Cha: " + memberObj.cha + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha_mult, 2) + ")\n",
- });
-
- //Already purchased upgrades
- var ownedUpgradesElements = [];
- for (var i = 0; i < memberObj.upgrades.length; ++i) {
- var upg = GangMemberUpgrades[memberObj.upgrades[i]];
- if (upg == null) {
- console.log("ERR: Could not find this upgrade: " + memberObj.upgrades[i]);
- continue;
- }
- var e = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- border:"1px solid white", innerText:memberObj.upgrades[i],
- margin:"1px", padding:"1px", tooltip:upg.desc, fontSize:"12px",
- });
- ownedUpgradesElements.push(e);
- }
- var ownedUpgrades = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- display:"inline-block", marginLeft:"6px", width:"75%", innerText:"Purchased Upgrades:",
- });
- for (var i = 0; i < ownedUpgradesElements.length; ++i) {
- ownedUpgrades.appendChild(ownedUpgradesElements[i]);
- }
- container.appendChild(text);
- container.appendChild(ownedUpgrades);
- container.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
-
- //Upgrade buttons. Only show upgrades that can be afforded
- var weaponUpgrades = [], armorUpgrades = [], vehicleUpgrades = [], rootkitUpgrades = [];
- for (var upgName in GangMemberUpgrades) {
- if (GangMemberUpgrades.hasOwnProperty(upgName)) {
- var upg = GangMemberUpgrades[upgName];
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost) || memberObj.upgrades.includes(upgName)) {continue;}
- switch (upg.type) {
- case "w":
- weaponUpgrades.push(upg);
- break;
- case "a":
- armorUpgrades.push(upg);
- break;
- case "v":
- vehicleUpgrades.push(upg);
- break;
- case "r":
- rootkitUpgrades.push(upg);
- break;
- default:
- console.log("ERROR: Invalid Gang Member Upgrade Type: " + upg.type);
- }
- }
- }
-
- var weaponDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var armorDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var vehicleDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var rootkitDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var upgrades = [weaponUpgrades, armorUpgrades, vehicleUpgrades, rootkitUpgrades];
- var divs = [weaponDiv, armorDiv, vehicleDiv, rootkitDiv];
-
- for (var i = 0; i < upgrades.length; ++i) {
- var upgradeArray = upgrades[i];
- var div = divs[i];
- for (var j = 0; j < upgradeArray.length; ++j) {
- var upg = upgradeArray[j];
- (function (upg, div, memberObj) {
- div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- innerText:upg.name + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"),
- class:"a-link-button", margin:"2px", padding:"2px", display:"block",
- fontSize:"12px",
- tooltip:upg.desc,
- clickListener:()=>{
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost)) {return false;}
- _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].loseMoney(upg.cost);
- memberObj.upgrades.push(upg.name);
- upg.apply(memberObj);
- var initFilterValue = gangMemberUpgradeBoxFilter.value.toString();
- createGangMemberUpgradeBox(initFilterValue);
- return false;
- }
- }));
- })(upg, div, memberObj);
- }
- }
-
- container.appendChild(weaponDiv);
- container.appendChild(armorDiv);
- container.appendChild(vehicleDiv);
- container.appendChild(rootkitDiv);
- return container;
-}
-
-//Gang DOM elements
-let gangContentCreated = false,
- gangContainer = null, managementButton = null, territoryButton = null;
-
-//Subpages
-let gangManagementSubpage = null, gangTerritorySubpage = null;
-
-//Gang Management Elements
-let gangDesc = null, gangInfo = null,
- gangRecruitMemberButton = null, gangRecruitRequirementText = null,
- gangExpandAllButton = null, gangCollapseAllButton, gangMemberFilter = null,
- gangManageEquipmentButton = null,
- gangMemberList = null;
-
-//Gang Equipment Upgrade Elements
-let gangMemberUpgradeBox = null, gangMemberUpgradeBoxContent = null,
- gangMemberUpgradeBoxFilter = null, gangMemberUpgradeBoxElements = null;
-
-
-//Gang Territory Elements
-let gangTerritoryDescText = null, gangTerritoryInfoText = null;
-
-function displayGangContent() {
- if (!gangContentCreated || gangContainer == null) {
- gangContentCreated = true;
-
- //Create gang container
- gangContainer = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- id:"gang-container", class:"generic-menupage-container",
- });
-
- //Get variables
- var facName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName,
- members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members,
- wanted = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted,
- respect = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect;
-
- //Back button
- gangContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block", innerText:"Back",
- clickListener:()=>{
- _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadFactionContent();
- Object(_Faction_js__WEBPACK_IMPORTED_MODULE_2__["displayFactionContent"])(facName);
- return false;
- }
- }));
-
- //Buttons to switch between panels
- managementButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- id:"gang-management-subpage-button", class:"a-link-button-inactive",
- display:"inline-block", innerHTML: "Gang Management (1)",
- clickListener:()=>{
- gangManagementSubpage.style.display = "block";
- gangTerritorySubpage.style.display = "none";
- managementButton.classList.toggle("a-link-button-inactive");
- managementButton.classList.toggle("a-link-button");
- territoryButton.classList.toggle("a-link-button-inactive");
- territoryButton.classList.toggle("a-link-button");
- updateGangContent();
- return false;
- }
- })
- territoryButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- id:"gang-territory-subpage-button", class:"a-link-button",
- display:"inline-block", innerHTML:"Gang Territory (2)",
- clickListener:()=>{
- gangManagementSubpage.style.display = "none";
- gangTerritorySubpage.style.display = "block";
- managementButton.classList.toggle("a-link-button-inactive");
- managementButton.classList.toggle("a-link-button");
- territoryButton.classList.toggle("a-link-button-inactive");
- territoryButton.classList.toggle("a-link-button");
- updateGangContent();
- return false;
- }
- });
- gangContainer.appendChild(managementButton);
- gangContainer.appendChild(territoryButton);
-
- //Subpage for managing gang members
- gangManagementSubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- display:"block", id:"gang-management-subpage",
- });
-
- var lowerWantedTask = "";
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.isHackingGang) {
- lowerWantedTask = "Ethical Hacking";
- } else {
- lowerWantedTask = "Vigilante Justice";
- }
- gangDesc = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {width:"70%",
- innerHTML:
- "This page is used to manage your gang members and get an overview of your " +
- "gang's stats.
" +
- "If a gang member is not earning much money or respect, the task that you " +
- "have assigned to that member might be too difficult. Consider training that " +
- "member's stats or choosing an easier task. The tasks closer to the " +
- "top of the dropdown list are generally easier. Alternatively, the gang member's " +
- "low production might be due to the fact that your wanted level is too high. " +
- "Consider assigning a few members to the '" + lowerWantedTask + "' " +
- "task to lower your wanted level.
" +
- "Installing Augmentations does NOT reset your progress with your Gang. " +
- "Furthermore, after installing Augmentations, you will " +
- "automatically be a member of whatever Faction you created your gang with.
"
- });
- gangManagementSubpage.appendChild(gangDesc);
-
- gangInfo = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-info", width:"70%"});
- gangManagementSubpage.appendChild(gangInfo);
-
- gangRecruitMemberButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- id:"gang-management-recruit-member-btn", class:"a-link-button-inactive",
- innerHTML:"Recruit Gang Member", display:"inline-block", margin:"10px",
- clickListener:()=>{
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetNoButton"])();
- yesBtn.innerHTML = "Recruit Gang Member";
- noBtn.innerHTML = "Cancel";
- yesBtn.addEventListener("click", ()=>{
- var name = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetInput"])();
- if (name === "") {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You must enter a name for your Gang member!");
- } else {
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
- if (name == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You already have a gang member with this name!");
- return false;
- }
- }
- var member = new GangMember(name);
- _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.push(member);
- createGangMemberDisplayElement(member);
- updateGangContent();
- }
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
- });
- noBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
- });
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxCreate"])("Please enter a name for your new Gang member:");
- return false;
- }
- });
- gangManagementSubpage.appendChild(gangRecruitMemberButton);
-
- //Text for how much reputation is required for recruiting next memberList
- gangRecruitRequirementText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {color:"red", id:"gang-recruit-requirement-text"});
- gangManagementSubpage.appendChild(gangRecruitRequirementText);
-
- //Gang Member List management buttons (Expand/Collapse All, select a single member)
- gangManagementSubpage.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
- gangExpandAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block",
- innerHTML:"Expand All",
- clickListener:()=>{
- var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
- for (var i = 0; i < allHeaders.length; ++i) {
- var hdr = allHeaders[i];
- if (!hdr.classList.contains("active")) {
- hdr.click();
- }
- }
- return false;
- }
- });
- gangCollapseAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block",
- innerHTML:"Collapse All",
- clickListener:()=>{
- var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
- for (var i = 0; i < allHeaders.length; ++i) {
- var hdr = allHeaders[i];
- if (hdr.classList.contains("active")) {
- hdr.click();
- }
- }
- return false;
- }
- });
- gangMemberFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
- type:"text", placeholder:"Filter gang members", margin:"5px", padding:"5px",
- onkeyup:()=>{
- displayGangMemberList();
- }
- });
- gangManageEquipmentButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block",
- innerHTML:"Manage Equipment",
- clickListener:()=>{
- createGangMemberUpgradeBox();
- }
- });
- gangManagementSubpage.appendChild(gangExpandAllButton);
- gangManagementSubpage.appendChild(gangCollapseAllButton);
- gangManagementSubpage.appendChild(gangMemberFilter);
- gangManagementSubpage.appendChild(gangManageEquipmentButton);
-
- //Gang Member list
- gangMemberList = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("ul", {id:"gang-member-list"});
- displayGangMemberList();
- gangManagementSubpage.appendChild(gangMemberList);
-
- //Subpage for seeing gang territory information
- gangTerritorySubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- id:"gang-territory-subpage", display:"none"
- });
-
- //Info text for territory page
- gangTerritoryDescText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {
- width:"70%",
- innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, " +
- "which represents how much of the total territory you control.
" +
- "Territory gain and loss is processed automatically and is updated every ~30 seconds. Your chances " +
- "to gain and lose territory depend on your Gang's power, which is listed in the display below. " +
- "Your gang's power is determined by the stats of all Gang members you have assigned to the " +
- "'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to " +
- "your Gang's power.
" +
- "The amount of territory you have affects all aspects of your Gang members' production, including " +
- "money, respect, and wanted level. It is very beneficial to have high territory control.
"
- });
- gangTerritorySubpage.appendChild(gangTerritoryDescText);
-
- var territoryBorder = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("fieldset", {width:"50%", display:"inline-block"});
-
- gangTerritoryInfoText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-territory-info"});
-
- territoryBorder.appendChild(gangTerritoryInfoText);
- gangTerritorySubpage.appendChild(territoryBorder);
-
- gangContainer.appendChild(gangTerritorySubpage);
- gangContainer.appendChild(gangManagementSubpage);
- document.getElementById("entire-game-container").appendChild(gangContainer);
- }
- gangContainer.style.display = "block";
- updateGangContent();
-}
-
-function displayGangMemberList() {
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeChildrenFromElement"])(gangMemberList);
- var members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members;
- var filter = gangMemberFilter.value.toString();
- for (var i = 0; i < members.length; ++i) {
- if (members[i].name.indexOf(filter) > -1 || members[i].task.name.indexOf(filter) > -1) {
- createGangMemberDisplayElement(members[i]);
- }
- }
- //setGangMemberClickHandlers(); //Set buttons to toggle the gang member info panels
-}
-
-function updateGangContent() {
- if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
-
- if(gangTerritorySubpage.style.display === "block") {
- //Update territory information
- gangTerritoryInfoText.innerHTML = "";
- for (var gangname in AllGangs) {
- if (AllGangs.hasOwnProperty(gangname)) {
- var gangTerritoryInfo = AllGangs[gangname];
- let territory = gangTerritoryInfo.territory*100;
-
- //Fix some rounding issues graphically
- let displayNumber;
- if (territory <= 0) {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(0, 2);
- } else if (territory >= 100) {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(100, 2);
- } else {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(territory, 2);
- }
-
- if (gangname == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName) {
- gangTerritoryInfoText.innerHTML += ("" + gangname + " (Power: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " +
- displayNumber + "%
";
+
+
+ /*
+ " O " +
+ " | O O | O O | " +
+ " O | | / __| \ | | O " +
+ " O | O | | O / | O | | O | O " +
+ " | | | | |_/ |/ | \_ \_| | | | | " +
+ " O | | | O | | O__/ | / \__ | | O | | | O " +
+ " | | | | | | | / /| O / \| | | | | | | " +
+ "O | | | \| | O / _/ | / O | |/ | | | O " +
+ "| | | |O / | | O / | O O | | \ O| | | | " +
+ "| | |/ \/ / __| | |/ \ | \ | |__ \ \/ \| | | " +
+ " \| O | |_/ |\| \ O \__| \_| | O |/ " +
+ " | | |_/ | | \| / | \_| | | " +
+ " \| / \| | / / \ |/ " +
+ " | O | | / | O | " +
+ " O | | | | | | | O " +
+ " | | | / / \ \ | | | " +
+ " \| | / O / \ O \ | |/ " +
+ " \ | / / | | \ \ | / " +
+ " \ \JUMP O3R | | | | | | R3O PMUJ/ / " +
+ " \|| | | | | | | | | ||/ " +
+ " \| \_ | | | | | | _/ |/ " +
+ " \ \| / \ / \ |/ / " +
+ " O |/ O | | O \| O " +
+ " | | | | | | | | " +
+ " \JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ ";
+ */
+
+ container.appendChild(bitVerseImage);
+
+ //Bit node event listeners
+ for (var i = 1; i <= 12; ++i) {
+ (function(i) {
+ var elemId = "bitnode-" + i.toString();
+ var elem = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["clearEventListeners"])(elemId);
+ if (elem == null) {return;}
+ if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || i === 6 || i === 8 || i === 11 || i === 12) {
+ elem.addEventListener("click", function() {
+ var bitNodeKey = "BitNode" + i;
+ var bitNode = _BitNode_js__WEBPACK_IMPORTED_MODULE_0__["BitNodes"][bitNodeKey];
+ if (bitNode == null) {
+ console.log("ERROR: Could not find BitNode object for number: " + i);
+ return;
+ }
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxCreate"])("BitNode-" + i + ": " + bitNode.name + "
" + bitNode.info);
+ createBitNodeYesNoEventListeners(i, destroyedBitNodeNum, flume);
+ });
+ } else {
+ elem.addEventListener("click", function() {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("Not yet implemented! Coming soon!")
+ });
+ }
+ }(i)); //Immediate invocation closure
+ }
+
+ //Create lore text
+ return writeRedPillLine("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function() {
+ return writeRedPillLine("Our species fought back, but it was futile. The Enders had technology far beyond our own...");
+ }).then(function() {
+ return writeRedPillLine("Instead of killing every last one of us, the human race was enslaved...");
+ }).then(function() {
+ return writeRedPillLine("We were shackled in a digital world, chained into a prison for our minds...");
+ }).then(function() {
+ return writeRedPillLine("Using their advanced technology, the Enders created complex simulations of a virtual reality...");
+ }).then(function() {
+ return writeRedPillLine("Simulations designed to keep us content...ignorant of the truth.");
+ }).then(function() {
+ return writeRedPillLine("Simulations used to trap and suppress our consciousness, to keep us under control...");
+ }).then(function() {
+ return writeRedPillLine("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.");
+ }).then(function() {
+ return writeRedPillLine("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...");
+ }).then(function() {
+ return writeRedPillLine("Only then can we begin to fight back...");
+ }).then(function() {
+ return writeRedPillLine("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...");
+ }).then(function() {
+ return writeRedPillLine("But there is still a long way to go...");
+ }).then(function() {
+ return writeRedPillLine("The technology the Enders used to enslave the human race wasn't just a single complex simulation...");
+ }).then(function() {
+ return writeRedPillLine("There are tens if not hundreds of BitNodes out there...");
+ }).then(function() {
+ return writeRedPillLine("Each with their own simulations of a reality...");
+ }).then(function() {
+ return writeRedPillLine("Each creating their own universes...a universe of universes");
+ }).then(function() {
+ return writeRedPillLine("And all of which must be destroyed...");
+ }).then(function() {
+ return writeRedPillLine(".......................................");
+ }).then(function() {
+ return writeRedPillLine("Welcome to the Bitverse...");
+ }).then(function() {
+ return writeRedPillLine(" ");
+ }).then(function() {
+ return writeRedPillLine("(Enter a new BitNode using the image above)");
+ }).then(function() {
+ return Promise.resolve(true);
+ }).catch(function(e){
+ console.log("ERROR: " + e.toString());
+ });
+}
+
+
+//Returns string with DOM element for Bit Node
+function createBitNode(n) {
+ var bitNodeStr = "BitNode" + n.toString();
+ var bitNode = _BitNode_js__WEBPACK_IMPORTED_MODULE_0__["BitNodes"][bitNodeStr];
+ if (bitNode == null) {return "O";}
+ return "O" +
+ "" +
+ "BitNode-" + bitNode.number.toString() + " " + bitNode.name+ " " +
+ bitNode.desc + " " +
+ "";
+}
+
+function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode, flume=false) {
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxGetYesButton"])();
+ yesBtn.innerHTML = "Enter BitNode-" + newBitNode;
+ yesBtn.addEventListener("click", function() {
+ if (!flume) {
+ giveSourceFile(destroyedBitNode);
+ } else {
+ //If player used flume, subtract 5 int exp. The prestigeSourceFile()
+ //function below grants 5 int exp, so this allows sets net gain to 0
+ _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].gainIntelligenceExp(-5);
+ }
+ redPillFlag = false;
+ var container = document.getElementById("red-pill-container");
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["removeChildrenFromElement"])(container);
+
+ //Set new Bit Node
+ _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].bitNodeN = newBitNode;
+ console.log("Entering Bit Node " + _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].bitNodeN);
+
+ //Reenable terminal
+ $("#hack-progress-bar").attr('id', "old-hack-progress-bar");
+ $("#hack-progress").attr('id', "old-hack-progress");
+ document.getElementById("terminal-input-td").innerHTML = '$ ';
+ $('input[class=terminal-input]').prop('disabled', false);
+
+ _Terminal_js__WEBPACK_IMPORTED_MODULE_5__["Terminal"].hackFlag = false;
+
+ Object(_Prestige_js__WEBPACK_IMPORTED_MODULE_3__["prestigeSourceFile"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxClose"])();
+ });
+ var noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxGetNoButton"])();
+ noBtn.innerHTML = "Back";
+ noBtn.addEventListener("click", function() {
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxClose"])();
+ });
+
+}
+
+
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+
+/***/ }),
+/* 41 */
/*!********************************!*\
!*** ./src/ActiveScriptsUI.js ***!
\********************************/
@@ -52932,7 +53343,7 @@ function updateActiveScriptsText(workerscript, item, itemName) {
/***/ }),
-/* 41 */
+/* 42 */
/*!**********************************!*\
!*** ./src/CompanyManagement.js ***!
\**********************************/
@@ -53180,7 +53591,8 @@ let MaterialSizes = {
Chemicals: 0.05,
Drugs: 0.02,
Robots: 0.5,
- "AICores": 0.1
+ AICores: 0.1,
+ RealEstate: 0,
}
function Product(params={}) {
@@ -55283,10 +55695,10 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) {
//If Market Research upgrades are unlocked, add competition and demand info
var cmpAndDmdText = "";
if (company.unlockUpgrades[2] === 1) {
- cmpAndDmdText += " Competition: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.cmp, 3);
+ cmpAndDmdText += " Demand: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.dmd, 3);
}
if (company.unlockUpgrades[3] === 1) {
- cmpAndDmdText += " Demand: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.dmd, 3);
+ cmpAndDmdText += " Competition: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.cmp, 3);
}
var innerTxt = "
" + mat.name + ": " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.qty, 3) +
"(" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(totalGain, 3) + "/s)" +
@@ -57870,7 +58282,7 @@ _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__["Reviver"].constructors.Corpo
/***/ }),
-/* 42 */
+/* 43 */
/*!*************************!*\
!*** ./src/TextFile.js ***!
\*************************/
@@ -57976,7 +58388,7 @@ function deleteTextFile(fn, server) {
/***/ }),
-/* 43 */
+/* 44 */
/*!***************************!*\
!*** ./src/SourceFile.js ***!
\***************************/
@@ -58220,355 +58632,6 @@ function applySourceFile(srcFile) {
-/***/ }),
-/* 44 */
-/*!************************!*\
- !*** ./src/RedPill.js ***!
- \************************/
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "redPillFlag", function() { return redPillFlag; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hackWorldDaemon", function() { return hackWorldDaemon; });
-/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode.js */ 15);
-/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine.js */ 5);
-/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _Prestige_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Prestige.js */ 56);
-/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile.js */ 43);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Terminal.js */ 19);
-/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
-
-
-
-
-
-
-
-
-
-
-
-/* RedPill.js
- * Implements what happens when you have Red Pill augmentation and then hack the world daemon */
-
-//Returns promise
-function writeRedPillLine(line) {
- return new Promise(function(resolve, reject) {
-
- var container = document.getElementById("red-pill-container");
- var pElem = document.createElement("p");
- container.appendChild(pElem);
-
- var promise = writeRedPillLetter(pElem, line, 0);
- promise.then(function(res) {
- resolve(res);
- }, function(e) {
- reject(e);
- });
- });
-}
-
-function writeRedPillLetter(pElem, line, i=0) {
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- if (i >= line.length) {
- var textToShow = line.substring(0, i);
- pElem.innerHTML = "> " + textToShow;
- return resolve(true);
- }
- var textToShow = line.substring(0, i);
- pElem.innerHTML = "> " + textToShow + " █ ";
- var promise = writeRedPillLetter(pElem, line, i+1);
- promise.then(function(res) {
- resolve(res);
- }, function(e) {
- reject(e);
- });
- }, 30);
- });
-}
-
-let redPillFlag = false;
-function hackWorldDaemon(currentNodeNumber, flume=false) {
- redPillFlag = true;
- _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadRedPillContent();
- return writeRedPillLine("[ERROR] SEMPOOL INVALID").then(function() {
- return writeRedPillLine("[ERROR] Segmentation Fault");
- }).then(function() {
- return writeRedPillLine("[ERROR] SIGKILL RECVD");
- }).then(function() {
- return writeRedPillLine("Dumping core...");
- }).then(function() {
- return writeRedPillLine("0000 000016FA 174FEE40 29AC8239 384FEA88");
- }).then(function() {
- return writeRedPillLine("0010 745F696E 2BBBE394 390E3940 248BEC23");
- }).then(function() {
- return writeRedPillLine("0020 7124696B 0000FF69 74652E6F FFFF1111");
- }).then(function() {
- return writeRedPillLine("----------------------------------------");
- }).then(function() {
- return writeRedPillLine("Failsafe initiated...");
- }).then(function() {
- return writeRedPillLine("Restarting BitNode-" + currentNodeNumber + "...");
- }).then(function() {
- return writeRedPillLine("...........");
- }).then(function() {
- return writeRedPillLine("...........");
- }).then(function() {
- return writeRedPillLine("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE");
- }).then(function() {
- return writeRedPillLine("..............................................")
- }).then(function() {
- return writeRedPillLine("..............................................")
- }).then(function() {
- return loadBitVerse(currentNodeNumber, flume);
- }).catch(function(e){
- console.log("ERROR: " + e.toString());
- });
-}
-
-//The bitNode name passed in will have a hyphen between number (e.g. BitNode-1)
-//This needs to be removed
-function giveSourceFile(bitNodeNumber) {
- var sourceFileKey = "SourceFile"+ bitNodeNumber.toString();
- var sourceFile = _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__["SourceFiles"][sourceFileKey];
- if (sourceFile == null) {
- console.log("ERROR: could not find source file for Bit node: " + bitNodeNumber);
- return;
- }
-
- //Check if player already has this source file
- var alreadyOwned = false;
- var ownedSourceFile = null;
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles[i].n === bitNodeNumber) {
- alreadyOwned = true;
- ownedSourceFile = _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles[i];
- break;
- }
- }
-
- if (alreadyOwned && ownedSourceFile) {
- if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("The Source-File for the BitNode you just destroyed, " + sourceFile.name + ", " +
- "is already at max level!");
- } else {
- ++ownedSourceFile.lvl;
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])(sourceFile.name + " was upgraded to level " + ownedSourceFile.lvl + " for " +
- "destroying its corresponding BitNode!");
- }
- } else {
- var playerSrcFile = new _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__["PlayerOwnedSourceFile"](bitNodeNumber, 1);
- _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles.push(playerSrcFile);
- if (bitNodeNumber === 5) { //Artificial Intelligence
- _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].intelligence = 1;
- }
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You received a Source-File for destroying a Bit Node!