mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 09:43:54 +01:00
7377 lines
3.8 MiB
7377 lines
3.8 MiB
/******/ (function(modules) { // webpackBootstrap
|
||
/******/ // install a JSONP callback for chunk loading
|
||
/******/ function webpackJsonpCallback(data) {
|
||
/******/ var chunkIds = data[0];
|
||
/******/ var moreModules = data[1];
|
||
/******/ var executeModules = data[2];
|
||
/******/
|
||
/******/ // add "moreModules" to the modules object,
|
||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||
/******/ var moduleId, chunkId, i = 0, resolves = [];
|
||
/******/ for(;i < chunkIds.length; i++) {
|
||
/******/ chunkId = chunkIds[i];
|
||
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||
/******/ resolves.push(installedChunks[chunkId][0]);
|
||
/******/ }
|
||
/******/ installedChunks[chunkId] = 0;
|
||
/******/ }
|
||
/******/ for(moduleId in moreModules) {
|
||
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
||
/******/ modules[moduleId] = moreModules[moduleId];
|
||
/******/ }
|
||
/******/ }
|
||
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
|
||
/******/
|
||
/******/ while(resolves.length) {
|
||
/******/ resolves.shift()();
|
||
/******/ }
|
||
/******/
|
||
/******/ // add entry modules from loaded chunk to deferred list
|
||
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
|
||
/******/
|
||
/******/ // run deferred modules when all chunks ready
|
||
/******/ return checkDeferredModules();
|
||
/******/ };
|
||
/******/ function checkDeferredModules() {
|
||
/******/ var result;
|
||
/******/ for(var i = 0; i < deferredModules.length; i++) {
|
||
/******/ var deferredModule = deferredModules[i];
|
||
/******/ var fulfilled = true;
|
||
/******/ for(var j = 1; j < deferredModule.length; j++) {
|
||
/******/ var depId = deferredModule[j];
|
||
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
|
||
/******/ }
|
||
/******/ if(fulfilled) {
|
||
/******/ deferredModules.splice(i--, 1);
|
||
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
|
||
/******/ }
|
||
/******/ }
|
||
/******/
|
||
/******/ return result;
|
||
/******/ }
|
||
/******/
|
||
/******/ // The module cache
|
||
/******/ var installedModules = {};
|
||
/******/
|
||
/******/ // object to store loaded and loading chunks
|
||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||
/******/ // Promise = chunk loading, 0 = chunk loaded
|
||
/******/ var installedChunks = {
|
||
/******/ 1: 0
|
||
/******/ };
|
||
/******/
|
||
/******/ var deferredModules = [];
|
||
/******/
|
||
/******/ // The require function
|
||
/******/ function __webpack_require__(moduleId) {
|
||
/******/
|
||
/******/ // Check if module is in cache
|
||
/******/ if(installedModules[moduleId]) {
|
||
/******/ return installedModules[moduleId].exports;
|
||
/******/ }
|
||
/******/ // Create a new module (and put it into the cache)
|
||
/******/ var module = installedModules[moduleId] = {
|
||
/******/ i: moduleId,
|
||
/******/ l: false,
|
||
/******/ exports: {}
|
||
/******/ };
|
||
/******/
|
||
/******/ // Execute the module function
|
||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||
/******/
|
||
/******/ // Flag the module as loaded
|
||
/******/ module.l = true;
|
||
/******/
|
||
/******/ // Return the exports of the module
|
||
/******/ return module.exports;
|
||
/******/ }
|
||
/******/
|
||
/******/
|
||
/******/ // expose the modules object (__webpack_modules__)
|
||
/******/ __webpack_require__.m = modules;
|
||
/******/
|
||
/******/ // expose the module cache
|
||
/******/ __webpack_require__.c = installedModules;
|
||
/******/
|
||
/******/ // define getter function for harmony exports
|
||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||
/******/ 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 ?
|
||
/******/ function getDefault() { return module['default']; } :
|
||
/******/ function getModuleExports() { return module; };
|
||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||
/******/ return getter;
|
||
/******/ };
|
||
/******/
|
||
/******/ // Object.prototype.hasOwnProperty.call
|
||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||
/******/
|
||
/******/ // __webpack_public_path__
|
||
/******/ __webpack_require__.p = "";
|
||
/******/
|
||
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
|
||
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
||
/******/ jsonpArray.push = webpackJsonpCallback;
|
||
/******/ jsonpArray = jsonpArray.slice();
|
||
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
|
||
/******/ var parentJsonpFunction = oldJsonpFunction;
|
||
/******/
|
||
/******/
|
||
/******/ // add entry module to deferred list
|
||
/******/ deferredModules.push([138,0]);
|
||
/******/ // run deferred modules when ready
|
||
/******/ return checkDeferredModules();
|
||
/******/ })
|
||
/************************************************************************/
|
||
/******/ ([
|
||
/* 0 */,
|
||
/* 1 */,
|
||
/* 2 */
|
||
/*!***********************!*\
|
||
!*** ./src/Player.js ***!
|
||
\***********************/
|
||
/*! exports provided: Player, loadPlayer */
|
||
/*! exports used: Player, loadPlayer */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Player; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadPlayer; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Corporation/Corporation */ 261);\n/* harmony import */ var _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/Player/PlayerObject */ 644);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Exploits/Exploit */ 223);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\nlet Player = new _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__[/* PlayerObject */ \"a\"]();\nfunction loadPlayer(saveString) {\n Player = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n Player.money = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.money);\n\n if (Player.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]) {\n Player.corporation.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.funds);\n Player.corporation.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.revenue);\n Player.corporation.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.expenses);\n\n for (var i = 0; i < Player.corporation.divisions.length; ++i) {\n var ind = Player.corporation.divisions[i];\n ind.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleRevenue);\n ind.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleExpenses);\n ind.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleRevenue);\n ind.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleExpenses);\n }\n }\n\n Player.exploits = Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* sanitizeExploits */ \"c\"])(Player.exploits);\n}\n\n//# sourceURL=webpack:///./src/Player.js?");
|
||
|
||
/***/ }),
|
||
/* 3 */
|
||
/*!*********************************!*\
|
||
!*** ./src/ui/numeralFormat.ts ***!
|
||
\*********************************/
|
||
/*! exports provided: numeralWrapper */
|
||
/*! exports used: numeralWrapper */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return numeralWrapper; });\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! numeral */ 121);\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! numeral/locales/bg */ 1098);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! numeral/locales/cs */ 1099);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/locales/da-dk */ 1100);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! numeral/locales/de */ 1101);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! numeral/locales/en-au */ 1102);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! numeral/locales/en-gb */ 1103);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/locales/es */ 1104);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! numeral/locales/fr */ 1105);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/locales/hu */ 1106);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/locales/it */ 1107);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/locales/lv */ 1108);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! numeral/locales/no */ 1109);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/locales/pl */ 1110);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! numeral/locales/ru */ 1111);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable class-methods-use-this */\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\n\nclass NumeralFormatter {\n // Default Locale\n constructor() {\n _defineProperty(this, \"defaultLocale\", \"en\");\n\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l) {\n if (numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(this.defaultLocale);\n return false;\n }\n\n return true;\n }\n\n format(n, format) {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n\n const answer = numeral__WEBPACK_IMPORTED_MODULE_0___default()(n).format(format);\n\n if (answer === \"NaN\") {\n return `${n}`;\n }\n\n return answer;\n }\n\n formatBigNumber(n) {\n return this.format(n, \"0.000a\");\n } // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n\n\n formatReallyBigNumber(n, decimalPlaces = 3) {\n if (n === Infinity) return \"∞\";\n\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < n && n <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n\n if (Math.abs(n) < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n) {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n) {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n) {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n) {\n return this.format(n, \"0,0\");\n }\n\n formatRAM(n) {\n return this.format(n, \"0.00\") + \"GB\";\n }\n\n formatPercentage(n, decimalPlaces = 2) {\n const formatter = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n) {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n) {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n) {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n) {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n) {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n) {\n return this.format(n, \"0,0\");\n }\n\n parseMoney(s) {\n // numeral library does not handle formats like 1e10 well (returns 110),\n // so if both return a valid number, return the biggest one\n const numeralValue = numeral__WEBPACK_IMPORTED_MODULE_0___default()(s).value();\n const parsed = parseFloat(s);\n\n if (isNaN(parsed) && numeralValue === null) {\n return NaN;\n } else if (isNaN(parsed)) {\n return numeralValue;\n } else if (numeralValue === null) {\n return parsed;\n } else {\n return Math.max(numeralValue, parsed);\n }\n }\n\n}\n\nconst numeralWrapper = new NumeralFormatter();\n\n//# sourceURL=webpack:///./src/ui/numeralFormat.ts?");
|
||
|
||
/***/ }),
|
||
/* 4 */,
|
||
/* 5 */
|
||
/*!**************************!*\
|
||
!*** ./src/Constants.ts ***!
|
||
\**************************/
|
||
/*! exports provided: CONSTANTS */
|
||
/*! exports used: CONSTANTS */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CONSTANTS; });\n/**\n * Generic Game Constants\n *\n * Constants for specific mechanics or features will NOT be here.\n */\nconst CONSTANTS = {\n Version: \"0.53.0\",\n // Speed (in ms) at which the main loop is updated\n _idleSpeed: 200,\n\n /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience\n * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then\n * the player will have this level assuming no multipliers. Multipliers can cause skills to go above this.\n */\n MaxSkillLevel: 975,\n // Milliseconds per game cycle\n MilliPerCycle: 200,\n // How much reputation is needed to join a megacorporation's faction\n CorpFactionRepRequirement: 200e3,\n // Base RAM costs\n BaseCostFor1GBOfRamHome: 32000,\n BaseCostFor1GBOfRamServer: 55000,\n //1 GB of RAM\n // Cost to travel to another city\n TravelCost: 200e3,\n // Faction and Company favor-related things\n BaseFavorToDonate: 150,\n DonateMoneyToRepDivisor: 1e6,\n FactionReputationToFavorBase: 500,\n FactionReputationToFavorMult: 1.02,\n CompanyReputationToFavorBase: 500,\n CompanyReputationToFavorMult: 1.02,\n // NeuroFlux Governor Augmentation cost multiplier\n NeuroFluxGovernorLevelMult: 1.14,\n NumNetscriptPorts: 20,\n // Server-related constants\n HomeComputerMaxRam: 1073741824,\n // 2 ^ 30\n ServerBaseGrowthRate: 1.03,\n // Unadjusted Growth rate\n ServerMaxGrowthRate: 1.0035,\n // Maximum possible growth rate (max rate accounting for server security)\n ServerFortifyAmount: 0.002,\n // Amount by which server's security increases when its hacked/grown\n ServerWeakenAmount: 0.05,\n // Amount by which server's security decreases when weakened\n PurchasedServerLimit: 25,\n PurchasedServerMaxRam: 1048576,\n // 2^20\n // Augmentation Constants\n MultipleAugMultiplier: 1.9,\n // TOR Router\n TorRouterCost: 200e3,\n // Infiltration\n InfiltrationBribeBaseAmount: 100e3,\n //Amount per clearance level\n InfiltrationMoneyValue: 5e3,\n //Convert \"secret\" value to money\n InfiltrationRepValue: 1.4,\n //Convert \"secret\" value to faction reputation\n InfiltrationExpPow: 0.8,\n // Stock market\n WSEAccountCost: 200e6,\n TIXAPICost: 5e9,\n MarketData4SCost: 1e9,\n MarketDataTixApi4SCost: 25e9,\n StockMarketCommission: 100e3,\n // Hospital/Health\n HospitalCostPerHp: 100e3,\n // Intelligence-related constants\n IntelligenceCrimeWeight: 0.025,\n // Weight for how much int affects crime success rates\n IntelligenceInfiltrationWeight: 0.1,\n // Weight for how much int affects infiltration success rates\n IntelligenceCrimeBaseExpGain: 0.05,\n IntelligenceProgramBaseExpGain: 2.5,\n // Program required hack level divided by this to determine int exp gain\n IntelligenceTerminalHackBaseExpGain: 200,\n // Hacking exp divided by this to determine int exp gain\n IntelligenceSingFnBaseExpGain: 1.5,\n IntelligenceClassBaseExpGain: 0.01,\n IntelligenceHackingMissionBaseExpGain: 3,\n // Hacking Mission difficulty multiplied by this to get exp gain\n // Hacking Missions\n // TODO Move this into Hacking Mission implementation\n HackingMissionRepToDiffConversion: 10000,\n // Faction rep is divided by this to get mission difficulty\n HackingMissionRepToRewardConversion: 7,\n // Faction rep divided byt his to get mission rep reward\n HackingMissionSpamTimeIncrease: 25000,\n // How much time limit increase is gained when conquering a Spam Node (ms)\n HackingMissionTransferAttackIncrease: 1.05,\n // Multiplier by which the attack for all Core Nodes is increased when conquering a Transfer Node\n HackingMissionMiscDefenseIncrease: 1.05,\n // The amount by which every misc node's defense is multiplied when one is conquered\n HackingMissionDifficultyToHacking: 135,\n // Difficulty is multiplied by this to determine enemy's \"hacking\" level (to determine effects of scan/attack, etc)\n HackingMissionHowToPlay: \"Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>\" + \"In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes \" + \"are colored blue, while the enemy's are red. There are also other nodes on the map colored gray \" + \"that initially belong to neither you nor the enemy. The goal of the game is \" + \"to capture all of the enemy's Database nodes within the time limit. \" + \"If you fail to do this, you will lose.<br><br>\" + \"Each Node has three stats: Attack, Defense, and HP. There are five different actions that \" + \"a Node can take:<br><br> \" + \"Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's \" + \"hacking level, and the enemy's defense.<br><br>\" + \"Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the \" + \"enemy's defense.<br><br>\" + \"Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's \" + \"defense.<br><br>\" + \"Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>\" + \"Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>\" + \"Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the \" + \"Attack/Defense of the individual Node that is performing the action.<br><br>\" + \"To capture a Node, you must lower its HP down to 0.<br><br>\" + \"There are six different types of Nodes:<br><br>\" + \"CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>\" + \"Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>\" + \"Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within \" + \"the time limit. These Nodes cannot perform any actions<br><br>\" + \"Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete \" + \"the mission. These Nodes cannot perform any actions<br><br>\" + \"Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. \" + \"These Nodes are capable of performing every action except the 'Attack' action<br><br>\" + \"Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>\" + \"To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking \" + \"a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes \" + \"that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, \" + \"select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard \" + \"shortcut.<br><br>\" + \"For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target \" + \"another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target \" + \"any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes \" + \"can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents \" + \"the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, \" + \"or press 'd'.<br><br>\" + \"Other Notes:<br><br>\" + \"-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that \" + \"are not actively being targeted will increase by a fixed percentage.<br><br>\" + \"-Whenever a Node is conquered, its stats are significantly reduced<br><br>\" + \"-Miscellaneous Nodes slowly raise their defense over time<br><br>\" + \"-Nodes slowly regenerate health over time.\",\n // Time-related constants\n MillisecondsPer20Hours: 72000000,\n GameCyclesPer20Hours: 72000000 / 200,\n MillisecondsPer10Hours: 36000000,\n GameCyclesPer10Hours: 36000000 / 200,\n MillisecondsPer8Hours: 28800000,\n GameCyclesPer8Hours: 28800000 / 200,\n MillisecondsPer4Hours: 14400000,\n GameCyclesPer4Hours: 14400000 / 200,\n MillisecondsPer2Hours: 7200000,\n GameCyclesPer2Hours: 7200000 / 200,\n MillisecondsPerHour: 3600000,\n GameCyclesPerHour: 3600000 / 200,\n MillisecondsPerHalfHour: 1800000,\n GameCyclesPerHalfHour: 1800000 / 200,\n MillisecondsPerQuarterHour: 900000,\n GameCyclesPerQuarterHour: 900000 / 200,\n MillisecondsPerFiveMinutes: 300000,\n GameCyclesPerFiveMinutes: 300000 / 200,\n // Player Work & Action\n FactionWorkHacking: \"Faction Hacking Work\",\n FactionWorkField: \"Faction Field Work\",\n FactionWorkSecurity: \"Faction Security Work\",\n WorkTypeCompany: \"Working for Company\",\n WorkTypeCompanyPartTime: \"Working for Company part-time\",\n WorkTypeFaction: \"Working for Faction\",\n WorkTypeCreateProgram: \"Working on Create a Program\",\n WorkTypeStudyClass: \"Studying or Taking a class at university\",\n WorkTypeCrime: \"Committing a crime\",\n ClassStudyComputerScience: \"studying Computer Science\",\n ClassDataStructures: \"taking a Data Structures course\",\n ClassNetworks: \"taking a Networks course\",\n ClassAlgorithms: \"taking an Algorithms course\",\n ClassManagement: \"taking a Management course\",\n ClassLeadership: \"taking a Leadership course\",\n ClassGymStrength: \"training your strength at a gym\",\n ClassGymDefense: \"training your defense at a gym\",\n ClassGymDexterity: \"training your dexterity at a gym\",\n ClassGymAgility: \"training your agility at a gym\",\n ClassDataStructuresBaseCost: 40,\n ClassNetworksBaseCost: 80,\n ClassAlgorithmsBaseCost: 320,\n ClassManagementBaseCost: 160,\n ClassLeadershipBaseCost: 320,\n ClassGymBaseCost: 120,\n ClassStudyComputerScienceBaseExp: 0.5,\n ClassDataStructuresBaseExp: 1,\n ClassNetworksBaseExp: 2,\n ClassAlgorithmsBaseExp: 4,\n ClassManagementBaseExp: 2,\n ClassLeadershipBaseExp: 4,\n CrimeShoplift: \"shoplift\",\n CrimeRobStore: \"rob a store\",\n CrimeMug: \"mug someone\",\n CrimeLarceny: \"commit larceny\",\n CrimeDrugs: \"deal drugs\",\n CrimeBondForgery: \"forge corporate bonds\",\n CrimeTraffickArms: \"traffick illegal arms\",\n CrimeHomicide: \"commit homicide\",\n CrimeGrandTheftAuto: \"commit grand theft auto\",\n CrimeKidnap: \"kidnap someone for ransom\",\n CrimeAssassination: \"assassinate a high-profile target\",\n CrimeHeist: \"pull off the ultimate heist\",\n // Coding Contract\n // TODO: Move this into Coding contract implementation?\n CodingContractBaseFactionRepGain: 2500,\n CodingContractBaseCompanyRepGain: 4000,\n CodingContractBaseMoneyGain: 75e6,\n // BitNode/Source-File related stuff\n TotalNumBitNodes: 24,\n LatestUpdate: `\n v0.53.0 - 2021-09-09 Way too many things. (hydroflame & community)\n -------------------------------------------\n\n ** Dev? **\n\n * The entire codebase has been run through a code prettifier, hurray for consistency. (@threehams)\n * Lots of test. (@threehams)\n * Massive improvements to build speed. (@threehams)\n * Dev notes: This won't affect any players but is immensely useful for me.\n\n ** Hacknet **\n\n * Converted to ts/react\n\n ** Resleeving **\n\n * Converted to ts/react\n\n ** Sleeves **\n\n * Converted to ts/react. The ui should also have a better feel.\n * Fixed a bug that allowed players to recover shock much faster than intended.\n\n ** BN10 **\n\n * You have access to Sleeves right away\n * In BN10 Sleeves start with 75 shock and 25 sync.\n\n ** MathJax **\n\n * Several tooltips have been updated to display the relevant formula in Mathjax, e.g. Favor and reputation\n\n ** Corporation ** \n\n * Completely rewritten in React. Paving the way for bigger change.\n * Smart Supply is now smarter and won't deadlock the warehouse. It is also more configurable.\n * Several UI fixes.\n\n ** Bladeburner ** \n\n * Action count is no longer decided when joining the Bladeburners. Experiences for all players should be more similar.\n\n ** Factions ** \n\n * No factions have home computer ram requirement. This caused some confusion for new players.\n\n ** Gang ** \n\n * Made it clear when there's a new equipment coming up.\n\n ** Netscript **\n\n * getActionCountRemaining now returns Infinity for bladeburner general actions. (@brubsy)\n * getActionEstimatedSuccessChance now returns 100% for Diplomacy and Hyperbolic Regeneration Chamber. (@brubsy)\n * disableLog('ALL') now disables all logs individually, meaning you can re-enable the ones you want after. (@Cass)\n * getPlayer returns numPeopleKilled.\n * Dynamic RAM calculation errors have a better error message.\n * Hide some functions from autocomplete.\n * Added getAugmentationPrice, getAugmentationRepReq, deprecated getAugmentationCost. (@TempFound)\n * Fixed bug where some crime API would return \"assassinate\" when that's not accepted in other functions.\n\n ** Coding Contract **\n\n * Spiralize Matrix is easier to read.\n\n ** Misc. **\n\n * The world map is now used in sleeve travel and bladeburner travel.\n * noselect a bunch of stuff.\n * Ascii maps letters are more contrasting\n * Updated documentation for infiltration.\n * Most money costs in the game will turn grey/cyan when you don't have enough money.\n * Donation textbox has better look & feel.\n * Tech vendors ram & cores buttons have better look and feels.\n * cores cost modified to be a formula instead of a semi-random array of numbers.\n * Tech vendors now give a hint about where to get bigger servers.\n * logboxes now displays whitespaces exactly. (@Cass)\n * nerf noodle bar\n`\n /*\n */\n\n};\n\n//# sourceURL=webpack:///./src/Constants.ts?");
|
||
|
||
/***/ }),
|
||
/* 6 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/Augmentation/data/AugmentationNames.ts ***!
|
||
\****************************************************/
|
||
/*! exports provided: AugmentationNames */
|
||
/*! exports used: AugmentationNames */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationNames; });\nconst AugmentationNames = {\n Targeting1: \"Augmented Targeting I\",\n Targeting2: \"Augmented Targeting II\",\n Targeting3: \"Augmented Targeting III\",\n SyntheticHeart: \"Synthetic Heart\",\n SynfibrilMuscle: \"Synfibril Muscle\",\n CombatRib1: \"Combat Rib I\",\n CombatRib2: \"Combat Rib II\",\n CombatRib3: \"Combat Rib III\",\n NanofiberWeave: \"Nanofiber Weave\",\n SubdermalArmor: \"NEMEAN Subdermal Weave\",\n WiredReflexes: \"Wired Reflexes\",\n GrapheneBoneLacings: \"Graphene Bone Lacings\",\n BionicSpine: \"Bionic Spine\",\n GrapheneBionicSpine: \"Graphene Bionic Spine Upgrade\",\n BionicLegs: \"Bionic Legs\",\n GrapheneBionicLegs: \"Graphene Bionic Legs Upgrade\",\n SpeechProcessor: \"Speech Processor Implant\",\n TITN41Injection: \"TITN-41 Gene-Modification Injection\",\n EnhancedSocialInteractionImplant: \"Enhanced Social Interaction Implant\",\n BitWire: \"BitWire\",\n ArtificialBioNeuralNetwork: \"Artificial Bio-neural Network Implant\",\n ArtificialSynapticPotentiation: \"Artificial Synaptic Potentiation\",\n EnhancedMyelinSheathing: \"Enhanced Myelin Sheathing\",\n SynapticEnhancement: \"Synaptic Enhancement Implant\",\n NeuralRetentionEnhancement: \"Neural-Retention Enhancement\",\n DataJack: \"DataJack\",\n ENM: \"Embedded Netburner Module\",\n ENMCore: \"Embedded Netburner Module Core Implant\",\n ENMCoreV2: \"Embedded Netburner Module Core V2 Upgrade\",\n ENMCoreV3: \"Embedded Netburner Module Core V3 Upgrade\",\n ENMAnalyzeEngine: \"Embedded Netburner Module Analyze Engine\",\n ENMDMA: \"Embedded Netburner Module Direct Memory Access Upgrade\",\n Neuralstimulator: \"Neuralstimulator\",\n NeuralAccelerator: \"Neural Accelerator\",\n CranialSignalProcessorsG1: \"Cranial Signal Processors - Gen I\",\n CranialSignalProcessorsG2: \"Cranial Signal Processors - Gen II\",\n CranialSignalProcessorsG3: \"Cranial Signal Processors - Gen III\",\n CranialSignalProcessorsG4: \"Cranial Signal Processors - Gen IV\",\n CranialSignalProcessorsG5: \"Cranial Signal Processors - Gen V\",\n NeuronalDensification: \"Neuronal Densification\",\n NuoptimalInjectorImplant: \"Nuoptimal Nootropic Injector Implant\",\n SpeechEnhancement: \"Speech Enhancement\",\n FocusWire: \"FocusWire\",\n PCDNI: \"PC Direct-Neural Interface\",\n PCDNIOptimizer: \"PC Direct-Neural Interface Optimization Submodule\",\n PCDNINeuralNetwork: \"PC Direct-Neural Interface NeuroNet Injector\",\n PCMatrix: \"PCMatrix\",\n ADRPheromone1: \"ADR-V1 Pheromone Gene\",\n ADRPheromone2: \"ADR-V2 Pheromone Gene\",\n ShadowsSimulacrum: \"The Shadow's Simulacrum\",\n HacknetNodeCPUUpload: \"Hacknet Node CPU Architecture Neural-Upload\",\n HacknetNodeCacheUpload: \"Hacknet Node Cache Architecture Neural-Upload\",\n HacknetNodeNICUpload: \"Hacknet Node NIC Architecture Neural-Upload\",\n HacknetNodeKernelDNI: \"Hacknet Node Kernel Direct-Neural Interface\",\n HacknetNodeCoreDNI: \"Hacknet Node Core Direct-Neural Interface\",\n NeuroFluxGovernor: \"NeuroFlux Governor\",\n Neurotrainer1: \"Neurotrainer I\",\n Neurotrainer2: \"Neurotrainer II\",\n Neurotrainer3: \"Neurotrainer III\",\n Hypersight: \"HyperSight Corneal Implant\",\n LuminCloaking1: \"LuminCloaking-V1 Skin Implant\",\n LuminCloaking2: \"LuminCloaking-V2 Skin Implant\",\n HemoRecirculator: \"HemoRecirculator\",\n SmartSonar: \"SmartSonar Implant\",\n PowerRecirculator: \"Power Recirculation Core\",\n QLink: \"QLink\",\n TheRedPill: \"The Red Pill\",\n SPTN97: \"SPTN-97 Gene Modification\",\n HiveMind: \"ECorp HVMind Implant\",\n CordiARCReactor: \"CordiARC Fusion Reactor\",\n SmartJaw: \"SmartJaw\",\n Neotra: \"Neotra\",\n Xanipher: \"Xanipher\",\n nextSENS: \"nextSENS Gene Modification\",\n OmniTekInfoLoad: \"OmniTek InfoLoad\",\n PhotosyntheticCells: \"Photosynthetic Cells\",\n Neurolink: \"BitRunners Neurolink\",\n TheBlackHand: \"The Black Hand\",\n UnstableCircadianModulator: \"Unstable Circadian Modulator\",\n CRTX42AA: \"CRTX42-AA Gene Modification\",\n Neuregen: \"Neuregen Gene Modification\",\n CashRoot: \"CashRoot Starter Kit\",\n NutriGen: \"NutriGen Implant\",\n INFRARet: \"INFRARET Enhancement\",\n DermaForce: \"DermaForce Particle Barrier\",\n GrapheneBrachiBlades: \"Graphene BranchiBlades Upgrade\",\n GrapheneBionicArms: \"Graphene Bionic Arms Upgrade\",\n BrachiBlades: \"BrachiBlades\",\n BionicArms: \"Bionic Arms\",\n SNA: \"Social Negotiation Assistant (S.N.A)\",\n HydroflameLeftArm: \"Hydroflame Left Arm\",\n EsperEyewear: \"EsperTech Bladeburner Eyewear\",\n EMS4Recombination: \"EMS-4 Recombination\",\n OrionShoulder: \"ORION-MKIV Shoulder\",\n HyperionV1: \"Hyperion Plasma Cannon V1\",\n HyperionV2: \"Hyperion Plasma Cannon V2\",\n GolemSerum: \"GOLEM Serum\",\n VangelisVirus: \"Vangelis Virus\",\n VangelisVirus3: \"Vangelis Virus 3.0\",\n INTERLINKED: \"I.N.T.E.R.L.I.N.K.E.D\",\n BladeRunner: \"Blade's Runners\",\n BladeArmor: \"BLADE-51b Tesla Armor\",\n BladeArmorPowerCells: \"BLADE-51b Tesla Armor: Power Cells Upgrade\",\n BladeArmorEnergyShielding: \"BLADE-51b Tesla Armor: Energy Shielding Upgrade\",\n BladeArmorUnibeam: \"BLADE-51b Tesla Armor: Unibeam Upgrade\",\n BladeArmorOmnibeam: \"BLADE-51b Tesla Armor: Omnibeam Upgrade\",\n BladeArmorIPU: \"BLADE-51b Tesla Armor: IPU Upgrade\",\n BladesSimulacrum: \"The Blade's Simulacrum\" //Wasteland Augs\n //PepBoy: \"P.E.P-Boy\", Plasma Energy Projection System\n //PepBoyForceField Generates plasma force fields\n //PepBoyBlasts Generate high density plasma concussive blasts\n //PepBoyDataStorage STore more data on pep boy,\n\n};\n\n//# sourceURL=webpack:///./src/Augmentation/data/AugmentationNames.ts?");
|
||
|
||
/***/ }),
|
||
/* 7 */,
|
||
/* 8 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/BitNode/BitNodeMultipliers.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: BitNodeMultipliers */
|
||
/*! exports used: BitNodeMultipliers */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitNodeMultipliers; });\n/**\n * Bitnode multipliers influence the difficulty of different aspects of the game.\n * Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the\n * player toward the intended strategy. Unless they really want to play the long, slow game of waiting...\n */\n\n/**\n * The multipliers that are influenced by current Bitnode progression.\n */\n// tslint:disable-next-line:variable-name\nconst BitNodeMultipliers = {\n HackingLevelMultiplier: 1,\n StrengthLevelMultiplier: 1,\n DefenseLevelMultiplier: 1,\n DexterityLevelMultiplier: 1,\n AgilityLevelMultiplier: 1,\n CharismaLevelMultiplier: 1,\n ServerGrowthRate: 1,\n ServerMaxMoney: 1,\n ServerStartingMoney: 1,\n ServerStartingSecurity: 1,\n ServerWeakenRate: 1,\n HomeComputerRamCost: 1,\n PurchasedServerCost: 1,\n PurchasedServerLimit: 1,\n PurchasedServerMaxRam: 1,\n CompanyWorkMoney: 1,\n CrimeMoney: 1,\n HacknetNodeMoney: 1,\n ManualHackMoney: 1,\n ScriptHackMoney: 1,\n ScriptHackMoneyGain: 1,\n CodingContractMoney: 1,\n ClassGymExpGain: 1,\n CompanyWorkExpGain: 1,\n CrimeExpGain: 1,\n FactionWorkExpGain: 1,\n HackExpGain: 1,\n FactionPassiveRepGain: 1,\n FactionWorkRepGain: 1,\n RepToDonateToFaction: 1,\n AugmentationMoneyCost: 1,\n AugmentationRepCost: 1,\n InfiltrationMoney: 1,\n InfiltrationRep: 1,\n FourSigmaMarketDataCost: 1,\n FourSigmaMarketDataApiCost: 1,\n CorporationValuation: 1,\n BladeburnerRank: 1,\n BladeburnerSkillCost: 1,\n DaedalusAugsRequirement: 1,\n GangKarmaRequirement: 1\n};\n\n//# sourceURL=webpack:///./src/BitNode/BitNodeMultipliers.ts?");
|
||
|
||
/***/ }),
|
||
/* 9 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Locations/data/LocationNames.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: LocationName */
|
||
/*! exports used: LocationName */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationName; });\n/**\n * Names of all locations\n */\nlet LocationName;\n\n(function (LocationName) {\n LocationName[\"Aevum\"] = \"Aevum\";\n LocationName[\"Chongqing\"] = \"Chongqing\";\n LocationName[\"Ishima\"] = \"Ishima\";\n LocationName[\"NewTokyo\"] = \"New Tokyo\";\n LocationName[\"Sector12\"] = \"Sector-12\";\n LocationName[\"Volhaven\"] = \"Volhaven\";\n LocationName[\"AevumAeroCorp\"] = \"AeroCorp\";\n LocationName[\"AevumBachmanAndAssociates\"] = \"Bachman & Associates\";\n LocationName[\"AevumClarkeIncorporated\"] = \"Clarke Incorporated\";\n LocationName[\"AevumCrushFitnessGym\"] = \"Crush Fitness Gym\";\n LocationName[\"AevumECorp\"] = \"ECorp\";\n LocationName[\"AevumFulcrumTechnologies\"] = \"Fulcrum Technologies\";\n LocationName[\"AevumGalacticCybersystems\"] = \"Galactic Cybersystems\";\n LocationName[\"AevumNetLinkTechnologies\"] = \"NetLink Technologies\";\n LocationName[\"AevumPolice\"] = \"Aevum Police Headquarters\";\n LocationName[\"AevumRhoConstruction\"] = \"Rho Construction\";\n LocationName[\"AevumSnapFitnessGym\"] = \"Snap Fitness Gym\";\n LocationName[\"AevumSummitUniversity\"] = \"Summit University\";\n LocationName[\"AevumWatchdogSecurity\"] = \"Watchdog Security\";\n LocationName[\"AevumCasino\"] = \"Iker Molina Casino\";\n LocationName[\"ChongqingKuaiGongInternational\"] = \"KuaiGong International\";\n LocationName[\"ChongqingSolarisSpaceSystems\"] = \"Solaris Space Systems\";\n LocationName[\"Sector12AlphaEnterprises\"] = \"Alpha Enterprises\";\n LocationName[\"Sector12BladeIndustries\"] = \"Blade Industries\";\n LocationName[\"Sector12CIA\"] = \"Central Intelligence Agency\";\n LocationName[\"Sector12CarmichaelSecurity\"] = \"Carmichael Security\";\n LocationName[\"Sector12CityHall\"] = \"Sector-12 City Hall\";\n LocationName[\"Sector12DeltaOne\"] = \"DeltaOne\";\n LocationName[\"Sector12FoodNStuff\"] = \"FoodNStuff\";\n LocationName[\"Sector12FourSigma\"] = \"Four Sigma\";\n LocationName[\"Sector12IcarusMicrosystems\"] = \"Icarus Microsystems\";\n LocationName[\"Sector12IronGym\"] = \"Iron Gym\";\n LocationName[\"Sector12JoesGuns\"] = \"Joe's Guns\";\n LocationName[\"Sector12MegaCorp\"] = \"MegaCorp\";\n LocationName[\"Sector12NSA\"] = \"National Security Agency\";\n LocationName[\"Sector12PowerhouseGym\"] = \"Powerhouse Gym\";\n LocationName[\"Sector12RothmanUniversity\"] = \"Rothman University\";\n LocationName[\"Sector12UniversalEnergy\"] = \"Universal Energy\";\n LocationName[\"NewTokyoDefComm\"] = \"DefComm\";\n LocationName[\"NewTokyoGlobalPharmaceuticals\"] = \"Global Pharmaceuticals\";\n LocationName[\"NewTokyoNoodleBar\"] = \"Noodle Bar\";\n LocationName[\"NewTokyoVitaLife\"] = \"VitaLife\";\n LocationName[\"IshimaNovaMedical\"] = \"Nova Medical\";\n LocationName[\"IshimaOmegaSoftware\"] = \"Omega Software\";\n LocationName[\"IshimaStormTechnologies\"] = \"Storm Technologies\";\n LocationName[\"VolhavenCompuTek\"] = \"CompuTek\";\n LocationName[\"VolhavenHeliosLabs\"] = \"Helios Labs\";\n LocationName[\"VolhavenLexoCorp\"] = \"LexoCorp\";\n LocationName[\"VolhavenMilleniumFitnessGym\"] = \"Millenium Fitness Gym\";\n LocationName[\"VolhavenNWO\"] = \"NWO\";\n LocationName[\"VolhavenOmniTekIncorporated\"] = \"OmniTek Incorporated\";\n LocationName[\"VolhavenOmniaCybersystems\"] = \"Omnia Cybersystems\";\n LocationName[\"VolhavenSysCoreSecurities\"] = \"SysCore Securities\";\n LocationName[\"VolhavenZBInstituteOfTechnology\"] = \"ZB Institute of Technology\";\n LocationName[\"Hospital\"] = \"Hospital\";\n LocationName[\"Slums\"] = \"The Slums\";\n LocationName[\"TravelAgency\"] = \"Travel Agency\";\n LocationName[\"WorldStockExchange\"] = \"World Stock Exchange\";\n LocationName[\"Void\"] = \"The Void\";\n})(LocationName || (LocationName = {}));\n\n//# sourceURL=webpack:///./src/Locations/data/LocationNames.ts?");
|
||
|
||
/***/ }),
|
||
/* 10 */
|
||
/*!*****************************!*\
|
||
!*** ./utils/DialogBox.tsx ***!
|
||
\*****************************/
|
||
/*! exports provided: dialogBoxCreate */
|
||
/*! exports used: dialogBoxCreate */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return dialogBoxCreate; });\n/* harmony import */ var _src_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/ui/React/createPopup */ 19);\n/* harmony import */ var _helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers/getRandomInt */ 18);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\nfunction MessagePopup(props) {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_2___default.a.Fragment, null, props.content);\n}\n\nfunction dialogBoxCreate(txt, preformatted = false) {\n const popupId = `popup-` + Array.from(Array(16)).map(() => `${Object(_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(0, 9)}`).join(\"\");\n\n if (typeof txt === \"string\") {\n if (preformatted) {\n // For text files as they are often computed data that\n // shouldn't be wrapped and should retain tabstops.\n Object(_src_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_0__[/* createPopup */ \"a\"])(popupId, MessagePopup, {\n content: react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(\"pre\", {\n dangerouslySetInnerHTML: {\n __html: txt\n }\n })\n });\n } else {\n Object(_src_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_0__[/* createPopup */ \"a\"])(popupId, MessagePopup, {\n content: react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(\"p\", {\n dangerouslySetInnerHTML: {\n __html: txt.replace(/(?:\\r\\n|\\r|\\n)/g, \"<br />\")\n }\n })\n });\n }\n } else {\n Object(_src_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_0__[/* createPopup */ \"a\"])(popupId, MessagePopup, {\n content: txt\n });\n }\n}\n\n//# sourceURL=webpack:///./utils/DialogBox.tsx?");
|
||
|
||
/***/ }),
|
||
/* 11 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Netscript/RamCostGenerator.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: RamCostConstants, RamCosts, getRamCost */
|
||
/*! exports used: RamCostConstants, RamCosts, getRamCost */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RamCostConstants; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return RamCosts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getRamCost; });\n// TODO remember to update RamCalculations.js and WorkerScript.js\n// RAM costs for Netscript functions\nconst RamCostConstants = {\n ScriptBaseRamCost: 1.6,\n ScriptDomRamCost: 25,\n ScriptHackRamCost: 0.1,\n ScriptHackAnalyzeRamCost: 1,\n ScriptGrowRamCost: 0.15,\n ScriptGrowthAnalyzeRamCost: 1,\n ScriptWeakenRamCost: 0.15,\n ScriptScanRamCost: 0.2,\n ScriptPortProgramRamCost: 0.05,\n ScriptRunRamCost: 1.0,\n ScriptExecRamCost: 1.3,\n ScriptSpawnRamCost: 2.0,\n ScriptScpRamCost: 0.6,\n ScriptKillRamCost: 0.5,\n ScriptHasRootAccessRamCost: 0.05,\n ScriptGetHostnameRamCost: 0.05,\n ScriptGetHackingLevelRamCost: 0.05,\n ScriptGetMultipliersRamCost: 4.0,\n ScriptGetServerRamCost: 0.1,\n ScriptGetServerMaxRam: 0.05,\n ScriptGetServerUsedRam: 0.05,\n ScriptFileExistsRamCost: 0.1,\n ScriptIsRunningRamCost: 0.1,\n ScriptHacknetNodesRamCost: 4.0,\n ScriptHNUpgLevelRamCost: 0.4,\n ScriptHNUpgRamRamCost: 0.6,\n ScriptHNUpgCoreRamCost: 0.8,\n ScriptGetStockRamCost: 2.0,\n ScriptBuySellStockRamCost: 2.5,\n ScriptGetPurchaseServerRamCost: 0.25,\n ScriptPurchaseServerRamCost: 2.25,\n ScriptGetPurchasedServerLimit: 0.05,\n ScriptGetPurchasedServerMaxRam: 0.05,\n ScriptRoundRamCost: 0.05,\n ScriptReadWriteRamCost: 1.0,\n ScriptArbScriptRamCost: 1.0,\n ScriptGetScriptRamCost: 0.1,\n ScriptGetRunningScriptRamCost: 0.3,\n ScriptGetHackTimeRamCost: 0.05,\n ScriptGetFavorToDonate: 0.1,\n ScriptCodingContractBaseRamCost: 10,\n ScriptSleeveBaseRamCost: 4,\n ScriptSingularityFn1RamCost: 2,\n ScriptSingularityFn2RamCost: 3,\n ScriptSingularityFn3RamCost: 5,\n ScriptGangApiBaseRamCost: 4,\n ScriptBladeburnerApiBaseRamCost: 4\n};\nconst RamCosts = {\n hacknet: {\n numNodes: () => 0,\n purchaseNode: () => 0,\n getPurchaseNodeCost: () => 0,\n getNodeStats: () => 0,\n upgradeLevel: () => 0,\n upgradeRam: () => 0,\n upgradeCore: () => 0,\n upgradeCache: () => 0,\n getLevelUpgradeCost: () => 0,\n getRamUpgradeCost: () => 0,\n getCoreUpgradeCost: () => 0,\n getCacheUpgradeCost: () => 0,\n numHashes: () => 0,\n hashCost: () => 0,\n spendHashes: () => 0\n },\n sprintf: () => 0,\n vsprintf: () => 0,\n scan: () => RamCostConstants.ScriptScanRamCost,\n hack: () => RamCostConstants.ScriptHackRamCost,\n hackAnalyzeThreads: () => RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzePercent: () => RamCostConstants.ScriptHackAnalyzeRamCost,\n hackChance: () => RamCostConstants.ScriptHackAnalyzeRamCost,\n sleep: () => 0,\n grow: () => RamCostConstants.ScriptGrowRamCost,\n growthAnalyze: () => RamCostConstants.ScriptGrowthAnalyzeRamCost,\n weaken: () => RamCostConstants.ScriptWeakenRamCost,\n print: () => 0,\n tprint: () => 0,\n clearLog: () => 0,\n disableLog: () => 0,\n enableLog: () => 0,\n isLogEnabled: () => 0,\n getScriptLogs: () => 0,\n nuke: () => RamCostConstants.ScriptPortProgramRamCost,\n brutessh: () => RamCostConstants.ScriptPortProgramRamCost,\n ftpcrack: () => RamCostConstants.ScriptPortProgramRamCost,\n relaysmtp: () => RamCostConstants.ScriptPortProgramRamCost,\n httpworm: () => RamCostConstants.ScriptPortProgramRamCost,\n sqlinject: () => RamCostConstants.ScriptPortProgramRamCost,\n run: () => RamCostConstants.ScriptRunRamCost,\n exec: () => RamCostConstants.ScriptExecRamCost,\n spawn: () => RamCostConstants.ScriptSpawnRamCost,\n kill: () => RamCostConstants.ScriptKillRamCost,\n killall: () => RamCostConstants.ScriptKillRamCost,\n exit: () => 0,\n scp: () => RamCostConstants.ScriptScpRamCost,\n ls: () => RamCostConstants.ScriptScanRamCost,\n ps: () => RamCostConstants.ScriptScanRamCost,\n hasRootAccess: () => RamCostConstants.ScriptHasRootAccessRamCost,\n getIp: () => RamCostConstants.ScriptGetHostnameRamCost,\n getHostname: () => RamCostConstants.ScriptGetHostnameRamCost,\n getHackingLevel: () => RamCostConstants.ScriptGetHackingLevelRamCost,\n getHackingMultipliers: () => RamCostConstants.ScriptGetMultipliersRamCost,\n getHacknetMultipliers: () => RamCostConstants.ScriptGetMultipliersRamCost,\n getBitNodeMultipliers: () => RamCostConstants.ScriptGetMultipliersRamCost,\n getServer: () => RamCostConstants.ScriptGetMultipliersRamCost / 2,\n getServerMoneyAvailable: () => RamCostConstants.ScriptGetServerRamCost,\n getServerSecurityLevel: () => RamCostConstants.ScriptGetServerRamCost,\n getServerBaseSecurityLevel: () => RamCostConstants.ScriptGetServerRamCost,\n getServerMinSecurityLevel: () => RamCostConstants.ScriptGetServerRamCost,\n getServerRequiredHackingLevel: () => RamCostConstants.ScriptGetServerRamCost,\n getServerMaxMoney: () => RamCostConstants.ScriptGetServerRamCost,\n getServerGrowth: () => RamCostConstants.ScriptGetServerRamCost,\n getServerNumPortsRequired: () => RamCostConstants.ScriptGetServerRamCost,\n getServerRam: () => RamCostConstants.ScriptGetServerRamCost,\n getServerMaxRam: () => RamCostConstants.ScriptGetServerMaxRam,\n getServerUsedRam: () => RamCostConstants.ScriptGetServerUsedRam,\n serverExists: () => RamCostConstants.ScriptGetServerRamCost,\n fileExists: () => RamCostConstants.ScriptFileExistsRamCost,\n isRunning: () => RamCostConstants.ScriptIsRunningRamCost,\n getStockSymbols: () => RamCostConstants.ScriptGetStockRamCost,\n getStockPrice: () => RamCostConstants.ScriptGetStockRamCost,\n getStockAskPrice: () => RamCostConstants.ScriptGetStockRamCost,\n getStockBidPrice: () => RamCostConstants.ScriptGetStockRamCost,\n getStockPosition: () => RamCostConstants.ScriptGetStockRamCost,\n getStockMaxShares: () => RamCostConstants.ScriptGetStockRamCost,\n getStockPurchaseCost: () => RamCostConstants.ScriptGetStockRamCost,\n getStockSaleGain: () => RamCostConstants.ScriptGetStockRamCost,\n buyStock: () => RamCostConstants.ScriptBuySellStockRamCost,\n sellStock: () => RamCostConstants.ScriptBuySellStockRamCost,\n shortStock: () => RamCostConstants.ScriptBuySellStockRamCost,\n sellShort: () => RamCostConstants.ScriptBuySellStockRamCost,\n placeOrder: () => RamCostConstants.ScriptBuySellStockRamCost,\n cancelOrder: () => RamCostConstants.ScriptBuySellStockRamCost,\n getOrders: () => RamCostConstants.ScriptBuySellStockRamCost,\n getStockVolatility: () => RamCostConstants.ScriptBuySellStockRamCost,\n getStockForecast: () => RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketData: () => RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketDataTixApi: () => RamCostConstants.ScriptBuySellStockRamCost,\n getPurchasedServerLimit: () => RamCostConstants.ScriptGetPurchasedServerLimit,\n getPurchasedServerMaxRam: () => RamCostConstants.ScriptGetPurchasedServerMaxRam,\n getPurchasedServerCost: () => RamCostConstants.ScriptGetPurchaseServerRamCost,\n purchaseServer: () => RamCostConstants.ScriptPurchaseServerRamCost,\n deleteServer: () => RamCostConstants.ScriptPurchaseServerRamCost,\n getPurchasedServers: () => RamCostConstants.ScriptPurchaseServerRamCost,\n write: () => RamCostConstants.ScriptReadWriteRamCost,\n tryWrite: () => RamCostConstants.ScriptReadWriteRamCost,\n read: () => RamCostConstants.ScriptReadWriteRamCost,\n peek: () => RamCostConstants.ScriptReadWriteRamCost,\n clear: () => RamCostConstants.ScriptReadWriteRamCost,\n getPortHandle: () => RamCostConstants.ScriptReadWriteRamCost * 10,\n rm: () => RamCostConstants.ScriptReadWriteRamCost,\n scriptRunning: () => RamCostConstants.ScriptArbScriptRamCost,\n scriptKill: () => RamCostConstants.ScriptArbScriptRamCost,\n getScriptName: () => 0,\n getScriptRam: () => RamCostConstants.ScriptGetScriptRamCost,\n getHackTime: () => RamCostConstants.ScriptGetHackTimeRamCost,\n getGrowTime: () => RamCostConstants.ScriptGetHackTimeRamCost,\n getWeakenTime: () => RamCostConstants.ScriptGetHackTimeRamCost,\n getScriptIncome: () => RamCostConstants.ScriptGetScriptRamCost,\n getScriptExpGain: () => RamCostConstants.ScriptGetScriptRamCost,\n getRunningScript: () => RamCostConstants.ScriptGetRunningScriptRamCost,\n nFormat: () => 0,\n getTimeSinceLastAug: () => RamCostConstants.ScriptGetHackTimeRamCost,\n prompt: () => 0,\n wget: () => 0,\n getFavorToDonate: () => RamCostConstants.ScriptGetFavorToDonate,\n // Singularity Functions\n universityCourse: () => RamCostConstants.ScriptSingularityFn1RamCost,\n gymWorkout: () => RamCostConstants.ScriptSingularityFn1RamCost,\n travelToCity: () => RamCostConstants.ScriptSingularityFn1RamCost,\n purchaseTor: () => RamCostConstants.ScriptSingularityFn1RamCost,\n purchaseProgram: () => RamCostConstants.ScriptSingularityFn1RamCost,\n getCurrentServer: () => RamCostConstants.ScriptSingularityFn1RamCost,\n connect: () => RamCostConstants.ScriptSingularityFn1RamCost,\n manualHack: () => RamCostConstants.ScriptSingularityFn1RamCost,\n installBackdoor: () => RamCostConstants.ScriptSingularityFn1RamCost,\n getStats: () => RamCostConstants.ScriptSingularityFn1RamCost / 4,\n getCharacterInformation: () => RamCostConstants.ScriptSingularityFn1RamCost / 4,\n getPlayer: () => RamCostConstants.ScriptSingularityFn1RamCost / 4,\n hospitalize: () => RamCostConstants.ScriptSingularityFn1RamCost / 4,\n isBusy: () => RamCostConstants.ScriptSingularityFn1RamCost / 4,\n stopAction: () => RamCostConstants.ScriptSingularityFn1RamCost / 2,\n upgradeHomeRam: () => RamCostConstants.ScriptSingularityFn2RamCost,\n getUpgradeHomeRamCost: () => RamCostConstants.ScriptSingularityFn2RamCost / 2,\n workForCompany: () => RamCostConstants.ScriptSingularityFn2RamCost,\n applyToCompany: () => RamCostConstants.ScriptSingularityFn2RamCost,\n getCompanyRep: () => RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getCompanyFavor: () => RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getCompanyFavorGain: () => RamCostConstants.ScriptSingularityFn2RamCost / 4,\n checkFactionInvitations: () => RamCostConstants.ScriptSingularityFn2RamCost,\n joinFaction: () => RamCostConstants.ScriptSingularityFn2RamCost,\n workForFaction: () => RamCostConstants.ScriptSingularityFn2RamCost,\n getFactionRep: () => RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getFactionFavor: () => RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getFactionFavorGain: () => RamCostConstants.ScriptSingularityFn2RamCost / 4,\n donateToFaction: () => RamCostConstants.ScriptSingularityFn3RamCost,\n createProgram: () => RamCostConstants.ScriptSingularityFn3RamCost,\n commitCrime: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getCrimeChance: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getCrimeStats: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getOwnedAugmentations: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getOwnedSourceFiles: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationsFromFaction: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationCost: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationPrereq: () => RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationPrice: () => RamCostConstants.ScriptSingularityFn3RamCost / 2,\n getAugmentationRepReq: () => RamCostConstants.ScriptSingularityFn3RamCost / 2,\n getAugmentationStats: () => RamCostConstants.ScriptSingularityFn3RamCost,\n purchaseAugmentation: () => RamCostConstants.ScriptSingularityFn3RamCost,\n softReset: () => RamCostConstants.ScriptSingularityFn3RamCost,\n installAugmentations: () => RamCostConstants.ScriptSingularityFn3RamCost,\n // Gang API\n gang: {\n createGang: () => RamCostConstants.ScriptGangApiBaseRamCost / 4,\n inGang: () => RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getMemberNames: () => RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getGangInformation: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getOtherGangInformation: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getMemberInformation: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n canRecruitMember: () => RamCostConstants.ScriptGangApiBaseRamCost / 4,\n recruitMember: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getTaskNames: () => RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getTaskStats: () => RamCostConstants.ScriptGangApiBaseRamCost / 4,\n setMemberTask: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentNames: () => RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getEquipmentCost: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentType: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentStats: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n purchaseEquipment: () => RamCostConstants.ScriptGangApiBaseRamCost,\n ascendMember: () => RamCostConstants.ScriptGangApiBaseRamCost,\n setTerritoryWarfare: () => RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getChanceToWinClash: () => RamCostConstants.ScriptGangApiBaseRamCost,\n getBonusTime: () => 0\n },\n // Bladeburner API\n bladeburner: {\n getContractNames: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getOperationNames: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpNames: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpRank: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getGeneralActionNames: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getSkillNames: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n startAction: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n stopBladeburnerAction: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getCurrentAction: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost / 4,\n getActionTime: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionEstimatedSuccessChance: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionRepGain: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCountRemaining: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionMaxLevel: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCurrentLevel: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionAutolevel: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionAutolevel: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionLevel: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getRank: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillPoints: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillLevel: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillUpgradeCost: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n upgradeSkill: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getTeamSize: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setTeamSize: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityEstimatedPopulation: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityEstimatedCommunities: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityChaos: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCity: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n switchCity: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getStamina: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerFaction: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerDivision: () => RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getBonusTime: () => 0\n },\n // Coding Contract API\n codingcontract: {\n attempt: () => RamCostConstants.ScriptCodingContractBaseRamCost,\n getContractType: () => RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getData: () => RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getDescription: () => RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getNumTriesRemaining: () => RamCostConstants.ScriptCodingContractBaseRamCost / 5\n },\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: () => RamCostConstants.ScriptSleeveBaseRamCost,\n setToShockRecovery: () => RamCostConstants.ScriptSleeveBaseRamCost,\n setToSynchronize: () => RamCostConstants.ScriptSleeveBaseRamCost,\n setToCommitCrime: () => RamCostConstants.ScriptSleeveBaseRamCost,\n setToUniversityCourse: () => RamCostConstants.ScriptSleeveBaseRamCost,\n travel: () => RamCostConstants.ScriptSleeveBaseRamCost,\n setToCompanyWork: () => RamCostConstants.ScriptSleeveBaseRamCost,\n setToFactionWork: () => RamCostConstants.ScriptSleeveBaseRamCost,\n setToGymWorkout: () => RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveStats: () => RamCostConstants.ScriptSleeveBaseRamCost,\n getTask: () => RamCostConstants.ScriptSleeveBaseRamCost,\n getInformation: () => RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveAugmentations: () => RamCostConstants.ScriptSleeveBaseRamCost,\n getSleevePurchasableAugs: () => RamCostConstants.ScriptSleeveBaseRamCost,\n purchaseSleeveAug: () => RamCostConstants.ScriptSleeveBaseRamCost\n },\n heart: {\n // Easter egg function\n break: () => 0\n }\n};\nfunction getRamCost(...args) {\n if (args.length === 0) {\n console.warn(`No arguments passed to getRamCost()`);\n return 0;\n }\n\n let curr = RamCosts[args[0]];\n\n for (let i = 1; i < args.length; ++i) {\n if (curr == null) {\n console.warn(`Invalid function passed to getRamCost: ${args}`);\n return 0;\n }\n\n const currType = typeof curr;\n\n if (currType === \"function\" || currType === \"number\") {\n break;\n }\n\n curr = curr[args[i]];\n }\n\n const currType = typeof curr;\n\n if (currType === \"function\") {\n return curr();\n }\n\n if (currType === \"number\") {\n return curr;\n }\n\n console.warn(`Unexpected type (${currType}) for value [${args}]`);\n return 0;\n}\n\n//# sourceURL=webpack:///./src/Netscript/RamCostGenerator.ts?");
|
||
|
||
/***/ }),
|
||
/* 12 */
|
||
/*!****************************************!*\
|
||
!*** ./utils/StringHelperFunctions.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: convertTimeMsToTimeElapsedString, longestCommonStart, containsAllStrings, formatNumber, isHTML, generateRandomString, replaceAt */
|
||
/*! exports used: containsAllStrings, convertTimeMsToTimeElapsedString, formatNumber, generateRandomString, longestCommonStart */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return convertTimeMsToTimeElapsedString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return longestCommonStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return containsAllStrings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return formatNumber; });\n/* unused harmony export isHTML */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return generateRandomString; });\n/* unused harmony export replaceAt */\n/* harmony import */ var _helpers_isString__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/isString */ 82);\n // Netburner String helper functions\n// Replaces the character at an index with a new character\n\nfunction replaceAt(base, index, character) {\n return base.substr(0, index) + character + base.substr(index + character.length);\n}\n/*\nConverts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds\ne.g. 10000 -> \"10 seconds\"\n 120000 -> \"2 minutes and 0 seconds\"\n*/\n\n\nfunction convertTimeMsToTimeElapsedString(time, showMilli = false) {\n time = Math.floor(time);\n const millisecondsPerSecond = 1000;\n const secondPerMinute = 60;\n const minutesPerHours = 60;\n const secondPerHours = secondPerMinute * minutesPerHours;\n const hoursPerDays = 24;\n const secondPerDay = secondPerHours * hoursPerDays; // Convert ms to seconds, since we only have second-level precision\n\n const totalSeconds = Math.floor(time / millisecondsPerSecond);\n const days = Math.floor(totalSeconds / secondPerDay);\n const secTruncDays = totalSeconds % secondPerDay;\n const hours = Math.floor(secTruncDays / secondPerHours);\n const secTruncHours = secTruncDays % secondPerHours;\n const minutes = Math.floor(secTruncHours / secondPerMinute);\n const secTruncMinutes = secTruncHours % secondPerMinute;\n\n const milliTruncSec = (() => {\n let str = `${time % millisecondsPerSecond}`;\n\n while (str.length < 3) str = \"0\" + str;\n\n return str;\n })();\n\n const seconds = showMilli ? `${secTruncMinutes}.${milliTruncSec}` : `${secTruncMinutes}`;\n let res = \"\";\n\n if (days > 0) {\n res += `${days} days `;\n }\n\n if (hours > 0) {\n res += `${hours} hours `;\n }\n\n if (minutes > 0) {\n res += `${minutes} minutes `;\n }\n\n res += `${seconds} seconds`;\n return res;\n} // Finds the longest common starting substring in a set of strings\n\n\nfunction longestCommonStart(strings) {\n if (!containsAllStrings(strings)) {\n return \"\";\n }\n\n if (strings.length === 0) {\n return \"\";\n }\n\n const A = strings.concat().sort();\n const a1 = A[0];\n const a2 = A[A.length - 1];\n const L = a1.length;\n let i = 0;\n\n const areEqualCaseInsensitive = (a, b) => a.toUpperCase() === b.toUpperCase();\n\n while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) {\n i++;\n }\n\n return a1.substring(0, i);\n} // Returns whether an array contains entirely of string objects\n\n\nfunction containsAllStrings(arr) {\n return arr.every(_helpers_isString__WEBPACK_IMPORTED_MODULE_0__[/* isString */ \"a\"]);\n} // Formats a number with commas and a specific number of decimal digits\n\n\nfunction formatNumber(num, numFractionDigits = 0) {\n return num.toLocaleString(undefined, {\n maximumFractionDigits: numFractionDigits,\n minimumFractionDigits: numFractionDigits\n });\n} // Checks if a string contains HTML elements\n\n\nfunction isHTML(str) {\n const element = document.createElement(\"div\");\n element.innerHTML = str;\n const c = element.childNodes;\n\n for (let i = c.length - 1; i >= 0; i--) {\n if (c[i].nodeType === 1) {\n return true;\n }\n }\n\n return false;\n} // Generates a random alphanumeric string with N characters\n\n\nfunction generateRandomString(n) {\n let str = \"\";\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < n; i++) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n\n\n\n//# sourceURL=webpack:///./utils/StringHelperFunctions.ts?");
|
||
|
||
/***/ }),
|
||
/* 13 */
|
||
/*!********************************!*\
|
||
!*** ./src/ui/React/Money.tsx ***!
|
||
\********************************/
|
||
/*! exports provided: Money */
|
||
/*! exports used: Money */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Money; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction Money(props) {\n if (props.player !== undefined) {\n if (typeof props.money !== \"number\") throw new Error(\"if player if provided, money should be number, contact dev\");\n if (!props.player.canAfford(props.money)) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"unbuyable samefont\"\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.money));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"money-gold samefont\"\n }, typeof props.money === \"number\" ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.money) : props.money);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Money.tsx?");
|
||
|
||
/***/ }),
|
||
/* 14 */,
|
||
/* 15 */
|
||
/*!******************************!*\
|
||
!*** ./utils/JSONReviver.js ***!
|
||
\******************************/
|
||
/*! exports provided: Reviver, Generic_toJSON, Generic_fromJSON */
|
||
/*! exports used: Generic_fromJSON, Generic_toJSON, Reviver */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return Reviver; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Generic_toJSON; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Generic_fromJSON; });\n/* Generic Reviver, toJSON, and fromJSON functions used for saving and loading objects */\n// A generic \"smart reviver\" function.\n// Looks for object values with a `ctor` property and\n// a `data` property. If it finds them, and finds a matching\n// constructor that has a `fromJSON` property on it, it hands\n// off to that `fromJSON` fuunction, passing in the value.\nfunction Reviver(key, value) {\n var ctor;\n\n if (value == null) {\n console.log(\"Reviver WRONGLY called with key: \" + key + \", and value: \" + value);\n return 0;\n }\n\n if (typeof value === \"object\" && typeof value.ctor === \"string\" && typeof value.data !== \"undefined\") {\n // Compatibility for version v0.43.1\n // TODO Remove this eventually\n if (value.ctor === \"AllServersMap\") {\n console.log(\"Converting AllServersMap for v0.43.1\");\n return value.data;\n }\n\n ctor = Reviver.constructors[value.ctor] || window[value.ctor];\n\n if (typeof ctor === \"function\" && typeof ctor.fromJSON === \"function\") {\n return ctor.fromJSON(value);\n }\n }\n\n return value;\n}\n\nReviver.constructors = {}; // A list of constructors the smart reviver should know about\n// A generic \"toJSON\" function that creates the data expected\n// by Reviver.\n// `ctorName` The name of the constructor to use to revive it\n// `obj` The object being serialized\n// `keys` (Optional) Array of the properties to serialize,\n// if not given then all of the objects \"own\" properties\n// that don't have function values will be serialized.\n// (Note: If you list a property in `keys`, it will be serialized\n// regardless of whether it's an \"own\" property.)\n// Returns: The structure (which will then be turned into a string\n// as part of the JSON.stringify algorithm)\n\nfunction Generic_toJSON(ctorName, obj, keys) {\n var data, key;\n\n if (!keys) {\n keys = Object.keys(obj); // Only \"own\" properties are included\n }\n\n data = {};\n\n for (let index = 0; index < keys.length; ++index) {\n key = keys[index];\n data[key] = obj[key];\n }\n\n return {\n ctor: ctorName,\n data: data\n };\n} // A generic \"fromJSON\" function for use with Reviver: Just calls the\n// constructor function with no arguments, then applies all of the\n// key/value pairs from the raw data to the instance. Only useful for\n// constructors that can be reasonably called without arguments!\n// `ctor` The constructor to call\n// `data` The data to apply\n// Returns: The object\n\n\nfunction Generic_fromJSON(ctor, data) {\n var obj, name;\n obj = new ctor();\n\n for (name in data) {\n obj[name] = data[name];\n }\n\n return obj;\n}\n\n\n\n//# sourceURL=webpack:///./utils/JSONReviver.js?");
|
||
|
||
/***/ }),
|
||
/* 16 */,
|
||
/* 17 */,
|
||
/* 18 */
|
||
/*!***************************************!*\
|
||
!*** ./utils/helpers/getRandomInt.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: getRandomInt */
|
||
/*! exports used: getRandomInt */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getRandomInt; });\n/**\n * Gets a random integer bounded by the values passed in.\n * @param min The minimum value in the range.\n * @param max The maximum value in the range.\n */\nfunction getRandomInt(min, max) {\n const lower = Math.min(min, max);\n const upper = Math.max(min, max);\n return Math.floor(Math.random() * (upper - lower + 1)) + lower;\n}\n\n//# sourceURL=webpack:///./utils/helpers/getRandomInt.ts?");
|
||
|
||
/***/ }),
|
||
/* 19 */
|
||
/*!**************************************!*\
|
||
!*** ./src/ui/React/createPopup.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: createPopup, removePopup */
|
||
/*! exports used: createPopup, removePopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createPopup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return removePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Popup */ 642);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElementById */ 212);\n/**\n * Create a pop-up dialog box using React.\n *\n * Calling this function with the same ID and React Root Component will trigger a re-render\n *\n * @param id The (hopefully) unique identifier for the popup container\n * @param rootComponent Root React Component for the content (NOT the popup containers themselves)\n */\n\n\n\n\n\nlet gameContainer;\n\n(function () {\n function getGameContainer() {\n const container = document.getElementById(\"entire-game-container\");\n\n if (container == null) {\n throw new Error(`Failed to find game container DOM element`);\n }\n\n gameContainer = container;\n document.removeEventListener(\"DOMContentLoaded\", getGameContainer);\n }\n\n document.addEventListener(\"DOMContentLoaded\", getGameContainer);\n})(); // This variable is used to avoid setting the semi-transparent background\n// several times on top of one another. Sometimes there's several popup at once.\n\n\nlet deepestPopupId = \"\"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction createPopup(id, rootComponent, props, onClose) {\n let container = document.getElementById(id);\n\n if (container == null) {\n function onClick(event) {\n if (!event.srcElement) return;\n if (!(event.srcElement instanceof HTMLElement)) return;\n const clickedId = event.srcElement.id;\n if (clickedId !== id) return;\n removePopup(id);\n if (onClose) onClose();\n }\n\n const backgroundColor = deepestPopupId === \"\" ? \"rgba(0,0,0,0.5)\" : \"rgba(0,0,0,0)\";\n container = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-container\",\n display: \"flex\",\n id: id,\n backgroundColor: backgroundColor,\n mouseDown: onClick\n });\n gameContainer.appendChild(container);\n }\n\n if (deepestPopupId === \"\") deepestPopupId = id;\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"render\"](react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Popup__WEBPACK_IMPORTED_MODULE_2__[/* Popup */ \"a\"], {\n content: rootComponent,\n id: id,\n props: props,\n removePopup: () => {\n removePopup(id);\n if (onClose) onClose();\n }\n }), container);\n return container;\n}\n/**\n * Closes a popup created with the createPopup() function above\n */\n\nfunction removePopup(id) {\n const content = document.getElementById(`${id}`);\n if (content == null) return;\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](content);\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(id);\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(`${id}-close`);\n if (id === deepestPopupId) deepestPopupId = \"\";\n}\n\n//# sourceURL=webpack:///./src/ui/React/createPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 20 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Augmentation/Augmentations.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: Augmentations */
|
||
/*! exports used: Augmentations */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentations; });\nconst Augmentations = {};\n\n//# sourceURL=webpack:///./src/Augmentation/Augmentations.ts?");
|
||
|
||
/***/ }),
|
||
/* 21 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Locations/data/CityNames.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: CityName */
|
||
/*! exports used: CityName */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CityName; });\n/**\n * All possible Cities in the game. Names only, not actual \"City\" object\n * Implemented as an enum for typing purposes\n */\nlet CityName;\n\n(function (CityName) {\n CityName[\"Aevum\"] = \"Aevum\";\n CityName[\"Chongqing\"] = \"Chongqing\";\n CityName[\"Ishima\"] = \"Ishima\";\n CityName[\"NewTokyo\"] = \"New Tokyo\";\n CityName[\"Sector12\"] = \"Sector-12\";\n CityName[\"Volhaven\"] = \"Volhaven\";\n})(CityName || (CityName = {}));\n\n//# sourceURL=webpack:///./src/Locations/data/CityNames.ts?");
|
||
|
||
/***/ }),
|
||
/* 22 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Faction/Factions.ts ***!
|
||
\*********************************/
|
||
/*! exports provided: Factions, loadFactions, AddToFactions, factionExists, initFactions, resetFaction */
|
||
/*! exports used: Factions, factionExists, initFactions, loadFactions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadFactions; });\n/* unused harmony export AddToFactions */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return factionExists; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initFactions; });\n/* unused harmony export resetFaction */\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FactionInfo */ 430);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\n\n\n\nlet Factions = {};\nfunction loadFactions(saveString) {\n Factions = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"]);\n}\nfunction AddToFactions(faction) {\n const name = faction.name;\n Factions[name] = faction;\n}\nfunction factionExists(name) {\n return Factions.hasOwnProperty(name);\n}\nfunction initFactions() {\n for (const name in _FactionInfo__WEBPACK_IMPORTED_MODULE_1__[/* FactionInfos */ \"a\"]) {\n resetFaction(new _Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"](name));\n }\n} //Resets a faction during (re-)initialization. Saves the favor in the new\n//Faction object and deletes the old Faction Object from \"Factions\". Then\n//reinserts the new Faction object\n\nfunction resetFaction(newFactionObject) {\n if (!(newFactionObject instanceof _Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"])) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n\n const factionName = newFactionObject.name;\n\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n\n AddToFactions(newFactionObject);\n}\n\n//# sourceURL=webpack:///./src/Faction/Factions.ts?");
|
||
|
||
/***/ }),
|
||
/* 23 */
|
||
/*!************************************!*\
|
||
!*** ./src/ui/React/StdButton.tsx ***!
|
||
\************************************/
|
||
/*! exports provided: StdButton */
|
||
/*! exports used: StdButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StdButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Basic stateless button\n * Uses the 'std-button' css class\n */\n\nfunction StdButton(props) {\n const hasTooltip = props.tooltip != null && props.tooltip !== \"\";\n let className = props.disabled ? \"std-button-disabled\" : \"std-button\";\n\n if (hasTooltip) {\n className += \" tooltip\";\n }\n\n if (typeof props.addClasses === \"string\") {\n className += ` ${props.addClasses}`;\n } // Tooltip will be set using inner HTML\n\n\n let tooltip;\n\n if (hasTooltip) {\n if (typeof props.tooltip === \"string\") {\n const tooltipMarkup = {\n __html: props.tooltip\n };\n tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: tooltipMarkup\n });\n } else {\n tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n id: props.id,\n onClick: props.onClick,\n onKeyUp: props.onKeyUp,\n style: props.style,\n autoFocus: props.autoFocus\n }, props.text, hasTooltip && tooltip);\n}\n\n//# sourceURL=webpack:///./src/ui/React/StdButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 24 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Company/data/companypositionnames.ts ***!
|
||
\**************************************************/
|
||
/*! exports provided: SoftwareCompanyPositions, ITCompanyPositions, SecurityEngineerCompanyPositions, NetworkEngineerCompanyPositions, BusinessCompanyPositions, SecurityCompanyPositions, AgentCompanyPositions, MiscCompanyPositions, SoftwareConsultantCompanyPositions, BusinessConsultantCompanyPositions, PartTimeCompanyPositions */
|
||
/*! exports used: AgentCompanyPositions, BusinessCompanyPositions, BusinessConsultantCompanyPositions, ITCompanyPositions, MiscCompanyPositions, NetworkEngineerCompanyPositions, PartTimeCompanyPositions, SecurityCompanyPositions, SecurityEngineerCompanyPositions, SoftwareCompanyPositions, SoftwareConsultantCompanyPositions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return SoftwareCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return ITCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return SecurityEngineerCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return NetworkEngineerCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BusinessCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return SecurityCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AgentCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return MiscCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return SoftwareConsultantCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BusinessConsultantCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return PartTimeCompanyPositions; });\n// Defs for job titles, stored in arrays and categorized by job \"type\"\nconst SoftwareCompanyPositions = [\"Software Engineering Intern\", \"Junior Software Engineer\", \"Senior Software Engineer\", \"Lead Software Developer\", \"Head of Software\", \"Head of Engineering\", \"Vice President of Technology\", \"Chief Technology Officer\"];\nconst ITCompanyPositions = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\nconst SecurityEngineerCompanyPositions = [\"Security Engineer\"];\nconst NetworkEngineerCompanyPositions = [\"Network Engineer\", \"Network Administrator\"];\nconst BusinessCompanyPositions = [\"Business Intern\", \"Business Analyst\", \"Business Manager\", \"Operations Manager\", \"Chief Financial Officer\", \"Chief Executive Officer\"];\nconst SecurityCompanyPositions = [\"Police Officer\", \"Police Chief\", \"Security Guard\", \"Security Officer\", \"Security Supervisor\", \"Head of Security\"];\nconst AgentCompanyPositions = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\nconst MiscCompanyPositions = [\"Waiter\", \"Employee\"];\nconst SoftwareConsultantCompanyPositions = [\"Software Consultant\", \"Senior Software Consultant\"];\nconst BusinessConsultantCompanyPositions = [\"Business Consultant\", \"Senior Business Consultant\"];\nconst PartTimeCompanyPositions = [\"Part-time Waiter\", \"Part-time Employee\"];\n\n//# sourceURL=webpack:///./src/Company/data/companypositionnames.ts?");
|
||
|
||
/***/ }),
|
||
/* 25 */,
|
||
/* 26 */
|
||
/*!**************************!*\
|
||
!*** ./src/ui/Router.ts ***!
|
||
\**************************/
|
||
/*! exports provided: Page */
|
||
/*! exports used: Page */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Page; });\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nlet Page;\n/**\n * This class keeps track of player navigation/routing within the game.\n */\n\n(function (Page) {\n Page[Page[\"ActiveScripts\"] = 0] = \"ActiveScripts\";\n Page[Page[\"Augmentations\"] = 1] = \"Augmentations\";\n Page[Page[\"BitVerse\"] = 2] = \"BitVerse\";\n Page[Page[\"Bladeburner\"] = 3] = \"Bladeburner\";\n Page[Page[\"City\"] = 4] = \"City\";\n Page[Page[\"Corporation\"] = 5] = \"Corporation\";\n Page[Page[\"CreateProgram\"] = 6] = \"CreateProgram\";\n Page[Page[\"CreateScript\"] = 7] = \"CreateScript\";\n Page[Page[\"DevMenu\"] = 8] = \"DevMenu\";\n Page[Page[\"Faction\"] = 9] = \"Faction\";\n Page[Page[\"Factions\"] = 10] = \"Factions\";\n Page[Page[\"Gang\"] = 11] = \"Gang\";\n Page[Page[\"Hacknet\"] = 12] = \"Hacknet\";\n Page[Page[\"Infiltration\"] = 13] = \"Infiltration\";\n Page[Page[\"Job\"] = 14] = \"Job\";\n Page[Page[\"Milestones\"] = 15] = \"Milestones\";\n Page[Page[\"Options\"] = 16] = \"Options\";\n Page[Page[\"Resleeves\"] = 17] = \"Resleeves\";\n Page[Page[\"Sleeves\"] = 18] = \"Sleeves\";\n Page[Page[\"Stats\"] = 19] = \"Stats\";\n Page[Page[\"StockMarket\"] = 20] = \"StockMarket\";\n Page[Page[\"Terminal\"] = 21] = \"Terminal\";\n Page[Page[\"Travel\"] = 22] = \"Travel\";\n Page[Page[\"Tutorial\"] = 23] = \"Tutorial\";\n Page[Page[\"Work\"] = 24] = \"Work\";\n Page[Page[\"BladeburnerCinematic\"] = 25] = \"BladeburnerCinematic\";\n Page[Page[\"Location\"] = 26] = \"Location\";\n})(Page || (Page = {}));\n\n//# sourceURL=webpack:///./src/ui/Router.ts?");
|
||
|
||
/***/ }),
|
||
/* 27 */,
|
||
/* 28 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Augmentation/Augmentation.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: Augmentation */
|
||
/*! exports used: Augmentation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Class definition for a single Augmentation object\n\n\n\n\n\n\n\nfunction generateStatsDescription(mults, programs, startingMoney) {\n const f = (x, decimals = 0) => {\n // look, I don't know how to make a \"smart decimals\"\n // todo, make it smarter\n if (x === 1.0777 - 1) return \"7.77%\";\n if (x === 1.777 - 1) return \"77.7%\";\n return _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatPercentage(x, decimals);\n };\n\n let desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Effects:\");\n\n if (mults.hacking_mult && mults.hacking_mult == mults.strength_mult && mults.hacking_mult == mults.defense_mult && mults.hacking_mult == mults.dexterity_mult && mults.hacking_mult == mults.agility_mult && mults.hacking_mult == mults.charisma_mult) {\n desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_mult - 1), \" all skills\");\n } else {\n if (mults.hacking_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_mult - 1), \" hacking skill\");\n\n if (mults.strength_mult && mults.strength_mult == mults.defense_mult && mults.strength_mult == mults.dexterity_mult && mults.strength_mult == mults.agility_mult) {\n desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.strength_mult - 1), \" combat skills\");\n } else {\n if (mults.strength_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.strength_mult - 1), \" strength skill\");\n if (mults.defense_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.defense_mult - 1), \" defense skill\");\n if (mults.dexterity_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.dexterity_mult - 1), \" dexterity skill\");\n if (mults.agility_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.agility_mult - 1), \" agility skill\");\n }\n\n if (mults.charisma_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.charisma_mult - 1), \" Charisma skill\");\n }\n\n if (mults.hacking_exp_mult && mults.hacking_exp_mult === mults.strength_exp_mult && mults.hacking_exp_mult === mults.defense_exp_mult && mults.hacking_exp_mult === mults.dexterity_exp_mult && mults.hacking_exp_mult === mults.agility_exp_mult && mults.hacking_exp_mult === mults.charisma_exp_mult) {\n desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_exp_mult - 1), \" exp for all skills\");\n } else {\n if (mults.hacking_exp_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_exp_mult - 1), \" hacking exp\");\n\n if (mults.strength_exp_mult && mults.strength_exp_mult === mults.defense_exp_mult && mults.strength_exp_mult === mults.dexterity_exp_mult && mults.strength_exp_mult === mults.agility_exp_mult) {\n desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.strength_exp_mult - 1), \" combat exp\");\n } else {\n if (mults.strength_exp_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.strength_exp_mult - 1), \" strength exp\");\n if (mults.defense_exp_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.defense_exp_mult - 1), \" defense exp\");\n if (mults.dexterity_exp_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.dexterity_exp_mult - 1), \" dexterity exp\");\n if (mults.agility_exp_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.agility_exp_mult - 1), \" agility exp\");\n }\n\n if (mults.charisma_exp_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.charisma_exp_mult - 1), \" charisma exp\");\n }\n\n if (mults.hacking_speed_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_speed_mult - 1), \" faster hack(), grow(), and weaken()\");\n if (mults.hacking_chance_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_chance_mult - 1), \" hack() success chance\");\n if (mults.hacking_money_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_money_mult - 1), \" hack() power\");\n if (mults.hacking_grow_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacking_grow_mult - 1), \" grow() power\");\n\n if (mults.faction_rep_mult && mults.faction_rep_mult === mults.company_rep_mult) {\n desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.faction_rep_mult - 1), \" reputation from factions and companies\");\n } else {\n if (mults.faction_rep_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.faction_rep_mult - 1), \" reputation from factions\");\n if (mults.company_rep_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.company_rep_mult - 1), \" reputation from companies\");\n }\n\n if (mults.crime_money_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.crime_money_mult - 1), \" crime money\");\n if (mults.crime_success_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.crime_success_mult - 1), \" crime success rate\");\n if (mults.work_money_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.work_money_mult - 1), \" work money\");\n if (mults.hacknet_node_money_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.hacknet_node_money_mult - 1), \" hacknet production\");\n if (mults.hacknet_node_purchase_cost_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"-\", f(-(mults.hacknet_node_purchase_cost_mult - 1)), \" hacknet nodes cost\");\n if (mults.hacknet_node_level_cost_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"-\", f(-(mults.hacknet_node_level_cost_mult - 1)), \" hacknet nodes upgrade cost\");\n if (mults.bladeburner_max_stamina_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.bladeburner_max_stamina_mult - 1), \" Bladeburner Max Stamina\");\n if (mults.bladeburner_stamina_gain_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.bladeburner_stamina_gain_mult - 1), \" Bladeburner Stamina gain\");\n if (mults.bladeburner_analysis_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.bladeburner_analysis_mult - 1), \" Bladeburner Field Analysis effectiveness\");\n if (mults.bladeburner_success_chance_mult) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"+\", f(mults.bladeburner_success_chance_mult - 1), \" Bladeburner Contracts and Operations success chance\");\n if (startingMoney) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Start with \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: startingMoney\n }), \" after installing Augmentations.\");\n if (programs) desc = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, desc, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Start with \", programs.join(\" and \"), \" after installing Augmentations.\");\n return desc;\n}\n\nclass Augmentation {\n // How much money this costs to buy\n // How much faction reputation is required to unlock this\n // Any Augmentation not immediately available in BitNode-1 is special (e.g. Bladeburner augs)\n // Augmentation level - for repeatable Augs like NeuroFlux Governor\n // Name of Augmentation\n // Whether the player owns this Augmentation\n // Array of names of all prerequisites\n // Multipliers given by this Augmentation. Must match the property name in\n // The Player/Person classes\n // Initial cost. Doesn't change when you purchase multiple Augmentation\n constructor(params = {\n info: \"\",\n moneyCost: 0,\n name: \"\",\n repCost: 0\n }) {\n _defineProperty(this, \"baseCost\", 0);\n\n _defineProperty(this, \"baseRepRequirement\", 0);\n\n _defineProperty(this, \"isSpecial\", false);\n\n _defineProperty(this, \"level\", 0);\n\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"owned\", false);\n\n _defineProperty(this, \"prereqs\", []);\n\n _defineProperty(this, \"mults\", {});\n\n _defineProperty(this, \"startingCost\", 0);\n\n this.name = params.name;\n this.info = params.info;\n this.prereqs = params.prereqs ? params.prereqs : [];\n this.baseRepRequirement = params.repCost * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n this.baseCost = params.moneyCost * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n this.startingCost = this.baseCost;\n\n if (params.isSpecial) {\n this.isSpecial = true;\n }\n\n this.level = 0; // Set multipliers\n\n if (params.hacking_mult) {\n this.mults.hacking_mult = params.hacking_mult;\n }\n\n if (params.strength_mult) {\n this.mults.strength_mult = params.strength_mult;\n }\n\n if (params.defense_mult) {\n this.mults.defense_mult = params.defense_mult;\n }\n\n if (params.dexterity_mult) {\n this.mults.dexterity_mult = params.dexterity_mult;\n }\n\n if (params.agility_mult) {\n this.mults.agility_mult = params.agility_mult;\n }\n\n if (params.charisma_mult) {\n this.mults.charisma_mult = params.charisma_mult;\n }\n\n if (params.hacking_exp_mult) {\n this.mults.hacking_exp_mult = params.hacking_exp_mult;\n }\n\n if (params.strength_exp_mult) {\n this.mults.strength_exp_mult = params.strength_exp_mult;\n }\n\n if (params.defense_exp_mult) {\n this.mults.defense_exp_mult = params.defense_exp_mult;\n }\n\n if (params.dexterity_exp_mult) {\n this.mults.dexterity_exp_mult = params.dexterity_exp_mult;\n }\n\n if (params.agility_exp_mult) {\n this.mults.agility_exp_mult = params.agility_exp_mult;\n }\n\n if (params.charisma_exp_mult) {\n this.mults.charisma_exp_mult = params.charisma_exp_mult;\n }\n\n if (params.hacking_chance_mult) {\n this.mults.hacking_chance_mult = params.hacking_chance_mult;\n }\n\n if (params.hacking_speed_mult) {\n this.mults.hacking_speed_mult = params.hacking_speed_mult;\n }\n\n if (params.hacking_money_mult) {\n this.mults.hacking_money_mult = params.hacking_money_mult;\n }\n\n if (params.hacking_grow_mult) {\n this.mults.hacking_grow_mult = params.hacking_grow_mult;\n }\n\n if (params.company_rep_mult) {\n this.mults.company_rep_mult = params.company_rep_mult;\n }\n\n if (params.faction_rep_mult) {\n this.mults.faction_rep_mult = params.faction_rep_mult;\n }\n\n if (params.crime_money_mult) {\n this.mults.crime_money_mult = params.crime_money_mult;\n }\n\n if (params.crime_success_mult) {\n this.mults.crime_success_mult = params.crime_success_mult;\n }\n\n if (params.work_money_mult) {\n this.mults.work_money_mult = params.work_money_mult;\n }\n\n if (params.hacknet_node_money_mult) {\n this.mults.hacknet_node_money_mult = params.hacknet_node_money_mult;\n }\n\n if (params.hacknet_node_purchase_cost_mult) {\n this.mults.hacknet_node_purchase_cost_mult = params.hacknet_node_purchase_cost_mult;\n }\n\n if (params.hacknet_node_ram_cost_mult) {\n this.mults.hacknet_node_ram_cost_mult = params.hacknet_node_ram_cost_mult;\n }\n\n if (params.hacknet_node_core_cost_mult) {\n this.mults.hacknet_node_core_cost_mult = params.hacknet_node_core_cost_mult;\n }\n\n if (params.hacknet_node_level_cost_mult) {\n this.mults.hacknet_node_level_cost_mult = params.hacknet_node_level_cost_mult;\n }\n\n if (params.bladeburner_max_stamina_mult) {\n this.mults.bladeburner_max_stamina_mult = params.bladeburner_max_stamina_mult;\n }\n\n if (params.bladeburner_stamina_gain_mult) {\n this.mults.bladeburner_stamina_gain_mult = params.bladeburner_stamina_gain_mult;\n }\n\n if (params.bladeburner_analysis_mult) {\n this.mults.bladeburner_analysis_mult = params.bladeburner_analysis_mult;\n }\n\n if (params.bladeburner_success_chance_mult) {\n this.mults.bladeburner_success_chance_mult = params.bladeburner_success_chance_mult;\n }\n\n if (params.stats) this.stats = params.stats;else this.stats = generateStatsDescription(this.mults, params.programs, params.startingMoney);\n } // Adds this Augmentation to the specified Factions\n\n\n addToFactions(factionList) {\n for (let i = 0; i < factionList.length; ++i) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ \"a\"][factionList[i]];\n\n if (faction == null) {\n console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${factionList[i]}`);\n continue;\n }\n\n faction.augmentations.push(this.name);\n }\n } // Adds this Augmentation to all Factions\n\n\n addToAllFactions() {\n for (const fac in _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ \"a\"].hasOwnProperty(fac)) {\n const facObj = _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ \"a\"][fac];\n\n if (facObj == null) {\n console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${fac}`);\n continue;\n }\n\n facObj.augmentations.push(this.name);\n }\n }\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_toJSON */ \"b\"])(\"Augmentation\", this);\n } // Initiatizes a Augmentation object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_fromJSON */ \"a\"])(Augmentation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"].constructors.Augmentation = Augmentation;\n\n//# sourceURL=webpack:///./src/Augmentation/Augmentation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 29 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Server/AllServers.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: AllServers, ipExists, createUniqueRandomIp, AddToAllServers, initForeignServers, prestigeAllServers, loadAllServers */
|
||
/*! exports used: AddToAllServers, AllServers, createUniqueRandomIp, initForeignServers, ipExists, loadAllServers, prestigeAllServers */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return AllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ipExists; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return createUniqueRandomIp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AddToAllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return initForeignServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return prestigeAllServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return loadAllServers; });\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SpecialServerIps */ 51);\n/* harmony import */ var _data_servers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/servers */ 655);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\n\nlet AllServers = {};\nfunction ipExists(ip) {\n return AllServers[ip] != null;\n}\nfunction createUniqueRandomIp() {\n const ip = Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])(); // If the Ip already exists, recurse to create a new one\n\n if (ipExists(ip)) {\n return Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])();\n }\n\n return ip;\n} // Saftely add a Server to the AllServers map\n\nfunction AddToAllServers(server) {\n const serverIp = server.ip;\n\n if (ipExists(serverIp)) {\n console.warn(`IP of server that's being added: ${serverIp}`);\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[serverIp].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[serverIp] = server;\n}\nfunction initForeignServers(homeComputer) {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers = [];\n\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n } // Essentially any property that is of type 'number | IMinMaxRange'\n\n\n const propertiesToPatternMatch = [\"hackDifficulty\", \"moneyAvailable\", \"requiredHackingSkill\", \"serverGrowth\"];\n\n const toNumber = value => {\n switch (typeof value) {\n case \"number\":\n return value;\n\n case \"object\":\n return Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(value.min, value.max);\n\n default:\n throw Error(`Do not know how to convert the type '${typeof value}' to a number`);\n }\n };\n\n for (const metadata of _data_servers__WEBPACK_IMPORTED_MODULE_2__[/* serverMetadata */ \"a\"]) {\n const serverParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n for (const prop of propertiesToPatternMatch) {\n if (metadata[prop] !== undefined) {\n serverParams[prop] = toNumber(metadata[prop]);\n }\n }\n\n const server = new _Server__WEBPACK_IMPORTED_MODULE_0__[/* Server */ \"a\"](serverParams);\n\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (metadata.specialName !== undefined) {\n _SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].addIp(metadata.specialName, server.ip);\n }\n\n AddToAllServers(server);\n\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n /* Create a randomized network for all the foreign servers */\n\n\n const linkComputers = (server1, server2) => {\n server1.serversOnNetwork.push(server2.ip);\n server2.serversOnNetwork.push(server1.ip);\n };\n\n const getRandomArrayItem = arr => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1, selectServer) => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n }; // Connect the first tier of servers to the player's home computer\n\n\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\nfunction prestigeAllServers() {\n for (const member in AllServers) {\n delete AllServers[member];\n }\n\n AllServers = {};\n}\nfunction loadAllServers(saveString) {\n AllServers = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"]);\n}\n\n//# sourceURL=webpack:///./src/Server/AllServers.ts?");
|
||
|
||
/***/ }),
|
||
/* 30 */,
|
||
/* 31 */,
|
||
/* 32 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Hacknet/data/Constants.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: HacknetNodeConstants, PurchaseMultipliers, HacknetServerConstants */
|
||
/*! exports used: HacknetNodeConstants, HacknetServerConstants, PurchaseMultipliers */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNodeConstants; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return PurchaseMultipliers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return HacknetServerConstants; });\nconst HacknetNodeConstants = {\n MoneyGainPerLevel: 1.6,\n BaseCost: 1000,\n LevelBaseCost: 1,\n RamBaseCost: 30e3,\n CoreBaseCost: 500e3,\n PurchaseNextMult: 1.85,\n UpgradeLevelMult: 1.04,\n UpgradeRamMult: 1.28,\n UpgradeCoreMult: 1.48,\n MaxLevel: 200,\n MaxRam: 64,\n MaxCores: 16\n};\nconst PurchaseMultipliers = {\n x1: 1,\n x5: 5,\n x10: 10,\n MAX: \"MAX\"\n};\nconst HacknetServerConstants = {\n HashesPerLevel: 0.001,\n BaseCost: 50e3,\n RamBaseCost: 200e3,\n CoreBaseCost: 1e6,\n CacheBaseCost: 10e6,\n PurchaseMult: 3.2,\n UpgradeLevelMult: 1.1,\n UpgradeRamMult: 1.4,\n UpgradeCoreMult: 1.55,\n UpgradeCacheMult: 1.85,\n MaxServers: 20,\n MaxLevel: 300,\n MaxRam: 8192,\n MaxCores: 128,\n MaxCache: 15\n};\n\n//# sourceURL=webpack:///./src/Hacknet/data/Constants.ts?");
|
||
|
||
/***/ }),
|
||
/* 33 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Bladeburner/data/ActionTypes.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: ActionTypes */
|
||
/*! exports used: ActionTypes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ActionTypes; });\n// Action Identifier enum\nconst ActionTypes = {\n Idle: 1,\n Contract: 2,\n Operation: 3,\n BlackOp: 4,\n BlackOperation: 4,\n Training: 5,\n Recruitment: 6,\n FieldAnalysis: 7,\n \"Field Analysis\": 7,\n Diplomacy: 8,\n \"Hyperbolic Regeneration Chamber\": 9\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/ActionTypes.ts?");
|
||
|
||
/***/ }),
|
||
/* 34 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Settings/Settings.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: Settings */
|
||
/*! exports used: Settings */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Settings; });\n/* harmony import */ var _SettingEnums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SettingEnums */ 152);\n\n/**\n * Represents the default settings the player could customize.\n */\n\nconst defaultSettings = {\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n Locale: \"en\",\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 200,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressHospitalizationPopup: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false\n};\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\n\nconst Settings = {\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n Locale: \"en\",\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: _SettingEnums__WEBPACK_IMPORTED_MODULE_0__[/* OwnedAugmentationsOrderSetting */ \"a\"].AcquirementTime,\n PurchaseAugmentationsOrder: _SettingEnums__WEBPACK_IMPORTED_MODULE_0__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressHospitalizationPopup: defaultSettings.SuppressHospitalizationPopup,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n MonacoTheme: \"vs-dark\",\n MonacoInsertSpaces: false,\n\n init() {\n Object.assign(Settings, defaultSettings);\n },\n\n load(saveString) {\n Object.assign(Settings, JSON.parse(saveString));\n }\n\n};\n\n//# sourceURL=webpack:///./src/Settings/Settings.ts?");
|
||
|
||
/***/ }),
|
||
/* 35 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Corporation/data/Constants.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: CorporationConstants */
|
||
/*! exports used: CorporationConstants */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationConstants; });\nconst CyclesPerMarketCycle = 50;\nconst AllCorporationStates = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\nconst CorporationConstants = {\n INITIALSHARES: 1e9,\n //Total number of shares you have at your company\n SHARESPERPRICEUPDATE: 1e6,\n //When selling large number of shares, price is dynamically updated for every batch of this amount\n IssueNewSharesCooldown: 216e3,\n // 12 Hour in terms of game cycles\n SellSharesCooldown: 18e3,\n // 1 Hour in terms of game cycles\n CyclesPerMarketCycle: CyclesPerMarketCycle,\n CyclesPerIndustryStateCycle: CyclesPerMarketCycle / AllCorporationStates.length,\n SecsPerMarketCycle: CyclesPerMarketCycle / 5,\n Cities: [\"Aevum\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n WarehouseInitialCost: 5e9,\n //Initial purchase cost of warehouse\n WarehouseInitialSize: 100,\n WarehouseUpgradeBaseCost: 1e9,\n OfficeInitialCost: 4e9,\n OfficeInitialSize: 3,\n OfficeUpgradeBaseCost: 1e9,\n BribeThreshold: 100e12,\n //Money needed to be able to bribe for faction rep\n BribeToRepRatio: 1e9,\n //Bribe Value divided by this = rep gain\n ProductProductionCostRatio: 5,\n //Ratio of material cost of a product to its production cost\n DividendMaxPercentage: 0.5,\n EmployeeSalaryMultiplier: 3,\n // Employee stats multiplied by this to determine initial salary\n CyclesPerEmployeeRaise: 400,\n // All employees get a raise every X market cycles\n EmployeeRaiseAmount: 50,\n // Employee salary increases by this (additive)\n BaseMaxProducts: 3,\n // Initial value for maximum number of products allowed\n AllCorporationStates: AllCorporationStates,\n AllMaterials: [\"Water\", \"Energy\", \"Food\", \"Plants\", \"Metal\", \"Hardware\", \"Chemicals\", \"Drugs\", \"Robots\", \"AI Cores\", \"Real Estate\"]\n};\n\n//# sourceURL=webpack:///./src/Corporation/data/Constants.ts?");
|
||
|
||
/***/ }),
|
||
/* 36 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Server/ServerHelpers.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: safetlyCreateUniqueServer, numCycleForGrowth, processSingleServerGrowth, prestigeHomeComputer, GetServerByHostname, getServer, getServerOnNetwork, isBackdoorInstalled */
|
||
/*! exports used: GetServerByHostname, getServer, getServerOnNetwork, isBackdoorInstalled, numCycleForGrowth, prestigeHomeComputer, processSingleServerGrowth, safetlyCreateUniqueServer */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return safetlyCreateUniqueServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return numCycleForGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return processSingleServerGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return prestigeHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GetServerByHostname; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getServerOnNetwork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isBackdoorInstalled; });\n/* harmony import */ var _AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AllServers */ 29);\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _formulas_grow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/grow */ 434);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isValidNumber */ 521);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 435);\n\n\n\n\n\n\n\n\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\n\nfunction safetlyCreateUniqueServer(params) {\n if (params.ip != null && Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* ipExists */ \"e\"])(params.ip)) {\n params.ip = Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* createUniqueRandomIp */ \"c\"])();\n }\n\n if (GetServerByHostname(params.hostname) != null) {\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n let hostname = params.hostname;\n\n for (let i = 0; i < 200; ++i) {\n hostname = `${params.hostname}-${i}`;\n\n if (GetServerByHostname(hostname) == null) {\n break;\n }\n }\n\n params.hostname = hostname;\n }\n\n return new _Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"](params);\n}\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\n\nfunction numCycleForGrowth(server, growth, p) {\n let ajdGrowthRate = 1 + (_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerBaseGrowthRate - 1) / server.hackDifficulty;\n\n if (ajdGrowthRate > _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate) {\n ajdGrowthRate = _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n const cycles = Math.log(growth) / (Math.log(ajdGrowthRate) * p.hacking_grow_mult * serverGrowthPercentage * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate);\n return cycles;\n} //Applied server growth for a single server. Returns the percentage growth\n\nfunction processSingleServerGrowth(server, threads, p, cores = 1) {\n let serverGrowth = Object(_formulas_grow__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerGrowth */ \"a\"])(server, threads, p, cores);\n\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable *= serverGrowth; // in case of data corruption\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n } // cap at max\n\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n } // if there was any growth at all, increase security\n\n\n if (oldMoneyAvailable !== server.moneyAvailable) {\n //Growing increases server security twice as much as hacking\n let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p);\n usedCycles = Math.max(0, usedCycles);\n server.fortify(2 * _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.ceil(usedCycles));\n }\n\n return server.moneyAvailable / oldMoneyAvailable;\n}\nfunction prestigeHomeComputer(homeComp) {\n const hasBitflume = homeComp.programs.includes(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n homeComp.programs.length = 0; //Remove programs\n\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].NukeProgram.name);\n\n if (hasBitflume) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n } //Update RAM usage on all scripts\n\n\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(homeComp.scripts);\n });\n homeComp.messages.length = 0; //Remove .lit and .msg files\n\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n} //Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\n\nfunction GetServerByHostname(hostname) {\n for (const ip in _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"]) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"].hasOwnProperty(ip)) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip].hostname == hostname) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip];\n }\n }\n }\n\n return null;\n} //Get server by IP or hostname. Returns null if invalid\n\nfunction getServer(s) {\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__[/* isValidIPAddress */ \"a\"])(s)) {\n return GetServerByHostname(s);\n }\n\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s] !== undefined) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s];\n }\n\n return null;\n} // Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\n\nfunction getServerOnNetwork(server, i) {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][server.serversOnNetwork[i]];\n}\nfunction isBackdoorInstalled(server) {\n if (\"backdoorInstalled\" in server) {\n return server.backdoorInstalled;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Server/ServerHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 37 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Corporation/EmployeePositions.ts ***!
|
||
\**********************************************/
|
||
/*! exports provided: EmployeePositions */
|
||
/*! exports used: EmployeePositions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return EmployeePositions; });\nconst EmployeePositions = {\n Operations: \"Operations\",\n Engineer: \"Engineer\",\n Business: \"Business\",\n Management: \"Management\",\n RandD: \"Research & Development\",\n Training: \"Training\",\n Unassigned: \"Unassigned\"\n};\n\n//# sourceURL=webpack:///./src/Corporation/EmployeePositions.ts?");
|
||
|
||
/***/ }),
|
||
/* 38 */,
|
||
/* 39 */,
|
||
/* 40 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Corporation/IndustryData.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: Industries, IndustryStartingCosts, IndustryDescriptions, IndustryResearchTrees, resetIndustryResearchTrees */
|
||
/*! exports used: Industries, IndustryDescriptions, IndustryResearchTrees, IndustryStartingCosts, resetIndustryResearchTrees */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Industries; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return IndustryStartingCosts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return IndustryDescriptions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return IndustryResearchTrees; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return resetIndustryResearchTrees; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/BaseResearchTree */ 85);\n/* harmony import */ var _ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ui/MoneyCost */ 93);\n\n\n\n// Map of official names for each Industry\nconst Industries = {\n Energy: \"Energy\",\n Utilities: \"Water Utilities\",\n Agriculture: \"Agriculture\",\n Fishing: \"Fishing\",\n Mining: \"Mining\",\n Food: \"Food\",\n Tobacco: \"Tobacco\",\n Chemical: \"Chemical\",\n Pharmaceutical: \"Pharmaceutical\",\n Computer: \"Computer Hardware\",\n Robotics: \"Robotics\",\n Software: \"Software\",\n Healthcare: \"Healthcare\",\n RealEstate: \"RealEstate\"\n}; // Map of how much money it takes to start each industry\n\nconst IndustryStartingCosts = {\n Energy: 225e9,\n Utilities: 150e9,\n Agriculture: 40e9,\n Fishing: 80e9,\n Mining: 300e9,\n Food: 10e9,\n Tobacco: 20e9,\n Chemical: 70e9,\n Pharmaceutical: 200e9,\n Computer: 500e9,\n Robotics: 1e12,\n Software: 25e9,\n Healthcare: 750e9,\n RealEstate: 600e9\n}; // Map of description for each industry\n\nconst IndustryDescriptions = {\n Energy: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Engage in the production and distribution of energy.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Energy,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Utilities: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Distribute water and provide wastewater services.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Utilities,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Agriculture: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Cultivate crops and breed livestock to produce food.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Agriculture,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Fishing: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Produce food through the breeding and processing of fish and fish products.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Fishing,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Mining: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Extract and process metals from the earth.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Mining,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Food: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Create your own restaurants all around the world.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Food,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Tobacco: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Create and distribute tobacco and tobacco-related products.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Tobacco,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Chemical: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Produce industrial chemicals.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Chemical,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Pharmaceutical: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Discover, develop, and create new pharmaceutical drugs.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Pharmaceutical,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Computer: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop and manufacture new computer hardware and networking infrastructures.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Computer,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Robotics: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop and create robots.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Robotics,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n Software: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop computer software and create AI Cores.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Software,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: YES\"),\n Healthcare: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Create and manage hospitals.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.Healthcare,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\"),\n RealEstate: corp => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Develop and manage real estate properties.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Starting cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoneyCost__WEBPACK_IMPORTED_MODULE_2__[/* MoneyCost */ \"a\"], {\n money: IndustryStartingCosts.RealEstate,\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Recommended starting Industry: NO\")\n}; // Map of available Research for each Industry. This data is held in a\n// ResearchTree object\n\nconst IndustryResearchTrees = {\n Energy: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Utilities: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Agriculture: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Fishing: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Mining: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Food: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Tobacco: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Chemical: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])(),\n Pharmaceutical: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Computer: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Robotics: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Software: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n Healthcare: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])(),\n RealEstate: Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getProductIndustryResearchTreeCopy */ \"b\"])()\n};\nfunction resetIndustryResearchTrees() {\n IndustryResearchTrees.Energy = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Utilities = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Agriculture = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Fishing = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Mining = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Food = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Tobacco = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Chemical = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Pharmaceutical = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Computer = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Robotics = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Software = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.Healthcare = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n IndustryResearchTrees.RealEstate = Object(_data_BaseResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* getBaseResearchTreeCopy */ \"a\"])();\n}\n\n//# sourceURL=webpack:///./src/Corporation/IndustryData.tsx?");
|
||
|
||
/***/ }),
|
||
/* 41 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Locations/LocationTypeEnum.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: LocationType */
|
||
/*! exports used: LocationType */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationType; });\n/**\n * Enum defining the different types of possible locations\n */\nlet LocationType;\n\n(function (LocationType) {\n LocationType[LocationType[\"Company\"] = 0] = \"Company\";\n LocationType[LocationType[\"Gym\"] = 1] = \"Gym\";\n LocationType[LocationType[\"Hospital\"] = 2] = \"Hospital\";\n LocationType[LocationType[\"Slums\"] = 3] = \"Slums\";\n LocationType[LocationType[\"Special\"] = 4] = \"Special\";\n LocationType[LocationType[\"StockMarket\"] = 5] = \"StockMarket\";\n LocationType[LocationType[\"TechVendor\"] = 6] = \"TechVendor\";\n LocationType[LocationType[\"TravelAgency\"] = 7] = \"TravelAgency\";\n LocationType[LocationType[\"University\"] = 8] = \"University\";\n LocationType[LocationType[\"Casino\"] = 9] = \"Casino\";\n})(LocationType || (LocationType = {}));\n\n//# sourceURL=webpack:///./src/Locations/LocationTypeEnum.ts?");
|
||
|
||
/***/ }),
|
||
/* 42 */,
|
||
/* 43 */
|
||
/*!***************************!*\
|
||
!*** ./src/ui/Context.ts ***!
|
||
\***************************/
|
||
/*! exports provided: Context, use */
|
||
/*! exports used: Context, use */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Context; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return use; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nconst Context = {\n Player: react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext({}),\n Router: react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext({})\n};\nconst use = {\n Player: () => Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(Context.Player),\n Router: () => Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(Context.Router)\n};\n\n//# sourceURL=webpack:///./src/ui/Context.ts?");
|
||
|
||
/***/ }),
|
||
/* 44 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Bladeburner/data/Constants.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: BladeburnerConstants */
|
||
/*! exports used: BladeburnerConstants */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerConstants; });\nconst BladeburnerConstants = {\n CityNames: [\"Aevum\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n CyclesPerSecond: 5,\n // Game cycle is 200 ms\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285,\n // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000,\n // Max Stamina is divided by this to get bonus stamina gain\n DifficultyToTimeFactor: 10,\n // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n BaseRecruitmentTimeNeeded: 300,\n // Base time needed (s) to complete a Recruitment action\n PopulationThreshold: 1e9,\n // Population which determines baseline success rate\n PopulationExponent: 0.7,\n // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50,\n // City chaos level after which it starts making tasks harder\n BaseStatGain: 1,\n // Base stat gain per second\n BaseIntGain: 0.003,\n // Base intelligence stat gain\n ActionCountGrowthPeriod: 480,\n // Time (s) it takes for action count to grow by its specified value\n RankToFactionRepFactor: 2,\n // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n ContractSuccessesPerLevel: 3,\n // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5,\n // How many successes you need to level up an op\n RanksPerSkillPoint: 3,\n // How many ranks needed to get 1 Skill Point\n ContractBaseMoneyGain: 250e3,\n // Base Money Gained per contract\n HrcHpGain: 2,\n // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1 // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Constants.ts?");
|
||
|
||
/***/ }),
|
||
/* 45 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Literature/data/LiteratureNames.ts ***!
|
||
\************************************************/
|
||
/*! exports provided: LiteratureNames */
|
||
/*! exports used: LiteratureNames */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LiteratureNames; });\nconst LiteratureNames = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\"\n};\n\n//# sourceURL=webpack:///./src/Literature/data/LiteratureNames.ts?");
|
||
|
||
/***/ }),
|
||
/* 46 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Hacknet/HacknetHelpers.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: hasHacknetServers, purchaseHacknet, hasMaxNumberHacknetServers, getCostOfNextHacknetNode, getCostOfNextHacknetServer, getMaxNumberLevelUpgrades, getMaxNumberRamUpgrades, getMaxNumberCoreUpgrades, getMaxNumberCacheUpgrades, purchaseLevelUpgrade, purchaseRamUpgrade, purchaseCoreUpgrade, purchaseCacheUpgrade, processHacknetEarnings, updateHashManagerCapacity, purchaseHashUpgrade */
|
||
/*! exports used: getCostOfNextHacknetNode, getCostOfNextHacknetServer, getMaxNumberCacheUpgrades, getMaxNumberCoreUpgrades, getMaxNumberLevelUpgrades, getMaxNumberRamUpgrades, hasHacknetServers, hasMaxNumberHacknetServers, processHacknetEarnings, purchaseCacheUpgrade, purchaseCoreUpgrade, purchaseHacknet, purchaseHashUpgrade, purchaseLevelUpgrade, purchaseRamUpgrade, updateHashManagerCapacity */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return hasHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return purchaseHacknet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return hasMaxNumberHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getCostOfNextHacknetNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getCostOfNextHacknetServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return getMaxNumberLevelUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return getMaxNumberRamUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getMaxNumberCoreUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getMaxNumberCacheUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return purchaseLevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return purchaseRamUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return purchaseCoreUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return purchaseCacheUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return processHacknetEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return updateHashManagerCapacity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return purchaseHashUpgrade; });\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HacknetNode */ 248);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 198);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _HacknetServer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetServer */ 84);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashManager */ 288);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HashUpgrades */ 217);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CodingContractGenerator */ 289);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Server/Server */ 92);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\n\n\n\n\n\n\n\n\n\n\n\n\n // Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\n\nfunction hasHacknetServers(player) {\n return player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__[/* SourceFileFlags */ \"a\"][9] > 0;\n}\nfunction purchaseHacknet(player) {\n /* INTERACTIVE TUTORIAL */\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].isRunning) {\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialSteps */ \"d\"].HacknetNodesIntroduction) {\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialNextStep */ \"b\"])();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n\n const numOwned = player.hacknetNodes.length;\n\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n player.loseMoney(cost);\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n } // Auto generate a name for the Node\n\n\n const name = \"hacknet-node-\" + numOwned;\n const node = new _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"](name, player.hacknet_node_money_mult);\n player.loseMoney(cost);\n player.hacknetNodes.push(node);\n return numOwned;\n }\n}\nfunction hasMaxNumberHacknetServers(player) {\n return hasHacknetServers(player) && player.hacknetNodes.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxServers;\n}\nfunction getCostOfNextHacknetNode(player) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateNodeCost */ \"d\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\nfunction getCostOfNextHacknetServer(player) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerCost */ \"f\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\n\nfunction getMaxNumberLevelUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n\n if (player.money.gt(nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult))) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr !== maxLevel && player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) && player.money.lt(nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\n\nfunction getMaxNumberRamUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult))) {\n return 0;\n }\n\n let levelsToMax;\n\n if (nodeObj instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult))) {\n return levelsToMax;\n } //We'll just loop until we find the max\n\n\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult))) {\n return i;\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\n\nfunction getMaxNumberCoreUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n\n if (player.money.gt(nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) && player.money.lt(nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\n\nfunction getMaxNumberCacheUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) && !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\nfunction purchaseLevelUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // If we're at max level, return false\n\n if (node.level >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n return false;\n } // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n\n\n if (node.level + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseRamUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"] && node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n return false;\n }\n\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"] && node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n return false;\n } // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n if (node.ram * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCoreUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // Fail if we're already at max\n\n if (node.cores >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n return false;\n } // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n\n\n if (node.cores + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCacheUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n } // Fail if we're already at max\n\n\n if (node.cache + sanitizedLevels > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n const diff = Math.max(0, _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCache(sanitizedLevels);\n return true;\n}\nfunction processHacknetEarnings(player, numCycles) {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player, numCycles) {\n let total = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player, numCycles, nodeObj) {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings);\n player.recordMoneySource(totalEarnings, \"hacknetnode\");\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player, numCycles) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should not be HacketNode`);\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"]) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hserver.totalHashesGenerated += h;\n hashes += h;\n }\n\n player.hashManager.storeHashes(hashes);\n return hashes;\n}\n\nfunction updateHashManagerCapacity(player) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n const ip = nodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should be string but isn't`);\n const h = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n\n if (!(h instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\nfunction purchaseHashUpgrade(player, upgName, upgTarget) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return false;\n } // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n\n\n if (player.hashManager.upgrade(upgName)) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__[/* HashUpgrades */ \"a\"][upgName];\n\n switch (upgName) {\n case \"Sell for Money\":\n {\n player.gainMoney(upg.value);\n player.recordMoneySource(upg.value, \"hacknetnode\");\n break;\n }\n\n case \"Sell for Corporation Funds\":\n {\n // This will throw if player doesn't have a corporation\n try {\n player.corporation.funds = player.corporation.funds.plus(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Reduce Minimum Security\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Increase Maximum Money\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMaximumMoney(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Improve Studying\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Improve Gym Training\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Exchange for Corporation Research\":\n {\n // This will throw if player doesn't have a corporation\n try {\n for (const division of player.corporation.divisions) {\n division.sciResearch.qty += upg.value;\n }\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner Rank\":\n {\n // This will throw if player isnt in Bladeburner\n try {\n player.bladeburner.changeRank(player, upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner SP\":\n {\n // This will throw if player isn't in Bladeburner\n try {\n // As long as we don't change `Bladeburner.totalSkillPoints`, this\n // shouldn't affect anything else\n player.bladeburner.skillPoints += upg.value;\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Generate Coding Contract\":\n {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__[/* generateRandomContract */ \"b\"])();\n break;\n }\n\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetHelpers.tsx?");
|
||
|
||
/***/ }),
|
||
/* 47 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Company/Companies.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: Companies, initCompanies, loadCompanies, companyExists */
|
||
/*! exports used: Companies, initCompanies, loadCompanies */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return initCompanies; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return loadCompanies; });\n/* unused harmony export companyExists */\n/* harmony import */ var _data_CompaniesMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompaniesMetadata */ 647);\n/* harmony import */ var _Company__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company */ 172);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\n\nlet Companies = {};\n\nfunction addCompany(params) {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n Companies[params.name] = new _Company__WEBPACK_IMPORTED_MODULE_1__[/* Company */ \"a\"](params);\n} // Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\n\n\nfunction initCompanies() {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies; // Re-construct all Companies\n\n Companies = {};\n _data_CompaniesMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companiesMetadata */ \"a\"].forEach(e => {\n addCompany(e);\n }); // Reset data\n\n for (const companyName in Companies) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n\n if (!(oldCompany instanceof _Company__WEBPACK_IMPORTED_MODULE_1__[/* Company */ \"a\"])) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n} // Used to load Companies map from a save\n\nfunction loadCompanies(saveString) {\n Companies = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"]);\n} // Utility function to check if a string is valid company name\n\nfunction companyExists(name) {\n return Companies.hasOwnProperty(name);\n}\n\n//# sourceURL=webpack:///./src/Company/Companies.ts?");
|
||
|
||
/***/ }),
|
||
/* 48 */,
|
||
/* 49 */
|
||
/*!************************************!*\
|
||
!*** ./src/InteractiveTutorial.js ***!
|
||
\************************************/
|
||
/*! exports provided: iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial */
|
||
/*! exports used: ITutorial, iTutorialNextStep, iTutorialStart, iTutorialSteps */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return iTutorialSteps; });\n/* unused harmony export iTutorialEnd */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return iTutorialStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return iTutorialNextStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ITutorial; });\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 287);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 436);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 212);\n\n\n\n\n\n\n\n // Ordered array of keys to Interactive Tutorial Steps\n\nconst orderedITutorialSteps = [\"Start\", \"GoToCharacterPage\", // Click on 'Stats' page\n\"CharacterPage\", // Introduction to 'Stats' page\n\"CharacterGoToTerminalPage\", // Go back to Terminal\n\"TerminalIntro\", // Introduction to Terminal\n\"TerminalHelp\", // Using 'help' Terminal command\n\"TerminalLs\", // Using 'ls' Terminal command\n\"TerminalScan\", // Using 'scan' Terminal command\n\"TerminalScanAnalyze1\", // Using 'scan-analyze' Terminal command\n\"TerminalScanAnalyze2\", // Using 'scan-analyze 3' Terminal command\n\"TerminalConnect\", // Connecting to n00dles\n\"TerminalAnalyze\", // Analyzing n00dles\n\"TerminalNuke\", // NUKE n00dles\n\"TerminalManualHack\", // Hack n00dles\n\"TerminalHackingMechanics\", // Explanation of hacking mechanics\n\"TerminalCreateScript\", // Create a script using 'nano'\n\"TerminalTypeScript\", // Script Editor page - Type script and then save & close\n\"TerminalFree\", // Using 'Free' Terminal command\n\"TerminalRunScript\", // Running script using 'run' Terminal command\n\"TerminalGoToActiveScriptsPage\", \"ActiveScriptsPage\", \"ActiveScriptsToTerminal\", \"TerminalTailScript\", \"GoToHacknetNodesPage\", \"HacknetNodesIntroduction\", \"HacknetNodesGoToWorldPage\", \"WorldDescription\", \"TutorialPageInfo\", \"End\"]; // Create an 'enum' for the Steps\n\nconst iTutorialSteps = {};\n\nfor (let i = 0; i < orderedITutorialSteps.length; ++i) {\n iTutorialSteps[orderedITutorialSteps[i]] = i;\n}\n\nconst ITutorial = {\n currStep: 0,\n // iTutorialSteps.Start\n isRunning: false,\n // Keeps track of whether each step has been done\n stepIsDone: {}\n};\n\nfunction iTutorialStart() {\n // Initialize Interactive Tutorial state by settings 'done' for each state to false\n ITutorial.stepIsDone = {};\n\n for (let i = 0; i < orderedITutorialSteps.length; ++i) {\n ITutorial.stepIsDone[i] = false;\n } // Don't autosave during this interactive tutorial\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n ITutorial.currStep = 0;\n ITutorial.isRunning = true;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"block\"; // Exit tutorial button\n\n const exitButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-exit\");\n exitButton.addEventListener(\"click\", function () {\n iTutorialEnd();\n return false;\n }); // Back button\n\n const backButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-back\");\n backButton.addEventListener(\"click\", function () {\n iTutorialPrevStep();\n return false;\n }); // Next button\n\n const nextButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-next\");\n nextButton.addEventListener(\"click\", function () {\n iTutorialNextStep();\n return false;\n });\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEvaluateStep() {\n if (!ITutorial.isRunning) {\n return;\n } // Disable and clear main menu\n // const terminalMainMenu = clearEventListeners(\"terminal-menu-link\");\n // const statsMainMenu = clearEventListeners(\"stats-menu-link\");\n // const activeScriptsMainMenu = clearEventListeners(\"active-scripts-menu-link\");\n // const hacknetMainMenu = clearEventListeners(\"hacknet-nodes-menu-link\");\n // const cityMainMenu = clearEventListeners(\"city-menu-link\");\n // const tutorialMainMenu = clearEventListeners(\"tutorial-menu-link\");\n // terminalMainMenu.removeAttribute(\"class\");\n // statsMainMenu.removeAttribute(\"class\");\n // activeScriptsMainMenu.removeAttribute(\"class\");\n // hacknetMainMenu.removeAttribute(\"class\");\n // cityMainMenu.removeAttribute(\"class\");\n // tutorialMainMenu.removeAttribute(\"class\");\n // Interactive Tutorial Next button\n\n\n const nextBtn = document.getElementById(\"interactive-tutorial-next\");\n\n switch (ITutorial.currStep) {\n case iTutorialSteps.Start:\n iTutorialSetText(\"Welcome to Bitburner, a cyberpunk-themed incremental RPG! \" + \"The game takes place in a dark, dystopian future... The year is 2077...<br><br>\" + \"This tutorial will show you the basics of the game. \" + \"You may skip the tutorial at any time.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToCharacterPage:\n iTutorialSetText(\"Let's start by heading to the Stats page. Click the <code class='interactive-tutorial-tab flashing-button'>Stats</code> tab on \" + \"the main navigation menu (left-hand side of the screen)\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.CharacterPage:\n iTutorialSetText(\"The <code class='interactive-tutorial-tab'>Stats</code> page shows a lot of important information about your progress, \" + \"such as your skills, money, and bonuses. \");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.CharacterGoToTerminalPage:\n iTutorialSetText(\"Let's head to your computer's terminal by clicking the <code class='interactive-tutorial-tab flashing-button'>Terminal</code> tab on the \" + \"main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TerminalIntro:\n iTutorialSetText(\"The <code class='interactive-tutorial-tab'>Terminal</code> is used to interface with your home computer as well as \" + \"all of the other machines around the world.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalHelp:\n iTutorialSetText(\"Let's try it out. Start by entering the <code class='interactive-tutorial-command'>help</code> command into the <code class='interactive-tutorial-tab'>Terminal</code> \" + \"(Don't forget to press Enter after typing the command)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalLs:\n iTutorialSetText(\"The <code class='interactive-tutorial-command'>help</code> command displays a list of all available <code class='interactive-tutorial-tab'>Terminal</code> commands, how to use them, \" + \"and a description of what they do. <br><br>Let's try another command. Enter the <code class='interactive-tutorial-command'>ls</code> command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScan:\n iTutorialSetText(\" <code class='interactive-tutorial-command'>ls</code> is a basic command that shows files \" + \"on the computer. Right now, it shows that you have a program called <code class='interactive-tutorial-command'>NUKE.exe</code> on your computer. \" + \"We'll get to what this does later. <br><br>Using your home computer's terminal, you can connect \" + \"to other machines throughout the world. Let's do that now by first entering \" + \"the <code class='interactive-tutorial-command'>scan</code> command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze1:\n iTutorialSetText(\"The <code class='interactive-tutorial-command'>scan</code> command shows all available network connections. In other words, \" + \"it displays a list of all servers that can be connected to from your \" + \"current machine. A server is identified by its hostname. <br><br> \" + \"That's great and all, but there's so many servers. Which one should you go to? \" + \"The <code class='interactive-tutorial-command'>scan-analyze</code> command gives some more detailed information about servers on the \" + \"network. Try it now!\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze2:\n iTutorialSetText(\"You just ran <code class='interactive-tutorial-command'>scan-analyze</code> with a depth of one. This command shows more detailed \" + \"information about each server that you can connect to (servers that are a distance of \" + \"one node away). <br><br> It is also possible to run <code class='interactive-tutorial-command'>scan-analyze</code> with \" + \"a higher depth. Let's try a depth of two with the following command: <code class='interactive-tutorial-command'>scan-analyze 2</code>.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalConnect:\n iTutorialSetText(\"Now you can see information about all servers that are up to two nodes away, as well \" + \"as figure out how to navigate to those servers through the network. You can only connect to \" + \"a server that is one node away. To connect to a machine, use the <code class='interactive-tutorial-command'>connect [hostname]</code> command.<br><br>\" + \"From the results of the <code class='interactive-tutorial-command'>scan-analyze</code> command, we can see that the <code class='interactive-tutorial-command'>n00dles</code> server is \" + \"only one node away. Let's connect so it now using: <code class='interactive-tutorial-command'>connect n00dles</code>\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalAnalyze:\n iTutorialSetText(\"You are now connected to another machine! What can you do now? You can hack it!<br><br> In the year 2077, currency has \" + \"become digital and decentralized. People and corporations store their money \" + \"on servers and computers. Using your hacking abilities, you can hack servers \" + \"to steal money and gain experience. <br><br> \" + \"Before you try to hack a server, you should run diagnostics using the <code class='interactive-tutorial-command'>analyze</code> command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalNuke:\n iTutorialSetText(\"When the <code class='interactive-tutorial-command'>analyze</code> command finishes running it will show useful information \" + \"about hacking the server. <br><br> For this server, the required hacking skill is only <span class='character-hack-cell'>1</span>, \" + \"which means you can hack it right now. However, in order to hack a server \" + \"you must first gain root access. The <code class='interactive-tutorial-command'>NUKE.exe</code> program that we saw earlier on your \" + \"home computer is a virus that will grant you root access to a machine if there are enough \" + \"open ports.<br><br> The <code class='interactive-tutorial-command'>analyze</code> results shows that there do not need to be any open ports \" + \"on this machine for the NUKE virus to work, so go ahead and run the virus using the \" + \"<code class='interactive-tutorial-command'>run NUKE.exe</code> command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalManualHack:\n iTutorialSetText(\"You now have root access! You can hack the server using the <code class='interactive-tutorial-command'>hack</code> command. \" + \"Try doing that now.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalHackingMechanics:\n iTutorialSetText(\"You are now attempting to hack the server. Performing a hack takes time and \" + \"only has a certain percentage chance \" + \"of success. This time and success chance is determined by a variety of factors, including \" + \"your hacking skill and the server's security level.<br><br>\" + \"If your attempt to hack the server is successful, you will steal a certain percentage \" + \"of the server's total money. This percentage is affected by your hacking skill and \" + \"the server's security level.<br><br>The amount of money on a server is not limitless. So, if \" + \"you constantly hack a server and deplete its money, then you will encounter \" + \"diminishing returns in your hacking.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalCreateScript:\n iTutorialSetText(\"Hacking is the core mechanic of the game and is necessary for progressing. However, \" + \"you don't want to be hacking manually the entire time. You can automate your hacking \" + \"by writing scripts!<br><br>To create a new script or edit an existing one, you can use the <code class='interactive-tutorial-command'>nano</code> \" + \"command. Scripts must end with the <code class='interactive-tutorial-command'>.script</code> extension. Let's make a script now by \" + \"entering <code class='interactive-tutorial-command'>nano n00dles.script</code> after the hack command finishes running (Sidenote: Pressing ctrl + c\" + \" will end a command like hack early)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTypeScript:\n iTutorialSetText(\"This is the script editor. You can use it to program your scripts. Scripts are \" + \"written in a simplified version of javascript. Copy and paste the following code into the script editor: <br><br>\" + \"<pre class='interactive-tutorial-code'>\" + \"while(true) {\\n\" + \" hack('n00dles');\\n\" + \"}</pre>\" + \"For anyone with basic programming experience, this code should be straightforward. \" + \"This script will continuously hack the <code class='interactive-tutorial-command'>n00dles</code> server.<br><br>\" + \"To save and close the script editor, press the button in the bottom left, or press ctrl + b.\");\n nextBtn.style.display = \"none\"; // next step triggered in saveAndCloseScriptEditor() (Script.js)\n\n break;\n\n case iTutorialSteps.TerminalFree:\n iTutorialSetText(\"Now we'll run the script. Scripts require a certain amount of RAM to run, and can be \" + \"run on any machine which you have root access to. Different servers have different \" + \"amounts of RAM. You can also purchase more RAM for your home server.<br><br>To check how much \" + \"RAM is available on this machine, enter the <code class='interactive-tutorial-command'>free</code> command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalRunScript:\n iTutorialSetText(\"We have 4GB of free RAM on this machine, which is enough to run our \" + \"script. Let's run our script using <code class='interactive-tutorial-command'>run n00dles.script</code>.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalGoToActiveScriptsPage:\n iTutorialSetText(\"Your script is now running! \" + \"It will continuously run in the background and will automatically stop if \" + \"the code ever completes (the <code class='interactive-tutorial-command'>n00dles.script</code> will never complete because it \" + \"runs an infinite loop). <br><br>These scripts can passively earn you income and hacking experience. \" + \"Your scripts will also earn money and experience while you are offline, although at a \" + \"slightly slower rate. <br><br> \" + \"Let's check out some statistics for our running scripts by clicking the \" + \"<code class='interactive-tutorial-tab flashing-button'>Active Scripts</code> link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsPage:\n iTutorialSetText(\"This page displays information about all of your scripts that are \" + \"running across every server. You can use this to gauge how well \" + \"your scripts are doing. Let's go back to the <code class='interactive-tutorial-tab flashing-button'>Terminal</code>\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsToTerminal:\n iTutorialSetText(\"One last thing about scripts, each active script contains logs that detail \" + \"what it's doing. We can check these logs using the <code class='interactive-tutorial-command'>tail</code> command. Do that \" + \"now for the script we just ran by typing <code class='interactive-tutorial-command'>tail n00dles.script</code>\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTailScript:\n iTutorialSetText(\"The log for this script won't show much right now (it might show nothing at all) because it \" + \"just started running...but check back again in a few minutes! <br><br>\" + \"This covers the basics of hacking. To learn more about writing \" + \"scripts, select the <code class='interactive-tutorial-tab'>Tutorial</code> link in the \" + \"main navigation menu to look at the documentation. \" + \"<strong style='background-color:#444;'>If you are an experienced JavaScript \" + \"developer, I would highly suggest you check out the section on \" + \"NetscriptJS/Netscript 2.0, it's faster and more powerful.</strong><br><br>For now, let's move on to something else!\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToHacknetNodesPage:\n iTutorialSetText(\"Hacking is not the only way to earn money. One other way to passively \" + \"earn money is by purchasing and upgrading Hacknet Nodes. Let's go to \" + \"the <code class='interactive-tutorial-tab flashing-button'>Hacknet</code> page through the main navigation menu now.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.HacknetNodesIntroduction:\n iTutorialSetText(\"here you can purchase new Hacknet Nodes and upgrade your \" + \"existing ones. Let's purchase a new one now.\");\n nextBtn.style.display = \"none\"; // Next step triggered by purchaseHacknet() (HacknetNode.js)\n\n break;\n\n case iTutorialSteps.HacknetNodesGoToWorldPage:\n iTutorialSetText(\"You just purchased a Hacknet Node! This Hacknet Node will passively \" + \"earn you money over time, both online and offline. When you get enough \" + \" money, you can upgrade \" + \"your newly-purchased Hacknet Node below.<br><br>\" + \"Let's go to the <code class='interactive-tutorial-tab flashing-button'>City</code> page through the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.WorldDescription:\n iTutorialSetText(\"This page lists all of the different locations you can currently \" + \"travel to. Each location has something that you can do. \" + \"There's a lot of content out in the world, make sure \" + \"you explore and discover!<br><br>\" + \"Lastly, click on the <code class='interactive-tutorial-tab flashing-button'>Tutorial</code> link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TutorialPageInfo:\n iTutorialSetText(\"This page contains a lot of different documentation about the game's \" + \"content and mechanics. <strong style='background-color:#444;'> I know it's a lot, but I highly suggest you read \" + \"(or at least skim) through this before you start playing</strong>. That's the end of the tutorial. \" + \"Hope you enjoy the game!\");\n nextBtn.style.display = \"inline-block\";\n nextBtn.innerHTML = \"Finish Tutorial\";\n break;\n\n case iTutorialSteps.End:\n iTutorialEnd();\n break;\n\n default:\n throw new Error(\"Invalid tutorial step\");\n }\n\n if (ITutorial.stepIsDone[ITutorial.currStep] === true) {\n nextBtn.style.display = \"inline-block\";\n }\n} // Go to the next step and evaluate it\n\n\nfunction iTutorialNextStep() {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n\n iTutorialEvaluateStep();\n} // Go to previous step and evaluate\n\n\nfunction iTutorialPrevStep() {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEnd() {\n // Re-enable auto save\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n } else {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval * 5;\n }\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].init();\n ITutorial.currStep = iTutorialSteps.End;\n ITutorial.isRunning = false;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"none\"; // Create a popup with final introductory stuff\n\n const popupId = \"interactive-tutorial-ending-popup\";\n const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: \"If you are new to the game, the following links may be useful for you!<br><br>\" + \"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a>\" + \"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>\" + \"The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. \" + \"To read it, go to Terminal and enter<br><br>cat \" + _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook\n });\n const gotitBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n float: \"right\",\n padding: \"6px\",\n innerText: \"Got it!\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__[/* removeElementById */ \"a\"])(popupId);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, [txt, gotitBtn]);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n}\n\nlet textBox = null;\n\n(function () {\n function set() {\n textBox = document.getElementById(\"interactive-tutorial-text\");\n document.removeEventListener(\"DOMContentLoaded\", set);\n }\n\n document.addEventListener(\"DOMContentLoaded\", set);\n})();\n\nfunction iTutorialSetText(txt) {\n textBox.innerHTML = txt;\n textBox.parentElement.scrollTop = 0; // this resets scroll position\n}\n\n\n\n//# sourceURL=webpack:///./src/InteractiveTutorial.js?");
|
||
|
||
/***/ }),
|
||
/* 50 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/SourceFile/SourceFileFlags.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: SourceFileFlags, updateSourceFileFlags */
|
||
/*! exports used: SourceFileFlags, updateSourceFileFlags */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileFlags; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return updateSourceFileFlags; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n// Contains an array containing information about the player's source files\n// Array[n] returns what level the player has of Source-File N.\n\nconst SourceFileFlags = Array(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TotalNumBitNodes + 1); // Skip index 0\n\nfunction updateSourceFileFlags(p) {\n for (let i = 0; i < SourceFileFlags.length; ++i) {\n SourceFileFlags[i] = 0;\n }\n\n for (let i = 0; i < p.sourceFiles.length; ++i) {\n const sf = p.sourceFiles[i];\n SourceFileFlags[sf.n] = sf.lvl;\n }\n}\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFileFlags.ts?");
|
||
|
||
/***/ }),
|
||
/* 51 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Server/SpecialServerIps.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: SpecialServerNames, SpecialServerIpsMap, SpecialServerIps, prestigeSpecialServerIps, loadSpecialServerIps, initSpecialServerIps */
|
||
/*! exports used: SpecialServerIps, SpecialServerNames, initSpecialServerIps, loadSpecialServerIps, prestigeSpecialServerIps */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SpecialServerNames; });\n/* unused harmony export SpecialServerIpsMap */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return prestigeSpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadSpecialServerIps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initSpecialServerIps; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n/* Holds IP of Special Servers */\n\nconst SpecialServerNames = {\n FulcrumSecretTechnologies: \"Fulcrum Secret Technologies Server\",\n CyberSecServer: \"CyberSec Server\",\n NiteSecServer: \"NiteSec Server\",\n TheBlackHandServer: \"The Black Hand Server\",\n BitRunnersServer: \"BitRunners Server\",\n TheDarkArmyServer: \"The Dark Army Server\",\n DaedalusServer: \"Daedalus Server\",\n WorldDaemon: \"w0r1d_d43m0n\"\n};\nclass SpecialServerIpsMap {\n // eslint-disable-next-line @typescript-eslint/ban-types\n addIp(name, ip) {\n this[name] = ip;\n }\n\n getIp(name) {\n return this[name];\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"SpecialServerIpsMap\", this);\n } // Initializes a SpecialServerIpsMap Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(SpecialServerIpsMap, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.SpecialServerIpsMap = SpecialServerIpsMap;\nlet SpecialServerIps = new SpecialServerIpsMap();\nfunction prestigeSpecialServerIps() {\n for (const member in SpecialServerIps) {\n delete SpecialServerIps[member];\n }\n\n SpecialServerIps = new SpecialServerIpsMap();\n}\nfunction loadSpecialServerIps(saveString) {\n SpecialServerIps = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"]);\n}\nfunction initSpecialServerIps() {\n SpecialServerIps = new SpecialServerIpsMap();\n}\n\n//# sourceURL=webpack:///./src/Server/SpecialServerIps.ts?");
|
||
|
||
/***/ }),
|
||
/* 52 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/StockMarket/data/PositionTypes.ts ***!
|
||
\***********************************************/
|
||
/*! exports provided: PositionTypes */
|
||
/*! exports used: PositionTypes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PositionTypes; });\nlet PositionTypes;\n\n(function (PositionTypes) {\n PositionTypes[\"Long\"] = \"L\";\n PositionTypes[\"Short\"] = \"S\";\n})(PositionTypes || (PositionTypes = {}));\n\n//# sourceURL=webpack:///./src/StockMarket/data/PositionTypes.ts?");
|
||
|
||
/***/ }),
|
||
/* 53 */
|
||
/*!************************************!*\
|
||
!*** ./src/Corporation/Actions.ts ***!
|
||
\************************************/
|
||
/*! exports provided: NewIndustry, NewCity, UnlockUpgrade, LevelUpgrade, IssueDividends, SellMaterial, SellProduct, SetSmartSupply, SetSmartSupplyUseLeftovers, BuyMaterial, AssignJob, UpgradeOfficeSize, ThrowParty, PurchaseWarehouse, UpgradeWarehouse, BuyCoffee, HireAdVert, MakeProduct, Research, ExportMaterial, CancelExportMaterial, LimitProductProduction, SetMaterialMarketTA1, SetMaterialMarketTA2, SetProductMarketTA1, SetProductMarketTA2 */
|
||
/*! exports used: AssignJob, BuyCoffee, BuyMaterial, CancelExportMaterial, ExportMaterial, HireAdVert, IssueDividends, LevelUpgrade, LimitProductProduction, MakeProduct, NewCity, NewIndustry, PurchaseWarehouse, Research, SellMaterial, SellProduct, SetMaterialMarketTA1, SetMaterialMarketTA2, SetProductMarketTA1, SetProductMarketTA2, SetSmartSupply, SetSmartSupplyUseLeftovers, ThrowParty, UnlockUpgrade, UpgradeOfficeSize, UpgradeWarehouse */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return NewIndustry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return NewCity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return UnlockUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return LevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return IssueDividends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return SellMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return SellProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"u\", function() { return SetSmartSupply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"v\", function() { return SetSmartSupplyUseLeftovers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BuyMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AssignJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return UpgradeOfficeSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"w\", function() { return ThrowParty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return PurchaseWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"z\", function() { return UpgradeWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BuyCoffee; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return HireAdVert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return MakeProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return Research; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return CancelExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return LimitProductProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"q\", function() { return SetMaterialMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"r\", function() { return SetMaterialMarketTA2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"s\", function() { return SetProductMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return SetProductMarketTA2; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 40);\n/* harmony import */ var _Industry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Industry */ 698);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OfficeSpace */ 290);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Product */ 314);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Locations/Cities */ 105);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./IndustryUpgrades */ 291);\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ResearchMap */ 285);\n\n\n\n\n\n\n\n\n\n\nfunction NewIndustry(corporation, industry, name) {\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n return;\n }\n }\n\n const cost = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryStartingCosts */ \"d\"][industry];\n\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds.minus(cost);\n corporation.divisions.push(new _Industry__WEBPACK_IMPORTED_MODULE_1__[/* Industry */ \"a\"]({\n corp: corporation,\n name: name,\n type: industry\n }));\n }\n}\nfunction NewCity(corporation, division, city) {\n if (corporation.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost)) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost);\n division.offices[city] = new _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__[/* OfficeSpace */ \"a\"]({\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n });\n }\n}\nfunction UnlockUpgrade(corporation, upgrade) {\n if (corporation.funds.lt(upgrade[1])) {\n throw new Error(\"Insufficient funds\");\n }\n\n corporation.unlock(upgrade);\n}\nfunction LevelUpgrade(corporation, upgrade) {\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgrade[0]];\n const cost = baseCost * Math.pow(priceMult, level);\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\nfunction IssueDividends(corporation, percent) {\n if (isNaN(percent) || percent < 0 || percent > _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\nfunction SellMaterial(mat, amt, price) {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MP]/g, \"\"); //Sanitize cost\n\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n } //Parse quantity\n\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, \"1\");\n tempQty = tempQty.replace(/PROD/g, \"1\");\n\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n\n if (isNaN(q)) {\n q = 0;\n }\n\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\nfunction SellProduct(product, city, amt, price, all) {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell quantity field.\");\n }\n\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n\n product.sCost = cost;\n } // Array of all cities. Used later\n\n\n const cities = Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__[/* Cities */ \"a\"]); // Parse quantity\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, \"1\");\n temp = temp.replace(/PROD/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric\");\n } else {\n let qty = parseFloat(amt);\n\n if (isNaN(qty)) {\n qty = 0;\n }\n\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n }\n}\nfunction SetSmartSupply(warehouse, smartSupply) {\n warehouse.smartSupplyEnabled = smartSupply;\n}\nfunction SetSmartSupplyUseLeftovers(warehouse, material, useLeftover) {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name)) throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name] = useLeftover;\n}\nfunction BuyMaterial(material, amt) {\n if (isNaN(amt)) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n\n material.buy = amt;\n}\nfunction AssignJob(employee, job) {\n if (!Object.values(_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__[/* EmployeePositions */ \"a\"]).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\nfunction UpgradeOfficeSize(corp, office, size) {\n const initialPriceMult = Math.round(office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09; // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const cost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n if (corp.funds.lt(cost)) return;\n office.size += size;\n corp.funds = corp.funds.minus(cost);\n}\nfunction ThrowParty(corp, office, costPerEmployee) {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds.lt(totalCost)) return 0;\n corp.funds = corp.funds.minus(totalCost);\n let mult = 0;\n\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\nfunction PurchaseWarehouse(corp, division, city) {\n if (corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)) return;\n if (division.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) return;\n division.warehouses[city] = new _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]({\n corp: corp,\n industry: division,\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n });\n corp.funds = corp.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost);\n}\nfunction UpgradeWarehouse(corp, division, warehouse) {\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds.minus(sizeUpgradeCost);\n}\nfunction BuyCoffee(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction HireAdVert(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction MakeProduct(corp, division, city, productName, designInvest, marketingInvest) {\n if (designInvest < 0) {\n designInvest = 0;\n }\n\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n\n if (corp.funds.lt(designInvest + marketingInvest)) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n\n const product = new _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]({\n name: productName.replace(/[<>]/g, \"\"),\n //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest\n });\n\n if (division.products[product.name] instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds.minus(designInvest + marketingInvest);\n division.products[product.name] = product;\n}\nfunction Research(division, researchName) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryResearchTrees */ \"c\"][division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_9__[/* ResearchMap */ \"a\"][researchName];\n if (division.sciResearch.qty < research.cost) throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost; // Get the Node from the Research Tree and set its 'researched' property\n\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\nfunction ExportMaterial(divisionName, cityName, material, amt) {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\");\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n\n const exportObj = {\n ind: divisionName,\n city: cityName,\n amt: sanitizedAmt\n };\n material.exp.push(exportObj);\n}\nfunction CancelExportMaterial(divisionName, cityName, material, amt) {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt) continue;\n material.exp.splice(i, 1);\n break;\n }\n}\nfunction LimitProductProduction(product, cityName, qty) {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\nfunction SetMaterialMarketTA1(material, on) {\n material.marketTa1 = on;\n}\nfunction SetMaterialMarketTA2(material, on) {\n material.marketTa2 = on;\n}\nfunction SetProductMarketTA1(product, on) {\n product.marketTa1 = on;\n}\nfunction SetProductMarketTA2(product, on) {\n product.marketTa2 = on;\n}\n\n//# sourceURL=webpack:///./src/Corporation/Actions.ts?");
|
||
|
||
/***/ }),
|
||
/* 54 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Programs/Programs.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: Programs */
|
||
/*! exports used: Programs */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var _Program__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Program */ 650);\n/* harmony import */ var _data_ProgramsMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/ProgramsMetadata */ 651);\n\n\nconst Programs = {};\n\nfor (const params of _data_ProgramsMetadata__WEBPACK_IMPORTED_MODULE_1__[/* programsMetadata */ \"a\"]) {\n Programs[params.key] = new _Program__WEBPACK_IMPORTED_MODULE_0__[/* Program */ \"a\"](params.name, params.create, params.run);\n}\n\n//# sourceURL=webpack:///./src/Programs/Programs.ts?");
|
||
|
||
/***/ }),
|
||
/* 55 */
|
||
/*!*********************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts ***!
|
||
\*********************************************************/
|
||
/*! exports provided: SleeveTaskType */
|
||
/*! exports used: SleeveTaskType */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveTaskType; });\n/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nlet SleeveTaskType;\n\n(function (SleeveTaskType) {\n SleeveTaskType[SleeveTaskType[\"Idle\"] = 0] = \"Idle\";\n SleeveTaskType[SleeveTaskType[\"Company\"] = 1] = \"Company\";\n SleeveTaskType[SleeveTaskType[\"Faction\"] = 2] = \"Faction\";\n SleeveTaskType[SleeveTaskType[\"Crime\"] = 3] = \"Crime\";\n SleeveTaskType[SleeveTaskType[\"Class\"] = 4] = \"Class\";\n SleeveTaskType[SleeveTaskType[\"Gym\"] = 5] = \"Gym\";\n SleeveTaskType[SleeveTaskType[\"Recovery\"] = 6] = \"Recovery\";\n SleeveTaskType[SleeveTaskType[\"Synchro\"] = 7] = \"Synchro\";\n})(SleeveTaskType || (SleeveTaskType = {}));\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts?");
|
||
|
||
/***/ }),
|
||
/* 56 */,
|
||
/* 57 */,
|
||
/* 58 */,
|
||
/* 59 */
|
||
/*!******************************!*\
|
||
!*** ./src/Gang/AllGangs.ts ***!
|
||
\******************************/
|
||
/*! exports provided: AllGangs, resetGangs, loadAllGangs */
|
||
/*! exports used: AllGangs, loadAllGangs, resetGangs */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AllGangs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return resetGangs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadAllGangs; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\nlet AllGangs = {\n \"Slum Snakes\": {\n power: 1,\n territory: 1 / 7\n },\n Tetrads: {\n power: 1,\n territory: 1 / 7\n },\n \"The Syndicate\": {\n power: 1,\n territory: 1 / 7\n },\n \"The Dark Army\": {\n power: 1,\n territory: 1 / 7\n },\n \"Speakers for the Dead\": {\n power: 1,\n territory: 1 / 7\n },\n NiteSec: {\n power: 1,\n territory: 1 / 7\n },\n \"The Black Hand\": {\n power: 1,\n territory: 1 / 7\n }\n};\nfunction resetGangs() {\n AllGangs = {\n \"Slum Snakes\": {\n power: 1,\n territory: 1 / 7\n },\n Tetrads: {\n power: 1,\n territory: 1 / 7\n },\n \"The Syndicate\": {\n power: 1,\n territory: 1 / 7\n },\n \"The Dark Army\": {\n power: 1,\n territory: 1 / 7\n },\n \"Speakers for the Dead\": {\n power: 1,\n territory: 1 / 7\n },\n NiteSec: {\n power: 1,\n territory: 1 / 7\n },\n \"The Black Hand\": {\n power: 1,\n territory: 1 / 7\n }\n };\n}\nfunction loadAllGangs(saveString) {\n AllGangs = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"]);\n}\n\n//# sourceURL=webpack:///./src/Gang/AllGangs.ts?");
|
||
|
||
/***/ }),
|
||
/* 60 */
|
||
/*!*****************************!*\
|
||
!*** ./src/Crime/Crimes.ts ***!
|
||
\*****************************/
|
||
/*! exports provided: Crimes */
|
||
/*! exports used: Crimes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Crimes; });\n/* harmony import */ var _Crime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Crime */ 157);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Constants */ 5);\n\n\nconst Crimes = {\n Shoplift: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Shoplift\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeShoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n dexterity_exp: 2,\n agility_exp: 2\n }),\n RobStore: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Rob Store\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeRobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n intelligence_exp: 7.5 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Mug: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Mug\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeMug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5\n }),\n Larceny: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Larceny\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeLarceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n intelligence_exp: 15 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n DealDrugs: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Deal Drugs\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeDrugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1\n }),\n BondForgery: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Bond Forgery\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeBondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n intelligence_exp: 60 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n TraffickArms: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Traffick Arms\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeTraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1\n }),\n Homicide: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Homicide\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeHomicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n kills: 1\n }),\n GrandTheftAuto: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Grand Theft Auto\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeGrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n intelligence_exp: 16 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Kidnap: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Kidnap\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeKidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n intelligence_exp: 26 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n }),\n Assassination: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Assassination\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeAssassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n intelligence_exp: 65 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain,\n kills: 1\n }),\n Heist: new _Crime__WEBPACK_IMPORTED_MODULE_0__[/* Crime */ \"a\"](\"Heist\", _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].CrimeHeist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n intelligence_exp: 130 * _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].IntelligenceCrimeBaseExpGain\n })\n};\n\n//# sourceURL=webpack:///./src/Crime/Crimes.ts?");
|
||
|
||
/***/ }),
|
||
/* 61 */
|
||
/*!*****************************!*\
|
||
!*** ./src/Casino/utils.ts ***!
|
||
\*****************************/
|
||
/*! exports provided: trusted */
|
||
/*! exports used: trusted */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return trusted; });\nfunction trusted(f) {\n return function (event) {\n if (!event.isTrusted) return;\n f();\n };\n}\n\n//# sourceURL=webpack:///./src/Casino/utils.ts?");
|
||
|
||
/***/ }),
|
||
/* 62 */,
|
||
/* 63 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Company/CompanyPositions.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: CompanyPositions */
|
||
/*! exports used: CompanyPositions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyPositions; });\n/* harmony import */ var _data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompanyPositionsMetadata */ 697);\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyPosition */ 276);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\nconst CompanyPositions = {};\n\nfunction addCompanyPosition(params) {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n CompanyPositions[params.name] = new _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__[/* CompanyPosition */ \"a\"](params);\n}\n\n_data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companyPositionMetadata */ \"a\"].forEach(e => {\n addCompanyPosition(e);\n});\n\n//# sourceURL=webpack:///./src/Company/CompanyPositions.ts?");
|
||
|
||
/***/ }),
|
||
/* 64 */,
|
||
/* 65 */,
|
||
/* 66 */,
|
||
/* 67 */
|
||
/*!************************************!*\
|
||
!*** ./src/Fconf/FconfSettings.ts ***!
|
||
\************************************/
|
||
/*! exports provided: FconfSettings */
|
||
/*! exports used: FconfSettings */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FconfSettings; });\nconst FconfSettings = {\n ENABLE_BASH_HOTKEYS: false,\n ENABLE_TIMESTAMPS: false,\n MAIN_MENU_STYLE: \"default\",\n THEME_BACKGROUND_COLOR: \"#000000\",\n THEME_FONT_COLOR: \"#66ff33\",\n THEME_HIGHLIGHT_COLOR: \"#ffffff\",\n THEME_PROMPT_COLOR: \"#f92672\",\n WRAP_INPUT: false\n};\n\n//# sourceURL=webpack:///./src/Fconf/FconfSettings.ts?");
|
||
|
||
/***/ }),
|
||
/* 68 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/StockMarket/data/StockSymbols.ts ***!
|
||
\**********************************************/
|
||
/*! exports provided: StockSymbols */
|
||
/*! exports used: StockSymbols */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockSymbols; });\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n\nconst StockSymbols = {}; // Stocks for companies at which you can work\n\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumECorp] = \"ECP\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12MegaCorp] = \"MGCP\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12BladeIndustries] = \"BLD\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumClarkeIncorporated] = \"CLRK\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated] = \"OMTK\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FourSigma] = \"FSIG\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational] = \"KGI\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies] = \"FLCM\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaStormTechnologies] = \"STM\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoDefComm] = \"DCOMM\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenHeliosLabs] = \"HLS\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoVitaLife] = \"VITA\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems] = \"ICRS\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12UniversalEnergy] = \"UNV\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumAeroCorp] = \"AERO\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems] = \"OMN\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems] = \"SLRS\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals] = \"GPH\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaNovaMedical] = \"NVMD\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumWatchdogSecurity] = \"WDS\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenLexoCorp] = \"LXO\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumRhoConstruction] = \"RHOC\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12AlphaEnterprises] = \"APHE\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities] = \"SYSC\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenCompuTek] = \"CTK\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumNetLinkTechnologies] = \"NTLK\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaOmegaSoftware] = \"OMGA\";\nStockSymbols[_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FoodNStuff] = \"FNS\"; // Stocks for other companies\n\nStockSymbols[\"Sigma Cosmetics\"] = \"SGC\";\nStockSymbols[\"Joes Guns\"] = \"JGN\";\nStockSymbols[\"Catalyst Ventures\"] = \"CTYS\";\nStockSymbols[\"Microdyne Technologies\"] = \"MDYN\";\nStockSymbols[\"Titan Laboratories\"] = \"TITN\";\n\n//# sourceURL=webpack:///./src/StockMarket/data/StockSymbols.ts?");
|
||
|
||
/***/ }),
|
||
/* 69 */,
|
||
/* 70 */,
|
||
/* 71 */,
|
||
/* 72 */,
|
||
/* 73 */,
|
||
/* 74 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/StockMarket/StockMarket.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: StockMarket, SymbolToStockMap, placeOrder, cancelOrder, loadStockMarket, deleteStockMarket, initStockMarket, initSymbolToStockMap, stockMarketCycle, processStockPrices, initStockMarketFnForReact, eventEmitterForUiReset */
|
||
/*! exports used: StockMarket, SymbolToStockMap, cancelOrder, deleteStockMarket, eventEmitterForUiReset, initStockMarket, initStockMarketFnForReact, initSymbolToStockMap, loadStockMarket, placeOrder, processStockPrices */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SymbolToStockMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return placeOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return cancelOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return loadStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return deleteStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return initStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return initSymbolToStockMap; });\n/* unused harmony export stockMarketCycle */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return processStockPrices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return initStockMarketFnForReact; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return eventEmitterForUiReset; });\n/* harmony import */ var _Order__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Order */ 527);\n/* harmony import */ var _OrderProcessing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrderProcessing */ 253);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockMarketConstants */ 473);\n/* harmony import */ var _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/InitStockMetadata */ 705);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data/StockSymbols */ 68);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/EventEmitter */ 344);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! .././ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n}; // Maps full stock name -> Stock object\n\nconst SymbolToStockMap = {}; // Maps symbol -> Stock object\n\nfunction placeOrder(stock, shares, price, type, position, workerScript = null) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid stock: '${stock}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n\n return false;\n }\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n\n return false;\n }\n\n const order = new _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"](stock.symbol, shares, price, type, position);\n\n if (StockMarket[\"Orders\"] == null) {\n const orders = {};\n\n for (const name in StockMarket) {\n const stk = StockMarket[name];\n\n if (!(stk instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stk.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n }\n\n StockMarket[\"Orders\"][stock.symbol].push(order); // Process to see if it should be executed immediately\n\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, order.type, order.pos, processOrderRefs);\n return true;\n} // Returns true if successfully cancels an order, false otherwise\n\nfunction cancelOrder(params, workerScript = null) {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n\n if (params.order && params.order instanceof _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"]) {\n const order = params.order; // An 'Order' object is passed in\n\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n\n return false;\n } else if (params.stock && params.shares && params.price && params.type && params.pos && params.stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"]) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatMoney(params.price);\n\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n\n if (params.shares === order.shares && params.price === order.price && params.type === order.type && params.pos === order.pos) {\n stockOrders.splice(i, 1);\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n\n return true;\n }\n }\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n\n return false;\n }\n\n return false;\n}\nfunction loadStockMarket(saveString) {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n } else {\n StockMarket = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__[/* Reviver */ \"c\"]);\n }\n}\nfunction deleteStockMarket() {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n}\nfunction initStockMarket() {\n for (const stk in StockMarket) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__[/* InitStockMetadata */ \"a\"]) {\n const name = metadata.name;\n StockMarket[name] = new _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"](metadata);\n }\n\n const orders = {};\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n}\nfunction initSymbolToStockMap() {\n for (const name in _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"]) {\n if (_data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"].hasOwnProperty(name)) {\n const stock = StockMarket[name];\n\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n\n const symbol = _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"][name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\nfunction stockMarketCycle() {\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n const roll = Math.random();\n\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n} // Stock prices updated every 6 seconds\n\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction processStockPrices(numCycles = 1) {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n } // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n\n\n const timeNow = new Date().getTime();\n\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate; // Cycle\n\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n\n --StockMarket.ticksUntilCycle;\n\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n let av = v * stock.mv / 100;\n\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n\n stock.b = false;\n }\n\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2); // Shares required for price movement gradually approaches max over time\n\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\nfunction initStockMarketFnForReact() {\n initStockMarket();\n initSymbolToStockMap();\n}\nconst eventEmitterForUiReset = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarket.tsx?");
|
||
|
||
/***/ }),
|
||
/* 75 */
|
||
/*!***********************************!*\
|
||
!*** ./utils/helpers/keyCodes.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: KEY */
|
||
/*! exports used: KEY */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return KEY; });\n/**\n * Keyboard key codes\n */\nconst KEY = {\n CTRL: 17,\n DOWNARROW: 40,\n ENTER: 13,\n ESC: 27,\n TAB: 9,\n UPARROW: 38,\n \"0\": 48,\n \"1\": 49,\n \"2\": 50,\n \"3\": 51,\n \"4\": 52,\n \"5\": 53,\n \"6\": 54,\n \"7\": 55,\n \"8\": 56,\n \"9\": 57,\n A: 65,\n B: 66,\n C: 67,\n D: 68,\n E: 69,\n F: 70,\n G: 71,\n H: 72,\n I: 73,\n J: 74,\n K: 75,\n L: 76,\n M: 77,\n N: 78,\n O: 79,\n P: 80,\n Q: 81,\n R: 82,\n S: 83,\n T: 84,\n U: 85,\n V: 86,\n W: 87,\n X: 88,\n Y: 89,\n Z: 90\n};\n\n//# sourceURL=webpack:///./utils/helpers/keyCodes.ts?");
|
||
|
||
/***/ }),
|
||
/* 76 */
|
||
/*!*************************************!*\
|
||
!*** ./src/ui/React/Reputation.tsx ***!
|
||
\*************************************/
|
||
/*! exports provided: Reputation */
|
||
/*! exports used: Reputation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Reputation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction Reputation(reputation) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"reputation samefont\"\n }, typeof reputation === \"number\" ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatReputation(reputation) : reputation);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Reputation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 77 */,
|
||
/* 78 */,
|
||
/* 79 */
|
||
/*!********************************!*\
|
||
!*** ./src/CodingContracts.ts ***!
|
||
\********************************/
|
||
/*! exports provided: CodingContractType, CodingContractTypes, CodingContractRewardType, CodingContractResult, CodingContract */
|
||
/*! exports used: CodingContract, CodingContractResult, CodingContractRewardType, CodingContractTypes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export CodingContractType */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return CodingContractTypes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return CodingContractRewardType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return CodingContractResult; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContract; });\n/* harmony import */ var _data_codingcontracttypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/codingcontracttypes */ 652);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_CodingContractPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ui/React/CodingContractPopup */ 653);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */\n\n/* Represents different types of problems that a Coding Contract can have */\n\nclass CodingContractType {\n /**\n * Function that generates a description of the problem\n */\n\n /**\n * Number that generally represents the problem's difficulty. Bigger numbers = harder\n */\n\n /**\n * A function that randomly generates a valid 'data' for the problem\n */\n\n /**\n * Name of the type of problem\n */\n\n /**\n * The maximum number of tries the player gets on this kind of problem before it self-destructs\n */\n\n /**\n * Stores a function that checks if the provided answer is correct\n */\n constructor(name, desc, gen, solver, diff, numTries) {\n this.name = name;\n this.desc = desc;\n this.generate = gen;\n this.solver = solver;\n this.difficulty = diff;\n this.numTries = numTries;\n }\n\n}\n/* Contract Types */\n// tslint:disable-next-line\n\nconst CodingContractTypes = {};\n\nfor (const md of _data_codingcontracttypes__WEBPACK_IMPORTED_MODULE_0__[/* codingContractTypesMetadata */ \"a\"]) {\n // tslint:disable-next-line\n CodingContractTypes[md.name] = new CodingContractType(md.name, md.desc, md.gen, md.solver, md.difficulty, md.numTries);\n}\n/**\n * Enum representing the different types of rewards a Coding Contract can give\n */\n\n\nlet CodingContractRewardType;\n/**\n * Enum representing the result when trying to solve the Contract\n */\n\n(function (CodingContractRewardType) {\n CodingContractRewardType[CodingContractRewardType[\"FactionReputation\"] = 0] = \"FactionReputation\";\n CodingContractRewardType[CodingContractRewardType[\"FactionReputationAll\"] = 1] = \"FactionReputationAll\";\n CodingContractRewardType[CodingContractRewardType[\"CompanyReputation\"] = 2] = \"CompanyReputation\";\n CodingContractRewardType[CodingContractRewardType[\"Money\"] = 3] = \"Money\";\n})(CodingContractRewardType || (CodingContractRewardType = {}));\n\nlet CodingContractResult;\n/**\n * A class that represents the type of reward a contract gives\n */\n\n(function (CodingContractResult) {\n CodingContractResult[CodingContractResult[\"Success\"] = 0] = \"Success\";\n CodingContractResult[CodingContractResult[\"Failure\"] = 1] = \"Failure\";\n CodingContractResult[CodingContractResult[\"Cancelled\"] = 2] = \"Cancelled\";\n})(CodingContractResult || (CodingContractResult = {}));\n\n/**\n * A Coding Contract is a file that poses a programming-related problem to the Player.\n * The player receives a reward if the problem is solved correctly\n */\nclass CodingContract {\n /* Relevant data for the contract's problem */\n\n /* Contract's filename */\n\n /* Describes the reward given if this Contract is solved. The reward is actually\n processed outside of this file */\n\n /* Number of times the Contract has been attempted */\n constructor(fn = \"\", type = \"Find Largest Prime Factor\", reward = null) {\n _defineProperty(this, \"tries\", 0);\n\n this.fn = fn;\n\n if (!this.fn.endsWith(\".cct\")) {\n this.fn += \".cct\";\n } // tslint:disable-next-line\n\n\n if (CodingContractTypes[type] == null) {\n throw new Error(`Error: invalid contract type: ${type} please contact developer`);\n }\n\n this.type = type;\n this.data = CodingContractTypes[type].generate();\n this.reward = reward;\n }\n\n getData() {\n return this.data;\n }\n\n getDescription() {\n return CodingContractTypes[this.type].desc(this.data);\n }\n\n getDifficulty() {\n return CodingContractTypes[this.type].difficulty;\n }\n\n getMaxNumTries() {\n return CodingContractTypes[this.type].numTries;\n }\n\n getType() {\n return CodingContractTypes[this.type].name;\n }\n\n isSolution(solution) {\n return CodingContractTypes[this.type].solver(this.data, solution);\n }\n /**\n * Creates a popup to prompt the player to solve the problem\n */\n\n\n async prompt() {\n const popupId = `coding-contract-prompt-popup-${this.fn}`;\n return new Promise(resolve => {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* createPopup */ \"a\"])(popupId, _ui_React_CodingContractPopup__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractPopup */ \"a\"], {\n c: this,\n popupId: popupId,\n onClose: () => {\n resolve(CodingContractResult.Cancelled);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(popupId);\n },\n onAttempt: val => {\n if (this.isSolution(val)) {\n resolve(CodingContractResult.Success);\n } else {\n resolve(CodingContractResult.Failure);\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(popupId);\n }\n }, () => resolve(CodingContractResult.Cancelled));\n });\n }\n /**\n * Serialize the current file to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"CodingContract\", this);\n }\n /**\n * Initiatizes a CodingContract from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(CodingContract, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.CodingContract = CodingContract;\n\n//# sourceURL=webpack:///./src/CodingContracts.ts?");
|
||
|
||
/***/ }),
|
||
/* 80 */
|
||
/*!********************************************!*\
|
||
!*** ./src/StockMarket/data/OrderTypes.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: OrderTypes */
|
||
/*! exports used: OrderTypes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OrderTypes; });\nlet OrderTypes;\n\n(function (OrderTypes) {\n OrderTypes[\"LimitBuy\"] = \"Limit Buy Order\";\n OrderTypes[\"LimitSell\"] = \"Limit Sell Order\";\n OrderTypes[\"StopBuy\"] = \"Stop Buy Order\";\n OrderTypes[\"StopSell\"] = \"Stop Sell Order\";\n})(OrderTypes || (OrderTypes = {}));\n\n//# sourceURL=webpack:///./src/StockMarket/data/OrderTypes.ts?");
|
||
|
||
/***/ }),
|
||
/* 81 */
|
||
/*!************************!*\
|
||
!*** ./src/Hacking.ts ***!
|
||
\************************/
|
||
/*! exports provided: calculateHackingChance, calculateHackingExpGain, calculatePercentMoneyHacked, calculateHackingTime, calculateGrowTime, calculateWeakenTime */
|
||
/*! exports used: calculateGrowTime, calculateHackingChance, calculateHackingExpGain, calculateHackingTime, calculatePercentMoneyHacked, calculateWeakenTime */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateHackingChance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return calculateHackingExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return calculatePercentMoneyHacked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return calculateHackingTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateGrowTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return calculateWeakenTime; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/formulas/intelligence */ 312);\n\n\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nfunction calculateHackingChance(server, player) {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking_skill;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance = skillChance * difficultyMult * player.hacking_chance_mult * Object(_PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__[/* calculateIntelligenceBonus */ \"a\"])(player.intelligence, 1);\n\n if (chance > 1) {\n return 1;\n }\n\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\n\nfunction calculateHackingExpGain(server, player) {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * player.hacking_exp_mult * diffFactor;\n return expGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HackExpGain;\n}\n/**\n * Returns the percentage of money that will be stolen from a server if\n * it is successfully hacked (returns the decimal form, not the actual percent value)\n */\n\nfunction calculatePercentMoneyHacked(server, player) {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking_skill - (server.requiredHackingSkill - 1)) / player.hacking_skill;\n const percentMoneyHacked = difficultyMult * skillMult * player.hacking_money_mult / balanceFactor;\n\n if (percentMoneyHacked < 0) {\n return 0;\n }\n\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney;\n}\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\n\nfunction calculateHackingTime(server, player) {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff; // tslint:disable-next-line\n\n skillFactor /= player.hacking_skill + baseSkill;\n const hackTimeMultiplier = 5;\n const hackingTime = hackTimeMultiplier * skillFactor / (player.hacking_speed_mult * Object(_PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__[/* calculateIntelligenceBonus */ \"a\"])(player.intelligence, 1));\n return hackingTime;\n}\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\n\nfunction calculateGrowTime(server, player) {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\n\nfunction calculateWeakenTime(server, player) {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n\n//# sourceURL=webpack:///./src/Hacking.ts?");
|
||
|
||
/***/ }),
|
||
/* 82 */
|
||
/*!***********************************!*\
|
||
!*** ./utils/helpers/isString.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: isString */
|
||
/*! exports used: isString */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isString; });\n/**\n * Checks whether the value passed in can be considered a string.\n * @param value The value to check if it is a string.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction isString(value) {\n return typeof value === \"string\" || value instanceof String;\n}\n\n//# sourceURL=webpack:///./utils/helpers/isString.ts?");
|
||
|
||
/***/ }),
|
||
/* 83 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Script/ScriptHelpersTS.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: isScriptFilename */
|
||
/*! exports used: isScriptFilename */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isScriptFilename; });\n// Script helper functions\nfunction isScriptFilename(f) {\n return f.endsWith(\".js\") || f.endsWith(\".script\") || f.endsWith(\".ns\");\n}\n\n//# sourceURL=webpack:///./src/Script/ScriptHelpersTS.ts?");
|
||
|
||
/***/ }),
|
||
/* 84 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Hacknet/HacknetServer.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: HacknetServer */
|
||
/*! exports used: HacknetServer */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/BaseServer */ 432);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\n\n\n\n\n\n\nclass HacknetServer extends _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__[/* BaseServer */ \"a\"] {\n // Cache level. Affects hash Capacity\n // Number of cores. Improves hash production\n // Number of hashes that can be stored by this Hacknet Server\n // Hashes produced per second\n // Similar to Node level. Improves hash production\n // How long this HacknetServer has existed, in seconds\n // Total number of hashes earned by this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__[/* createRandomIp */ \"a\"])()\n }) {\n super(params);\n\n _defineProperty(this, \"cache\", 1);\n\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"hashCapacity\", 0);\n\n _defineProperty(this, \"hashRate\", 0);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"totalHashesGenerated\", 0);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCacheUpgradeCost */ \"a\"])(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCoreUpgradeCost */ \"b\"])(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateLevelUpgradeCost */ \"d\"])(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateRamUpgradeCost */ \"e\"])(this.maxRam, levels, costMult);\n } // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n return this.hashRate * seconds;\n }\n\n upgradeCache(levels) {\n this.cache = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeLevel(levels, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n\n this.maxRam = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n return true;\n } // Whenever a script is run, we must update this server's hash rate\n\n\n runScript(script, prodMult) {\n super.runScript(script);\n\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateHashCapacity() {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult) {\n this.hashRate = Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateHashGainRate */ \"c\"])(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(`Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`, false);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_toJSON */ \"b\"])(\"HacknetServer\", this);\n } // Initializes a HacknetServer Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_fromJSON */ \"a\"])(HacknetServer, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"].constructors.HacknetServer = HacknetServer;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetServer.ts?");
|
||
|
||
/***/ }),
|
||
/* 85 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Corporation/data/BaseResearchTree.ts ***!
|
||
\**************************************************/
|
||
/*! exports provided: getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy */
|
||
/*! exports used: getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getBaseResearchTreeCopy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getProductIndustryResearchTreeCopy; });\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ResearchMap */ 285);\n/* harmony import */ var _ResearchTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ResearchTree */ 471);\n// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\n\n\n\nfunction makeNode(name) {\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][name];\n\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* Node */ \"a\"]({\n text: research.name,\n cost: research.cost\n });\n} // Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\n\n\nfunction createBaseResearchTreeNodes() {\n const rootNode = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew = makeNode(\"AutoBrew\");\n const autoParty = makeNode(\"AutoPartyManager\");\n const autoDrugs = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing = makeNode(\"Bulk Purchasing\");\n const cph4 = makeNode(\"CPH4 Injections\");\n const drones = makeNode(\"Drones\");\n const dronesAssembly = makeNode(\"Drones - Assembly\");\n const dronesTransport = makeNode(\"Drones - Transport\");\n const goJuice = makeNode(\"Go-Juice\");\n const hrRecruitment = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining = makeNode(\"HRBuddy-Training\");\n const joywire = makeNode(\"JoyWire\");\n const marketta1 = makeNode(\"Market-TA.I\");\n const marketta2 = makeNode(\"Market-TA.II\");\n const overclock = makeNode(\"Overclock\");\n const scAssemblers = makeNode(\"Self-Correcting Assemblers\");\n const stimu = makeNode(\"Sti.mu\");\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n hrRecruitment.addChild(hrTraining);\n marketta1.addChild(marketta2);\n overclock.addChild(stimu);\n rootNode.addChild(autoBrew);\n rootNode.addChild(autoParty);\n rootNode.addChild(autoDrugs);\n rootNode.addChild(bulkPurchasing);\n rootNode.addChild(drones);\n rootNode.addChild(hrRecruitment);\n rootNode.addChild(joywire);\n rootNode.addChild(marketta1);\n rootNode.addChild(overclock);\n rootNode.addChild(scAssemblers);\n return rootNode;\n}\n\nfunction getBaseResearchTreeCopy() {\n const baseResearchTree = new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* ResearchTree */ \"b\"]();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n return baseResearchTree;\n} // Base Research Tree for Industry's that make products\n\nfunction getProductIndustryResearchTreeCopy() {\n const researchTree = new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* ResearchTree */ \"b\"]();\n const root = createBaseResearchTreeNodes();\n const upgradeFulcrum = makeNode(\"uPgrade: Fulcrum\");\n const upgradeCapacity1 = makeNode(\"uPgrade: Capacity.I\");\n const upgradeCapacity2 = makeNode(\"uPgrade: Capacity.II\");\n const upgradeDashboard = makeNode(\"uPgrade: Dashboard\");\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n researchTree.setRoot(root);\n return researchTree;\n}\n\n//# sourceURL=webpack:///./src/Corporation/data/BaseResearchTree.ts?");
|
||
|
||
/***/ }),
|
||
/* 86 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Terminal/DirectoryHelpers.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: removeLeadingSlash, removeTrailingSlash, isValidFilename, isValidDirectoryName, isValidDirectoryPath, isValidFilePath, getFirstParentDirectory, getAllParentDirectories, isInRootDirectory, evaluateDirectoryPath, evaluateFilePath */
|
||
/*! exports used: evaluateDirectoryPath, evaluateFilePath, getAllParentDirectories, getFirstParentDirectory, isInRootDirectory, isValidDirectoryPath, isValidFilePath, removeLeadingSlash, removeTrailingSlash */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return removeLeadingSlash; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return removeTrailingSlash; });\n/* unused harmony export isValidFilename */\n/* unused harmony export isValidDirectoryName */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return isValidDirectoryPath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return isValidFilePath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getFirstParentDirectory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getAllParentDirectories; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return isInRootDirectory; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return evaluateDirectoryPath; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return evaluateFilePath; });\n/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains functions that deal only with that string manipulation.\n * Functions that need to access/process Server-related things can be\n * found in ./DirectoryServerHelpers.ts\n */\n\n/**\n * Removes leading forward slash (\"/\") from a string.\n */\nfunction removeLeadingSlash(s) {\n if (s.startsWith(\"/\")) {\n return s.slice(1);\n }\n\n return s;\n}\n/**\n * Removes trailing forward slash (\"/\") from a string.\n * Note that this will also remove the slash if it is the leading slash (i.e. if s = \"/\")\n */\n\nfunction removeTrailingSlash(s) {\n if (s.endsWith(\"/\")) {\n return s.slice(0, -1);\n }\n\n return s;\n}\n/**\n * Checks whether a string is a valid filename. Only used for the filename itself,\n * not the entire filepath\n */\n\nfunction isValidFilename(filename) {\n // Allows alphanumerics, hyphens, underscores, and percentage signs\n // Must have a file extension\n const regex = /^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\\d+(?:\\.\\d*)?%-INC)?$/; // match() returns null if no match is found\n\n return filename.match(regex) != null;\n}\n/**\n * Checks whether a string is a valid directory name. Only used for the directory itself,\n * not an entire path\n */\n\nfunction isValidDirectoryName(name) {\n // Allows alphanumerics, hyphens, underscores, and percentage signs.\n // Name can begin with a single period, but otherwise cannot have any\n const regex = /^.?[a-zA-Z0-9_-]+$/; // match() returns null if no match is found\n\n return name.match(regex) != null;\n}\n/**\n * Checks whether a string is a valid directory path.\n * This only checks if it has the proper formatting. It does NOT check\n * if the directories actually exist on Terminal\n */\n\nfunction isValidDirectoryPath(path) {\n let t_path = path;\n\n if (t_path.length === 0) {\n return false;\n }\n\n if (t_path.length === 1) {\n return t_path === \"/\";\n } // A full path must have a leading slash, but we'll ignore it for the checks\n\n\n if (t_path.startsWith(\"/\")) {\n t_path = t_path.slice(1);\n } else {\n return false;\n } // Trailing slash does not matter\n\n\n t_path = removeTrailingSlash(t_path); // Check that every section of the path is a valid directory name\n\n const dirs = t_path.split(\"/\");\n\n for (const dir of dirs) {\n // Special case, \".\" and \"..\" are valid for path\n if (dir === \".\" || dir === \"..\") {\n continue;\n }\n\n if (!isValidDirectoryName(dir)) {\n return false;\n }\n }\n\n return true;\n}\n/**\n * Checks whether a string is a valid file path. This only checks if it has the\n * proper formatting. It dose NOT check if the file actually exists on Terminal\n */\n\nfunction isValidFilePath(path) {\n if (path == null || typeof path !== \"string\") {\n return false;\n }\n\n const t_path = path; // Impossible for filename to have less than length of 3\n\n if (t_path.length < 3) {\n return false;\n } // Full filepath can't end with trailing slash because it must be a file\n\n\n if (t_path.endsWith(\"/\")) {\n return false;\n } // Everything after the last forward slash is the filename. Everything before\n // it is the file path\n\n\n const fnSeparator = t_path.lastIndexOf(\"/\");\n\n if (fnSeparator === -1) {\n return isValidFilename(t_path);\n }\n\n const fn = t_path.slice(fnSeparator + 1);\n const dirPath = t_path.slice(0, fnSeparator + 1);\n return isValidDirectoryPath(dirPath) && isValidFilename(fn);\n}\n/**\n * Returns a formatted string for the first parent directory in a filepath. For example:\n * /home/var/test/ -> home/\n * If there is no first parent directory, then it returns \"/\" for root\n */\n\nfunction getFirstParentDirectory(path) {\n let t_path = path;\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n if (t_path.lastIndexOf(\"/\") === -1) {\n return \"/\";\n }\n\n const dirs = t_path.split(\"/\");\n\n if (dirs.length === 0) {\n return \"/\";\n }\n\n return dirs[0] + \"/\";\n}\n/**\n * Given a filepath, returns a formatted string for all of the parent directories\n * in that filepath. For example:\n * /home/var/tes -> home/var/\n * /home/var/test/ -> home/var/test/\n * If there are no parent directories, it returns the empty string\n */\n\nfunction getAllParentDirectories(path) {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n\n if (lastSlash === -1) {\n return \"\";\n }\n\n return t_path.slice(0, lastSlash + 1);\n}\n/**\n * Checks if a file path refers to a file in the root directory.\n */\n\nfunction isInRootDirectory(path) {\n if (!isValidFilePath(path)) {\n return false;\n }\n\n if (path == null || path.length === 0) {\n return false;\n }\n\n return path.lastIndexOf(\"/\") <= 0;\n}\n/**\n * Evaluates a directory path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\n\nfunction evaluateDirectoryPath(path, currPath) {\n let t_path = path; // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidDirectoryPath(t_path)) {\n return null;\n } // Trim leading/trailing slashes\n\n\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n const dirs = t_path.split(\"/\");\n const reconstructedPath = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n/**\n * Evaluates a file path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\n\nfunction evaluateFilePath(path, currPath) {\n let t_path = path; // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidFilePath(t_path)) {\n return null;\n } // Trim leading/trailing slashes\n\n\n t_path = removeLeadingSlash(t_path);\n const dirs = t_path.split(\"/\");\n const reconstructedPath = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/DirectoryHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 87 */
|
||
/*!**********************!*\
|
||
!*** ./src/Alias.ts ***!
|
||
\**********************/
|
||
/*! exports provided: Aliases, GlobalAliases, loadAliases, loadGlobalAliases, printAliases, parseAliasDeclaration, removeAlias, substituteAliases */
|
||
/*! exports used: Aliases, GlobalAliases, loadAliases, loadGlobalAliases, parseAliasDeclaration, printAliases, removeAlias, substituteAliases */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Aliases; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return GlobalAliases; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return loadAliases; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadGlobalAliases; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return printAliases; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return parseAliasDeclaration; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return removeAlias; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return substituteAliases; });\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Terminal */ 88);\n\nlet Aliases = {};\nlet GlobalAliases = {};\nfunction loadAliases(saveString) {\n if (saveString === \"\") {\n Aliases = {};\n } else {\n Aliases = JSON.parse(saveString);\n }\n}\nfunction loadGlobalAliases(saveString) {\n if (saveString === \"\") {\n GlobalAliases = {};\n } else {\n GlobalAliases = JSON.parse(saveString);\n }\n} // Prints all aliases to terminal\n\nfunction printAliases() {\n for (const name in Aliases) {\n if (Aliases.hasOwnProperty(name)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_0__[/* Terminal */ \"a\"].print(\"alias \" + name + \"=\" + Aliases[name]);\n }\n }\n\n for (const name in GlobalAliases) {\n if (GlobalAliases.hasOwnProperty(name)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_0__[/* Terminal */ \"a\"].print(\"global alias \" + name + \"=\" + GlobalAliases[name]);\n }\n }\n} // Returns true if successful, false otherwise\n\nfunction parseAliasDeclaration(dec, global = false) {\n const re = /^([_|\\w|!|%|,|@]+)=\"(.+)\"$/;\n const matches = dec.match(re);\n\n if (matches == null || matches.length != 3) {\n return false;\n }\n\n if (global) {\n addGlobalAlias(matches[1], matches[2]);\n } else {\n addAlias(matches[1], matches[2]);\n }\n\n return true;\n}\n\nfunction addAlias(name, value) {\n if (name in GlobalAliases) {\n delete GlobalAliases[name];\n }\n\n Aliases[name] = value.trim();\n}\n\nfunction addGlobalAlias(name, value) {\n if (name in Aliases) {\n delete Aliases[name];\n }\n\n GlobalAliases[name] = value.trim();\n}\n\nfunction getAlias(name) {\n if (Aliases.hasOwnProperty(name)) {\n return Aliases[name];\n }\n\n return null;\n}\n\nfunction getGlobalAlias(name) {\n if (GlobalAliases.hasOwnProperty(name)) {\n return GlobalAliases[name];\n }\n\n return null;\n}\n\nfunction removeAlias(name) {\n if (Aliases.hasOwnProperty(name)) {\n delete Aliases[name];\n return true;\n }\n\n if (GlobalAliases.hasOwnProperty(name)) {\n delete GlobalAliases[name];\n return true;\n }\n\n return false;\n}\n/**\n * Returns the original string with any aliases substituted in.\n * Aliases are only applied to \"whole words\", one level deep\n */\n\nfunction substituteAliases(origCommand) {\n const commandArray = origCommand.split(\" \");\n\n if (commandArray.length > 0) {\n // For the alias and unalias commands, dont substite\n if (commandArray[0] === \"unalias\" || commandArray[0] === \"alias\") {\n return commandArray.join(\" \");\n }\n\n let somethingSubstituted = true;\n let depth = 0;\n\n while (somethingSubstituted && depth < 10) {\n var _getAlias;\n\n depth++;\n somethingSubstituted = false;\n const alias = (_getAlias = getAlias(commandArray[0])) === null || _getAlias === void 0 ? void 0 : _getAlias.split(\" \");\n\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(0, 1, ...alias); //commandArray[0] = alias;\n }\n\n for (let i = 0; i < commandArray.length; ++i) {\n var _getGlobalAlias;\n\n const alias = (_getGlobalAlias = getGlobalAlias(commandArray[i])) === null || _getGlobalAlias === void 0 ? void 0 : _getGlobalAlias.split(\" \");\n\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(i, 1, ...alias);\n i += alias.length - 1; //commandArray[i] = alias;\n }\n }\n }\n }\n\n return commandArray.join(\" \");\n}\n\n//# sourceURL=webpack:///./src/Alias.ts?");
|
||
|
||
/***/ }),
|
||
/* 88 */
|
||
/*!**************************!*\
|
||
!*** ./src/Terminal.jsx ***!
|
||
\**************************/
|
||
/*! exports provided: Terminal */
|
||
/*! exports used: Terminal */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Terminal; });\n/* harmony import */ var _Terminal_Terminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Terminal/Terminal */ 661);\n\nconst Terminal = new _Terminal_Terminal__WEBPACK_IMPORTED_MODULE_0__[/* Terminal */ \"a\"]();\n\n//# sourceURL=webpack:///./src/Terminal.jsx?");
|
||
|
||
/***/ }),
|
||
/* 89 */,
|
||
/* 90 */,
|
||
/* 91 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Faction/FactionHelpers.jsx ***!
|
||
\****************************************/
|
||
/*! exports provided: inviteToFaction, joinFaction, startHackingMission, hasAugmentationPrereqs, purchaseAugmentation, getNextNeurofluxLevel, processPassiveFactionRepGain */
|
||
/*! exports used: getNextNeurofluxLevel, hasAugmentationPrereqs, inviteToFaction, joinFaction, processPassiveFactionRepGain, purchaseAugmentation, startHackingMission */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inviteToFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return joinFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return startHackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return hasAugmentationPrereqs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return purchaseAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getNextNeurofluxLevel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return processPassiveFactionRepGain; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Factions */ 22);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Missions */ 119);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/InvitationPopup */ 657);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction inviteToFaction(faction) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.push(faction.name);\n faction.alreadyInvited = true;\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressFactionInvites) {\n const popupId = \"faction-invitation\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__[/* InvitationPopup */ \"a\"], {\n player: _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"],\n faction: faction,\n popupId: popupId\n });\n }\n}\nfunction joinFaction(faction) {\n if (faction.isMember) return;\n faction.isMember = true;\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factions.push(faction.name);\n const factionInfo = faction.getInfo(); //Determine what factions you are banned from now that you have joined this faction\n\n for (const i in factionInfo.enemies) {\n const enemy = factionInfo.enemies[i];\n\n if (_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy] instanceof _Faction__WEBPACK_IMPORTED_MODULE_5__[/* Faction */ \"a\"]) {\n _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy].isBanned = true;\n }\n }\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i] == faction.name || _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\nfunction startHackingMission(faction) {\n const mission = new _Missions__WEBPACK_IMPORTED_MODULE_7__[/* HackingMission */ \"a\"](faction.playerReputation, faction);\n Object(_Missions__WEBPACK_IMPORTED_MODULE_7__[/* setInMission */ \"d\"])(true, mission); //Sets inMission flag to true\n\n mission.init();\n} //Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\n\nfunction hasAugmentationPrereqs(aug) {\n let hasPrereqs = true;\n\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][aug.prereqs[i]];\n\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n\n if (prereqAug.owned === false) {\n hasPrereqs = false; // Check if the aug is purchased\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\nfunction purchaseAugmentation(aug, fac, sing = false) {\n const factionInfo = fac.getInfo();\n var hasPrereqs = hasAugmentationPrereqs(aug);\n\n if (!hasPrereqs) {\n var txt = \"You must first purchase or install \" + aug.prereqs.join(\",\") + \" before you can \" + \"purchase this one.\";\n\n if (sing) {\n return txt;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n }\n } else if (aug.baseCost !== 0 && _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.lt(aug.baseCost * factionInfo.augmentationPriceMult)) {\n let txt = \"You don't have enough money to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n let txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (aug.baseCost === 0 || _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.gte(aug.baseCost * factionInfo.augmentationPriceMult)) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased === false) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased = true;\n document.getElementById(\"augmentations-tab\").style.display = \"list-item\";\n document.getElementById(\"character-menu-header\").click();\n document.getElementById(\"character-menu-header\").click();\n }\n\n var queuedAugmentation = new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.push(queuedAugmentation);\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].loseMoney(aug.baseCost * factionInfo.augmentationPriceMult); // If you just purchased Neuroflux Governor, recalculate the cost\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n var nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n var mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n aug.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name].baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"You purchased \" + aug.name + \". It's enhancements will not take \" + \"effect until they are installed. To install your augmentations, go to the \" + \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" + \"augmentations will now be more expensive.\");\n }\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"Hmm, something went wrong when trying to purchase an Augmentation. \" + \"Please report this to the game developer with an explanation of how to \" + \"reproduce this.\");\n }\n}\nfunction getNextNeurofluxLevel() {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].level;\n }\n } // Account for purchased but uninstalled Augmentations\n\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[i].name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n\n return currLevel + 1;\n}\nfunction processPassiveFactionRepGain(numCycles) {\n for (const name in _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (name === _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].currentWorkFactionName) continue;\n if (!_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) continue;\n const faction = _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name];\n if (!faction.isMember) continue; // No passive rep for special factions\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No passive rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].getGangName() === name) continue; // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01); // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n faction.playerReputation += rate * numCycles * _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain;\n }\n}\n\n//# sourceURL=webpack:///./src/Faction/FactionHelpers.jsx?");
|
||
|
||
/***/ }),
|
||
/* 92 */
|
||
/*!******************************!*\
|
||
!*** ./src/Server/Server.ts ***!
|
||
\******************************/
|
||
/*! exports provided: Server */
|
||
/*! exports used: Server */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Server; });\n/* harmony import */ var _BaseServer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseServer */ 432);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helpers/createRandomString */ 654);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Class representing a single hackable Server\n\n\n\n\n\nclass Server extends _BaseServer__WEBPACK_IMPORTED_MODULE_0__[/* BaseServer */ \"a\"] {\n // Flag indicating whether this server has a backdoor installed by a player\n // Initial server security level\n // (i.e. security level when the server was created)\n // Server Security Level\n // Minimum server security level that this server can be weakened to\n // How much money currently resides on the server and can be hacked\n // Maximum amount of money that this server can hold\n // Number of open ports required in order to gain admin/root access\n // How many ports are currently opened on the server\n // Flag indicating wehther this is a purchased server\n // Hacking level required to hack this server\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])()\n }) {\n super(params); // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n\n _defineProperty(this, \"backdoorInstalled\", false);\n\n _defineProperty(this, \"baseDifficulty\", 1);\n\n _defineProperty(this, \"hackDifficulty\", 1);\n\n _defineProperty(this, \"minDifficulty\", 1);\n\n _defineProperty(this, \"moneyAvailable\", 0);\n\n _defineProperty(this, \"moneyMax\", 0);\n\n _defineProperty(this, \"numOpenPortsRequired\", 5);\n\n _defineProperty(this, \"openPortCount\", 0);\n\n _defineProperty(this, \"purchasedByPlayer\", false);\n\n _defineProperty(this, \"requiredHackingSkill\", 1);\n\n _defineProperty(this, \"serverGrowth\", 1);\n\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = Object(_utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__[/* createRandomString */ \"a\"])(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false; //RAM, CPU speed and Scripts\n\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable = params.moneyAvailable != null ? params.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney; //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n\n this.hackDifficulty = params.hackDifficulty != null ? params.hackDifficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n //Port information, required for porthacking servers to get admin rights\n\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n\n\n capDifficulty() {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n } // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n\n\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMinimumSecurity(n, perc = false) {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n } // Server security cannot go below 1\n\n\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMaximumMoney(n, perc = false) {\n if (perc) {\n this.moneyMax *= n;\n } else {\n this.moneyMax += n;\n }\n }\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n\n\n fortify(amt) {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n\n\n weaken(amt) {\n this.hackDifficulty -= amt * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerWeakenRate;\n this.capDifficulty();\n }\n /**\n * Serialize the current object to a JSON save state\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"Server\", this);\n } // Initializes a Server Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(Server, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Server = Server;\n\n//# sourceURL=webpack:///./src/Server/Server.ts?");
|
||
|
||
/***/ }),
|
||
/* 93 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Corporation/ui/MoneyCost.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: MoneyCost */
|
||
/*! exports used: MoneyCost */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoneyCost; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction MoneyCost(props) {\n if (!props.corp.funds.gt(props.money)) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"unbuyable samefont\"\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.money));\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"money-gold samefont\"\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.money));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/MoneyCost.tsx?");
|
||
|
||
/***/ }),
|
||
/* 94 */,
|
||
/* 95 */,
|
||
/* 96 */,
|
||
/* 97 */
|
||
/*!********************************!*\
|
||
!*** ./src/Message/Message.ts ***!
|
||
\********************************/
|
||
/*! exports provided: Message */
|
||
/*! exports used: Message */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Message; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass Message {\n // Name of Message file\n // The text contains in the Message\n // Flag indicating whether this Message has been received by the player\n constructor(filename = \"\", msg = \"\") {\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"msg\", \"\");\n\n _defineProperty(this, \"recvd\", false);\n\n this.filename = filename;\n this.msg = msg;\n this.recvd = false;\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Message\", this);\n } // Initializes a Message Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Message, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Message = Message;\n\n//# sourceURL=webpack:///./src/Message/Message.ts?");
|
||
|
||
/***/ }),
|
||
/* 98 */,
|
||
/* 99 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Bladeburner/BlackOperation.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: BlackOperation */
|
||
/*! exports used: BlackOperation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOperation; });\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Operation */ 263);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass BlackOperation extends _Operation__WEBPACK_IMPORTED_MODULE_0__[/* Operation */ \"a\"] {\n constructor(params = null) {\n super(params);\n this.count = 1;\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1.5;\n }\n\n getChaosCompetencePenalty() {\n return 1;\n }\n\n getChaosDifficultyBonus() {\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"BlackOperation\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(BlackOperation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.BlackOperation = BlackOperation;\n\n//# sourceURL=webpack:///./src/Bladeburner/BlackOperation.ts?");
|
||
|
||
/***/ }),
|
||
/* 100 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Bladeburner/data/SkillNames.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: SkillNames */
|
||
/*! exports used: SkillNames */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SkillNames; });\nconst SkillNames = {\n BladesIntuition: \"Blade's Intuition\",\n Cloak: \"Cloak\",\n Marksman: \"Marksman\",\n WeaponProficiency: \"Weapon Proficiency\",\n ShortCircuit: \"Short-Circuit\",\n DigitalObserver: \"Digital Observer\",\n Tracer: \"Tracer\",\n Overclock: \"Overclock\",\n Reaper: \"Reaper\",\n EvasiveSystem: \"Evasive System\",\n Datamancer: \"Datamancer\",\n CybersEdge: \"Cyber's Edge\",\n HandsOfMidas: \"Hands of Midas\",\n Hyperdrive: \"Hyperdrive\"\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/SkillNames.ts?");
|
||
|
||
/***/ }),
|
||
/* 101 */,
|
||
/* 102 */,
|
||
/* 103 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Netscript/killWorkerScript.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: killWorkerScript */
|
||
/*! exports used: killWorkerScript */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killWorkerScript; });\n/* harmony import */ var _WorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScript */ 249);\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScripts */ 153);\n/* harmony import */ var _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Script/RunningScript */ 277);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 311);\n/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\n\n\n\n\n\n\n\nfunction killWorkerScript(script, serverIp, rerenderUi) {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(script);\n return true;\n } else if (script instanceof _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__[/* RunningScript */ \"a\"] && typeof serverIp === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n\n if (res) {\n return res;\n } // If for some reason that doesn't work, we'll try the old way\n\n\n for (const ws of _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].values()) {\n if (ws.name == script.filename && ws.serverIp == serverIp && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n }\n\n return false;\n } else if (typeof script === \"number\") {\n return killWorkerScriptByPid(script, rerenderUi);\n } else {\n console.error(`killWorkerScript() called with invalid argument:`);\n console.error(script);\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid, rerenderUi = true) {\n const ws = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].get(pid);\n\n if (ws instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript, rerenderUi = true) {\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript | number} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\n\n\nfunction removeWorkerScript(workerScript, rerenderUi = true) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n const ip = workerScript.serverIp;\n const name = workerScript.name; // Get the server on which the script runs\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ \"b\"][ip];\n\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n } // Recalculate ram used on that server\n\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__[/* roundToTwo */ \"a\"])(server.ramUsed - workerScript.ramUsage);\n\n if (server.ramUsed < 0) {\n console.warn(`Server (${server.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${server.ramUsed}`);\n server.ramUsed = 0;\n } // Delete the RunningScript object from that server\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n\n if (runningScript.filename === name && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n } // Delete script from global pool (workerScripts)\n\n\n const res = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].delete(workerScript.pid);\n\n if (!res) {\n console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n console.warn(workerScript);\n }\n\n if (rerenderUi) {\n _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n }\n } else {\n console.error(`Invalid argument passed into removeWorkerScript():`);\n console.error(workerScript);\n return;\n }\n}\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\n\n\nfunction killNetscriptDelay(workerScript) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n\n if (workerScript.delayResolve) {\n workerScript.delayResolve();\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Netscript/killWorkerScript.ts?");
|
||
|
||
/***/ }),
|
||
/* 104 */
|
||
/*!**********************************!*\
|
||
!*** ./src/StockMarket/Stock.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: StockForecastInfluenceLimit, Stock */
|
||
/*! exports used: Stock */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export StockForecastInfluenceLimit */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stock; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n\n\nconst StockForecastInfluenceLimit = 5;\nconst defaultConstructorParams = {\n b: true,\n initPrice: 10e3,\n marketCap: 1e12,\n mv: 1,\n name: \"\",\n otlkMag: 0,\n spreadPerc: 0,\n shareTxForMovement: 1e6,\n symbol: \"\"\n}; // Helper function that convert a IMinMaxRange to a number\n\nfunction toNumber(n) {\n let value;\n\n switch (typeof n) {\n case \"number\":\n {\n return n;\n }\n\n case \"object\":\n {\n const range = n;\n value = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(range.min, range.max);\n break;\n }\n\n default:\n throw Error(`Do not know how to convert the type '${typeof n}' to a number`);\n }\n\n if (typeof n === \"object\" && typeof n.divisor === \"number\") {\n return value / n.divisor;\n }\n\n return value;\n}\n/**\n * Represents the valuation of a company in the World Stock Exchange.\n */\n\n\nclass Stock {\n /**\n * Bear or bull (more likely to go up or down, based on otlkMag)\n */\n\n /**\n * Maximum price of a stock (per share)\n */\n\n /**\n * Stocks previous share price\n */\n\n /**\n * Maximum number of shares that player can own (both long and short combined)\n */\n\n /**\n * Maximum volatility\n */\n\n /**\n * Name of the company that the stock is for\n */\n\n /**\n * Outlook magnitude. Represents the stock's forecast and likelihood\n * of increasing/decreasing (based on whether its in bear or bull mode)\n */\n\n /**\n * Forecast of outlook magnitude. Essentially a second-order forecast.\n * Unlike 'otlkMag', this number is on an absolute scale from 0-100 (rather than 0-50)\n */\n\n /**\n * Average price of stocks that the player owns in the LONG position\n */\n\n /**\n * Average price of stocks that the player owns in the SHORT position\n */\n\n /**\n * Number of shares the player owns in the LONG position\n */\n\n /**\n * Number of shares the player owns in the SHORT position\n */\n\n /**\n * Stock's share price\n */\n\n /**\n * How many shares need to be transacted in order to trigger a price movement\n */\n\n /**\n * How many share transactions remaining until a price movement occurs\n * (separately tracked for upward and downward movements)\n */\n\n /**\n * Spread percentage. The bid/ask prices for this stock are N% above or below\n * the \"real price\" to emulate spread.\n */\n\n /**\n * The stock's ticker symbol\n */\n\n /**\n * Total number of shares of this stock\n * This is different than maxShares, as this is like authorized stock while\n * maxShares is outstanding stock.\n */\n constructor(p = defaultConstructorParams) {\n this.name = p.name;\n this.symbol = p.symbol;\n this.price = toNumber(p.initPrice);\n this.lastPrice = this.price;\n this.playerShares = 0;\n this.playerAvgPx = 0;\n this.playerShortShares = 0;\n this.playerAvgShortPx = 0;\n this.mv = toNumber(p.mv);\n this.b = p.b;\n this.otlkMag = p.otlkMag;\n this.otlkMagForecast = this.getAbsoluteForecast();\n this.cap = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(this.price * 1e3, this.price * 25e3);\n this.spreadPerc = toNumber(p.spreadPerc);\n this.shareTxForMovement = toNumber(p.shareTxForMovement);\n this.shareTxUntilMovement = this.shareTxForMovement; // Total shares is determined by market cap, and is rounded to nearest 100k\n\n const totalSharesUnrounded = p.marketCap / this.price;\n this.totalShares = Math.round(totalSharesUnrounded / 1e5) * 1e5; // Max Shares (Outstanding shares) is a percentage of total shares\n\n const outstandingSharePercentage = 0.2;\n this.maxShares = Math.round(this.totalShares * outstandingSharePercentage / 1e5) * 1e5;\n }\n /**\n * Safely set the stock's second-order forecast to a new value\n */\n\n\n changeForecastForecast(newff) {\n this.otlkMagForecast = newff;\n\n if (this.otlkMagForecast > 100) {\n this.otlkMagForecast = 100;\n } else if (this.otlkMagForecast < 0) {\n this.otlkMagForecast = 0;\n }\n }\n /**\n * Set the stock to a new price. Also updates the stock's previous price tracker\n */\n\n\n changePrice(newPrice) {\n this.lastPrice = this.price;\n this.price = newPrice;\n }\n /**\n * Change the stock's forecast during a stock market 'tick'.\n * The way a stock's forecast changes depends on various internal properties,\n * but is ultimately determined by RNG\n */\n\n\n cycleForecast(changeAmt = 0.1) {\n const increaseChance = this.getForecastIncreaseChance();\n\n if (Math.random() < increaseChance) {\n // Forecast increases\n if (this.b) {\n this.otlkMag += changeAmt;\n } else {\n this.otlkMag -= changeAmt;\n }\n } else {\n // Forecast decreases\n if (this.b) {\n this.otlkMag -= changeAmt;\n } else {\n this.otlkMag += changeAmt;\n }\n }\n\n this.otlkMag = Math.min(this.otlkMag, 50);\n\n if (this.otlkMag < 0) {\n this.otlkMag *= -1;\n this.b = !this.b;\n }\n }\n /**\n * Change's the stock's second-order forecast during a stock market 'tick'.\n * The change for the second-order forecast to increase is 50/50\n */\n\n\n cycleForecastForecast(changeAmt = 0.1) {\n if (Math.random() < 0.5) {\n this.changeForecastForecast(this.otlkMagForecast + changeAmt);\n } else {\n this.changeForecastForecast(this.otlkMagForecast - changeAmt);\n }\n }\n /**\n * \"Flip\" the stock's second-order forecast. This can occur during a\n * stock market \"cycle\" (determined by RNG). It is used to simulate\n * RL stock market cycles and introduce volatility\n */\n\n\n flipForecastForecast() {\n const diff = this.otlkMagForecast - 50;\n this.otlkMagForecast = 50 + -1 * diff;\n }\n /**\n * Returns the stock's absolute forecast, which is a number between 0-100\n */\n\n\n getAbsoluteForecast() {\n return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;\n }\n /**\n * Return the price at which YOUR stock is bought (market ask price). Accounts for spread\n */\n\n\n getAskPrice() {\n return this.price * (1 + this.spreadPerc / 100);\n }\n /**\n * Return the price at which YOUR stock is sold (market bid price). Accounts for spread\n */\n\n\n getBidPrice() {\n return this.price * (1 - this.spreadPerc / 100);\n }\n /**\n * Returns the chance (0-1 decimal) that a stock has of having its forecast increase\n */\n\n\n getForecastIncreaseChance() {\n const diff = this.otlkMagForecast - this.getAbsoluteForecast();\n return (50 + Math.min(Math.max(diff, -45), 45)) / 100;\n }\n /**\n * Changes a stock's forecast. This is used when the stock is influenced\n * by a transaction. The stock's forecast always goes towards 50, but the\n * movement is capped by a certain threshold/limit\n */\n\n\n influenceForecast(change) {\n if (this.otlkMag > StockForecastInfluenceLimit) {\n this.otlkMag = Math.max(StockForecastInfluenceLimit, this.otlkMag - change);\n }\n }\n /**\n * Changes a stock's second-order forecast. This is used when the stock is\n * influenced by a transaction. The stock's second-order forecast always\n * goes towards 50.\n */\n\n\n influenceForecastForecast(change) {\n if (this.otlkMagForecast > 50) {\n this.otlkMagForecast -= change;\n this.otlkMagForecast = Math.max(50, this.otlkMagForecast);\n } else if (this.otlkMagForecast < 50) {\n this.otlkMagForecast += change;\n this.otlkMagForecast = Math.min(50, this.otlkMagForecast);\n }\n }\n /**\n * Serialize the Stock to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Stock\", this);\n }\n /**\n * Initializes a Stock from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Stock, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Stock = Stock;\n\n//# sourceURL=webpack:///./src/StockMarket/Stock.ts?");
|
||
|
||
/***/ }),
|
||
/* 105 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Locations/Cities.ts ***!
|
||
\*********************************/
|
||
/*! exports provided: Cities */
|
||
/*! exports used: Cities */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Cities; });\n/**\n * Map of all Cities in the game\n * Key = City Name, Value = City object\n */\nconst Cities = {};\n\n//# sourceURL=webpack:///./src/Locations/Cities.ts?");
|
||
|
||
/***/ }),
|
||
/* 106 */,
|
||
/* 107 */
|
||
/*!*************************************!*\
|
||
!*** ./src/DevMenu/ui/Adjuster.tsx ***!
|
||
\*************************************/
|
||
/*! exports provided: Adjuster */
|
||
/*! exports used: Adjuster */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Adjuster; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/icons-material/Add */ 831);\n/* harmony import */ var _mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/icons-material/Remove */ 832);\n/* harmony import */ var _mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/Clear */ 456);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 448);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Tooltip */ 102);\n\n\n\n\n\n\n\n\nfunction Adjuster(props) {\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n if (event.target.value === \"\") setValue(\"\");else setValue(parseFloat(event.target.value));\n }\n\n const {\n label,\n placeholder,\n add,\n subtract,\n reset,\n tons\n } = props;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n label: label,\n value: value,\n onChange: onChange,\n placeholder: placeholder,\n type: \"number\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Add a lot\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: tons,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n }\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Add\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: () => add(typeof value !== \"string\" ? value : 0),\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1___default.a, null)))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Remove\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: () => subtract(typeof value !== \"string\" ? value : 0),\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2___default.a, null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Reset\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: reset,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4___default.a, null))))\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Adjuster.tsx?");
|
||
|
||
/***/ }),
|
||
/* 108 */,
|
||
/* 109 */
|
||
/*!***********************************!*\
|
||
!*** ./src/NetscriptEvaluator.js ***!
|
||
\***********************************/
|
||
/*! exports provided: netscriptDelay, makeRuntimeRejectMsg, resolveNetscriptRequestedThreads, getErrorLineNumber, isScriptErrorMessage */
|
||
/*! exports used: isScriptErrorMessage, makeRuntimeRejectMsg, netscriptDelay, resolveNetscriptRequestedThreads */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return netscriptDelay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return makeRuntimeRejectMsg; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return resolveNetscriptRequestedThreads; });\n/* unused harmony export getErrorLineNumber */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isScriptErrorMessage; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n\n\n\nfunction netscriptDelay(time, workerScript) {\n return new Promise(function (resolve) {\n workerScript.delay = Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(() => {\n workerScript.delay = null;\n resolve();\n }, time);\n workerScript.delayResolve = resolve;\n });\n}\nfunction makeRuntimeRejectMsg(workerScript, msg, exp = null) {\n var lineNum = \"\";\n\n if (exp != null) {\n var num = getErrorLineNumber(exp, workerScript);\n lineNum = \" (Line \" + num + \")\";\n }\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][workerScript.serverIp];\n\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);\n }\n\n return \"|\" + server.hostname + \"|\" + workerScript.name + \"|\" + msg + lineNum;\n}\nfunction resolveNetscriptRequestedThreads(workerScript, functionName, requestedThreads) {\n const threads = workerScript.scriptRef.threads;\n\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n\n const requestedThreadsAsInt = requestedThreads | 0;\n\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(workerScript, `Invalid thread count passed to ${functionName}: ${requestedThreads}. Threads must be a positive number.`);\n }\n\n if (requestedThreads > threads) {\n throw makeRuntimeRejectMsg(workerScript, `Too many threads requested by ${functionName}. Requested: ${requestedThreads}. Has: ${threads}.`);\n }\n\n return requestedThreadsAsInt;\n}\nfunction getErrorLineNumber(exp, workerScript) {\n var code = workerScript.scriptRef.codeCode(); //Split code up to the start of the node\n\n try {\n code = code.substring(0, exp.start);\n return (code.match(/\\n/g) || []).length + 1;\n } catch (e) {\n return -1;\n }\n}\nfunction isScriptErrorMessage(msg) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_1__[/* isString */ \"a\"])(msg)) {\n return false;\n }\n\n let splitMsg = msg.split(\"|\");\n\n if (splitMsg.length != 4) {\n return false;\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./src/NetscriptEvaluator.js?");
|
||
|
||
/***/ }),
|
||
/* 110 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Literature/Literature.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: Literature */
|
||
/*! exports used: Literature */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Literature; });\n/**\n * Lore / world building literature files that can be found on servers.\n * These files can be read by the player\n */\nclass Literature {\n constructor(title, filename, txt) {\n this.title = title;\n this.fn = filename;\n this.txt = txt;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Literature/Literature.ts?");
|
||
|
||
/***/ }),
|
||
/* 111 */,
|
||
/* 112 */,
|
||
/* 113 */
|
||
/*!******************************************!*\
|
||
!*** ./utils/uiHelpers/createElement.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: createElement */
|
||
/*! exports used: createElement */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createElement; });\n/**\n * Options specific to creating an anchor (\"<a>\") element.\n */\n\n/**\n * Options specific to creating an input (\"<input>\") element.\n */\n\n/**\n * Options specific to creating a label (\"<label>\") element.\n */\n\n/**\n * Options for setting up event listeners on the element.\n */\n\n/**\n * Options for setting up the inline-styling of element.\n * NOTE: Relying on CSS styling should be preferred over forcing the higher specificity via inline styles.\n */\n\n/**\n * Options for adding an in-game tooltip to the element.\n */\n\n/**\n * All possible configuration options when creating an element.\n */\nfunction setElementAnchor(el, params) {\n if (params.text !== undefined) {\n el.text = params.text;\n }\n\n if (params.href !== undefined) {\n el.href = params.href;\n }\n\n if (params.target !== undefined) {\n el.target = params.target;\n }\n}\n\nfunction setElementInput(el, params) {\n if (params.name !== undefined) {\n el.name = params.name;\n }\n\n if (params.value !== undefined) {\n el.value = params.value;\n }\n\n if (params.type !== undefined) {\n el.type = params.type;\n }\n\n if (params.checked !== undefined) {\n el.checked = params.checked;\n }\n\n if (params.pattern !== undefined) {\n el.pattern = params.pattern;\n }\n\n if (params.maxLength !== undefined) {\n el.maxLength = params.maxLength;\n }\n\n if (params.placeholder !== undefined) {\n el.placeholder = params.placeholder;\n }\n\n if (params.max !== undefined) {\n el.max = params.max;\n }\n\n if (params.min !== undefined) {\n el.min = params.min;\n }\n\n if (params.step !== undefined) {\n el.step = params.step;\n }\n}\n\nfunction setElementLabel(el, params) {\n if (params.for !== undefined) {\n el.htmlFor = params.for;\n }\n}\n\nfunction setElementListeners(el, params) {\n // tslint:disable:no-unbound-method\n if (params.clickListener !== undefined) {\n el.addEventListener(\"click\", params.clickListener);\n }\n\n if (params.mouseDown !== undefined) {\n el.addEventListener(\"mousedown\", params.mouseDown);\n }\n\n if (params.inputListener !== undefined) {\n el.addEventListener(\"input\", params.inputListener);\n }\n\n if (params.changeListener !== undefined) {\n el.addEventListener(\"change\", params.changeListener);\n }\n\n if (params.onkeyup !== undefined) {\n el.addEventListener(\"keyup\", params.onkeyup);\n }\n\n if (params.onkeydown !== undefined) {\n el.addEventListener(\"keydown\", params.onkeydown);\n }\n\n if (params.onfocus !== undefined) {\n el.addEventListener(\"focus\", params.onfocus);\n } // tslint:enable:no-unbound-method\n\n}\n\nfunction setElementStyle(el, params) {\n if (params.display !== undefined) {\n el.style.display = params.display;\n }\n\n if (params.visibility !== undefined) {\n el.style.visibility = params.visibility;\n }\n\n if (params.margin !== undefined) {\n el.style.margin = params.margin;\n }\n\n if (params.marginLeft !== undefined) {\n el.style.marginLeft = params.marginLeft;\n }\n\n if (params.marginTop !== undefined) {\n el.style.marginTop = params.marginTop;\n }\n\n if (params.padding !== undefined) {\n el.style.padding = params.padding;\n }\n\n if (params.color !== undefined) {\n el.style.color = params.color;\n }\n\n if (params.border !== undefined) {\n el.style.border = params.border;\n }\n\n if (params.float !== undefined) {\n el.style.cssFloat = params.float;\n }\n\n if (params.fontSize !== undefined) {\n el.style.fontSize = params.fontSize;\n }\n\n if (params.whiteSpace !== undefined) {\n el.style.whiteSpace = params.whiteSpace;\n }\n\n if (params.width !== undefined) {\n el.style.width = params.width;\n }\n\n if (params.height !== undefined) {\n el.style.height = params.height;\n }\n\n if (params.top !== undefined) {\n el.style.top = params.top;\n }\n\n if (params.left !== undefined) {\n el.style.left = params.left;\n }\n\n if (params.backgroundColor !== undefined) {\n el.style.backgroundColor = params.backgroundColor;\n }\n\n if (params.position !== undefined) {\n el.style.position = params.position;\n }\n\n if (params.overflow !== undefined) {\n el.style.overflow = params.overflow;\n }\n}\n\nfunction setElementTooltip(el, params) {\n if (params.tooltip !== undefined && params.tooltip !== \"\") {\n el.className += \" tooltip\";\n el.appendChild(createElement(\"span\", {\n class: \"tooltiptext\",\n innerHTML: params.tooltip\n }));\n } else if (params.tooltipleft !== undefined) {\n el.className += \" tooltip\";\n el.appendChild(createElement(\"span\", {\n class: \"tooltiptextleft\",\n innerHTML: params.tooltipleft\n }));\n } else if (params.tooltipsmall !== undefined) {\n el.className += \" tooltip\";\n el.appendChild(createElement(\"span\", {\n class: \"tooltiptext smallfont\",\n innerHTML: params.tooltipsmall\n }));\n } else if (params.tooltiplow !== undefined) {\n el.className += \"tooltip\";\n el.appendChild(createElement(\"span\", {\n class: \"tooltiptextlow\",\n innerHTML: params.tooltiplow\n }));\n }\n}\n/**\n * An all-in-one-call way of creating an element to be added to the DOM at some point.\n * @param tagName The HTML tag/element name\n * @param params Additional parameters to set on the element\n */\n\n\nfunction createElement(tagName, params = {}) {\n const el = document.createElement(tagName);\n\n if (params.id !== undefined) {\n el.id = params.id;\n }\n\n if (params.class !== undefined) {\n el.className = params.class;\n }\n\n if (params.innerHTML !== undefined) {\n el.innerHTML = params.innerHTML;\n }\n\n if (params.innerText !== undefined) {\n el.innerText = params.innerText;\n }\n\n if (params.tabIndex !== undefined) {\n el.tabIndex = params.tabIndex;\n }\n\n setElementAnchor(el, params);\n setElementInput(el, params);\n setElementLabel(el, params);\n setElementListeners(el, params);\n setElementStyle(el, params);\n setElementTooltip(el, params);\n return el;\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/createElement.ts?");
|
||
|
||
/***/ }),
|
||
/* 114 */,
|
||
/* 115 */,
|
||
/* 116 */,
|
||
/* 117 */,
|
||
/* 118 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Augmentation/AugmentationHelpers.jsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: isRepeatableAug, installAugmentations, initAugmentations, applyAugmentation, augmentationExists */
|
||
/*! exports used: applyAugmentation, augmentationExists, initAugmentations, installAugmentations, isRepeatableAug */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return isRepeatableAug; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return installAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applyAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return augmentationExists; });\n/* harmony import */ var _Augmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation */ 28);\n/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 20);\n/* harmony import */ var _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Prestige */ 275);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/clearObject */ 716);\n/* harmony import */ var _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Casino/RNG */ 279);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_14__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction AddToAugmentations(aug) {\n var name = aug.name;\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name] = aug;\n}\n\nfunction getRandomBonus() {\n var bonuses = [{\n bonuses: {\n hacking_chance_mult: 1.25,\n hacking_speed_mult: 1.1,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.1\n },\n description: \"Increases the player's hacking chance by 25%.<br>\" + \"Increases the player's hacking speed by 10%.<br>\" + \"Increases the amount of money the player's gains from hacking by 25%.<br>\" + \"Improves grow() by 10%.\"\n }, {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2\n },\n description: \"Increases the player's hacking skill by 15%.<br>\" + \"Increases the player's hacking experience gain rate by 100%.\"\n }, {\n bonuses: {\n strength_mult: 1.25,\n strength_exp_mult: 2,\n defense_mult: 1.25,\n defense_exp_mult: 2,\n dexterity_mult: 1.25,\n dexterity_exp_mult: 2,\n agility_mult: 1.25,\n agility_exp_mult: 2\n },\n description: \"Increases all of the player's combat stats by 25%.<br>\" + \"Increases all of the player's combat stat experience gain rate by 100%.\"\n }, {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2\n },\n description: \"This augmentation increases the player's charisma by 50%.<br>\" + \"Increases the player's charisma experience gain rate by 100%.\"\n }, {\n bonuses: {\n hacknet_node_money_mult: 1.2,\n hacknet_node_purchase_cost_mult: 0.85,\n hacknet_node_ram_cost_mult: 0.85,\n hacknet_node_core_cost_mult: 0.85,\n hacknet_node_level_cost_mult: 0.85\n },\n description: \"Increases the amount of money produced by Hacknet Nodes by 20%.<br>\" + \"Decreases all costs related to Hacknet Node by 15%.\"\n }, {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7\n },\n description: \"Increases the amount of money the player gains from working by 70%.<br>\" + \"Increases the amount of reputation the player gains when working for a company by 25%.<br>\" + \"Increases the amount of reputation the player gains for a faction by 15%.\"\n }, {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2\n },\n description: \"Increases the player's crime success rate by 100%.<br>\" + \"Increases the amount of money the player gains from crimes by 100%.\"\n }];\n const randomNumber = new _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__[/* WHRNG */ \"b\"](Math.floor(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].lastUpdate / 3600000));\n\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nfunction initAugmentations() {\n for (var name in _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name].augmentations = [];\n }\n } //Reset Augmentations\n\n\n Object(_utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__[/* clearObject */ \"a\"])(_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]); //Time-Based Augment Test\n\n const randomBonuses = getRandomBonus();\n const UnstableCircadianModulatorParams = {\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info: \"An experimental nanobot injection. Its unstable nature leads to \" + \"unpredictable results based on your circadian rhythm.\"\n };\n Object.keys(randomBonuses.bonuses).forEach(key => UnstableCircadianModulatorParams[key] = randomBonuses.bonuses[key]);\n const UnstableCircadianModulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"](UnstableCircadianModulatorParams);\n UnstableCircadianModulator.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator];\n }\n\n AddToAugmentations(UnstableCircadianModulator); //Combat stat augmentations\n\n const HemoRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump \" + \"blood.\",\n strength_mult: 1.08,\n defense_mult: 1.08,\n agility_mult: 1.08,\n dexterity_mult: 1.08\n });\n HemoRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator];\n }\n\n AddToAugmentations(HemoRecirculator);\n const Targeting1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info: \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" + \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1\n });\n Targeting1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1];\n }\n\n AddToAugmentations(Targeting1);\n const Targeting2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info: \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" + \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1],\n dexterity_mult: 1.2\n });\n Targeting2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2];\n }\n\n AddToAugmentations(Targeting2);\n const Targeting3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to \" + \"lock-on and track threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2],\n dexterity_mult: 1.3\n });\n Targeting3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3];\n }\n\n AddToAugmentations(Targeting3);\n const SyntheticHeart = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info: \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" + \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5\n });\n SyntheticHeart.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart];\n }\n\n AddToAugmentations(SyntheticHeart);\n const SynfibrilMuscle = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info: \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" + \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" + \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3\n });\n SynfibrilMuscle.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle];\n }\n\n AddToAugmentations(SynfibrilMuscle);\n const CombatRib1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info: \"The rib cage is augmented to continuously release boosters into the bloodstream \" + \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1\n });\n CombatRib1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1];\n }\n\n AddToAugmentations(CombatRib1);\n const CombatRib2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info: \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" + \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14\n });\n CombatRib2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2];\n }\n\n AddToAugmentations(CombatRib2);\n const CombatRib3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info: \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" + \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18\n });\n CombatRib3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3];\n }\n\n AddToAugmentations(CombatRib3);\n const NanofiberWeave = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info: \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" + \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2\n });\n NanofiberWeave.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"Blade Industries\", \"Fulcrum Secret Technologies\", \"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave];\n }\n\n AddToAugmentations(NanofiberWeave);\n const SubdermalArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info: \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" + \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" + \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" + \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" + \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2\n });\n SubdermalArmor.addToFactions([\"The Syndicate\", \"Fulcrum Secret Technologies\", \"Illuminati\", \"Daedalus\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor];\n }\n\n AddToAugmentations(SubdermalArmor);\n const WiredReflexes = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info: \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" + \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05\n });\n WiredReflexes.addToFactions([\"Tian Di Hui\", \"Slum Snakes\", \"Sector-12\", \"Volhaven\", \"Aevum\", \"Ishima\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes];\n }\n\n AddToAugmentations(WiredReflexes);\n const GrapheneBoneLacings = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info: \"Graphene is grafted and fused into the skeletal structure, \" + \"enhancing bone density and tensile strength.\",\n strength_mult: 1.7,\n defense_mult: 1.7\n });\n GrapheneBoneLacings.addToFactions([\"Fulcrum Secret Technologies\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings];\n }\n\n AddToAugmentations(GrapheneBoneLacings);\n const BionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info: \"The spine is reconstructed using plasteel and carbon fibers. \" + \"It is now capable of stimulating and regulating neural signals \" + \"passing through the spinal cord, improving senses and reaction speed. \" + \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n agility_mult: 1.15,\n dexterity_mult: 1.15\n });\n BionicSpine.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine];\n }\n\n AddToAugmentations(BionicSpine);\n const GrapheneBionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info: \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" + \"which enhances durability and supercharges all body functions.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6\n });\n GrapheneBionicSpine.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine];\n }\n\n AddToAugmentations(GrapheneBionicSpine);\n const BionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility_mult: 1.6\n });\n BionicLegs.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs];\n }\n\n AddToAugmentations(BionicLegs);\n const GrapheneBionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info: \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" + \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs],\n agility_mult: 2.5\n });\n GrapheneBionicLegs.addToFactions([\"MegaCorp\", \"ECorp\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs];\n }\n\n AddToAugmentations(GrapheneBionicLegs); // Work stat augmentations\n\n const SpeechProcessor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info: \"A cochlear implant with an embedded computer that analyzes incoming speech. \" + \"The embedded computer processes characteristics of incoming speech, such as tone \" + \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2\n });\n SpeechProcessor.addToFactions([\"Tian Di Hui\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor];\n }\n\n AddToAugmentations(SpeechProcessor);\n const TITN41Injection = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info: \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" + \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" + \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n TITN41Injection.addToFactions([\"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection];\n }\n\n AddToAugmentations(TITN41Injection);\n const EnhancedSocialInteractionImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info: \"A cranial implant that greatly assists in the user's ability to analyze social situations \" + \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" + \"language, and the voice tone, and inflection to determine the best course of action during social\" + \"situations. The implant also uses deep learning software to continuously learn new behavior\" + \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6\n });\n EnhancedSocialInteractionImplant.addToFactions([\"Bachman & Associates\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant];\n }\n\n AddToAugmentations(EnhancedSocialInteractionImplant); // Hacking augmentations\n\n const BitWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info: \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" + \"capabilities.\",\n hacking_mult: 1.05\n });\n BitWire.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire];\n }\n\n AddToAugmentations(BitWire);\n const ArtificialBioNeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info: \"A network consisting of millions of nanoprocessors is embedded into the brain. \" + \"The network is meant to mimic the way a biological brain solves a problem, with each \" + \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" + \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" + \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.15,\n hacking_mult: 1.12\n });\n ArtificialBioNeuralNetwork.addToFactions([\"BitRunners\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork];\n }\n\n AddToAugmentations(ArtificialBioNeuralNetwork);\n const ArtificialSynapticPotentiation = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info: \"The body is injected with a chemical that artificially induces synaptic potentiation, \" + \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.05\n });\n ArtificialSynapticPotentiation.addToFactions([\"The Black Hand\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation];\n }\n\n AddToAugmentations(ArtificialSynapticPotentiation);\n const EnhancedMyelinSheathing = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info: \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" + \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" + \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" + \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed_mult: 1.03,\n hacking_exp_mult: 1.1,\n hacking_mult: 1.08\n });\n EnhancedMyelinSheathing.addToFactions([\"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing];\n }\n\n AddToAugmentations(EnhancedMyelinSheathing);\n const SynapticEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info: \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" + \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03\n });\n SynapticEnhancement.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement];\n }\n\n AddToAugmentations(SynapticEnhancement);\n const NeuralRetentionEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info: \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" + \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25\n });\n NeuralRetentionEnhancement.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement];\n }\n\n AddToAugmentations(NeuralRetentionEnhancement);\n const DataJack = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info: \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" + \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" + \"and delete it.\",\n hacking_money_mult: 1.25\n });\n DataJack.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack];\n }\n\n AddToAugmentations(DataJack);\n const ENM = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info: \"A thin device embedded inside the arm containing a wireless module capable of connecting \" + \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" + \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" + \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" + \"control the traffic on a network.\",\n hacking_mult: 1.08\n });\n ENM.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM];\n }\n\n AddToAugmentations(ENM);\n const ENMCore = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore,\n repCost: 2.5e5,\n moneyCost: 2.5e9,\n info: \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n hacking_chance_mult: 1.03,\n hacking_exp_mult: 1.07,\n hacking_mult: 1.07\n });\n ENMCore.addToFactions([\"BitRunners\", \"The Black Hand\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore];\n }\n\n AddToAugmentations(ENMCore);\n const ENMCoreV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info: \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to control information on \" + \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" + \"packets.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.3,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.15,\n hacking_mult: 1.08\n });\n ENMCoreV2.addToFactions([\"BitRunners\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\", \"OmniTek Incorporated\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2];\n }\n\n AddToAugmentations(ENMCoreV2);\n const ENMCoreV3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info: \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" + \"any device on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.25,\n hacking_mult: 1.1\n });\n ENMCoreV3.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3];\n }\n\n AddToAugmentations(ENMCoreV3);\n const ENMAnalyzeEngine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info: \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" + \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.1\n });\n ENMAnalyzeEngine.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine];\n }\n\n AddToAugmentations(ENMAnalyzeEngine);\n const ENMDMA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info: \"This implant installs a Direct Memory Access (DMA) controller into the \" + \"Embedded Netburner Module. This allows the Module to send and receive data \" + \"directly to and from the main memory of devices on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2\n });\n ENMDMA.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA];\n }\n\n AddToAugmentations(ENMDMA);\n const Neuralstimulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info: \"A cranial implant that intelligently stimulates certain areas of the brain \" + \"in order to improve cognitive functions.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.12\n });\n Neuralstimulator.addToFactions([\"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator];\n }\n\n AddToAugmentations(Neuralstimulator);\n const NeuralAccelerator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info: \"A microprocessor that accelerates the processing \" + \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking_mult: 1.1,\n hacking_exp_mult: 1.15,\n hacking_money_mult: 1.2\n });\n NeuralAccelerator.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator];\n }\n\n AddToAugmentations(NeuralAccelerator);\n const CranialSignalProcessorsG1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info: \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05\n });\n CranialSignalProcessorsG1.addToFactions([\"CyberSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1];\n }\n\n AddToAugmentations(CranialSignalProcessorsG1);\n const CranialSignalProcessorsG2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info: \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07\n });\n CranialSignalProcessorsG2.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2];\n }\n\n AddToAugmentations(CranialSignalProcessorsG2);\n const CranialSignalProcessorsG3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info: \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09\n });\n CranialSignalProcessorsG3.addToFactions([\"NiteSec\", \"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3];\n }\n\n AddToAugmentations(CranialSignalProcessorsG3);\n const CranialSignalProcessorsG4 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info: \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25\n });\n CranialSignalProcessorsG4.addToFactions([\"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4];\n }\n\n AddToAugmentations(CranialSignalProcessorsG4);\n const CranialSignalProcessorsG5 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info: \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75\n });\n CranialSignalProcessorsG5.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5];\n }\n\n AddToAugmentations(CranialSignalProcessorsG5);\n const NeuronalDensification = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info: \"The brain is surgically re-engineered to have increased neuronal density \" + \"by decreasing the neuron gap junction. Then, the body is genetically modified \" + \"to enhance the production and capabilities of its neural stem cells.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.1,\n hacking_speed_mult: 1.03\n });\n NeuronalDensification.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification];\n }\n\n AddToAugmentations(NeuronalDensification); // Work Augmentations\n\n const NuoptimalInjectorImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info: \"This torso implant automatically injects nootropic supplements into \" + \"the bloodstream to improve memory, increase focus, and provide other \" + \"cognitive enhancements.\",\n company_rep_mult: 1.2\n });\n NuoptimalInjectorImplant.addToFactions([\"Tian Di Hui\", \"Volhaven\", \"New Tokyo\", \"Chongqing\", \"Clarke Incorporated\", \"Four Sigma\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant];\n }\n\n AddToAugmentations(NuoptimalInjectorImplant);\n const SpeechEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info: \"An advanced neural implant that improves your speaking abilities, making \" + \"you more convincing and likable in conversations and overall improving your \" + \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1\n });\n SpeechEnhancement.addToFactions([\"Tian Di Hui\", \"Speakers for the Dead\", \"Four Sigma\", \"KuaiGong International\", \"Clarke Incorporated\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement];\n }\n\n AddToAugmentations(SpeechEnhancement);\n const FocusWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways \" + \"in the brain.\",\n hacking_exp_mult: 1.05,\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n charisma_exp_mult: 1.05,\n company_rep_mult: 1.1,\n work_money_mult: 1.2\n });\n FocusWire.addToFactions([\"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire];\n }\n\n AddToAugmentations(FocusWire);\n const PCDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info: \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" + \"computers. Connecting to a computer through this jack allows you to interface with \" + \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08\n });\n PCDNI.addToFactions([\"Four Sigma\", \"OmniTek Incorporated\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI];\n }\n\n AddToAugmentations(PCDNI);\n const PCDNIOptimizer = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info: \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" + \"improves the performance of the interface and gives the user more control options \" + \"to a connected computer.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1\n });\n PCDNIOptimizer.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer];\n }\n\n AddToAugmentations(PCDNIOptimizer);\n const PCDNINeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info: \"This is an additional installation that upgrades the functionality of the \" + \"PC Direct-Neural Interface augmentation. When connected to a computer, \" + \"The Neural Network upgrade allows the user to use their own brain's \" + \"processing power to aid the computer in computational tasks.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05\n });\n PCDNINeuralNetwork.addToFactions([\"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork];\n }\n\n AddToAugmentations(PCDNINeuralNetwork);\n const ADRPheromone1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info: \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" + \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" + \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1\n });\n ADRPheromone1.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"NWO\", \"MegaCorp\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1];\n }\n\n AddToAugmentations(ADRPheromone1);\n const ADRPheromone2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info: \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" + \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" + \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2\n });\n ADRPheromone2.addToFactions([\"Silhouette\", \"Four Sigma\", \"Bachman & Associates\", \"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2];\n }\n\n AddToAugmentations(ADRPheromone2);\n const ShadowsSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info: \"A crude but functional matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation was developed by \" + \"criminal organizations and allows the user to project and control holographic \" + \"simulacrums within a large radius. These simulacrums are commonly used for \" + \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n ShadowsSimulacrum.addToFactions([\"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum];\n }\n\n AddToAugmentations(ShadowsSimulacrum); // HacknetNode Augmentations\n\n const HacknetNodeCPUUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info: \"Uploads the architecture and design details of a Hacknet Node's CPU into \" + \"the brain. This allows the user to engineer custom hardware and software \" + \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85\n });\n HacknetNodeCPUUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload];\n }\n\n AddToAugmentations(HacknetNodeCPUUpload);\n const HacknetNodeCacheUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" + \"into the brain. This allows the user to engineer custom cache hardware for the \" + \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85\n });\n HacknetNodeCacheUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload];\n }\n\n AddToAugmentations(HacknetNodeCacheUpload);\n const HacknetNodeNICUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" + \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" + \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9\n });\n HacknetNodeNICUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload];\n }\n\n AddToAugmentations(HacknetNodeNICUpload);\n const HacknetNodeKernelDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" + \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25\n });\n HacknetNodeKernelDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI];\n }\n\n AddToAugmentations(HacknetNodeKernelDNI);\n const HacknetNodeCoreDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" + \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45\n });\n HacknetNodeCoreDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI];\n }\n\n AddToAugmentations(HacknetNodeCoreDNI); //Misc/Hybrid augmentations\n\n const NeuroFluxGovernor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n repCost: 1.25e3,\n moneyCost: 3.75e6,\n info: \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" + \"monitors and regulates nervous impulses coming to and from the spinal column, \" + \"essentially 'governing' the body. By doing so, it improves the functionality of the \" + \"body's nervous system.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL multipliers by 1%, stacking multiplicatively.\"),\n hacking_chance_mult: 1.01,\n hacking_speed_mult: 1.01,\n hacking_money_mult: 1.01,\n hacking_grow_mult: 1.01,\n hacking_mult: 1.01,\n strength_mult: 1.01,\n defense_mult: 1.01,\n dexterity_mult: 1.01,\n agility_mult: 1.01,\n charisma_mult: 1.01,\n hacking_exp_mult: 1.01,\n strength_exp_mult: 1.01,\n defense_exp_mult: 1.01,\n dexterity_exp_mult: 1.01,\n agility_exp_mult: 1.01,\n charisma_exp_mult: 1.01,\n company_rep_mult: 1.01,\n faction_rep_mult: 1.01,\n crime_money_mult: 1.01,\n crime_success_mult: 1.01,\n hacknet_node_money_mult: 1.01,\n hacknet_node_purchase_cost_mult: 0.99,\n hacknet_node_ram_cost_mult: 0.99,\n hacknet_node_core_cost_mult: 0.99,\n hacknet_node_level_cost_mult: 0.99,\n work_money_mult: 1.01\n }); // Set the Augmentation's level to the currently-installed level\n\n let currLevel = 0;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level;\n }\n }\n\n NeuroFluxGovernor.level = currLevel; // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux\n // levels that are purchased but not yet installed\n\n let nextLevel = currLevel;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++nextLevel;\n }\n }\n\n let mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n NeuroFluxGovernor.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n NeuroFluxGovernor.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor];\n }\n\n NeuroFluxGovernor.addToAllFactions();\n AddToAugmentations(NeuroFluxGovernor);\n const Neurotrainer1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. It is \" + \"installed by releasing millions of nanobots into the human brain, each of which \" + \"attaches to a different neural pathway to enhance the brain's ability to retain \" + \"and retrieve information.\",\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n Neurotrainer1.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1];\n }\n\n AddToAugmentations(Neurotrainer1);\n const Neurotrainer2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" + \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Neurotrainer2.addToFactions([\"BitRunners\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2];\n }\n\n AddToAugmentations(Neurotrainer2);\n const Neurotrainer3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" + \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp_mult: 1.2,\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n charisma_exp_mult: 1.2\n });\n Neurotrainer3.addToFactions([\"NWO\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3];\n }\n\n AddToAugmentations(Neurotrainer3);\n const Hypersight = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info: \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" + \"Embedded circuitry within the implant provides the ability to detect heat and movement \" + \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity_mult: 1.4,\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1\n });\n Hypersight.addToFactions([\"Blade Industries\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight];\n }\n\n AddToAugmentations(Hypersight);\n const LuminCloaking1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info: \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, have a negative refractive index. As a result, they bend light \" + \"around the skin, making the user much harder to see to the naked eye.\",\n agility_mult: 1.05,\n crime_money_mult: 1.1\n });\n LuminCloaking1.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1];\n }\n\n AddToAugmentations(LuminCloaking1);\n const LuminCloaking2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info: \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" + \"reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, are capable of not only bending light but also of bending heat, \" + \"making the user more resilient as well as stealthy.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25\n });\n LuminCloaking2.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2];\n }\n\n AddToAugmentations(LuminCloaking2);\n const SmartSonar = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies \" + \"using sound propagation.\",\n dexterity_mult: 1.1,\n dexterity_exp_mult: 1.15,\n crime_money_mult: 1.25\n });\n SmartSonar.addToFactions([\"Slum Snakes\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar];\n }\n\n AddToAugmentations(SmartSonar);\n const PowerRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info: \"The body's nerves are attached with polypyrrole nanocircuits that \" + \"are capable of capturing wasted energy, in the form of heat, \" + \"and converting it back into usable power.\",\n hacking_mult: 1.05,\n strength_mult: 1.05,\n defense_mult: 1.05,\n dexterity_mult: 1.05,\n agility_mult: 1.05,\n charisma_mult: 1.05,\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n PowerRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\", \"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator];\n }\n\n AddToAugmentations(PowerRecirculator); // Unique AUGS (Each Faction gets one unique augmentation)\n // Factions that already have unique augs up to this point:\n // Slum Snakes, CyberSec, Netburners, Fulcrum Secret Technologies,\n // Silhouette\n // Illuminati\n\n const QLink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info: \"A brain implant that wirelessly connects you to the Illuminati's \" + \"quantum supercomputer, allowing you to access and use its incredible \" + \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4\n });\n QLink.addToFactions([\"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink];\n }\n\n AddToAugmentations(QLink); // Daedalus\n\n const RedPill = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n RedPill.addToFactions([\"Daedalus\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill];\n }\n\n AddToAugmentations(RedPill); // Covenant\n\n const SPTN97 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info: \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" + \"artificially-synthesized gene that was developed by DARPA to create \" + \"super-soldiers through genetic modification. The gene was outlawed in \" + \"2056.\",\n strength_mult: 1.75,\n defense_mult: 1.75,\n dexterity_mult: 1.75,\n agility_mult: 1.75,\n hacking_mult: 1.15\n });\n SPTN97.addToFactions([\"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97];\n }\n\n AddToAugmentations(SPTN97); // ECorp\n\n const HiveMind = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info: \"A brain implant developed by ECorp. They do not reveal what \" + \"exactly the implant does, but they promise that it will greatly \" + \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n HiveMind.addToFactions([\"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind];\n }\n\n AddToAugmentations(HiveMind); // MegaCorp\n\n const CordiARCReactor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info: \"The thoracic cavity is equipped with a small chamber designed \" + \"to hold and sustain hydrogen plasma. The plasma is used to generate \" + \"fusion power through nuclear fusion, providing limitless amounts of clean \" + \"energy for the body.\",\n strength_mult: 1.35,\n defense_mult: 1.35,\n dexterity_mult: 1.35,\n agility_mult: 1.35,\n strength_exp_mult: 1.35,\n defense_exp_mult: 1.35,\n dexterity_exp_mult: 1.35,\n agility_exp_mult: 1.35\n });\n CordiARCReactor.addToFactions([\"MegaCorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor];\n }\n\n AddToAugmentations(CordiARCReactor); // BachmanAndAssociates\n\n const SmartJaw = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info: \"A bionic jaw that contains advanced hardware and software \" + \"capable of psychoanalyzing and profiling the personality of \" + \"others using optical imaging software.\",\n charisma_mult: 1.5,\n charisma_exp_mult: 1.5,\n company_rep_mult: 1.25,\n faction_rep_mult: 1.25\n });\n SmartJaw.addToFactions([\"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw];\n }\n\n AddToAugmentations(SmartJaw); // BladeIndustries\n\n const Neotra = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info: \"A highly-advanced techno-organic drug that is injected into the skeletal \" + \"and integumentary system. The drug permanently modifies the DNA of the \" + \"body's skin and bone cells, granting them the ability to repair \" + \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55\n });\n Neotra.addToFactions([\"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra];\n }\n\n AddToAugmentations(Neotra); // NWO\n\n const Xanipher = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info: \"A concoction of advanced nanobots that is orally ingested into the \" + \"body. These nanobots induce physiological changes and significantly \" + \"improve the body's functioning in all aspects.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Xanipher.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher];\n }\n\n AddToAugmentations(Xanipher);\n const HydroflameLeftArm = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info: \"The left arm of a legendary BitRunner who ascended beyond this world. \" + \"It projects a light blue energy shield that protects the exposed inner parts. \" + \"Even though it contains no weapons, the advanced tungsten titanium \" + \"alloy increases the users strength to unbelievable levels. The augmentation \" + \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7\n });\n HydroflameLeftArm.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm];\n }\n\n AddToAugmentations(HydroflameLeftArm); // ClarkeIncorporated\n\n const nextSENS = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info: \"The body is genetically re-engineered to maintain a state \" + \"of negligible senescence, preventing the body from \" + \"deteriorating with age.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2\n });\n nextSENS.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS];\n }\n\n AddToAugmentations(nextSENS); // OmniTekIncorporated\n\n const OmniTekInfoLoad = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info: \"OmniTek's data and information repository is uploaded \" + \"into your brain, enhancing your programming and \" + \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25\n });\n OmniTekInfoLoad.addToFactions([\"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad];\n }\n\n AddToAugmentations(OmniTekInfoLoad); // FourSigma\n // TODO Later when Intelligence is added in . Some aug that greatly increases int\n // KuaiGongInternational\n\n const PhotosyntheticCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info: \"Chloroplasts are added to epidermal stem cells and are applied \" + \"to the body using a skin graft. The result is photosynthetic \" + \"skin cells, allowing users to generate their own energy \" + \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4\n });\n PhotosyntheticCells.addToFactions([\"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells];\n }\n\n AddToAugmentations(PhotosyntheticCells); // BitRunners\n\n const Neurolink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info: \"A brain implant that provides a high-bandwidth, direct neural link between your \" + \"mind and the BitRunners' data servers, which reportedly contain \" + \"the largest database of hacking tools and information in the world.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.2,\n hacking_chance_mult: 1.1,\n hacking_speed_mult: 1.05,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].FTPCrackProgram.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].RelaySMTPProgram.name]\n });\n Neurolink.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink];\n }\n\n AddToAugmentations(Neurolink); // BlackHand\n\n const TheBlackHand = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info: \"A highly advanced bionic hand. This prosthetic not only \" + \"enhances strength and dexterity but it is also embedded \" + \"with hardware and firmware that lets the user connect to, access, and hack \" + \"devices and machines by just touching them.\",\n strength_mult: 1.15,\n dexterity_mult: 1.15,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.1\n });\n TheBlackHand.addToFactions([\"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand];\n }\n\n AddToAugmentations(TheBlackHand); // NiteSec\n\n const CRTX42AA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info: \"The CRTX42-AA gene is injected into the genome. \" + \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" + \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15\n });\n CRTX42AA.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA];\n }\n\n AddToAugmentations(CRTX42AA); // Chongqing\n\n const Neuregen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info: \"A drug that genetically modifies the neurons in the brain \" + \"resulting in neurons never die, continuously \" + \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4\n });\n Neuregen.addToFactions([\"Chongqing\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen];\n }\n\n AddToAugmentations(Neuregen); // Sector12\n\n const CashRoot = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets.\"),\n startingMoney: 1e6,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].BruteSSHProgram.name]\n });\n CashRoot.addToFactions([\"Sector-12\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot];\n }\n\n AddToAugmentations(CashRoot); // NewTokyo\n\n const NutriGen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info: \"A thermo-powered artificial nutrition generator. Endogenously \" + \"synthesizes glucose, amino acids, and vitamins and redistributes them \" + \"across the body. The device is powered by the body's naturally wasted \" + \"energy in the form of heat.\",\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2\n });\n NutriGen.addToFactions([\"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen];\n }\n\n AddToAugmentations(NutriGen); // Aevum\n\n const PCMatrix = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info: \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" + \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" + \"outcomes of nearly every situation.\",\n charisma_mult: 1.0777,\n charisma_exp_mult: 1.0777,\n work_money_mult: 1.777,\n faction_rep_mult: 1.0777,\n company_rep_mult: 1.0777,\n crime_success_mult: 1.0777,\n crime_money_mult: 1.0777,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].DeepscanV1.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].AutoLink.name]\n });\n PCMatrix.addToFactions([\"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix];\n }\n\n AddToAugmentations(PCMatrix); // Ishima\n\n const INFRARet = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info: \"A tiny chip that sits behind the retinae. This implant lets the\" + \"user visually detect infrared radiation.\",\n crime_success_mult: 1.25,\n crime_money_mult: 1.1,\n dexterity_mult: 1.1\n });\n INFRARet.addToFactions([\"Ishima\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet];\n }\n\n AddToAugmentations(INFRARet); // Volhaven\n\n const DermaForce = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info: \"Synthetic skin that is grafted onto the body. This skin consists of \" + \"millions of nanobots capable of projecting high-density muon beams, \" + \"creating an energy barrier around the user.\",\n defense_mult: 1.4\n });\n DermaForce.addToFactions([\"Volhaven\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce];\n }\n\n AddToAugmentations(DermaForce); // SpeakersForTheDead\n\n const GrapheneBrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info: \"An upgrade to the BrachiBlades augmentation. It infuses \" + \"the retractable blades with an advanced graphene material \" + \"making them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3\n });\n GrapheneBrachiBlades.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades];\n }\n\n AddToAugmentations(GrapheneBrachiBlades); // DarkArmy\n\n const GrapheneBionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info: \"An upgrade to the Bionic Arms augmentation. It infuses the \" + \"prosthetic arms with an advanced graphene material \" + \"to make them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85\n });\n GrapheneBionicArms.addToFactions([\"The Dark Army\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms];\n }\n\n AddToAugmentations(GrapheneBionicArms); // TheSyndicate\n\n const BrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n crime_success_mult: 1.1,\n crime_money_mult: 1.15\n });\n BrachiBlades.addToFactions([\"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades];\n }\n\n AddToAugmentations(BrachiBlades); // Tetrads\n\n const BionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info: \"Cybernetic arms created from plasteel and carbon fibers that completely replace \" + \"the user's organic arms.\",\n strength_mult: 1.3,\n dexterity_mult: 1.3\n });\n BionicArms.addToFactions([\"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms];\n }\n\n AddToAugmentations(BionicArms); // TianDiHui\n\n const SNA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info: \"A cranial implant that affects the user's personality, making them better \" + \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n SNA.addToFactions([\"Tian Di Hui\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA];\n }\n\n AddToAugmentations(SNA); // Special Bladeburner Augmentations\n\n const BladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* factionExists */ \"b\"])(BladeburnersFactionName)) {\n const EsperEyewear = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info: \"Ballistic-grade protective and retractable eyewear that was designed specifically \" + \"for Bladeburner units. This \" + \"is implanted by installing a mechanical frame in the skull's orbit. \" + \"This frame interfaces with the brain and allows the user to \" + \"automatically extrude and extract the eyewear. The eyewear protects \" + \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" + \"embedded with a data processing chip that can be programmed to display an \" + \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance_mult: 1.03,\n dexterity_mult: 1.05,\n isSpecial: true\n });\n EsperEyewear.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EsperEyewear);\n const EMS4Recombination = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info: \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" + \"technique was originally used on Bladeburners during the Synthoid uprising \" + \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" + \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance_mult: 1.03,\n bladeburner_analysis_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n isSpecial: true\n });\n EMS4Recombination.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EMS4Recombination);\n const OrionShoulder = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info: \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" + \"the ORION-MKIV shoulder enhances the strength and dexterity \" + \"of the user's right arm. It also provides protection due to its \" + \"crystallized graphene plating.\",\n defense_mult: 1.05,\n strength_mult: 1.05,\n dexterity_mult: 1.05,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n OrionShoulder.addToFactions([BladeburnersFactionName]);\n resetAugmentation(OrionShoulder);\n const HyperionV1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info: \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" + \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" + \"be used against augmented enemies as the ionized \" + \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" + \"it can also be effective against non-augmented enemies due to its high temperature \" + \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n HyperionV1.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV1);\n const HyperionV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"A pair of mini plasma cannons embedded into the hands. This augmentation \" + \"is more advanced and powerful than the original V1 model. This V2 model is \" + \"more power-efficient, more accurate, and can fire plasma bolts at a much \" + \"higher velocity than the V1 model.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n HyperionV2.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV2);\n const GolemSerum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info: \"A serum that permanently enhances many aspects of human capabilities, \" + \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" + \"serum was originally developed by the Chinese military in an attempt to \" + \"create super soldiers.\",\n strength_mult: 1.07,\n defense_mult: 1.07,\n dexterity_mult: 1.07,\n agility_mult: 1.07,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n GolemSerum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(GolemSerum);\n const VangelisVirus = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" + \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.1,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n VangelisVirus.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus);\n const VangelisVirus3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info: \"An improved version of Vangelis, a synthetic symbiotic virus that is \" + \"injected into human brain tissue. On top of the benefits of the original \" + \"virus, this also grants an accelerated healing factor and enhanced \" + \"reflexes.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus],\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.05,\n isSpecial: true\n });\n VangelisVirus3.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus3);\n const INTERLINKED = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"The DNA is genetically modified to enhance the human's body \" + \"extracellular matrix (ECM). This improves the ECM's ability to \" + \"structurally support the body and grants heightened strength and \" + \"durability.\",\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n bladeburner_max_stamina_mult: 1.1,\n isSpecial: true\n });\n INTERLINKED.addToFactions([BladeburnersFactionName]);\n resetAugmentation(INTERLINKED);\n const BladeRunner = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info: \"A cybernetic foot augmentation that was specifically created for Bladeburners \" + \"during the Synthoid Uprising. The organic musculature of the human foot \" + \"is enhanced with flexible carbon nanotube matrices that are controlled by \" + \"intelligent servo-motors.\",\n agility_mult: 1.05,\n bladeburner_max_stamina_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n BladeRunner.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeRunner);\n const BladeArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info: \"A powered exoskeleton suit designed as armor for Bladeburner units. This \" + \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" + \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" + \"physical abilities.\",\n strength_mult: 1.04,\n defense_mult: 1.04,\n dexterity_mult: 1.04,\n agility_mult: 1.04,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_success_chance_mult: 1.03,\n isSpecial: true\n });\n BladeArmor.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmor);\n const BladeArmorPowerCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" + \"more efficiently storing and using power.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_max_stamina_mult: 1.05,\n isSpecial: true\n });\n BladeArmorPowerCells.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorPowerCells);\n const BladeArmorEnergyShielding = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" + \"that is capable of projecting an energy shielding force field.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorEnergyShielding);\n const BladeArmorUnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info: \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" + \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" + \"threats while keeping casualties to a minimum.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n BladeArmorUnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorUnibeam);\n const BladeArmorOmnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info: \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" + \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" + \"modules that combine together to form a single, more powerful beam of up to \" + \"2000MW.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true\n });\n BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorOmnibeam);\n const BladeArmorIPU = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" + \"Unit that was specially designed to analyze Synthoid related data and \" + \"information.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true\n });\n BladeArmorIPU.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorIPU);\n const BladesSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info: \"A highly-advanced matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation allows \" + \"the user to project and control a holographic simulacrum within an \" + \"extremely large radius. These specially-modified holograms were specifically \" + \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.\"),\n isSpecial: true\n });\n BladesSimulacrum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladesSimulacrum);\n } // Update costs based on how many have been purchased\n\n\n mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__[/* SourceFileFlags */ \"a\"][11]], _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length);\n\n for (var name in _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n if (_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name].baseCost *= mult;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].reapplyAllAugmentations();\n} //Resets an Augmentation during (re-initizliation)\n\n\nfunction resetAugmentation(newAugObject) {\n if (!(newAugObject instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"])) {\n throw new Error(\"Invalid argument 'newAugObject' passed into resetAugmentation\");\n }\n\n var name = newAugObject.name;\n\n if (augmentationExists(name)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name];\n }\n\n AddToAugmentations(newAugObject);\n}\n\nfunction applyAugmentation(aug, reapply = false) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].owned = true;\n const augObj = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name]; // Apply multipliers\n\n for (const mult in augObj.mults) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] *= augObj.mults[mult];\n }\n } // Special logic for NeuroFlux Governor\n\n\n if (aug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n if (!reapply) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].level = aug.level;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name == _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level = aug.level;\n return; // break;\n }\n }\n }\n } // Push onto Player's Augmentation list\n\n\n if (!reapply) {\n var ownedAug = new _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations() {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length == 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n\n let augmentationList = \"\";\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i];\n const aug = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i]);\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n let level = \"\";\n\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n\n augmentationList += aug.name + level + \"<br>\";\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations = [];\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You slowly drift to sleep as scientists put you under in order \" + \"to install the following Augmentations:<br>\" + augmentationList + \"<br>You wake up in your home...you feel different...\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_8__[/* prestigeAugmentation */ \"a\"])();\n}\n\nfunction augmentationExists(name) {\n return _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name);\n}\n\nfunction isRepeatableAug(aug) {\n const augName = aug instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"] ? aug.name : aug;\n\n if (augName === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n return true;\n }\n\n return false;\n}\n\n\n//# sourceURL=webpack:///./src/Augmentation/AugmentationHelpers.jsx?");
|
||
|
||
/***/ }),
|
||
/* 119 */
|
||
/*!**************************!*\
|
||
!*** ./src/Missions.jsx ***!
|
||
\**************************/
|
||
/*! exports provided: HackingMission, inMission, setInMission, currMission */
|
||
/*! exports used: HackingMission, currMission, inMission, setInMission */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return setInMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return currMission; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 287);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! jsplumb */ 1117);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n // For some reason `jsplumb` needs to be imported exactly like this,\n// lowercase p, and later in the code used as `jsPlumb` uppercase P. wtf.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n\n\nlet inMission = false; // Flag to denote whether a mission is running\n\nlet currMission = null;\n\nfunction setInMission(bool, mission) {\n inMission = bool;\n\n if (bool) {\n currMission = mission;\n } else {\n currMission = null;\n }\n} // Keyboard shortcuts\n\n\n$(document).keydown(function (e) {\n if (inMission && currMission && currMission.selectedNode.length != 0) {\n switch (e.keyCode) {\n case 65:\n // a for Attack\n currMission.actionButtons[0].click();\n break;\n\n case 83:\n // s for Scan\n currMission.actionButtons[1].click();\n break;\n\n case 87:\n // w for Weaken\n currMission.actionButtons[2].click();\n break;\n\n case 70:\n // f for Fortify\n currMission.actionButtons[3].click();\n break;\n\n case 82:\n // r for Overflow\n currMission.actionButtons[4].click();\n break;\n\n case 68:\n // d for Detach connection\n currMission.actionButtons[5].click();\n break;\n\n default:\n break;\n }\n }\n});\nlet NodeTypes = {\n Core: \"CPU Core Node\",\n // All actions available\n Firewall: \"Firewall Node\",\n // No actions available\n Database: \"Database Node\",\n // No actions available\n Spam: \"Spam Node\",\n // No actions Available\n Transfer: \"Transfer Node\",\n // Can Weaken, Scan, Fortify and Overflow\n Shield: \"Shield Node\" // Can Fortify\n\n};\nlet NodeActions = {\n Attack: \"Attacking\",\n // Damaged based on attack stat + hacking level + opp def\n Scan: \"Scanning\",\n // -Def for target, affected by attack and hacking level\n Weaken: \"Weakening\",\n // -Attack for target, affected by attack and hacking level\n Fortify: \"Fortifying\",\n // +Defense for Node, affected by hacking level\n Overflow: \"Overflowing\" // +Attack but -Defense for Node, affected by hacking level\n\n};\n\nfunction Node(type, stats) {\n this.type = type;\n this.atk = stats.atk ? stats.atk : 0;\n this.def = stats.def ? stats.def : 0;\n this.hp = stats.hp ? stats.hp : 0;\n this.maxhp = this.hp;\n this.plyrCtrl = false;\n this.enmyCtrl = false;\n this.pos = [0, 0]; // x, y\n\n this.el = null; // Holds the Node's DOM element\n\n this.action = null;\n this.targetedCount = 0; // Count of how many connections this node is the target of\n\n /**\n * Holds the JsPlumb Connection object for this Node, where this Node is the Source (since each Node\n * can only have 1 outgoing Connection)\n */\n\n this.conn = null;\n}\n\nNode.prototype.setPosition = function (x, y) {\n this.pos = [x, y];\n};\n\nNode.prototype.setControlledByPlayer = function () {\n this.plyrCtrl = true;\n this.enmyCtrl = false;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-enemy-node\");\n this.el.classList.add(\"hack-mission-player-node\");\n }\n};\n\nNode.prototype.setControlledByEnemy = function () {\n this.plyrCtrl = false;\n this.enmyCtrl = true;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-player-node\");\n this.el.classList.add(\"hack-mission-enemy-node\");\n }\n}; // Sets this node to be the active node\n\n\nNode.prototype.select = function (actionButtons) {\n if (this.enmyCtrl) {\n return;\n }\n\n this.el.classList.add(\"hack-mission-player-node-active\"); // Make all buttons inactive\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n\n switch (this.type) {\n case NodeTypes.Core:\n // All buttons active\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button-inactive\");\n actionButtons[i].classList.add(\"a-link-button\");\n }\n\n break;\n\n case NodeTypes.Transfer:\n actionButtons[1].classList.remove(\"a-link-button-inactive\");\n actionButtons[1].classList.add(\"a-link-button\");\n actionButtons[2].classList.remove(\"a-link-button-inactive\");\n actionButtons[2].classList.add(\"a-link-button\");\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n actionButtons[4].classList.remove(\"a-link-button-inactive\");\n actionButtons[4].classList.add(\"a-link-button\");\n actionButtons[5].classList.remove(\"a-link-button-inactive\");\n actionButtons[5].classList.add(\"a-link-button\");\n break;\n\n case NodeTypes.Shield:\n case NodeTypes.Firewall:\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n break;\n\n default:\n break;\n }\n};\n\nNode.prototype.deselect = function (actionButtons) {\n this.el.classList.remove(\"hack-mission-player-node-active\");\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nNode.prototype.untarget = function () {\n if (this.targetedCount === 0) {\n console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`);\n return;\n }\n\n --this.targetedCount;\n};\n/**\n * Hacking mission instance\n * @param rep {number} How much reputation the player has for the faction\n * @param fac {Faction} Faction for which this mission is being conducted\n */\n\n\nfunction HackingMission(rep, fac) {\n this.faction = fac;\n this.started = false;\n this.time = 180000; // 5 minutes to start, milliseconds\n\n this.playerCores = [];\n this.playerNodes = []; // Non-core nodes\n\n this.playerAtk = 0;\n this.playerDef = 0;\n this.enemyCores = [];\n this.enemyDatabases = [];\n this.enemyNodes = []; // Non-core nodes\n\n this.enemyAtk = 0;\n this.enemyDef = 0;\n this.miscNodes = [];\n this.selectedNode = []; // Which of the player's nodes are currently selected\n\n this.actionButtons = []; // DOM buttons for actions\n\n this.availablePositions = [];\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.availablePositions.push([r, c]);\n }\n }\n\n this.map = [];\n\n for (var i = 0; i < 8; ++i) {\n this.map.push([null, null, null, null, null, null, null, null]);\n }\n\n this.jsplumbinstance = null;\n this.difficulty = rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToDiffConversion + 1;\n this.reward = 250 + rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToRewardConversion;\n}\n\nHackingMission.prototype.init = function () {\n // Create Header DOM\n this.createPageDom(); // Create player starting nodes\n\n var home = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < home.cpuCores; ++i) {\n var stats = {\n atk: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 7.5 + 30,\n def: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 20,\n hp: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 4\n };\n this.playerCores.push(new Node(NodeTypes.Core, stats));\n this.playerCores[i].setControlledByPlayer();\n this.setNodePosition(this.playerCores[i], i, 0);\n this.removeAvailablePosition(i, 0);\n } // Randomly generate enemy nodes (CPU and Firewall) based on difficulty\n\n\n var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4)));\n var numFirewalls = Math.min(20, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(Math.round(this.difficulty / 3), Math.round(this.difficulty / 3) + 1));\n var numDatabases = Math.min(10, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(1, Math.round(this.difficulty / 3) + 1));\n var totalNodes = numNodes + numFirewalls + numDatabases;\n var xlimit = 7 - Math.floor(totalNodes / 8);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.8 + this.difficulty / 5, 10);\n\n for (var i = 0; i < numNodes; ++i) {\n var stats = {\n atk: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(80, 86),\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(5, 10),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 230)\n };\n this.enemyCores.push(new Node(NodeTypes.Core, stats));\n this.enemyCores[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyCores[i], xlimit);\n }\n\n for (var i = 0; i < numFirewalls; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(10, 20),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(275, 300)\n };\n this.enemyNodes.push(new Node(NodeTypes.Firewall, stats));\n this.enemyNodes[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyNodes[i], xlimit);\n }\n\n for (var i = 0; i < numDatabases; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 55),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 275)\n };\n var node = new Node(NodeTypes.Database, stats);\n node.setControlledByEnemy();\n this.setNodeRandomPosition(node, xlimit);\n this.enemyDatabases.push(node);\n }\n\n this.calculateDefenses();\n this.calculateAttacks();\n this.createMap();\n};\n\nHackingMission.prototype.createPageDom = function () {\n var container = document.getElementById(\"mission-container\");\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n var headerText = document.createElement(\"p\");\n react_dom__WEBPACK_IMPORTED_MODULE_11___default.a.render(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"You are about to start a hacking mission! You will gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" faction reputation with\", \" \", this.faction.name, \" if you win. Click the 'Start' button to begin.\"), headerText);\n headerText.style.display = \"block\";\n headerText.classList.add(\"hack-mission-header-element\");\n headerText.style.width = \"80%\";\n var inGameGuideBtn = document.createElement(\"a\");\n inGameGuideBtn.innerText = \"How to Play\";\n inGameGuideBtn.classList.add(\"a-link-button\");\n inGameGuideBtn.style.display = \"inline-block\";\n inGameGuideBtn.classList.add(\"hack-mission-header-element\");\n inGameGuideBtn.addEventListener(\"click\", function () {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionHowToPlay);\n return false;\n }); // Start button will get replaced with forfeit when game is started\n\n var startBtn = document.createElement(\"a\");\n startBtn.innerHTML = \"Start\";\n startBtn.setAttribute(\"id\", \"hack-mission-start-btn\");\n startBtn.classList.add(\"a-link-button\");\n startBtn.classList.add(\"hack-mission-header-element\");\n startBtn.style.display = \"inline-block\";\n startBtn.addEventListener(\"click\", () => {\n this.start();\n return false;\n });\n var forfeitMission = document.createElement(\"a\");\n forfeitMission.innerHTML = \"Forfeit Mission (Exit)\";\n forfeitMission.classList.add(\"a-link-button\");\n forfeitMission.classList.add(\"hack-mission-header-element\");\n forfeitMission.style.display = \"inline-block\";\n forfeitMission.addEventListener(\"click\", () => {\n this.finishMission(false);\n return false;\n });\n var timer = document.createElement(\"p\");\n timer.setAttribute(\"id\", \"hacking-mission-timer\");\n timer.style.display = \"inline-block\";\n timer.style.margin = \"6px\"; // Create Action Buttons (Attack/Scan/Weaken/ etc...)\n\n var actionsContainer = document.createElement(\"span\");\n actionsContainer.style.display = \"block\";\n actionsContainer.classList.add(\"hack-mission-action-buttons-container\");\n\n for (var i = 0; i < 6; ++i) {\n this.actionButtons.push(document.createElement(\"a\"));\n this.actionButtons[i].style.display = \"inline-block\";\n this.actionButtons[i].classList.add(\"a-link-button-inactive\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"tooltip\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"hack-mission-header-element\");\n actionsContainer.appendChild(this.actionButtons[i]);\n }\n\n this.actionButtons[0].innerText = \"Attack(a)\";\n var atkTooltip = document.createElement(\"span\");\n atkTooltip.classList.add(\"tooltiptexthigh\");\n atkTooltip.innerText = \"Lowers the targeted node's HP. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[0].appendChild(atkTooltip);\n this.actionButtons[1].innerText = \"Scan(s)\";\n var scanTooltip = document.createElement(\"span\");\n scanTooltip.classList.add(\"tooltiptexthigh\");\n scanTooltip.innerText = \"Lowers the targeted node's defense. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[1].appendChild(scanTooltip);\n this.actionButtons[2].innerText = \"Weaken(w)\";\n var WeakenTooltip = document.createElement(\"span\");\n WeakenTooltip.classList.add(\"tooltiptexthigh\");\n WeakenTooltip.innerText = \"Lowers the targeted node's attack. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[2].appendChild(WeakenTooltip);\n this.actionButtons[3].innerText = \"Fortify(f)\";\n var fortifyTooltip = document.createElement(\"span\");\n fortifyTooltip.classList.add(\"tooltiptexthigh\");\n fortifyTooltip.innerText = \"Raises this node's Defense level. The effectiveness of this depends on \" + \"your hacking level\";\n this.actionButtons[3].appendChild(fortifyTooltip);\n this.actionButtons[4].innerText = \"Overflow(r)\";\n var overflowTooltip = document.createElement(\"span\");\n overflowTooltip.classList.add(\"tooltiptexthigh\");\n overflowTooltip.innerText = \"Raises this node's Attack level but lowers its Defense level. The effectiveness \" + \"of this depends on your hacking level.\";\n this.actionButtons[4].appendChild(overflowTooltip);\n this.actionButtons[5].innerText = \"Drop Connection(d)\";\n var dropconnTooltip = document.createElement(\"span\");\n dropconnTooltip.classList.add(\"tooltiptexthigh\");\n dropconnTooltip.innerText = \"Removes this Node's current connection to some target Node, if it has one. This can \" + \"also be done by simply clicking the white connection line.\";\n this.actionButtons[5].appendChild(dropconnTooltip); // Player/enemy defense displays will be in action container\n\n var playerStats = document.createElement(\"p\");\n var enemyStats = document.createElement(\"p\");\n playerStats.style.display = \"inline-block\";\n enemyStats.style.display = \"inline-block\";\n playerStats.style.color = \"#00ccff\";\n enemyStats.style.color = \"red\";\n playerStats.style.margin = \"4px\";\n enemyStats.style.margin = \"4px\";\n playerStats.setAttribute(\"id\", \"hacking-mission-player-stats\");\n enemyStats.setAttribute(\"id\", \"hacking-mission-enemy-stats\");\n actionsContainer.appendChild(playerStats);\n actionsContainer.appendChild(enemyStats); // Set Action Button event listeners\n\n this.actionButtons[0].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n if (this.selectedNode[0].type !== NodeTypes.Core) {\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Attack, false); // Set attack button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Attack;\n });\n });\n this.actionButtons[1].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Scan, false); // Set scan button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Scan;\n });\n });\n this.actionButtons[2].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Weaken, false); // Set Weaken button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Weaken;\n });\n });\n this.actionButtons[3].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Fortify, false); // Set Fortify button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Fortify;\n });\n });\n this.actionButtons[4].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type;\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Overflow, false); // Set Overflow button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Overflow;\n });\n });\n this.actionButtons[5].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.selectedNode.forEach(function (node) {\n if (node.conn) {\n var endpoints = node.conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }\n\n node.action = NodeActions.Fortify;\n });\n });\n var timeDisplay = document.createElement(\"p\");\n container.appendChild(headerText);\n container.appendChild(inGameGuideBtn);\n container.appendChild(startBtn);\n container.appendChild(forfeitMission);\n container.appendChild(timer);\n container.appendChild(actionsContainer);\n container.appendChild(timeDisplay);\n};\n\nHackingMission.prototype.setActionButtonsInactive = function () {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.setActionButtonsActive = function (nodeType = null) {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.add(\"a-link-button\");\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n }\n /**\n * For Transfer, FireWall and Shield Nodes, certain buttons should always be disabled\n * 0 = Attack, 1 = Scan, 2 = Weaken, 3 = Fortify, 4 = overflow, 5 = Drop conn\n */\n\n\n if (nodeType) {\n switch (nodeType) {\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n this.actionButtons[1].classList.remove(\"a-link-button\");\n this.actionButtons[1].classList.add(\"a-link-button-inactive\");\n this.actionButtons[2].classList.remove(\"a-link-button\");\n this.actionButtons[2].classList.add(\"a-link-button-inactive\");\n this.actionButtons[4].classList.remove(\"a-link-button\");\n this.actionButtons[4].classList.add(\"a-link-button-inactive\");\n this.actionButtons[5].classList.remove(\"a-link-button\");\n this.actionButtons[5].classList.add(\"a-link-button-inactive\");\n break;\n\n case NodeTypes.Transfer:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n break;\n\n default:\n break;\n }\n }\n}; // True for active, false for inactive\n\n\nHackingMission.prototype.setActionButton = function (i, active = true) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(i)) {\n switch (i) {\n case NodeActions.Attack:\n i = 0;\n break;\n\n case NodeActions.Scan:\n i = 1;\n break;\n\n case NodeActions.Weaken:\n i = 2;\n break;\n\n case NodeActions.Fortify:\n i = 3;\n break;\n\n case NodeActions.Overflow:\n default:\n i = 4;\n break;\n }\n }\n\n if (active) {\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n this.actionButtons[i].classList.add(\"a-link-button\");\n } else {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.calculateAttacks = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].atk;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].atk;\n }\n\n this.playerAtk = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"<br>\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].atk;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].atk;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].atk;\n }\n\n this.enemyAtk = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"<br>\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.calculateDefenses = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].def;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].def;\n }\n\n this.playerDef = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"<br>\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].def;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].def;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].def;\n }\n\n this.enemyDef = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"<br>\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.removeAvailablePosition = function (x, y) {\n for (var i = 0; i < this.availablePositions.length; ++i) {\n if (this.availablePositions[i][0] === x && this.availablePositions[i][1] === y) {\n this.availablePositions.splice(i, 1);\n return;\n }\n }\n\n console.warn(`removeAvailablePosition() did not remove ${x}, ${y}`);\n};\n\nHackingMission.prototype.setNodePosition = function (nodeObj, x, y) {\n if (!(nodeObj instanceof Node)) {\n console.warn(\"Non-Node object passed into setNodePOsition\");\n return;\n }\n\n if (isNaN(x) || isNaN(y)) {\n console.error(`Invalid values (${x}, ${y}) passed as (x, y) for setNodePosition`);\n return;\n }\n\n nodeObj.pos = [x, y];\n this.map[x][y] = nodeObj;\n};\n\nHackingMission.prototype.setNodeRandomPosition = function (nodeObj, xlimit = 0) {\n var i = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.availablePositions.length - 1);\n\n if (this.availablePositions[i][1] < xlimit) {\n // Recurse if not within limit\n return this.setNodeRandomPosition(nodeObj, xlimit);\n }\n\n var pos = this.availablePositions.splice(i, 1);\n pos = pos[0];\n this.setNodePosition(nodeObj, pos[0], pos[1]);\n};\n\nHackingMission.prototype.createMap = function () {\n // Use a grid\n var map = document.createElement(\"div\");\n map.classList.add(\"hack-mission-grid\");\n map.setAttribute(\"id\", \"hacking-mission-map\");\n document.getElementById(\"mission-container\").appendChild(map); // Create random Nodes for every space in the map that\n // hasn't been filled yet. The stats of each Node will be based on\n // the player/enemy attack\n\n var averageAttack = (this.playerAtk + this.enemyAtk) / 2;\n\n for (var x = 0; x < 8; ++x) {\n for (var y = 0; y < 8; ++y) {\n if (!(this.map[x][y] instanceof Node)) {\n var node,\n type = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, 2);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.85 + this.difficulty / 2, 15);\n\n switch (type) {\n case 0:\n // Spam\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(200, 225)\n };\n node = new Node(NodeTypes.Spam, stats);\n break;\n\n case 1:\n // Transfer\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(250, 275)\n };\n node = new Node(NodeTypes.Transfer, stats);\n break;\n\n case 2: // Shield\n\n default:\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 70),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(300, 320)\n };\n node = new Node(NodeTypes.Shield, stats);\n break;\n }\n\n this.setNodePosition(node, x, y);\n this.removeAvailablePosition(x, y);\n this.miscNodes.push(node);\n }\n }\n } // Create DOM elements in order\n\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.createNodeDomElement(this.map[r][c]);\n }\n } // Configure all Player CPUS\n\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n this.configurePlayerNodeElement(this.playerCores[i].el);\n }\n};\n\nHackingMission.prototype.createNodeDomElement = function (nodeObj) {\n var nodeDiv = document.createElement(\"a\"),\n txtEl = document.createElement(\"p\");\n nodeObj.el = nodeDiv; // Set the node element's id based on its coordinates\n\n var id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n nodeDiv.setAttribute(\"id\", id);\n txtEl.setAttribute(\"id\", id + \"-txt\"); // Set node classes for owner\n\n nodeDiv.classList.add(\"hack-mission-node\");\n\n if (nodeObj.plyrCtrl) {\n nodeDiv.classList.add(\"hack-mission-player-node\");\n } else if (nodeObj.enmyCtrl) {\n nodeDiv.classList.add(\"hack-mission-enemy-node\");\n } // Set node classes based on type\n\n\n var txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-cpu-node\");\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-firewall-node\");\n break;\n\n case NodeTypes.Database:\n txt = \"Database<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-database-node\");\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-spam-node\");\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-transfer-node\");\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-shield-node\");\n break;\n }\n\n txt += \"<br>Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"<br>Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n txtEl.innerHTML = txt;\n nodeDiv.appendChild(txtEl);\n document.getElementById(\"hacking-mission-map\").appendChild(nodeDiv);\n};\n\nHackingMission.prototype.updateNodeDomElement = function (nodeObj) {\n if (nodeObj.el == null) {\n console.error(\"Calling updateNodeDomElement on a Node without an element\");\n return;\n }\n\n let id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n let txtEl = document.getElementById(id + \"-txt\"); // Set node classes based on type\n\n let txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Database:\n txt = \"Database<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield<br>\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n }\n\n txt += \"<br>Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"<br>Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n\n if (nodeObj.action) {\n txt += \"<br>\" + nodeObj.action;\n }\n\n txtEl.innerHTML = txt;\n};\n/**\n * Gets a Node DOM elements corresponding Node object using its\n * element id. Function accepts either the DOM element object or the ID as\n * an argument\n */\n\n\nHackingMission.prototype.getNodeFromElement = function (el) {\n var id;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(el)) {\n id = el;\n } else {\n id = el.id;\n }\n\n id = id.replace(\"hacking-mission-node-\", \"\");\n var res = id.split(\"-\");\n\n if (res.length != 2) {\n console.error(\"Parsing hacking mission node id. could not find coordinates\");\n return null;\n }\n\n var x = res[0],\n y = res[1];\n\n if (isNaN(x) || isNaN(y) || x >= 8 || y >= 8 || x < 0 || y < 0) {\n console.error(`Unexpected values (${x}, ${y}) for (x, y)`);\n return null;\n }\n\n return this.map[x][y];\n};\n\nfunction selectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n nodeObj.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(nodeObj);\n}\n\nfunction multiselectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node Object in multiselectNode()\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n var type = nodeObj.type;\n\n if (type === NodeTypes.Core) {\n hackMissionInst.playerCores.forEach(function (node) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n });\n } else {\n hackMissionInst.playerNodes.forEach(function (node) {\n if (node.type === type) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n }\n });\n }\n}\n\nfunction clearAllSelectedNodes(hackMissionInst) {\n if (hackMissionInst.selectedNode.length > 0) {\n hackMissionInst.selectedNode.forEach(function (node) {\n node.deselect(hackMissionInst.actionButtons);\n });\n hackMissionInst.selectedNode.length = 0;\n }\n}\n/**\n * Configures a DOM element representing a player-owned node to\n * be selectable and actionable.\n * Note: Does NOT change its css class. This is handled by Node.setControlledBy...\n */\n\n\nHackingMission.prototype.configurePlayerNodeElement = function (el) {\n var nodeObj = this.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n } // Add event listener\n\n\n const selectNodeWrapper = () => {\n selectNode(this, el);\n };\n\n el.addEventListener(\"click\", selectNodeWrapper);\n\n const multiselectNodeWrapper = () => {\n multiselectNode(this, el);\n };\n\n el.addEventListener(\"dblclick\", multiselectNodeWrapper);\n\n if (el.firstChild) {\n el.firstChild.addEventListener(\"click\", selectNodeWrapper);\n }\n};\n/**\n * Configures a DOM element representing an enemy-node by removing\n * any event listeners\n */\n\n\nHackingMission.prototype.configureEnemyNodeElement = function (el) {\n // Deselect node if it was the selected node\n var nodeObj = this.getNodeFromElement(el);\n\n for (var i = 0; i < this.selectedNode.length; ++i) {\n if (this.selectedNode[i] == nodeObj) {\n nodeObj.deselect(this.actionButtons);\n this.selectedNode.splice(i, 1);\n break;\n }\n }\n};\n/**\n * Returns bool indicating whether a node is reachable by player\n * by checking if any of the adjacent nodes are owned by the player\n */\n\n\nHackingMission.prototype.nodeReachable = function (node) {\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].plyrCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].plyrCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].plyrCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].plyrCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.nodeReachableByEnemy = function (node) {\n if (node == null) {\n return false;\n }\n\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].enmyCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].enmyCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].enmyCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].enmyCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.start = function () {\n this.started = true;\n this.initJsPlumb();\n var startBtn = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__[/* clearEventListeners */ \"a\"])(\"hack-mission-start-btn\");\n startBtn.classList.remove(\"a-link-button\");\n startBtn.classList.add(\"a-link-button-inactive\");\n};\n\nHackingMission.prototype.initJsPlumb = function () {\n var instance = jsPlumb.getInstance({\n DragOptions: {\n cursor: \"pointer\",\n zIndex: 2000\n },\n PaintStyle: {\n gradient: {\n stops: [[0, \"#FFFFFF\"], [1, \"#FFFFFF\"]]\n },\n stroke: \"#FFFFFF\",\n strokeWidth: 8\n }\n });\n this.jsplumbinstance = instance; // All player cores are sources\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n instance.makeSource(this.playerCores[i].el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Everything else is a target\n\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n instance.makeTarget(this.enemyCores[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n instance.makeTarget(this.enemyDatabases[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n instance.makeTarget(this.enemyNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.miscNodes.length; ++i) {\n instance.makeTarget(this.miscNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Clicking a connection drops it\n\n\n instance.bind(\"click\", conn => {\n // Cannot drop enemy's connections\n const sourceNode = this.getNodeFromElement(conn.source);\n\n if (sourceNode.enmyCtrl) {\n return;\n }\n\n var endpoints = conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }); // Connection events\n\n instance.bind(\"connection\", info => {\n var targetNode = this.getNodeFromElement(info.target); // Do not detach for enemy nodes\n\n var thisNode = this.getNodeFromElement(info.source);\n\n if (thisNode.enmyCtrl) {\n return;\n } // If the node is not reachable, drop the connection\n\n\n if (!this.nodeReachable(targetNode)) {\n info.sourceEndpoint.detachFrom(info.targetEndpoint);\n return;\n }\n\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = info.connection;\n var targetNode = this.getNodeFromElement(info.target);\n ++targetNode.targetedCount;\n }); // Detach Connection events\n\n instance.bind(\"connectionDetached\", info => {\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = null;\n var targetNode = this.getNodeFromElement(info.target);\n targetNode.untarget();\n });\n}; // Drops all connections where the specified node is the source\n\n\nHackingMission.prototype.dropAllConnectionsFromNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].source == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n}; // Drops all connections where the specified node is the target\n\n\nHackingMission.prototype.dropAllConnectionsToNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].target == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n\n node.beingTargeted = false;\n};\n\nvar storedCycles = 0;\n\nHackingMission.prototype.process = function (numCycles = 1) {\n if (!this.started) {\n return;\n }\n\n storedCycles += numCycles;\n\n if (storedCycles < 2) {\n return;\n } // Only process every 3 cycles minimum\n\n\n var res = false; // Process actions of all player nodes\n\n this.playerCores.forEach(node => {\n res |= this.processNode(node, storedCycles);\n });\n this.playerNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n res |= this.processNode(node, storedCycles);\n }\n }); // Process actions of all enemy nodes\n\n this.enemyCores.forEach(node => {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n });\n this.enemyNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n }\n }); // The hp of enemy databases increases slowly\n\n this.enemyDatabases.forEach(node => {\n node.maxhp += 0.1 * storedCycles;\n node.hp += 0.1 * storedCycles;\n });\n\n if (res) {\n this.calculateAttacks();\n this.calculateDefenses();\n } // Win if all enemy databases are conquered\n\n\n if (this.enemyDatabases.length === 0) {\n this.finishMission(true);\n return;\n } // Lose if all your cores are gone\n\n\n if (this.playerCores.length === 0) {\n this.finishMission(false);\n return;\n } // Defense/hp of misc nodes increases slowly over time\n\n\n this.miscNodes.forEach(node => {\n node.def += 0.1 * storedCycles;\n node.maxhp += 0.05 * storedCycles;\n node.hp += 0.1 * storedCycles;\n\n if (node.hp > node.maxhp) {\n node.hp = node.maxhp;\n }\n\n this.updateNodeDomElement(node);\n }); // Update timer and check if player lost\n\n this.time -= storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (this.time <= 0) {\n this.finishMission(false);\n return;\n }\n\n this.updateTimer();\n storedCycles = 0;\n}; // Returns a bool representing whether defenses need to be re-calculated\n\n\nHackingMission.prototype.processNode = function (nodeObj, numCycles = 1) {\n if (nodeObj.action == null) {\n return;\n }\n\n var targetNode = null,\n def,\n atk;\n\n if (nodeObj.conn) {\n if (nodeObj.conn.target != null) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {// Player is in the middle of dragging the connection,\n // so the target node is null. Do nothing here\n } else if (targetNode.plyrCtrl) {\n def = this.playerDef;\n atk = this.enemyAtk;\n } else if (targetNode.enmyCtrl) {\n def = this.enemyDef;\n atk = this.playerAtk;\n } else {\n // Misc Node\n def = targetNode.def;\n nodeObj.plyrCtrl ? atk = this.playerAtk : atk = this.enemyAtk;\n }\n } // Calculations are per second, so divide everything by 5\n\n\n var calcStats = false,\n plyr = nodeObj.plyrCtrl;\n var enmyHacking = this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionDifficultyToHacking;\n\n switch (nodeObj.action) {\n case NodeActions.Attack:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var dmg = this.calculateAttackDamage(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.hp -= dmg / 5 * numCycles;\n break;\n\n case NodeActions.Scan:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateScanEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.def -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Weaken:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateWeakenEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.atk -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Fortify:\n var eff = this.calculateFortifyEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n nodeObj.def += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Overflow:\n var eff = this.calculateOverflowEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n\n if (nodeObj.def < eff) {\n break;\n }\n\n nodeObj.def -= eff / 5 * numCycles;\n nodeObj.atk += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n default:\n console.error(`Invalid Node Action: ${nodeObj.action}`);\n break;\n } // Stats can't go below 0\n\n\n if (nodeObj.atk < 0) {\n nodeObj.atk = 0;\n }\n\n if (nodeObj.def < 0) {\n nodeObj.def = 0;\n }\n\n if (targetNode && targetNode.atk < 0) {\n targetNode.atk = 0;\n }\n\n if (targetNode && targetNode.def < 0) {\n targetNode.def = 0;\n } // Conquering a node\n\n\n if (targetNode && targetNode.hp <= 0) {\n var conqueredByPlayer = nodeObj.plyrCtrl;\n targetNode.hp = targetNode.maxhp;\n targetNode.action = null;\n targetNode.conn = null;\n\n if (this.selectedNode == targetNode) {\n targetNode.deselect(this.actionButtons);\n } // The conquered node has its stats reduced\n\n\n targetNode.atk /= 2;\n targetNode.def /= 3.5; // Flag for whether the target node was a misc node\n\n var isMiscNode = !targetNode.plyrCtrl && !targetNode.enmyCtrl; // Remove all connections from Node\n\n this.dropAllConnectionsToNode(targetNode);\n this.dropAllConnectionsFromNode(targetNode); // Changes the css class and turn the node into a JsPlumb Source/Target\n\n if (conqueredByPlayer) {\n targetNode.setControlledByPlayer();\n this.jsplumbinstance.unmakeTarget(targetNode.el);\n this.jsplumbinstance.makeSource(targetNode.el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } else {\n targetNode.setControlledByEnemy();\n nodeObj.conn = null; // Clear connection\n\n this.jsplumbinstance.unmakeSource(targetNode.el);\n this.jsplumbinstance.makeTarget(targetNode.el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n calcStats = true; // Helper function to swap nodes between the respective enemyNodes/playerNodes arrays\n\n function swapNodes(orig, dest, targetNode) {\n for (var i = 0; i < orig.length; ++i) {\n if (orig[i] == targetNode) {\n var node = orig.splice(i, 1);\n node = node[0];\n dest.push(node);\n break;\n }\n }\n }\n\n switch (targetNode.type) {\n case NodeTypes.Core:\n if (conqueredByPlayer) {\n swapNodes(this.enemyCores, this.playerCores, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(this.playerCores, this.enemyCores, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Firewall:\n if (conqueredByPlayer) {\n swapNodes(this.enemyNodes, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Database:\n if (conqueredByPlayer) {\n swapNodes(this.enemyDatabases, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyDatabases, targetNode);\n }\n\n break;\n\n case NodeTypes.Spam:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); // Conquering spam node increases time limit\n\n this.time += _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionSpamTimeIncrease;\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Conquering a Transfer node increases the attack of all cores by some percentages\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.playerCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.enemyCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Shield:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n } // If a misc node was conquered, the defense for all misc nodes increases by some fixed amount\n\n\n if (isMiscNode) {\n //&& conqueredByPlayer) {\n this.miscNodes.forEach(node => {\n if (node.targetedCount === 0) {\n node.def *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionMiscDefenseIncrease;\n }\n });\n }\n } // Update node DOMs\n\n\n this.updateNodeDomElement(nodeObj);\n\n if (targetNode) {\n this.updateNodeDomElement(targetNode);\n }\n\n return calcStats;\n}; // Enemy \"AI\" for CPU Core and Transfer Nodes\n\n\nHackingMission.prototype.enemyAISelectAction = function (nodeObj) {\n if (nodeObj == null) {\n return;\n }\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n /**\n * Select a single RANDOM target from miscNodes and player's Nodes\n * If it is reachable, it will target it. If not, no target will\n * be selected for now, and the next time process() gets called this will repeat\n */\n if (nodeObj.conn == null) {\n if (this.miscNodes.length === 0) {\n // Randomly pick a player node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerNodes.length - 1);\n var node;\n\n if (this.playerNodes.length === 0) {\n node = null;\n } else {\n node = this.playerNodes[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n } else {\n // Randomly pick a player core and attack it if its reachable\n rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerCores.length - 1);\n\n if (this.playerCores.length === 0) {\n return; // No Misc Nodes, no player Nodes, no Player cores. Player lost\n } else {\n node = this.playerCores[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n }\n } else {\n // Randomly pick a misc node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.miscNodes.length - 1);\n var node = this.miscNodes[rand];\n\n if (this.nodeReachableByEnemy(node)) {\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n } // If no connection was made, set the Core to Fortify\n\n\n nodeObj.action = NodeActions.Fortify;\n } else {\n // If this node has a selected target\n var targetNode;\n\n if (nodeObj.conn.target) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {\n console.error(\"Error getting Target node Object in enemyAISelectAction()\");\n }\n\n if (targetNode.def > this.enemyAtk + 15) {\n if (nodeObj.def < 50) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n } else if (Math.abs(targetNode.def - this.enemyAtk) <= 15) {\n nodeObj.action = NodeActions.Scan;\n } else {\n nodeObj.action = NodeActions.Attack;\n }\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Switch between fortifying and overflowing as necessary\n if (nodeObj.def < 125) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n\n break;\n\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n nodeObj.action = NodeActions.Fortify;\n break;\n\n default:\n break;\n }\n};\n\nvar hackEffWeightSelf = 130; // Weight for Node actions on self\n\nvar hackEffWeightTarget = 25; // Weight for Node Actions against Target\n\nvar hackEffWeightAttack = 80; // Weight for Attack action\n// Returns damage per cycle based on stats\n\nHackingMission.prototype.calculateAttackDamage = function (atk, def, hacking = 0) {\n return Math.max(0.55 * (atk + hacking / hackEffWeightAttack - def), 1);\n};\n\nHackingMission.prototype.calculateScanEffect = function (atk, def, hacking = 0) {\n return Math.max(0.6 * (atk + hacking / hackEffWeightTarget - def * 0.95), 2);\n};\n\nHackingMission.prototype.calculateWeakenEffect = function (atk, def, hacking = 0) {\n return Math.max(atk + hacking / hackEffWeightTarget - def * 0.95, 2);\n};\n\nHackingMission.prototype.calculateFortifyEffect = function (hacking = 0) {\n return 0.9 * hacking / hackEffWeightSelf;\n};\n\nHackingMission.prototype.calculateOverflowEffect = function (hacking = 0) {\n return 0.95 * hacking / hackEffWeightSelf;\n}; // Updates timer display\n\n\nHackingMission.prototype.updateTimer = function () {\n var timer = document.getElementById(\"hacking-mission-timer\"); // Convert time remaining to a string of the form mm:ss\n\n var seconds = Math.round(this.time / 1000);\n var minutes = Math.trunc(seconds / 60);\n seconds %= 60;\n var str = (\"0\" + minutes).slice(-2) + \":\" + (\"0\" + seconds).slice(-2);\n timer.innerText = \"Time left: \" + str;\n}; // The 'win' argument is a bool for whether or not the player won\n\n\nHackingMission.prototype.finishMission = function (win) {\n inMission = false;\n currMission = null;\n\n if (win) {\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"Mission won! You earned \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" reputation with \", this.faction.name));\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainIntelligenceExp(Math.pow(this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].IntelligenceHackingMissionBaseExpGain, 0.5));\n this.faction.playerReputation += gain;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Mission lost/forfeited! You did not gain any faction reputation.\");\n }\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/Missions.jsx?");
|
||
|
||
/***/ }),
|
||
/* 120 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Gang/data/upgrades.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: UpgradeType, gangMemberUpgradesMetadata */
|
||
/*! exports used: UpgradeType, gangMemberUpgradesMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UpgradeType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return gangMemberUpgradesMetadata; });\nlet UpgradeType;\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberUpgrade\n * (defined in Gang.js)\n */\n\n(function (UpgradeType) {\n UpgradeType[\"Weapon\"] = \"w\";\n UpgradeType[\"Armor\"] = \"a\";\n UpgradeType[\"Vehicle\"] = \"v\";\n UpgradeType[\"Rootkit\"] = \"r\";\n UpgradeType[\"Augmentation\"] = \"g\";\n})(UpgradeType || (UpgradeType = {}));\n\n/**\n * Array of metadata for all Gang Member upgrades. Used to construct the global GangMemberUpgrade\n * objects in Gang.js\n */\nconst gangMemberUpgradesMetadata = [{\n cost: 1e6,\n mults: {\n str: 1.04,\n def: 1.04\n },\n name: \"Baseball Bat\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 12e6,\n mults: {\n str: 1.08,\n def: 1.08,\n dex: 1.08\n },\n name: \"Katana\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 25e6,\n mults: {\n str: 1.1,\n def: 1.1,\n dex: 1.1,\n agi: 1.1\n },\n name: \"Glock 18C\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 50e6,\n mults: {\n str: 1.12,\n def: 1.1,\n agi: 1.1\n },\n name: \"P90C\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 60e6,\n mults: {\n str: 1.2,\n def: 1.15\n },\n name: \"Steyr AUG\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 100e6,\n mults: {\n str: 1.25,\n def: 1.2\n },\n name: \"AK-47\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 150e6,\n mults: {\n str: 1.3,\n def: 1.25\n },\n name: \"M15A10 Assault Rifle\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 225e6,\n mults: {\n str: 1.3,\n dex: 1.25,\n agi: 1.3\n },\n name: \"AWM Sniper Rifle\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 2e6,\n mults: {\n def: 1.04\n },\n name: \"Bulletproof Vest\",\n upgType: UpgradeType.Armor\n}, {\n cost: 5e6,\n mults: {\n def: 1.08\n },\n name: \"Full Body Armor\",\n upgType: UpgradeType.Armor\n}, {\n cost: 25e6,\n mults: {\n def: 1.15,\n agi: 1.15\n },\n name: \"Liquid Body Armor\",\n upgType: UpgradeType.Armor\n}, {\n cost: 40e6,\n mults: {\n def: 1.2\n },\n name: \"Graphene Plating Armor\",\n upgType: UpgradeType.Armor\n}, {\n cost: 3e6,\n mults: {\n agi: 1.04,\n cha: 1.04\n },\n name: \"Ford Flex V20\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 9e6,\n mults: {\n agi: 1.08,\n cha: 1.08\n },\n name: \"ATX1070 Superbike\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 18e6,\n mults: {\n agi: 1.12,\n cha: 1.12\n },\n name: \"Mercedes-Benz S9001\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 30e6,\n mults: {\n agi: 1.16,\n cha: 1.16\n },\n name: \"White Ferrari\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 5e6,\n mults: {\n hack: 1.05\n },\n name: \"NUKE Rootkit\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 25e6,\n mults: {\n hack: 1.1\n },\n name: \"Soulstealer Rootkit\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 75e6,\n mults: {\n hack: 1.15\n },\n name: \"Demon Rootkit\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 40e6,\n mults: {\n hack: 1.12\n },\n name: \"Hmap Node\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 75e6,\n mults: {\n hack: 1.15\n },\n name: \"Jack the Ripper\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 10e9,\n mults: {\n str: 1.3,\n dex: 1.3\n },\n name: \"Bionic Arms\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 10e9,\n mults: {\n agi: 1.6\n },\n name: \"Bionic Legs\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 15e9,\n mults: {\n str: 1.15,\n def: 1.15,\n dex: 1.15,\n agi: 1.15\n },\n name: \"Bionic Spine\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 20e9,\n mults: {\n str: 1.4,\n def: 1.4\n },\n name: \"BrachiBlades\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 12e9,\n mults: {\n str: 1.2,\n def: 1.2\n },\n name: \"Nanofiber Weave\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 25e9,\n mults: {\n str: 1.5,\n agi: 1.5\n },\n name: \"Synthetic Heart\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 15e9,\n mults: {\n str: 1.3,\n def: 1.3\n },\n name: \"Synfibril Muscle\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 5e9,\n mults: {\n hack: 1.05\n },\n name: \"BitWire\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 10e9,\n mults: {\n hack: 1.15\n },\n name: \"Neuralstimulator\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 7.5e9,\n mults: {\n hack: 1.1\n },\n name: \"DataJack\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 50e9,\n mults: {\n str: 1.7,\n def: 1.7\n },\n name: \"Graphene Bone Lacings\",\n upgType: UpgradeType.Augmentation\n}];\n\n//# sourceURL=webpack:///./src/Gang/data/upgrades.ts?");
|
||
|
||
/***/ }),
|
||
/* 121 */,
|
||
/* 122 */,
|
||
/* 123 */
|
||
/*!************************************!*\
|
||
!*** ./src/ui/React/MoneyRate.tsx ***!
|
||
\************************************/
|
||
/*! exports provided: MoneyRate */
|
||
/*! exports used: MoneyRate */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoneyRate; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\nfunction MoneyRate({\n money\n}) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(money)} / sec`\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/MoneyRate.tsx?");
|
||
|
||
/***/ }),
|
||
/* 124 */
|
||
/*!***************************************!*\
|
||
!*** ./src/ui/React/CopyableText.tsx ***!
|
||
\***************************************/
|
||
/*! exports provided: ClickableTag, CopyableText */
|
||
/*! exports used: ClickableTag, CopyableText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ClickableTag; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return CopyableText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nlet ClickableTag;\n\n(function (ClickableTag) {\n ClickableTag[ClickableTag[\"Tag_span\"] = 0] = \"Tag_span\";\n ClickableTag[ClickableTag[\"Tag_h1\"] = 1] = \"Tag_h1\";\n})(ClickableTag || (ClickableTag = {}));\n\nclass CopyableText extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.copy = this.copy.bind(this);\n this.tooltipClasses = this.tooltipClasses.bind(this);\n this.textClasses = this.textClasses.bind(this);\n this.state = {\n tooltipVisible: false\n };\n }\n\n copy() {\n const copyText = document.createElement(\"textarea\");\n copyText.value = this.props.value;\n document.body.appendChild(copyText);\n copyText.select();\n copyText.setSelectionRange(0, 1e10);\n document.execCommand(\"copy\");\n document.body.removeChild(copyText);\n this.setState({\n tooltipVisible: true\n });\n setTimeout(() => this.setState({\n tooltipVisible: false\n }), 1000);\n }\n\n tooltipClasses() {\n let classes = \"copy_tooltip_text\";\n\n if (this.state.tooltipVisible) {\n classes += \" copy_tooltip_text_visible\";\n }\n\n return classes;\n }\n\n textClasses() {\n let classes = \"copy_tooltip noselect text\";\n\n if (this.state.tooltipVisible) {\n classes += \" copy_tooltip_copied\";\n }\n\n return classes;\n }\n\n render() {\n switch (this.props.tag) {\n case ClickableTag.Tag_h1:\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", {\n className: this.textClasses(),\n onClick: this.copy\n }, this.props.value, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: this.tooltipClasses()\n }, \"Copied!\"));\n\n case ClickableTag.Tag_span:\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: this.textClasses(),\n onClick: this.copy\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, this.props.value), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: this.tooltipClasses()\n }, \"Copied!\"));\n }\n }\n\n}\n\n_defineProperty(CopyableText, \"defaultProps\", {\n //Default span to prevent destroying current clickables\n tag: ClickableTag.Tag_span\n});\n\n//# sourceURL=webpack:///./src/ui/React/CopyableText.tsx?");
|
||
|
||
/***/ }),
|
||
/* 125 */
|
||
/*!********************************!*\
|
||
!*** ./src/NetscriptWorker.js ***!
|
||
\********************************/
|
||
/*! exports provided: NetscriptPorts, prestigeWorkerScripts, startWorkerScript, createAndAddWorkerScript, updateOnlineScriptTimes, loadAllRunningScripts, runScriptFromScript */
|
||
/*! exports used: NetscriptPorts, loadAllRunningScripts, prestigeWorkerScripts, runScriptFromScript, startWorkerScript, updateOnlineScriptTimes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPorts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return prestigeWorkerScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return startWorkerScript; });\n/* unused harmony export createAndAddWorkerScript */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return updateOnlineScriptTimes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadAllRunningScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return runScriptFromScript; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 103);\n/* harmony import */ var _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Netscript/WorkerScript */ 249);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Netscript/Pid */ 392);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./JSInterpreter */ 440);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./NetscriptFunctions */ 393);\n/* harmony import */ var _NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./NetscriptJSEvaluator */ 707);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptPort */ 264);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Script/RunningScript */ 277);\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Script/RunningScriptHelpers */ 438);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! escodegen */ 474);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(escodegen__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 218);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 311);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! acorn-walk */ 319);\n/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Netscript Ports are instantiated here\n\nconst NetscriptPorts = [];\n\nfor (var i = 0; i < _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NumNetscriptPorts; ++i) {\n NetscriptPorts.push(new _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__[/* NetscriptPort */ \"a\"]());\n}\n\nfunction prestigeWorkerScripts() {\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.env.stopFlag = true;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(ws);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].clear();\n} // JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\n\nfunction startNetscript2Script(workerScript) {\n workerScript.running = true; // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n\n let runningFn = null; // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n\n function wrap(propName, f) {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw workerScript;\n }\n\n if (propName === \"sleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg = \"Concurrent calls to Netscript functions not allowed! \" + \"Did you forget to await hack(), grow(), or some other \" + \"promise-returning function? (Currently running: %s tried to run: %s)\";\n\n if (runningFn) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, sprintf(msg, runningFn, propName), null);\n throw workerScript;\n }\n\n runningFn = propName; // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n\n let result;\n\n try {\n result = f(...args);\n } catch (e) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n for (let prop in workerScript.env.vars) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n } // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n\n\n return Object(_NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__[/* executeJSScript */ \"a\"])(workerScript.getServer().scripts, workerScript).then(function (mainReturnValue) {\n if (mainReturnValue === undefined) return workerScript;\n return [mainReturnValue, workerScript];\n }).catch(e => {\n if (e instanceof Error) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e.message + (e.stack && \"\\nstack:\\n\" + e.stack.toString() || \"\"));\n throw workerScript;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n }\n\n throw e; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript) {\n const code = workerScript.code;\n workerScript.running = true; //Process imports\n\n var codeWithImports, codeLineOffset;\n\n try {\n let importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Error processing Imports in \" + workerScript.name + \":<br>\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n var interpreterInitialization = function (int, scope) {\n //Add the Netscript environment\n var ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"])(workerScript);\n\n for (let name in ns) {\n let entry = ns[name];\n\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if (name === \"hack\" || name === \"grow\" || name === \"weaken\" || name === \"sleep\" || name === \"prompt\" || name === \"manualHack\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length - 1; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n let cb = arguments[arguments.length - 1];\n let fnPromise = entry.apply(null, fnArgs);\n fnPromise.then(function (res) {\n cb(res);\n }).catch(function (err) {\n console.error(err);\n });\n };\n\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (name === \"sprintf\" || name === \"vsprintf\" || name === \"scp\" || name == \"write\" || name === \"read\" || name === \"tryWrite\" || name === \"run\" || name === \"exec\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n return entry.apply(null, fnArgs);\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n let tempWrapper = function () {\n let res = entry.apply(null, arguments);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n } //Add the arguments\n\n\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n var interpreter;\n\n try {\n interpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__[/* Interpreter */ \"a\"](codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Syntax ERROR in \" + workerScript.name + \":<br>\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter() {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n if (interpreter.step()) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__[/* setTimeoutRef */ \"a\"])(runInterpreter, _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__[/* Settings */ \"a\"].CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e) {\n e = e.toString();\n\n if (!Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n e = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e);\n }\n\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__[/* isString */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\n }\n });\n}\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\n\n\nfunction processNetscript1Imports(code, workerScript) {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n var server = workerScript.getServer();\n\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName) {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n\n let hasImports = false; // Walk over the tree and process ImportDeclaration nodes\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(ast, {\n ImportDeclaration: node => {\n hasImports = true;\n let scriptName = node.source.value;\n\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n\n let script = getScript(scriptName);\n\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n\n let scriptAst = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n let namespace = node.specifiers[0].local.name;\n let fnNames = []; //Names only\n\n let fnDeclarations = []; //FunctionDeclaration Node objects\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n }\n }); //Now we have to generate the code that would create the namespace\n\n generatedCode += \"var \" + namespace + \";\\n\" + \"(function (namespace) {\\n\"; //Add the function declarations\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n }); //Add functions to namespace\n\n fnNames.forEach(fnName => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n }); //Finish\n\n generatedCode += \"})(\" + namespace + \" || \" + \"(\" + namespace + \" = {}));\\n\";\n } else {\n //import {...} from script\n //Get array of all fns to import\n let fnsToImport = [];\n node.specifiers.forEach(e => {\n fnsToImport.push(e.local.name);\n }); //Walk through script and get FunctionDeclaration code for all specified fns\n\n let fnDeclarations = [];\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n }\n }); //Convert FunctionDeclarations into code\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n });\n }\n }\n }); //If there are no imports, just return the original code\n\n if (!hasImports) {\n return {\n code: code,\n lineOffset: 0\n };\n } //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n\n\n var linesRemoved = 0;\n\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n } //Calculated line offset\n\n\n var lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved; //Convert the AST back into code\n\n code = Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(ast); //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n\n code = generatedCode + code;\n var res = {\n code: code,\n lineOffset: lineOffset\n };\n return res;\n}\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * @returns {number} pid of started script\n */\n\n\nfunction startWorkerScript(runningScript, server, parent) {\n if (createAndAddWorkerScript(runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript, _Player__WEBPACK_IMPORTED_MODULE_12__[/* Player */ \"a\"].hacknet_node_money_mult); // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n\n return runningScript.pid;\n }\n\n return 0;\n}\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\n\nfunction createAndAddWorkerScript(runningScriptObj, server, parent) {\n // Update server's ram usage\n let threads = 1;\n\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n\n const ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__[/* getRamUsageFromRunningScript */ \"a\"])(runningScriptObj) * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (ramUsage > ramAvailable) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(`Not enough RAM to run script ${runningScriptObj.filename} with args ` + `${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(runningScriptObj.args)}. This likely occurred because you re-loaded ` + `the game and the script's RAM usage increased (either because of an update to the game or ` + `your changes to the script.)`);\n return false;\n }\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(server.ramUsed + ramUsage); // Get the pid\n\n const pid = Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__[/* generateNextPid */ \"a\"])();\n\n if (pid === -1) {\n throw new Error(`Failed to start script because could not find available PID. This is most ` + `because you have too many scripts running.`);\n } // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n\n\n const s = new _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"](runningScriptObj, pid, _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"]);\n s.ramUsage = ramUsage; // Add the WorkerScript to the global pool\n\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].set(pid, s);\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent(); // Start the script's execution\n\n let p = null; // Script's resulting promise\n\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(s);\n } else {\n p = startNetscript1Script(s);\n\n if (!(p instanceof Promise)) {\n return false;\n }\n } // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n\n\n p.then(function (w) {\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent && parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n } // If the WorkerScript is no longer \"running\", then this means its execution was\n // already stopped somewhere else (maybe by something like exit()). This prevents\n // the script from being cleaned up twice\n\n\n if (!w.running) {\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n w.log(\"\", \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else if (w instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|\");\n\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + errorText);\n return;\n }\n\n const serverIp = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `RUNTIME ERROR<br>${scriptName}@${serverIp}<br>`;\n\n if (w.args.length > 0) {\n msg += `Args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(w.args)}<br>`;\n }\n\n msg += \"<br>\";\n msg += errorMsg;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(msg);\n w.log(\"\", \"Script crashed with runtime error\");\n } else {\n w.log(\"\", \"Script killed\");\n return; // Already killed, so stop here\n }\n\n w.running = false;\n w.env.stopFlag = true;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n });\n return true;\n}\n/**\n * Updates the online running time stat of all running scripts\n */\n\nfunction updateOnlineScriptTimes(numCycles = 1) {\n var time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed / 1000; //seconds\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\n\nfunction loadAllRunningScripts() {\n let skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n\n if (skipScriptLoad) {\n console.info(\"Skipping the load of any scripts during startup\");\n }\n\n for (const property in _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"]) {\n if (_Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"].hasOwnProperty(property)) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"][property]; // Reset each server's RAM usage to 0\n\n server.ramUsed = 0; // Reset modules on all scripts\n\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n createAndAddWorkerScript(server.runningScripts[j], server); // Offline production\n\n Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__[/* scriptCalculateOfflineProduction */ \"c\"])(server.runningScripts[j]);\n }\n }\n }\n }\n}\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\n\nfunction runScriptFromScript(caller, server, scriptname, args, workerScript, threads = 1) {\n // Sanitize arguments\n if (!(workerScript instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"])) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, `Invalid arguments: scriptname='${scriptname} args='${ags}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n } // Check if the script is already running\n\n\n let runningScriptObj = server.getRunningScript(scriptname, args);\n\n if (runningScriptObj != null) {\n workerScript.log(caller, `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n } // 'null/undefined' arguments are not allowed\n\n\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptname) {\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.round(Number(threads));\n\n if (threads === 0) {\n return 0;\n }\n\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable) {\n workerScript.log(caller, `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`);\n return 0;\n } else {\n // Able to run script\n workerScript.log(caller, `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(args)}.`);\n let runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__[/* RunningScript */ \"a\"](script, args);\n runningScriptObj.threads = threads;\n return startWorkerScript(runningScriptObj, server, workerScript);\n }\n }\n }\n\n workerScript.log(caller, `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n\n//# sourceURL=webpack:///./src/NetscriptWorker.js?");
|
||
|
||
/***/ }),
|
||
/* 126 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Faction/FactionWorkTypeEnum.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: FactionWorkType */
|
||
/*! exports used: FactionWorkType */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionWorkType; });\nlet FactionWorkType;\n\n(function (FactionWorkType) {\n FactionWorkType[FactionWorkType[\"Field\"] = 0] = \"Field\";\n FactionWorkType[FactionWorkType[\"Hacking\"] = 1] = \"Hacking\";\n FactionWorkType[FactionWorkType[\"None\"] = 2] = \"None\";\n FactionWorkType[FactionWorkType[\"Security\"] = 3] = \"Security\";\n})(FactionWorkType || (FactionWorkType = {}));\n\n//# sourceURL=webpack:///./src/Faction/FactionWorkTypeEnum.ts?");
|
||
|
||
/***/ }),
|
||
/* 127 */,
|
||
/* 128 */
|
||
/*!************************************************!*\
|
||
!*** ./utils/helpers/createProgressBarText.ts ***!
|
||
\************************************************/
|
||
/*! exports provided: createProgressBarText */
|
||
/*! exports used: createProgressBarText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createProgressBarText; });\n/**\n * Represents the possible configuration values that can be provided when creating the progress bar text.\n */\n\n/**\n * Represents concrete configuration values when creating the progress bar text.\n */\n\n/**\n * Creates a graphical \"progress bar\"\n * e.g.: [||||---------------]\n * @param params The configuration parameters for the progress bar\n */\nfunction createProgressBarText(params) {\n // Default values\n const defaultParams = {\n progress: 0,\n totalTicks: 20\n }; // tslint:disable-next-line:prefer-object-spread\n\n const derived = Object.assign({}, defaultParams, params); // Ensure it is 0..1\n\n derived.progress = Math.max(Math.min(derived.progress, 1), 0); // This way there is always at least one bar filled in...\n\n const bars = Math.max(Math.floor(derived.progress / (1 / derived.totalTicks)), 1);\n const dashes = Math.max(derived.totalTicks - bars, 0); // String.prototype.repeat isn't completley supported, but good enough for our purposes\n\n return `[${\"|\".repeat(bars)}${\"-\".repeat(dashes)}]`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/createProgressBarText.ts?");
|
||
|
||
/***/ }),
|
||
/* 129 */
|
||
/*!************************************!*\
|
||
!*** ./src/utils/SetTimeoutRef.ts ***!
|
||
\************************************/
|
||
/*! exports provided: setTimeoutRef */
|
||
/*! exports used: setTimeoutRef */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return setTimeoutRef; });\n// This is a reference to the native setTimeout() function\n// setTimeout() is used in various places around the game's source code.\n// This reference is used to make sure that if players alter window.setTimeout()\n// through NetscriptJS, then the game will still function properly\nconst setTimeoutRef = window.setTimeout.bind(window);\n\n//# sourceURL=webpack:///./src/utils/SetTimeoutRef.ts?");
|
||
|
||
/***/ }),
|
||
/* 130 */,
|
||
/* 131 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Corporation/Material.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Material */
|
||
/*! exports used: Material */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Material; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass Material {\n // Name of material\n // Amount of material owned\n // Material's \"quality\". Unbounded\n // How much demand the Material has in the market, and the range of possible\n // values for this \"demand\"\n // How much competition there is for this Material in the market, and the range\n // of possible values for this \"competition\"\n // Maximum volatility of this Materials stats\n // Markup. Determines how high of a price you can charge on the material\n // compared to the market price without suffering loss in # of sales\n // Quality is divided by this to determine markup limits\n // e,g, If mku is 10 and quality is 100 then you can markup prices by 100/10 = 10\n // How much of this material is being bought, sold, imported and produced every second\n // Exports of this material to another warehouse/industry\n // Total amount of this material exported in the last cycle\n // Cost / sec to buy this material. AKA Market Price\n // Cost / sec to sell this material\n // Flags to keep track of whether production and/or sale of this material is limited\n // [Whether production/sale is limited, limit amount]\n // Production\n // Sale\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"InitName\");\n\n _defineProperty(this, \"qty\", 0);\n\n _defineProperty(this, \"qlt\", 0);\n\n _defineProperty(this, \"dmd\", 0);\n\n _defineProperty(this, \"dmdR\", [0, 0]);\n\n _defineProperty(this, \"cmp\", 0);\n\n _defineProperty(this, \"cmpR\", [0, 0]);\n\n _defineProperty(this, \"mv\", 0);\n\n _defineProperty(this, \"mku\", 0);\n\n _defineProperty(this, \"buy\", 0);\n\n _defineProperty(this, \"sll\", 0);\n\n _defineProperty(this, \"prd\", 0);\n\n _defineProperty(this, \"imp\", 0);\n\n _defineProperty(this, \"exp\", []);\n\n _defineProperty(this, \"totalExp\", 0);\n\n _defineProperty(this, \"bCost\", 0);\n\n _defineProperty(this, \"sCost\", 0);\n\n _defineProperty(this, \"prdman\", [false, 0]);\n\n _defineProperty(this, \"sllman\", [false, 0]);\n\n _defineProperty(this, \"marketTa1\", false);\n\n _defineProperty(this, \"marketTa2\", false);\n\n _defineProperty(this, \"marketTa2Price\", 0);\n\n if (params.name) {\n this.name = params.name;\n }\n\n this.init();\n }\n\n getMarkupLimit() {\n return this.qlt / this.mku;\n }\n\n init() {\n switch (this.name) {\n case \"Water\":\n this.dmd = 75;\n this.dmdR = [65, 85];\n this.cmp = 50;\n this.cmpR = [40, 60];\n this.bCost = 1500;\n this.mv = 0.2;\n this.mku = 6;\n break;\n\n case \"Energy\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 2000;\n this.mv = 0.2;\n this.mku = 6;\n break;\n\n case \"Food\":\n this.dmd = 80;\n this.dmdR = [70, 90];\n this.cmp = 60;\n this.cmpR = [35, 85];\n this.bCost = 5000;\n this.mv = 1;\n this.mku = 3;\n break;\n\n case \"Plants\":\n this.dmd = 70;\n this.dmdR = [20, 90];\n this.cmp = 50;\n this.cmpR = [30, 70];\n this.bCost = 3000;\n this.mv = 0.6;\n this.mku = 3.75;\n break;\n\n case \"Metal\":\n this.dmd = 80;\n this.dmdR = [75, 85];\n this.cmp = 70;\n this.cmpR = [60, 80];\n this.bCost = 2650;\n this.mv = 1;\n this.mku = 6;\n break;\n\n case \"Hardware\":\n this.dmd = 85;\n this.dmdR = [80, 90];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 8e3;\n this.mv = 0.5; //Less mv bc its processed twice\n\n this.mku = 1;\n break;\n\n case \"Chemicals\":\n this.dmd = 55;\n this.dmdR = [40, 70];\n this.cmp = 60;\n this.cmpR = [40, 80];\n this.bCost = 9e3;\n this.mv = 1.2;\n this.mku = 2;\n break;\n\n case \"Real Estate\":\n this.dmd = 50;\n this.dmdR = [5, 99];\n this.cmp = 50;\n this.cmpR = [25, 75];\n this.bCost = 80e3;\n this.mv = 1.5; //Less mv bc its processed twice\n\n this.mku = 1.5;\n break;\n\n case \"Drugs\":\n this.dmd = 60;\n this.dmdR = [45, 75];\n this.cmp = 70;\n this.cmpR = [40, 99];\n this.bCost = 40e3;\n this.mv = 1.6;\n this.mku = 1;\n break;\n\n case \"Robots\":\n this.dmd = 90;\n this.dmdR = [80, 9];\n this.cmp = 90;\n this.cmpR = [80, 9];\n this.bCost = 75e3;\n this.mv = 0.5; //Less mv bc its processed twice\n\n this.mku = 1;\n break;\n\n case \"AI Cores\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 90;\n this.cmpR = [80, 9];\n this.bCost = 15e3;\n this.mv = 0.8; //Less mv bc its processed twice\n\n this.mku = 0.5;\n break;\n\n case \"Scientific Research\":\n case \"InitName\":\n break;\n\n default:\n console.error(`Invalid material type in init(): ${this.name}`);\n break;\n }\n } // Process change in demand, competition, and buy cost of this material\n\n\n processMarket() {\n // The price will change in accordance with demand and competition.\n // e.g. If demand goes up, then so does price. If competition goes up, price goes down\n const priceVolatility = Math.random() * this.mv / 300;\n const priceChange = 1 + priceVolatility; //This 1st random check determines whether competition increases or decreases\n\n const compVolatility = Math.random() * this.mv / 100;\n const compChange = 1 + compVolatility;\n\n if (Math.random() < 0.5) {\n this.cmp *= compChange;\n\n if (this.cmp > this.cmpR[1]) {\n this.cmp = this.cmpR[1];\n }\n\n this.bCost *= 1 / priceChange; // Competition increases, so price goes down\n } else {\n this.cmp *= 1 / compChange;\n\n if (this.cmp < this.cmpR[0]) {\n this.cmp = this.cmpR[0];\n }\n\n this.bCost *= priceChange; // Competition decreases, so price goes up\n } // This 2nd random check determines whether demand increases or decreases\n\n\n const dmdVolatility = Math.random() * this.mv / 100;\n const dmdChange = 1 + dmdVolatility;\n\n if (Math.random() < 0.5) {\n this.dmd *= dmdChange;\n\n if (this.dmd > this.dmdR[1]) {\n this.dmd = this.dmdR[1];\n }\n\n this.bCost *= priceChange; // Demand increases, so price goes up\n } else {\n this.dmd *= 1 / dmdChange;\n\n if (this.dmd < this.dmdR[0]) {\n this.dmd = this.dmdR[0];\n }\n\n this.bCost *= 1 / priceChange;\n }\n }\n\n copy() {\n const material = new Material();\n material.name = this.name;\n material.qty = this.qty;\n material.qlt = this.qlt;\n material.dmd = this.dmd;\n material.cmp = this.cmp;\n material.mv = this.mv;\n material.mku = this.mku;\n material.buy = this.buy;\n material.sll = this.sll;\n material.prd = this.prd;\n material.imp = this.imp;\n material.totalExp = this.totalExp;\n material.bCost = this.bCost;\n material.marketTa1 = this.marketTa1;\n material.marketTa2 = this.marketTa2;\n material.marketTa2Price = this.marketTa2Price;\n material.sCost = this.sCost;\n material.prdman = [this.prdman[0], this.prdman[1]];\n material.sllman = [this.sllman[0], this.sllman[1]];\n material.dmdR = this.dmdR.slice();\n material.cmpR = this.cmpR.slice();\n material.exp = this.exp.slice().map(e => {\n return {\n ind: e.ind,\n city: e.city,\n amt: e.amt\n };\n });\n return material;\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Material\", this);\n } // Initiatizes a Material object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Material, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Material = Material;\n\n//# sourceURL=webpack:///./src/Corporation/Material.ts?");
|
||
|
||
/***/ }),
|
||
/* 132 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Message/MessageHelpers.js ***!
|
||
\***************************************/
|
||
/*! exports provided: Messages, checkForMessagesToSend, sendMessage, showMessage, loadMessages, initMessages, Message */
|
||
/*! exports used: Messages, checkForMessagesToSend, initMessages, loadMessages, showMessage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Messages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkForMessagesToSend; });\n/* unused harmony export sendMessage */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return showMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadMessages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initMessages; });\n/* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Message */ 97);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Missions */ 119);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../RedPill */ 222);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n //Sends message to player, including a pop up\n\nfunction sendMessage(msg, forced = false) {\n msg.recvd = true;\n\n if (forced || !_Settings_Settings__WEBPACK_IMPORTED_MODULE_8__[/* Settings */ \"a\"].SuppressMessages) {\n showMessage(msg);\n }\n\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(msg) {\n var txt = \"Message received from unknown sender: <br><br>\" + \"<i>\" + msg.msg + \"</i><br><br>\" + \"This message was saved as \" + msg.filename + \" onto your home computer.\";\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(txt);\n} //Adds a message to a server\n\n\nfunction addMessageToServer(msg, serverHostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__[/* GetServerByHostname */ \"a\"])(serverHostname);\n\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (server.messages[i].filename === msg.filename) {\n return; //Already exists\n }\n }\n\n server.messages.push(msg);\n} //Checks if any of the 'timed' messages should be sent\n\n\nfunction checkForMessagesToSend() {\n var jumper0 = Messages[MessageFilenames.Jumper0];\n var jumper1 = Messages[MessageFilenames.Jumper1];\n var jumper2 = Messages[MessageFilenames.Jumper2];\n var jumper3 = Messages[MessageFilenames.Jumper3];\n var jumper4 = Messages[MessageFilenames.Jumper4];\n var cybersecTest = Messages[MessageFilenames.CyberSecTest];\n var nitesecTest = Messages[MessageFilenames.NiteSecTest];\n var bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n var redpill = Messages[MessageFilenames.RedPill];\n var redpillOwned = false;\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].sourceFiles.length === 0 && !_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 25) {\n sendMessage(jumper0);\n const flightName = _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__[/* Programs */ \"a\"].Flight.name;\n const homeComp = _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].getHomeComputer();\n\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg) {\n Messages[msg.filename] = msg;\n}\n\nlet Messages = {};\n\nfunction loadMessages(saveString) {\n Messages = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__[/* Reviver */ \"c\"]);\n}\n\nlet MessageFilenames = {\n Jumper0: \"j0.msg\",\n Jumper1: \"j1.msg\",\n Jumper2: \"j2.msg\",\n Jumper3: \"j3.msg\",\n Jumper4: \"j4.msg\",\n CyberSecTest: \"csec-test.msg\",\n NiteSecTest: \"nitesec-test.msg\",\n BitRunnersTest: \"19dfj3l1nd.msg\",\n RedPill: \"icarus.msg\"\n};\n\nfunction initMessages() {\n //Reset\n Messages = {}; //jump3R Messages\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper0, \"I know you can sense it. I know you're searching for it. \" + \"It's why you spend night after \" + \"night at your computer. <br><br>It's real, I've seen it. And I can \" + \"help you find it. But not right now. You're not ready yet.<br><br>\" + \"Use this program to track your progress<br><br>\" + \"The fl1ght.exe program was added to your home computer<br><br>\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper1, \"Soon you will be contacted by a hacking group known as CyberSec. \" + \"They can help you with your search. <br><br>\" + \"You should join them, garner their favor, and \" + \"exploit them for their Augmentations. But do not trust them. \" + \"They are not what they seem. No one is.<br><br>\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper2, \"Do not try to save the world. There is no world to save. If \" + \"you want to find the truth, worry only about yourself. Ethics and \" + \"morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec.\" + \"<br><br>-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper3, \"You must learn to walk before you can run. And you must \" + \"run before you can fly. Look for the black hand. <br><br>\" + \"I.I.I.I <br><br>-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper4, \"To find what you are searching for, you must understand the bits. \" + \"The bits are all around us. The runners will help you.<br><br>\" + \"-jump3R\")); //Messages from hacking factions\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.CyberSecTest, \"We've been watching you. Your skills are very impressive. But you're wasting \" + \"your talents. If you join us, you can put your skills to good use and change \" + \"the world for the better. If you join us, we can unlock your full potential. <br><br>\" + \"But first, you must pass our test. Find and install the backdoor on our server. <br><br>\" + \"-CyberSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.NiteSecTest, \"People say that the corrupted governments and corporations rule the world. \" + \"Yes, maybe they do. But do you know who everyone really fears? People \" + \"like us. Because they can't hide from us. Because they can't fight shadows \" + \"and ideas with bullets. <br><br>\" + \"Join us, and people will fear you, too. <br><br>\" + \"Find and install the backdoor on our server. Then, we will contact you again.\" + \"<br><br>-NiteSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.BitRunnersTest, \"We know what you are doing. We know what drives you. We know \" + \"what you are looking for. <br><br> \" + \"We can help you find the answers.<br><br>\" + \"run4theh111z\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.RedPill, \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>\" + \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>\" + \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>\" + \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\"));\n}\n\n\n\n//# sourceURL=webpack:///./src/Message/MessageHelpers.js?");
|
||
|
||
/***/ }),
|
||
/* 133 */,
|
||
/* 134 */,
|
||
/* 135 */
|
||
/*!********************************!*\
|
||
!*** ./src/Faction/Faction.ts ***!
|
||
\********************************/
|
||
/*! exports provided: Faction */
|
||
/*! exports used: Faction */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Faction; });\n/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FactionInfo */ 430);\n/* harmony import */ var _formulas_favor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/favor */ 468);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\nclass Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n\n /**\n * Amount of favor the player has with this faction.\n */\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n\n /**\n * Name of faction\n */\n\n /**\n * Amount of reputation player has with this faction\n */\n\n /**\n * Reputation from the last \"prestige\" that was not converted to favor.\n * This reputation rolls over and is used for the next favor calculation\n */\n constructor(name = \"\") {\n _defineProperty(this, \"alreadyInvited\", false);\n\n _defineProperty(this, \"augmentations\", []);\n\n _defineProperty(this, \"favor\", 0);\n\n _defineProperty(this, \"isBanned\", false);\n\n _defineProperty(this, \"isMember\", false);\n\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"playerReputation\", 0);\n\n _defineProperty(this, \"rolloverRep\", 0);\n\n this.name = name;\n }\n\n getInfo() {\n const info = _FactionInfo__WEBPACK_IMPORTED_MODULE_0__[/* FactionInfos */ \"a\"][this.name];\n\n if (info == null) {\n throw new Error(`Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`);\n }\n\n return info;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length !== 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n } //Returns an array with [How much favor would be gained, how much rep would be left over]\n\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const storedRep = Math.max(0, Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* favorToRep */ \"a\"])(this.favor - 1));\n const totalRep = storedRep + this.rolloverRep + this.playerReputation;\n const newFavor = Math.floor(Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* repToFavor */ \"b\"])(totalRep));\n const newRep = Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* favorToRep */ \"a\"])(newFavor);\n return [newFavor - this.favor + 1, totalRep - newRep];\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Faction\", this);\n }\n /**\n * Initiatizes a Faction object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Faction, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Faction = Faction;\n\n//# sourceURL=webpack:///./src/Faction/Faction.ts?");
|
||
|
||
/***/ }),
|
||
/* 136 */,
|
||
/* 137 */,
|
||
/* 138 */
|
||
/*!************************!*\
|
||
!*** ./src/engine.jsx ***!
|
||
\************************/
|
||
/*! exports provided: Engine */
|
||
/*! all exports used */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Engine\", function() { return Engine; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CodingContractGenerator */ 289);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Corporation/Corporation */ 261);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/GameRoot */ 254);\n/* harmony import */ var _ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ui/React/Theme */ 265);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./InteractiveTutorial */ 49);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Message/MessageHelpers */ 132);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Missions */ 119);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./NetscriptWorker */ 125);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./SaveObject */ 219);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./PersonObjects/Sleeve/Sleeve */ 246);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Locations/Locations */ 194);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Locations/data/LocationNames */ 9);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../utils/uiHelpers/removeLoadingScreen */ 574);\n/* harmony import */ var _Exploits_tampering__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Exploits/tampering */ 1290);\n/* harmony import */ var _Exploits_unclickable__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./Exploits/unclickable */ 1291);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_40__);\n/**\n * Game engine. Handles the main game loop.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Engine = {\n // Display objects\n // TODO-Refactor this into its own component\n Display: {\n missionContent: null\n },\n indexedDb: undefined,\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n updateGame: function (numCycles = 1) {\n const time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"].process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // Working\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toFaction();\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toTerminal();\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toCity();\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_29__[/* Locations */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_30__[/* LocationName */ \"a\"].Slums]);\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toCity();\n }\n } else {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toCity();\n }\n }\n } // Update stock prices\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCycles);\n } // Gang, if applicable\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCycles, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_18__[/* inMission */ \"c\"] && _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"]) {\n _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"].process(numCycles);\n } // Corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCycles);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCycles);\n } // Sleeves\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCycles, true);\n }\n }\n } // Counters\n\n\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters(); // Update the running time of all active scripts\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* updateOnlineScriptTimes */ \"f\"])(numCycles); // Hacknet Nodes\n\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5,\n // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000 // Generate Coding Contracts\n\n },\n decrementAllCounters: function (numCycles = 1) {\n for (var counter in Engine.Counters) {\n if (Engine.Counters.hasOwnProperty(counter)) {\n Engine.Counters[counter] = Engine.Counters[counter] - numCycles;\n }\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval == null) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval = 60;\n }\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n Engine.Counters.autoSaveCounter = Infinity;\n } else {\n Engine.Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval * 5;\n _SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* saveObject */ \"b\"].saveGame(Engine.indexedDb);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].checkForFactionInvitations();\n\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* inviteToFaction */ \"c\"])(randFaction);\n }\n\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* checkForMessagesToSend */ \"b\"])();\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n\n if (Engine.Counters.mechanicProcess <= 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n try {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_35__[/* exceptionAlert */ \"a\"])(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__[/* generateRandomContract */ \"b\"])();\n }\n\n Engine.Counters.contractGeneration = 3000;\n }\n },\n load: function (saveString) {\n // Load game from save or create new game\n if (Object(_SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* loadGame */ \"a\"])(saveString)) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])(); // Also calls Player.reapplyAllAugmentations()\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].reapplyAllSourceFiles();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* initSymbolToStockMap */ \"h\"])();\n } // Calculate the number of cycles have elapsed while offline\n\n\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n let offlineReputation = 0;\n const offlineHackingIncome = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].moneySourceA.hacking / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug * timeOffline * 0.75;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gainMoney(offlineHackingIncome); // Process offline progress\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* loadAllRunningScripts */ \"b\"])(); // This also takes care of offline production for those scripts\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = true;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCyclesOffline);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCyclesOffline);\n }\n } else {\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length; i++) {\n const facName = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions[i];\n if (!_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(facName)) continue;\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][facName];\n if (!faction.isMember) continue; // No rep for special factions.\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getGangName() === facName) continue;\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction); // can be infinite, doesn't matter.\n\n const reputationRate = Math.max(hRep, sRep, fRep) / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length;\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n } // Hacknet Nodes offline progress\n\n\n var offlineProductionFromHacknetNodes = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline);\n const hacknetProdInfo = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]) ? react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_39___default.a.Fragment, null, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_32__[/* Hashes */ \"a\"])(offlineProductionFromHacknetNodes), \" hashes\") : react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_31__[/* Money */ \"a\"], {\n money: offlineProductionFromHacknetNodes\n }); // Passive faction rep gain offline\n\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(numCyclesOffline); // Stock Market offline progress\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCyclesOffline);\n } // Gang progress for BitNode 2\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCyclesOffline, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Corporation offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCyclesOffline);\n } // Bladeburner offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCyclesOffline);\n } // Sleeves offline progress\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCyclesOffline, true);\n }\n }\n } // Update total playtime\n\n\n var time = numCyclesOffline * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_36__[/* removeLoadingScreen */ \"a\"])();\n const timeOfflineString = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* convertTimeMsToTimeElapsedString */ \"b\"])(time);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_34__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_39___default.a.Fragment, null, \"Offline for \", timeOfflineString, \". While you were offline, your scripts generated\", \" \", react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_31__[/* Money */ \"a\"], {\n money: offlineHackingIncome\n }), \", your Hacknet Nodes generated \", hacknetProdInfo, \" and you gained\", \" \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_33__[/* Reputation */ \"a\"])(offlineReputation), \" divided amongst your factions.\"));\n } else {\n // No save found, start new game\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__[/* initSpecialServerIps */ \"c\"])();\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Engine.start(); // Run main game loop and Scripts loop\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].init();\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_22__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getHomeComputer());\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* initCompanies */ \"b\"])();\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])();\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])();\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* initMessages */ \"c\"])();\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]); // Start interactive tutorial\n\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__[/* iTutorialStart */ \"c\"])();\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_36__[/* removeLoadingScreen */ \"a\"])();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_40___default.a.render(react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__[/* TTheme */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* GameRoot */ \"a\"], {\n terminal: _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"],\n engine: this,\n player: _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]\n })), document.getElementById(\"mainmenu-container\"));\n },\n setDisplayElements: function () {\n Engine.Display.missionContent = document.getElementById(\"mission-container\");\n Engine.Display.missionContent.style.display = \"none\";\n },\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed; // Divide this by cycle time to determine how many cycles have elapsed since last update\n\n diff = Math.floor(diff / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n\n window.requestAnimationFrame(Engine.start);\n }\n};\nvar indexedDbRequest;\n\nwindow.onload = function () {\n if (!window.indexedDB) {\n return Engine.load(null); // Will try to load from localstorage\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n */\n\n\n indexedDbRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n indexedDbRequest.onerror = function (e) {\n console.error(\"Error opening indexedDB: \");\n console.error(e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n indexedDbRequest.onsuccess = function (e) {\n Engine.indexedDb = e.target.result;\n var transaction = Engine.indexedDb.transaction([\"savestring\"]);\n var objectStore = transaction.objectStore(\"savestring\");\n var request = objectStore.get(\"save\");\n\n request.onerror = function (e) {\n console.error(\"Error in Database request to get savestring: \" + e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n request.onsuccess = function () {\n Engine.load(request.result);\n };\n };\n\n indexedDbRequest.onupgradeneeded = function (e) {\n const db = e.target.result;\n db.createObjectStore(\"savestring\");\n };\n};\n\n\n\n//# sourceURL=webpack:///./src/engine.jsx?");
|
||
|
||
/***/ }),
|
||
/* 139 */,
|
||
/* 140 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Corporation/MaterialSizes.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: MaterialSizes */
|
||
/*! exports used: MaterialSizes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MaterialSizes; });\n// Map of material (by name) to their sizes (how much space it takes in warehouse)\nconst MaterialSizes = {\n Water: 0.05,\n Energy: 0.01,\n Food: 0.03,\n Plants: 0.05,\n Metal: 0.1,\n Hardware: 0.06,\n Chemicals: 0.05,\n Drugs: 0.02,\n Robots: 0.5,\n AICores: 0.1,\n RealEstate: 0,\n \"Real Estate\": 0,\n \"AI Cores\": 0\n};\n\n//# sourceURL=webpack:///./src/Corporation/MaterialSizes.ts?");
|
||
|
||
/***/ }),
|
||
/* 141 */,
|
||
/* 142 */
|
||
/*!************************************************!*\
|
||
!*** ./src/ui/React/AutoupdatingStdButton.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: AutoupdatingStdButton */
|
||
/*! exports used: AutoupdatingStdButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AutoupdatingStdButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Basic stateless button that automatically re-renders itself every X seconds\n * Uses the 'std-button' css class\n *\n * NOT recommended for usage - only if you really have to\n */\n\nclass AutoupdatingStdButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Timer ID for auto-updating implementation (returned value from setInterval())\n */\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", 0);\n\n this.state = {\n i: 0\n };\n }\n\n componentDidMount() {\n const time = this.props.intervalTime ? this.props.intervalTime : 1000;\n this.interval = window.setInterval(() => this.tick(), time);\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n tick() {\n this.setState(prevState => ({\n i: prevState.i + 1\n }));\n }\n\n render() {\n const hasTooltip = this.props.tooltip != null && this.props.tooltip !== \"\";\n let className = this.props.disabled ? \"std-button-disabled\" : \"std-button\";\n\n if (hasTooltip) {\n className += \" tooltip\";\n } // Tooltip will eb set using inner HTML\n\n\n const tooltipMarkup = {\n __html: this.props.tooltip ? this.props.tooltip : \"\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.props.onClick,\n style: this.props.style\n }, this.props.text, hasTooltip && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: tooltipMarkup\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/AutoupdatingStdButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 143 */,
|
||
/* 144 */,
|
||
/* 145 */,
|
||
/* 146 */,
|
||
/* 147 */,
|
||
/* 148 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Infiltration/ui/KeyHandler.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: KeyHandler */
|
||
/*! exports used: KeyHandler */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return KeyHandler; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction KeyHandler(props) {\n let elem;\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => elem.focus());\n\n function onKeyDown(event) {\n if (!event.isTrusted) {\n props.onFailure({\n automated: true\n });\n return;\n }\n\n props.onKeyDown(event);\n } // invisible autofocused element that eats all the keypress for the minigames.\n\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n tabIndex: 1,\n ref: c => elem = c,\n onKeyDown: onKeyDown\n });\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/KeyHandler.tsx?");
|
||
|
||
/***/ }),
|
||
/* 149 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Infiltration/ui/GameTimer.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: GameTimer */
|
||
/*! exports used: GameTimer */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameTimer; });\n/* harmony import */ var _mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/material/LinearProgress */ 1383);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/withStyles */ 1381);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n\n\n\n\nconst TimerProgress = Object(_mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(() => ({\n bar: {\n transition: \"none\",\n backgroundColor: \"#adff2f\"\n }\n}))(_mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\nfunction GameTimer(props) {\n const [v, setV] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(100);\n const tick = 200;\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(() => {\n const intervalId = setInterval(() => {\n setV(old => {\n if (old <= 0) props.onExpire();\n return old - tick / props.millis * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []); // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(TimerProgress, {\n variant: \"determinate\",\n value: v\n }));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/GameTimer.tsx?");
|
||
|
||
/***/ }),
|
||
/* 150 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Infiltration/ui/Difficulty.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: interpolate */
|
||
/*! exports used: interpolate */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return interpolate; });\n// I could use `any` to simply some of this but I also want to take advantage\n// of the type safety that typescript provides. I'm just not sure how in this\n// case.\nfunction interpolate(settings, n, out) {\n // interpolates between 2 difficulties.\n function lerpD(a, b, t) {\n // interpolates between 2 numbers.\n function lerp(x, y, t) {\n return (1 - t) * x + t * y;\n }\n\n for (const key of Object.keys(a)) {\n out[key] = lerp(a[key], b[key], t);\n }\n\n return a;\n }\n\n if (n < 0) return lerpD(settings.Trivial, settings.Trivial, 0);\n if (n >= 0 && n < 1) return lerpD(settings.Trivial, settings.Normal, n);\n if (n >= 1 && n < 2) return lerpD(settings.Normal, settings.Hard, n - 1);\n if (n >= 2 && n < 3) return lerpD(settings.Hard, settings.Impossible, n - 2);\n return lerpD(settings.Impossible, settings.Impossible, 0);\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Difficulty.ts?");
|
||
|
||
/***/ }),
|
||
/* 151 */,
|
||
/* 152 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Settings/SettingEnums.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: AceKeybindingSetting, CodeMirrorKeybindingSetting, CodeMirrorThemeSetting, EditorSetting, PurchaseAugmentationsOrderSetting, OwnedAugmentationsOrderSetting */
|
||
/*! exports used: OwnedAugmentationsOrderSetting, PurchaseAugmentationsOrderSetting */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export AceKeybindingSetting */\n/* unused harmony export CodeMirrorKeybindingSetting */\n/* unused harmony export CodeMirrorThemeSetting */\n/* unused harmony export EditorSetting */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return PurchaseAugmentationsOrderSetting; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OwnedAugmentationsOrderSetting; });\n// Enums that defined allowed values for setting configuration\n\n/**\n * Allowed values for 'Keybinding/Keymap' setting in Ace editor\n */\nlet AceKeybindingSetting;\n/**\n * Allowed values for 'Keybinding/Keymap' setting in Code Mirror editor\n */\n\n(function (AceKeybindingSetting) {\n AceKeybindingSetting[\"Ace\"] = \"ace\";\n AceKeybindingSetting[\"Emacs\"] = \"emacs\";\n AceKeybindingSetting[\"Vim\"] = \"vim\";\n})(AceKeybindingSetting || (AceKeybindingSetting = {}));\n\nlet CodeMirrorKeybindingSetting;\n/**\n * Allowed values for 'Theme' setting in Code Mirror editor\n */\n\n(function (CodeMirrorKeybindingSetting) {\n CodeMirrorKeybindingSetting[\"Default\"] = \"default\";\n CodeMirrorKeybindingSetting[\"Emacs\"] = \"emacs\";\n CodeMirrorKeybindingSetting[\"Sublime\"] = \"sublime\";\n CodeMirrorKeybindingSetting[\"Vim\"] = \"vim\";\n})(CodeMirrorKeybindingSetting || (CodeMirrorKeybindingSetting = {}));\n\nlet CodeMirrorThemeSetting;\n/**\n * Allowed values for the \"Editor\" setting\n */\n\n(function (CodeMirrorThemeSetting) {\n CodeMirrorThemeSetting[\"Monokai\"] = \"monokai\";\n CodeMirrorThemeSetting[\"Day_3024\"] = \"3024-day\";\n CodeMirrorThemeSetting[\"Night_3024\"] = \"3024-night\";\n CodeMirrorThemeSetting[\"abcdef\"] = \"abcdef\";\n CodeMirrorThemeSetting[\"Ambiance_mobile\"] = \"ambiance-mobile\";\n CodeMirrorThemeSetting[\"Ambiance\"] = \"ambiance\";\n CodeMirrorThemeSetting[\"Base16_dark\"] = \"base16-dark\";\n CodeMirrorThemeSetting[\"Base16_light\"] = \"base16-light\";\n CodeMirrorThemeSetting[\"Bespin\"] = \"bespin\";\n CodeMirrorThemeSetting[\"Blackboard\"] = \"blackboard\";\n CodeMirrorThemeSetting[\"Cobalt\"] = \"cobalt\";\n CodeMirrorThemeSetting[\"Colorforth\"] = \"colorforth\";\n CodeMirrorThemeSetting[\"Darcula\"] = \"darcula\";\n CodeMirrorThemeSetting[\"Dracula\"] = \"dracula\";\n CodeMirrorThemeSetting[\"Duotone_dark\"] = \"duotone-dark\";\n CodeMirrorThemeSetting[\"Duotone_light\"] = \"duotone-light\";\n CodeMirrorThemeSetting[\"Eclipse\"] = \"eclipse\";\n CodeMirrorThemeSetting[\"Elegant\"] = \"elegant\";\n CodeMirrorThemeSetting[\"Erlang_dark\"] = \"erlang-dark\";\n CodeMirrorThemeSetting[\"Gruvbox_dark\"] = \"gruvbox-dark\";\n CodeMirrorThemeSetting[\"Hopscotch\"] = \"hopscotch\";\n CodeMirrorThemeSetting[\"Icecoder\"] = \"icecoder\";\n CodeMirrorThemeSetting[\"Idea\"] = \"idea\";\n CodeMirrorThemeSetting[\"Isotope\"] = \"isotope\";\n CodeMirrorThemeSetting[\"Lesser_dark\"] = \"lesser-dark\";\n CodeMirrorThemeSetting[\"Liquibyte\"] = \"liquibyte\";\n CodeMirrorThemeSetting[\"Lucario\"] = \"lucario\";\n CodeMirrorThemeSetting[\"Material\"] = \"material\";\n CodeMirrorThemeSetting[\"Mbo\"] = \"mbo\";\n CodeMirrorThemeSetting[\"Mdn_like\"] = \"mdn-like\";\n CodeMirrorThemeSetting[\"Midnight\"] = \"midnight\";\n CodeMirrorThemeSetting[\"Neat\"] = \"neat\";\n CodeMirrorThemeSetting[\"Neo\"] = \"neo\";\n CodeMirrorThemeSetting[\"Night\"] = \"night\";\n CodeMirrorThemeSetting[\"Oceanic_next\"] = \"oceanic-next\";\n CodeMirrorThemeSetting[\"Panda_syntax\"] = \"panda-syntax\";\n CodeMirrorThemeSetting[\"Paraiso_dark\"] = \"paraiso-dark\";\n CodeMirrorThemeSetting[\"Paraiso_light\"] = \"paraiso-light\";\n CodeMirrorThemeSetting[\"Pastel_on_dark\"] = \"pastel-on-dark\";\n CodeMirrorThemeSetting[\"Railscasts\"] = \"railscasts\";\n CodeMirrorThemeSetting[\"Rubyblue\"] = \"rubyblue\";\n CodeMirrorThemeSetting[\"Seti\"] = \"seti\";\n CodeMirrorThemeSetting[\"Shadowfox\"] = \"shadowfox\";\n CodeMirrorThemeSetting[\"Solarized\"] = \"solarized\";\n CodeMirrorThemeSetting[\"SolarizedDark\"] = \"solarized dark\";\n CodeMirrorThemeSetting[\"ssms\"] = \"ssms\";\n CodeMirrorThemeSetting[\"The_matrix\"] = \"the-matrix\";\n CodeMirrorThemeSetting[\"Tomorrow_night_bright\"] = \"tomorrow-night-bright\";\n CodeMirrorThemeSetting[\"Tomorrow_night_eighties\"] = \"tomorrow-night-eighties\";\n CodeMirrorThemeSetting[\"Ttcn\"] = \"ttcn\";\n CodeMirrorThemeSetting[\"Twilight\"] = \"twilight\";\n CodeMirrorThemeSetting[\"Vibrant_ink\"] = \"vibrant-ink\";\n CodeMirrorThemeSetting[\"xq_dark\"] = \"xq-dark\";\n CodeMirrorThemeSetting[\"xq_light\"] = \"xq-light\";\n CodeMirrorThemeSetting[\"Yeti\"] = \"yeti\";\n CodeMirrorThemeSetting[\"Zenburn\"] = \"zenburn\";\n})(CodeMirrorThemeSetting || (CodeMirrorThemeSetting = {}));\n\nlet EditorSetting;\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\n\n(function (EditorSetting) {\n EditorSetting[\"Ace\"] = \"Ace\";\n EditorSetting[\"CodeMirror\"] = \"CodeMirror\";\n})(EditorSetting || (EditorSetting = {}));\n\nlet PurchaseAugmentationsOrderSetting;\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\n\n(function (PurchaseAugmentationsOrderSetting) {\n PurchaseAugmentationsOrderSetting[PurchaseAugmentationsOrderSetting[\"Cost\"] = 0] = \"Cost\";\n PurchaseAugmentationsOrderSetting[PurchaseAugmentationsOrderSetting[\"Default\"] = 1] = \"Default\";\n PurchaseAugmentationsOrderSetting[PurchaseAugmentationsOrderSetting[\"Reputation\"] = 2] = \"Reputation\";\n})(PurchaseAugmentationsOrderSetting || (PurchaseAugmentationsOrderSetting = {}));\n\nlet OwnedAugmentationsOrderSetting;\n\n(function (OwnedAugmentationsOrderSetting) {\n OwnedAugmentationsOrderSetting[OwnedAugmentationsOrderSetting[\"Alphabetically\"] = 0] = \"Alphabetically\";\n OwnedAugmentationsOrderSetting[OwnedAugmentationsOrderSetting[\"AcquirementTime\"] = 1] = \"AcquirementTime\";\n})(OwnedAugmentationsOrderSetting || (OwnedAugmentationsOrderSetting = {}));\n\n//# sourceURL=webpack:///./src/Settings/SettingEnums.ts?");
|
||
|
||
/***/ }),
|
||
/* 153 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Netscript/WorkerScripts.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: workerScripts */
|
||
/*! exports used: workerScripts */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return workerScripts; });\n/**\n * Global pool of all active scripts (scripts that are currently running)\n */\nconst workerScripts = new Map();\n\n//# sourceURL=webpack:///./src/Netscript/WorkerScripts.ts?");
|
||
|
||
/***/ }),
|
||
/* 154 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Gang/GangMemberUpgrades.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: GangMemberUpgrades */
|
||
/*! exports used: GangMemberUpgrades */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgrades; });\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/upgrades */ 120);\n/* harmony import */ var _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberUpgrade */ 703);\n\n\nconst GangMemberUpgrades = {};\n\n(function () {\n _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* gangMemberUpgradesMetadata */ \"b\"].forEach(e => {\n GangMemberUpgrades[e.name] = new _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberUpgrade */ \"a\"](e.name, e.cost, e.upgType, e.mults);\n });\n})();\n\n//# sourceURL=webpack:///./src/Gang/GangMemberUpgrades.ts?");
|
||
|
||
/***/ }),
|
||
/* 155 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/StockMarket/BuyingAndSelling.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: buyStock, sellStock, shortStock, sellShort */
|
||
/*! exports used: buyStock, sellShort, sellStock, shortStock */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return sellStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return shortStock; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return sellShort; });\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StockMarketHelpers */ 156);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\n\n\n\n\n\n\n\n\n/**\n * Each function takes an optional config object as its last argument\n */\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nfunction buyStock(stock, shares, workerScript = null, opts = {}) {\n // Validate arguments\n shares = Math.round(shares);\n\n if (shares <= 0) {\n return false;\n }\n\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n } // Does player have enough money?\n\n\n const totalPrice = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getBuyTransactionCost */ \"b\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long);\n\n if (totalPrice == null) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].money.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `You do not have enough money to purchase this position. You need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}.`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"You do not have enough money to purchase this. You need \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n })));\n }\n\n return false;\n } // Would this purchase exceed the maximum number of shares?\n\n\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\"buyStock\", `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${stock.symbol}'s maximum (${stock.maxShares}) number of shares`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`You cannot purchase this many shares. ${stock.symbol} has a maximum of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(stock.maxShares)} shares.`);\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].loseMoney(totalPrice);\n const newTotal = origTotal + totalPrice - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol} for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}. ` + `Paid ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission)} in commission fees.`;\n workerScript.log(\"buyStock\", resultTxt);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Bought \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \" for \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n }), \". Paid\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission\n }), \" in commission fees.\"));\n }\n\n return true;\n}\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\n\nfunction sellStock(stock, shares, workerScript = null, opts = {}) {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"sellStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\");\n }\n\n return false;\n }\n\n shares = Math.round(shares);\n\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n\n if (shares === 0) {\n return false;\n }\n\n const gains = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getSellTransactionGain */ \"c\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long);\n\n if (gains == null) {\n return false;\n }\n\n let netProfit = gains - stock.playerAvgPx * shares;\n\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].gainMoney(gains);\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].recordMoneySource(netProfit, \"stock\");\n\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol}. ` + `After commissions, you gained a total of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(gains)}.`;\n workerScript.log(\"sellStock\", resultTxt);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Sold \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \". After commissions, you gained a total of\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: gains\n }), \".\"));\n }\n\n return true;\n}\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\n\nfunction shortStock(stock, shares, workerScript = null, opts = {}) {\n // Validate arguments\n shares = Math.round(shares);\n\n if (shares <= 0) {\n return false;\n }\n\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"shortStock\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to initiate a short position in a stock. This is probably \" + \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\");\n }\n\n return false;\n } // Does the player have enough money?\n\n\n const totalPrice = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getBuyTransactionCost */ \"b\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Short);\n\n if (totalPrice == null) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].money.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\"shortStock\", \"You do not have enough \" + \"money to purchase this short position. You need \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice));\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"You do not have enough money to purchase this short position. You need \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n })));\n }\n\n return false;\n } // Would this purchase exceed the maximum number of shares?\n\n\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\"shortStock\", `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${stock.symbol}'s maximum (${stock.maxShares}) number of shares.`);\n } else if (opts.suppressDialog !== true) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`);\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].loseMoney(totalPrice);\n const newTotal = origTotal + totalPrice - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Bought a short position of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol} ` + `for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalPrice)}. Paid ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission)} ` + `in commission fees.`;\n workerScript.log(\"shortStock\", resultTxt);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Bought a short position of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \" for\", \" \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalPrice\n }), \". Paid \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission\n }), \" in commission fees.\"));\n }\n\n return true;\n}\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\n\nfunction sellShort(stock, shares, workerScript = null, opts = {}) {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"sellShort\", `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Failed to sell a short position in a stock. This is probably \" + \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\");\n }\n\n return false;\n }\n\n shares = Math.round(shares);\n\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getSellTransactionGain */ \"c\"])(stock, shares, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Short);\n\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\"sellShort\", `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(`Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`);\n }\n\n return false;\n }\n\n let profit = totalGain - origCost;\n\n if (isNaN(profit)) {\n profit = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].gainMoney(totalGain);\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].recordMoneySource(profit, \"stock\");\n\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n\n Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_0__[/* processTransactionForecastMovement */ \"d\"])(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt = `Sold your short position of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares)} shares of ${stock.symbol}. ` + `After commissions, you gained a total of ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(totalGain)}`;\n workerScript.log(\"sellShort\", resultTxt);\n } else if (!opts.suppressDialog) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Sold your short position of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(shares), \" shares of \", stock.symbol, \". After commissions, you gained a total of \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: totalGain\n })));\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./src/StockMarket/BuyingAndSelling.tsx?");
|
||
|
||
/***/ }),
|
||
/* 156 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/StockMarket/StockMarketHelpers.ts ***!
|
||
\***********************************************/
|
||
/*! exports provided: forecastChangePerPriceMovement, getBuyTransactionCost, getSellTransactionGain, processTransactionForecastMovement, calculateBuyMaxAmount */
|
||
/*! exports used: calculateBuyMaxAmount, getBuyTransactionCost, getSellTransactionGain, processTransactionForecastMovement */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export forecastChangePerPriceMovement */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getBuyTransactionCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getSellTransactionGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return processTransactionForecastMovement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateBuyMaxAmount; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/**\n * Stock Market Helper Functions\n */\n\n\n // Amount by which a stock's forecast changes during each price movement\n\nconst forecastChangePerPriceMovement = 0.006;\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\n\nfunction getBuyTransactionCost(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long; // If the number of shares doesn't trigger a price movement, its a simple calculation\n\n if (isLong) {\n return shares * stock.getAskPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n }\n}\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\n\nfunction getSellTransactionGain(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n\n if (isLong) {\n return shares * stock.getBidPrice() - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n return origCost + profit;\n }\n}\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\n\nfunction processTransactionForecastMovement(stock, shares) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares); // If there's only going to be one iteration at most\n\n const firstShares = stock.shareTxUntilMovement;\n\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n } // Calculate how many iterations of price changes we need to account for\n\n\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement); // If on the offchance we end up perfectly at the next price movement\n\n stock.shareTxUntilMovement = stock.shareTxForMovement - (shares - stock.shareTxUntilMovement) % stock.shareTxForMovement;\n\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n } // Forecast always decreases in magnitude\n\n\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\n\nfunction calculateBuyMaxAmount(stock, posType, money) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return 0;\n }\n\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n const remainingMoney = money - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n return Math.floor(remainingMoney / currPrice);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 157 */
|
||
/*!****************************!*\
|
||
!*** ./src/Crime/Crime.ts ***!
|
||
\****************************/
|
||
/*! exports provided: Crime */
|
||
/*! exports used: Crime */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Crime; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass Crime {\n // Number representing the difficulty of the crime. Used for success chance calculations\n // Amount of karma lost for SUCCESSFULLY committing this crime\n // How many people die as a result of this crime\n // How much money is given by the\n // Name of crime\n // Milliseconds it takes to attempt the crime\n // Corresponding type in CONSTANTS. Contains a description for the crime activity\n // Weighting factors that determine how stats affect the success rate of this crime\n // How much stat experience is granted by this crime\n constructor(name = \"\", type = \"\", time = 0, money = 0, difficulty = 0, karma = 0, params = {}) {\n _defineProperty(this, \"difficulty\", 0);\n\n _defineProperty(this, \"karma\", 0);\n\n _defineProperty(this, \"kills\", 0);\n\n _defineProperty(this, \"money\", 0);\n\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"time\", 0);\n\n _defineProperty(this, \"type\", \"\");\n\n _defineProperty(this, \"hacking_success_weight\", 0);\n\n _defineProperty(this, \"strength_success_weight\", 0);\n\n _defineProperty(this, \"defense_success_weight\", 0);\n\n _defineProperty(this, \"dexterity_success_weight\", 0);\n\n _defineProperty(this, \"agility_success_weight\", 0);\n\n _defineProperty(this, \"charisma_success_weight\", 0);\n\n _defineProperty(this, \"hacking_exp\", 0);\n\n _defineProperty(this, \"strength_exp\", 0);\n\n _defineProperty(this, \"defense_exp\", 0);\n\n _defineProperty(this, \"dexterity_exp\", 0);\n\n _defineProperty(this, \"agility_exp\", 0);\n\n _defineProperty(this, \"charisma_exp\", 0);\n\n _defineProperty(this, \"intelligence_exp\", 0);\n\n this.name = name;\n this.type = type;\n this.time = time;\n this.money = money;\n this.difficulty = difficulty;\n this.karma = karma;\n this.hacking_success_weight = params.hacking_success_weight ? params.hacking_success_weight : 0;\n this.strength_success_weight = params.strength_success_weight ? params.strength_success_weight : 0;\n this.defense_success_weight = params.defense_success_weight ? params.defense_success_weight : 0;\n this.dexterity_success_weight = params.dexterity_success_weight ? params.dexterity_success_weight : 0;\n this.agility_success_weight = params.agility_success_weight ? params.agility_success_weight : 0;\n this.charisma_success_weight = params.charisma_success_weight ? params.charisma_success_weight : 0;\n this.hacking_exp = params.hacking_exp ? params.hacking_exp : 0;\n this.strength_exp = params.strength_exp ? params.strength_exp : 0;\n this.defense_exp = params.defense_exp ? params.defense_exp : 0;\n this.dexterity_exp = params.dexterity_exp ? params.dexterity_exp : 0;\n this.agility_exp = params.agility_exp ? params.agility_exp : 0;\n this.charisma_exp = params.charisma_exp ? params.charisma_exp : 0;\n this.intelligence_exp = params.intelligence_exp ? params.intelligence_exp : 0;\n this.kills = params.kills ? params.kills : 0;\n }\n\n commit(p, div = 1, singParams = null) {\n if (div <= 0) {\n div = 1;\n }\n\n p.startCrime(this.type, this.hacking_exp / div, this.strength_exp / div, this.defense_exp / div, this.dexterity_exp / div, this.agility_exp / div, this.charisma_exp / div, this.money / div, this.time, singParams);\n return this.time;\n }\n\n successRate(p) {\n let chance = this.hacking_success_weight * p.hacking_skill + this.strength_success_weight * p.strength + this.defense_success_weight * p.defense + this.dexterity_success_weight * p.dexterity + this.agility_success_weight * p.agility + this.charisma_success_weight * p.charisma + _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].IntelligenceCrimeWeight * p.intelligence;\n chance /= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n chance /= this.difficulty;\n chance *= p.crime_success_mult;\n chance *= p.getIntelligenceBonus(1);\n return Math.min(chance, 1);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Crime/Crime.ts?");
|
||
|
||
/***/ }),
|
||
/* 158 */
|
||
/*!*************************************!*\
|
||
!*** ./src/PersonObjects/Person.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: createTaskTracker, Person */
|
||
/*! exports used: Person, createTaskTracker */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createTaskTracker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Person; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/skill */ 199);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formulas/intelligence */ 312);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Base class representing a person-like object\n\n\n\n\n // Interface that defines a generic object used to track experience/money\n// earnings for tasks\n\nfunction createTaskTracker() {\n return {\n hack: 0,\n str: 0,\n def: 0,\n dex: 0,\n agi: 0,\n cha: 0,\n money: 0\n };\n}\nclass Person {\n constructor() {\n _defineProperty(this, \"hacking_skill\", 1);\n\n _defineProperty(this, \"strength\", 1);\n\n _defineProperty(this, \"defense\", 1);\n\n _defineProperty(this, \"dexterity\", 1);\n\n _defineProperty(this, \"agility\", 1);\n\n _defineProperty(this, \"charisma\", 1);\n\n _defineProperty(this, \"intelligence\", 1);\n\n _defineProperty(this, \"hp\", 10);\n\n _defineProperty(this, \"max_hp\", 10);\n\n _defineProperty(this, \"hacking_exp\", 0);\n\n _defineProperty(this, \"strength_exp\", 0);\n\n _defineProperty(this, \"defense_exp\", 0);\n\n _defineProperty(this, \"dexterity_exp\", 0);\n\n _defineProperty(this, \"agility_exp\", 0);\n\n _defineProperty(this, \"charisma_exp\", 0);\n\n _defineProperty(this, \"intelligence_exp\", 0);\n\n _defineProperty(this, \"hacking_mult\", 1);\n\n _defineProperty(this, \"strength_mult\", 1);\n\n _defineProperty(this, \"defense_mult\", 1);\n\n _defineProperty(this, \"dexterity_mult\", 1);\n\n _defineProperty(this, \"agility_mult\", 1);\n\n _defineProperty(this, \"charisma_mult\", 1);\n\n _defineProperty(this, \"hacking_exp_mult\", 1);\n\n _defineProperty(this, \"strength_exp_mult\", 1);\n\n _defineProperty(this, \"defense_exp_mult\", 1);\n\n _defineProperty(this, \"dexterity_exp_mult\", 1);\n\n _defineProperty(this, \"agility_exp_mult\", 1);\n\n _defineProperty(this, \"charisma_exp_mult\", 1);\n\n _defineProperty(this, \"hacking_chance_mult\", 1);\n\n _defineProperty(this, \"hacking_speed_mult\", 1);\n\n _defineProperty(this, \"hacking_money_mult\", 1);\n\n _defineProperty(this, \"hacking_grow_mult\", 1);\n\n _defineProperty(this, \"company_rep_mult\", 1);\n\n _defineProperty(this, \"faction_rep_mult\", 1);\n\n _defineProperty(this, \"crime_money_mult\", 1);\n\n _defineProperty(this, \"crime_success_mult\", 1);\n\n _defineProperty(this, \"work_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_purchase_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_ram_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_core_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_level_cost_mult\", 1);\n\n _defineProperty(this, \"bladeburner_max_stamina_mult\", 1);\n\n _defineProperty(this, \"bladeburner_stamina_gain_mult\", 1);\n\n _defineProperty(this, \"bladeburner_analysis_mult\", 1);\n\n _defineProperty(this, \"bladeburner_success_chance_mult\", 1);\n\n _defineProperty(this, \"augmentations\", []);\n\n _defineProperty(this, \"queuedAugmentations\", []);\n\n _defineProperty(this, \"city\", _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12);\n }\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug) {\n for (const mult in aug.mults) {\n if (this[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n this[mult] *= aug.mults[mult];\n }\n }\n }\n /**\n * Given an experience amount and stat multiplier, calculates the\n * stat level. Stat-agnostic (same formula for every stat)\n */\n\n\n calculateStat(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_3__[/* calculateSkill */ \"b\"])(exp, mult);\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n\n\n getFactionFieldWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.charisma / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 5.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n\n\n getFactionHackingWorkRepGain() {\n return this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n\n\n getFactionSecurityWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 4.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Reset all multipliers to 1\n */\n\n\n resetMultipliers() {\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.work_money_mult = 1;\n }\n /**\n * Update all stat levels\n */\n\n\n updateStatLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateStat(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateStat(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateStat(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n }\n\n getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Person.ts?");
|
||
|
||
/***/ }),
|
||
/* 159 */,
|
||
/* 160 */,
|
||
/* 161 */,
|
||
/* 162 */,
|
||
/* 163 */,
|
||
/* 164 */,
|
||
/* 165 */,
|
||
/* 166 */,
|
||
/* 167 */,
|
||
/* 168 */
|
||
/*!*********************************!*\
|
||
!*** ./src/BitNode/BitNode.tsx ***!
|
||
\*********************************/
|
||
/*! exports provided: BitNodes, initBitNodeMultipliers */
|
||
/*! exports used: BitNodes, initBitNodeMultipliers */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitNodes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return initBitNodeMultipliers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNodeMultipliers */ 8);\n\n\n\nclass BitNode {\n // A short description, or tagline, about the BitNode\n // A long, detailed overview of the BitNode\n // Name of BitNode\n // BitNode number\n constructor(n, name, desc = \"\", info = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null)) {\n this.number = n;\n this.name = name;\n this.desc = desc;\n this.info = info;\n }\n\n}\n\nconst BitNodes = {};\nBitNodes[\"BitNode1\"] = new BitNode(1, \"Source Genesis\", \"The original BitNode\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This is the first BitNode that you play through. It has no special modifications or mechanics.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 16%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 24%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 28%\"));\nBitNodes[\"BitNode2\"] = new BitNode(2, \"Rise of the Underworld\", \"From the shadows, they rose\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"From the shadows, they rose.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050s. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your hacking level is reduced by 20%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The growth rate and maximum amount of money available on servers are significantly decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The amount of money gained from crimes and Infiltration is tripled\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Every Augmentation in the game will be available through the Factions listed above\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"For every Faction NOT listed above, reputation gains are halved\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will no longer gain passive reputation with Factions\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 24%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 36%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 42%\"));\nBitNodes[\"BitNode3\"] = new BitNode(3, \"Corporatocracy\", \"The Price of Civilization\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The price and reputation cost of all Augmentations is tripled\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The starting and maximum amount of money on servers is reduced by 75%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Server growth rate is reduced by 80%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You now only need 75 favour with a faction in order to donate to it, rather than 150\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"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:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 8%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 12%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 14%\"));\nBitNodes[\"BitNode4\"] = new BitNode(4, \"The Singularity\", \"The Man and the Machine\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use.\"));\nBitNodes[\"BitNode5\"] = new BitNode(5, \"Artificial Intelligence\", \"Posthuman\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that couldn't be modeled by 1's and 0's. They were wrong.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The base security level of servers is doubled\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The starting money on servers is halved, but the maximum money remains the same\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Most methods of earning money now give significantly less\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Infiltration gives 50% more reputation and money\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Corporations have 50% lower valuations and are therefore less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Augmentations are more expensive\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking experience gain rates are reduced\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In addition, this Source-File will unlock the getBitNodeMultipliers() and getServer() Netscript functions, as well as the formulas API, and will also raise all of your hacking-related multipliers by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 8%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 12%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 14%\"));\nBitNodes[\"BitNode6\"] = new BitNode(6, \"Bladeburners\", \"Like Tears in Rain\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking and Hacknet Nodes will be less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your hacking level is reduced by 65%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking experience gain from scripts is reduced by 75%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Corporations have 80% lower valuations and are therefore less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Working for companies is 50% less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crimes and Infiltration are 25% less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 8%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 12%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 14%\"));\nBitNodes[\"BitNode7\"] = new BitNode(7, \"Bladeburners 2079\", \"More human than humans\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The rank you gain from Bladeburner contracts/operations is reduced by 40%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner skills cost twice as many skill points\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Augmentations are 3x more expensive\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking and Hacknet Nodes will be significantly less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your hacking level is reduced by 65%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking experience gain from scripts is reduced by 75%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Corporations have 80% lower valuations and are therefore less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Working for companies is 50% less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crimes and Infiltration are 25% less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 8%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 12%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 14%\"));\nBitNodes[\"BitNode8\"] = new BitNode(8, \"Ghost of Wall Street\", \"Money never sleeps\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You start with $250 million\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The only way to earn money is by trading on the stock market\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You start with a WSE membership and access to the TIX API\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You are able to short stocks and place different types of orders (limit/stop)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You can immediately donate to factions to gain reputation\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: Permanent access to WSE and TIX API\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: Ability to short stocks in other BitNodes\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: Ability to use limit/stop orders in other BitNodes\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This Source-File also increases your hacking growth multipliers by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 12%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 18%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 21%\"));\nBitNodes[\"BitNode9\"] = new BitNode(9, \"Hacktocracy\", \"Hacknet Unleashed\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly became the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the Hacknet, a global, decentralized network used for nefarious purposes. Fulcrum quickly abandoned the project and dissociated themselves from it.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes, which can be spent on a variety of different upgrades.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your stats are significantly decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You cannnot purchase additional servers\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking is significantly less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: Permanently unlocks the Hacknet Server in other BitNodes\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)\"));\nBitNodes[\"BitNode10\"] = new BitNode(10, \"Digital Carbon\", \"Your body is not who you are\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally achieved immortality - at least for those that could afford it.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This BitNode unlocks Sleeve technology. Sleeve technology allows you to:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"1. Re-sleeve: Purchase and transfer your consciousness into a new body\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your stats are significantly decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"All methods of gaining money are half as profitable (except Stock Market)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Purchased servers are more expensive, have less max RAM, and a lower maximum limit\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Augmentations are 5x as expensive and require twice as much reputation\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve\"));\nBitNodes[\"BitNode11\"] = new BitNode(11, \"The Big Crash\", \"Okay. Sell it all.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period of disorder that eventually lead to the governmental reformation of many global superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In this BitNode:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your hacking stat and experience gain are halved\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The starting and maximum amount of money available on servers is significantly decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The growth rate of servers is significantly reduced\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Weakening a server is twice as effective\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Company wages are decreased by 50%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Corporation valuations are 90% lower and are therefore significantly less profitable\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Node production is significantly decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crime and Infiltration are more lucrative\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Augmentations are twice as expensive\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 32%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 48%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 56%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"It also reduces the price increase for every aug bought by:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 1: 4%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 2: 6%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Level 3: 7%\"));\nBitNodes[\"BitNode12\"] = new BitNode(12, \"The Recursion\", \"Repeat.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"To iterate is human, to recurse divine.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the level of this source file.\")); // Books: Frontera, Shiner\n\nBitNodes[\"BitNode13\"] = new BitNode(13, \"fOS\", \"COMING SOON\"); //Unlocks the new game mode and the rest of the BitNodes\n\nBitNodes[\"BitNode14\"] = new BitNode(14, \"\", \"COMING SOON\");\nBitNodes[\"BitNode15\"] = new BitNode(15, \"\", \"COMING SOON\");\nBitNodes[\"BitNode16\"] = new BitNode(16, \"\", \"COMING SOON\");\nBitNodes[\"BitNode17\"] = new BitNode(17, \"\", \"COMING SOON\");\nBitNodes[\"BitNode18\"] = new BitNode(18, \"\", \"COMING SOON\");\nBitNodes[\"BitNode19\"] = new BitNode(19, \"\", \"COMING SOON\");\nBitNodes[\"BitNode20\"] = new BitNode(20, \"\", \"COMING SOON\");\nBitNodes[\"BitNode21\"] = new BitNode(21, \"\", \"COMING SOON\");\nBitNodes[\"BitNode22\"] = new BitNode(22, \"\", \"COMING SOON\");\nBitNodes[\"BitNode23\"] = new BitNode(23, \"\", \"COMING SOON\");\nBitNodes[\"BitNode24\"] = new BitNode(24, \"\", \"COMING SOON\");\nfunction initBitNodeMultipliers(p) {\n if (p.bitNodeN == null) {\n p.bitNodeN = 1;\n }\n\n for (const mult in _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"]) {\n if (_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].hasOwnProperty(mult)) {\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"][mult] = 1;\n }\n }\n\n switch (p.bitNodeN) {\n case 1:\n // Source Genesis (every multiplier is 1)\n break;\n\n case 2:\n // Rise of the Underworld\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = 0.8;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate = 0.8;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 3;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = 3;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement = 0;\n break;\n\n case 3:\n // Corporatocracy\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = 0.8;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost = 3;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost = 3;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = 0.25;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0.25;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0.25;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HomeComputerRamCost = 1.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerCost = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement = 3;\n break;\n\n case 4:\n // The Singularity\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 0.15;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.75;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0.05;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackExpGain = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain = 0.75;\n break;\n\n case 5:\n // Artificial intelligence\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.15;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep = 1.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = 1.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackExpGain = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = 0.5;\n break;\n\n case 6:\n // Bladeburner\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = 0.35;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity = 1.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.75;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0.75;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = 0.75;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackExpGain = 0.25;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement = 5;\n break;\n\n case 7:\n // Bladeburner 2079\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank = 0.6;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].BladeburnerSkillCost = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost = 3;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = 0.35;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity = 1.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0.75;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = 0.75;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackExpGain = 0.25;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataCost = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataApiCost = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement = 5;\n break;\n\n case 8:\n // Ghost of Wall Street\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.3;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoneyGain = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ManualHackMoney = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement = 10;\n break;\n\n case 9:\n // Hacktocracy\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier = 0.45;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier = 0.45;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier = 0.45;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier = 0.45;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier = 0.45;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerLimit = 0;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HomeComputerRamCost = 5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackExpGain = 0.05;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity = 2.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataCost = 5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataApiCost = 4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank = 0.9;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].BladeburnerSkillCost = 1.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement = 3;\n break;\n\n case 10:\n // Digital Carbon\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier = 0.4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ManualHackMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost = 5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HomeComputerRamCost = 1.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerCost = 5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerLimit = 0.6;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerMaxRam = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank = 0.8;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement = 3;\n break;\n\n case 11:\n //The Big Crash\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackExpGain = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate = 0.2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerWeakenRate = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = 3;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = 0.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost = 2;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = 2.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep = 2.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = 0.1;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney = 0.25;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataCost = 4;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataApiCost = 4;\n break;\n\n case 12:\n {\n //The Recursion\n let sf12Lvl = 0;\n\n for (let i = 0; i < p.sourceFiles.length; i++) {\n if (p.sourceFiles[i].n === 12) {\n sf12Lvl = p.sourceFiles[i].lvl;\n }\n }\n\n const inc = Math.pow(1.02, sf12Lvl);\n const dec = 1 / inc; // Multiplier for number of augs needed for Daedalus increases\n // up to a maximum of 1.34, which results in 40 Augs required\n\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement = Math.min(inc, 1.34);\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerWeakenRate = dec; //Does not scale, otherwise security might start at 300+\n\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity = 1.5;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HomeComputerRamCost = inc;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerCost = inc;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerLimit = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].PurchasedServerMaxRam = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ManualHackMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HackExpGain = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction = inc;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost = inc;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost = inc;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataCost = inc;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataApiCost = inc;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].CorporationValuation = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank = dec;\n _BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].BladeburnerSkillCost = inc;\n break;\n }\n\n default:\n console.warn(\"Player.bitNodeN invalid\");\n break;\n }\n}\n\n//# sourceURL=webpack:///./src/BitNode/BitNode.tsx?");
|
||
|
||
/***/ }),
|
||
/* 169 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Script/ScriptHelpers.js ***!
|
||
\*************************************/
|
||
/*! exports provided: scriptCalculateOfflineProduction, findRunningScript, findRunningScriptByPid */
|
||
/*! exports used: findRunningScript, findRunningScriptByPid, scriptCalculateOfflineProduction */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return scriptCalculateOfflineProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return findRunningScript; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return findRunningScriptByPid; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\n\n\n\n\n\n\nfunction scriptCalculateOfflineProduction(runningScriptObj) {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n\n let confidence = runningScriptObj.onlineRunningTime / 14400;\n\n if (confidence >= 1) {\n confidence = 1;\n } //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n // Grow\n\n\n for (const ip in runningScriptObj.dataMap) {\n if (runningScriptObj.dataMap.hasOwnProperty(ip)) {\n if (runningScriptObj.dataMap[ip][2] == 0 || runningScriptObj.dataMap[ip][2] == null) {\n continue;\n }\n\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][ip];\n\n if (serv == null) {\n continue;\n }\n\n const timesGrown = Math.round(0.5 * runningScriptObj.dataMap[ip][2] / runningScriptObj.onlineRunningTime * timePassed);\n runningScriptObj.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][runningScriptObj.server];\n const growth = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_3__[/* processSingleServerGrowth */ \"g\"])(serv, timesGrown, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"], host.cpuCores);\n runningScriptObj.log(`'${serv.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].format(growth * 100 - 100, \"0.000000%\")} while offline`);\n }\n } // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n\n\n const expGain = confidence * (runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime) * timePassed;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainHackingExp(expGain); // Update script stats\n\n runningScriptObj.offlineRunningTime += timePassed;\n runningScriptObj.offlineExpGained += expGain; // Weaken\n\n for (const ip in runningScriptObj.dataMap) {\n if (runningScriptObj.dataMap.hasOwnProperty(ip)) {\n if (runningScriptObj.dataMap[ip][3] == 0 || runningScriptObj.dataMap[ip][3] == null) {\n continue;\n }\n\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][ip];\n\n if (serv == null) {\n continue;\n }\n\n const host = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][runningScriptObj.server];\n const timesWeakened = Math.round(0.5 * runningScriptObj.dataMap[ip][3] / runningScriptObj.onlineRunningTime * timePassed);\n runningScriptObj.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n} //Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\n\nfunction findRunningScript(filename, args, server) {\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n\n return null;\n} //Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\n\nfunction findRunningScriptByPid(pid, server) {\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n\n return null;\n}\n\n//# sourceURL=webpack:///./src/Script/ScriptHelpers.js?");
|
||
|
||
/***/ }),
|
||
/* 170 */
|
||
/*!*****************************************!*\
|
||
!*** ./utils/helpers/exceptionAlert.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: exceptionAlert */
|
||
/*! exports used: exceptionAlert */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return exceptionAlert; });\n/* harmony import */ var _DialogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DialogBox */ 10);\n\nfunction exceptionAlert(e) {\n console.error(e);\n Object(_DialogBox__WEBPACK_IMPORTED_MODULE_0__[/* dialogBoxCreate */ \"a\"])(\"Caught an exception: \" + e + \"<br><br>\" + \"Filename: \" + (e.fileName || \"UNKNOWN FILE NAME\") + \"<br><br>\" + \"Line Number: \" + (e.lineNumber || \"UNKNOWN LINE NUMBER\") + \"<br><br>\" + \"This is a bug, please report to game developer with this \" + \"message as well as details about how to reproduce the bug.<br><br>\" + \"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your \" + \"safe doesn't get corrupted\", false);\n}\n\n//# sourceURL=webpack:///./utils/helpers/exceptionAlert.ts?");
|
||
|
||
/***/ }),
|
||
/* 171 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Bladeburner/Bladeburner.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: Bladeburner */
|
||
/*! exports used: Bladeburner */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ActionIdentifier */ 191);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/ActionTypes */ 33);\n/* harmony import */ var _data_Growths__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Growths */ 520);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOperations */ 200);\n/* harmony import */ var _BlackOperation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BlackOperation */ 99);\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Operation */ 263);\n/* harmony import */ var _Contract__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Contract */ 469);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GeneralActions */ 201);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Skills__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Skills */ 189);\n/* harmony import */ var _Skill__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Skill */ 181);\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./City */ 322);\n/* harmony import */ var _data_Help__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./data/Help */ 470);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Hospital/Hospital */ 310);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../RedPill */ 222);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 439);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Bladeburner {\n constructor(player) {\n _defineProperty(this, \"numHosp\", 0);\n\n _defineProperty(this, \"moneyLost\", 0);\n\n _defineProperty(this, \"rank\", 0);\n\n _defineProperty(this, \"maxRank\", 0);\n\n _defineProperty(this, \"skillPoints\", 0);\n\n _defineProperty(this, \"totalSkillPoints\", 0);\n\n _defineProperty(this, \"teamSize\", 0);\n\n _defineProperty(this, \"teamLost\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"randomEventCounter\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600));\n\n _defineProperty(this, \"actionTimeToComplete\", 0);\n\n _defineProperty(this, \"actionTimeCurrent\", 0);\n\n _defineProperty(this, \"actionTimeOverflow\", 0);\n\n _defineProperty(this, \"action\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"cities\", {});\n\n _defineProperty(this, \"city\", _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[2]);\n\n _defineProperty(this, \"skills\", {});\n\n _defineProperty(this, \"skillMultipliers\", {});\n\n _defineProperty(this, \"staminaBonus\", 0);\n\n _defineProperty(this, \"maxStamina\", 0);\n\n _defineProperty(this, \"stamina\", 0);\n\n _defineProperty(this, \"contracts\", {});\n\n _defineProperty(this, \"operations\", {});\n\n _defineProperty(this, \"blackops\", {});\n\n _defineProperty(this, \"logging\", {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true\n });\n\n _defineProperty(this, \"automateEnabled\", false);\n\n _defineProperty(this, \"automateActionHigh\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshHigh\", 0);\n\n _defineProperty(this, \"automateActionLow\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshLow\", 0);\n\n _defineProperty(this, \"consoleHistory\", []);\n\n _defineProperty(this, \"consoleLogs\", [\"Bladeburner Console\", \"Type 'help' to see console commands\"]);\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames.length; ++i) {\n this.cities[_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]] = new _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"](_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity() {\n const city = this.cities[this.city];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n\n return city;\n }\n\n calculateStaminaPenalty() {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n startAction(player, actionId) {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n if (actionId.name === \"Raid\" && this.getCurrentCity().commsEst === 0) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n this.resetAction();\n this.log(\"Error: Tried to start a Black Operation that had already been completed\");\n break;\n }\n\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n this.actionTimeToComplete = 60;\n break;\n\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n break;\n }\n }\n\n upgradeSkill(skill) {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\n }\n\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player, commands) {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n }\n\n postToConsole(input, saveToLogs = true) {\n const MaxConsoleEntries = 100;\n\n if (saveToLogs) {\n this.consoleLogs.push(input);\n\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input) {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__[/* getTimestamp */ \"a\"])()}] ${input}`);\n }\n\n resetAction() {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Idle\n });\n }\n\n clearConsole() {\n this.consoleLogs.length = 0;\n }\n\n prestige() {\n this.resetAction();\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0) {\n this.storedCycles += numCycles;\n } // working on\n\n\n getActionIdFromTypeAndName(type = \"\", name = \"\") {\n if (type === \"\" || name === \"\") {\n return null;\n }\n\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"];\n\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"];\n\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"];\n action.name = \"Training\";\n break;\n\n case \"recruitment\":\n case \"recruit\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n\n case \"diplomacy\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n\n case \"hyperbolic regeneration chamber\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n\n default:\n return null;\n }\n\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player, args) {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n\n const name = args[2];\n\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args) {\n switch (args.length) {\n case 1:\n {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n\n case 2:\n {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillNames[i]];\n let level = 0;\n\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level, 0));\n }\n\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n\n if (mult && mult !== 1) {\n mult = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(mult, 3);\n\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\n\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n case 3:\n {\n const skillName = args[2];\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null || !(skill instanceof _Skill__WEBPACK_IMPORTED_MODULE_11__[/* Skill */ \"a\"])) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n }\n\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const pointCost = skill.calculateCost(currentLevel);\n\n if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\"You do not have enough Skill Points to upgrade this. You need \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(pointCost, 0));\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n default:\n {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args) {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\");\n break;\n }\n }\n\n executeHelpConsoleCommand(args) {\n if (args.length === 1) {\n for (const line of _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"].helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"])) continue;\n const helpText = _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"][args[i]];\n\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args) {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\");\n return;\n } // Enable/Disable\n\n\n if (args.length === 2) {\n const flag = args[1];\n\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\"When your stamina drops to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshLow, 0) + \", you will automatically switch to \" + this.automateActionLow.name + \". When your stamina recovers to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshHigh, 0) + \", you will automatically \" + \"switch to \" + this.automateActionHigh.name + \".\");\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (!(this.automateActionLow instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]) || !(this.automateActionHigh instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n\n return;\n } // Set variables\n\n\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n let highLow = false; // True for high, false for low\n\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][val],\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n\n break;\n\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n\n break;\n\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command) {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n\n while (i < command.length) {\n const c = command.charAt(i);\n\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \" \") {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n\n ++i;\n }\n\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n\n return args;\n }\n\n executeConsoleCommand(player, command) {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n\n case \"stop\":\n this.resetAction();\n break;\n\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName) {\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n\n const rand = Math.random();\n let percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(2, 4); // Migration increases population change\n\n --sourceCity.comms;\n ++destCity.comms;\n }\n\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName, chance) {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n\n if (chance > 1) {\n chance /= 100;\n }\n\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent() {\n const chance = Math.random(); // Choose random source/destination city for events\n\n const sourceCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"]) || !(destCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms; // Change pop\n\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\");\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a large number of Synthoids migrated from \" + sourceCityName + \" to some other city\");\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 20) / 100;\n\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } // 10% chance of nothing happening\n\n }\n /**\n * Process stat gains from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n\n\n gainActionStats(player, action, success) {\n const difficulty = action.getDifficulty();\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n\n const difficultyMult = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n const unweightedGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n player.gainHackingExp(unweightedGain * action.weights.hack * player.hacking_exp_mult * skillMult);\n player.gainStrengthExp(unweightedGain * action.weights.str * player.strength_exp_mult * skillMult);\n player.gainDefenseExp(unweightedGain * action.weights.def * player.defense_exp_mult * skillMult);\n player.gainDexterityExp(unweightedGain * action.weights.dex * player.dexterity_exp_mult * skillMult);\n player.gainAgilityExp(unweightedGain * action.weights.agi * player.agility_exp_mult * skillMult);\n player.gainCharismaExp(unweightedGain * action.weights.cha * player.charisma_exp_mult * skillMult);\n let intExp = unweightedIntGain * action.weights.int * skillMult;\n\n if (intExp > 1) {\n intExp = Math.pow(intExp, 0.8);\n }\n\n player.gainIntelligenceExp(intExp);\n }\n\n getDiplomacyEffectiveness(player) {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player) {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player) {\n const effCharisma = player.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers() {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1\n };\n }\n\n updateSkillMultipliers() {\n this.resetSkillMultipliers();\n\n for (const skillName in this.skills) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n\n const level = this.skills[skillName];\n\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n } // Calculate team losses\n\n\n const teamCount = action.teamCount;\n\n if (teamCount >= 1) {\n let max;\n\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n\n break;\n\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n\n break;\n\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByCount(0.1);\n break;\n\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true\n });\n --city.comms;\n --city.commsEst;\n } else {\n const change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 5));\n break;\n\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-3, -1));\n break;\n\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-5, 5));\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId) {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n return this.contracts[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return this.operations[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Training\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Field Analysis\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Recruitment\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Diplomacy\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n\n default:\n return null;\n }\n }\n\n completeContract(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n\n const city = this.getCurrentCity();\n\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(100, 1e3));\n break;\n\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.02);\n break;\n\n case \"Retirement\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.04);\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router, player) {\n switch (this.action.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const isOperation = this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1); // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Process Contract/Operation success/failure\n\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count; // Earn money for contracts\n\n let moneyGain = 0;\n\n if (!isOperation) {\n moneyGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel);\n }\n\n if (action.rankGain) {\n const gain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, gain);\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain));\n }\n }\n\n isOperation ? this.completeOperation(true) : this.completeContract(true);\n } else {\n this.gainActionStats(player, action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n\n if (action.rankLoss) {\n loss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n this.hpLost += damage;\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n let logLossText = \"\";\n\n if (loss > 0) {\n logLossText += \"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(loss, 3) + \" rank. \";\n }\n\n if (damage > 0) {\n logLossText += \"Took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage.\";\n }\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract failed! \" + logLossText);\n }\n\n isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n\n\n this.startAction(player, this.action); // Repeat action\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n const action = this.getActionObject(this.action);\n\n if (action == null || !(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor; // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Team loss variables\n\n\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n\n if (action.rankGain) {\n rankGain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n\n teamLossMax = Math.ceil(teamCount / 2); // Operation Daedalus\n\n if (action.name === \"Operation Daedalus\") {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n\n if (action.rankLoss) {\n rankLoss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(action.name + \" failed! Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankLoss, 1) + \" rank and took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage\");\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n // Calculate team lossses\n\n if (teamCount >= 1) {\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.blackops) {\n this.log(\"You lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n {\n this.stamina -= 0.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss;\n const strExpGain = 30 * player.strength_exp_mult,\n defExpGain = 30 * player.defense_exp_mult,\n dexExpGain = 30 * player.dexterity_exp_mult,\n agiExpGain = 30 * player.agility_exp_mult,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n player.gainStrengthExp(strExpGain);\n player.gainDefenseExp(defExpGain);\n player.gainDexterityExp(dexExpGain);\n player.gainAgilityExp(agiExpGain);\n this.staminaBonus += staminaGain;\n\n if (this.logging.general) {\n this.log(\"Training completed. Gained: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(strExpGain, 1) + \" str exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(defExpGain, 1) + \" def exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(dexExpGain, 1) + \" dex exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(agiExpGain, 1) + \" agi exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(staminaGain, 3) + \" max stamina\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff = 0.04 * Math.pow(player.hacking_skill, 0.3) + 0.04 * Math.pow(player.intelligence, 0.9) + 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n\n const hackingExpGain = 20 * player.hacking_exp_mult,\n charismaExpGain = 20 * player.charisma_exp_mult;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, 0.1 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n\n if (this.logging.general) {\n this.log(\"Field analysis completed. Gained 0.1 rank, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(hackingExpGain, 1) + \" hacking exp, and \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(charismaExpGain, 1) + \" charisma exp\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const successChance = this.getRecruitmentSuccessChance(player);\n\n if (Math.random() < successChance) {\n const expGain = 2 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n\n if (this.logging.general) {\n this.log(`Diplomacy completed. Chaos levels in the current city fell by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatPercentage(1 - eff)}`);\n }\n\n this.startAction(player, this.action); // Repeat Action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n {\n player.regenerateHp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain);\n const staminaGain = this.maxStamina * (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n\n if (this.logging.general) {\n this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain} HP and gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatStamina(staminaGain)} stamina`);\n }\n\n break;\n }\n\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player, change) {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n\n this.rank += change;\n\n if (this.rank < 0) {\n this.rank = 0;\n }\n\n this.maxRank = Math.max(this.rank, this.maxRank);\n const bladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* factionExists */ \"b\"])(bladeburnersFactionName)) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][bladeburnersFactionName];\n\n if (!(bladeburnerFac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__[/* Faction */ \"a\"])) {\n throw new Error(\"Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button\");\n }\n\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation += _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n } // Gain skill points\n\n\n const rankNeededForSp = (this.totalSkillPoints + 1) * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint;\n\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor((this.maxRank - rankNeededForSp) / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint + 1);\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router, player, seconds) {\n if (this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) return;\n\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n\n if (!(this.action instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n } // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n\n\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n return this.completeAction(router, player);\n }\n }\n\n calculateStaminaGainPerSecond(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].MaxStaminaToGainFactor;\n const gain = (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus) * this.skillMultipliers.stamina * player.bladeburner_max_stamina_mult;\n\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = this.maxStamina * this.stamina / oldMax;\n }\n\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create() {\n this.contracts[\"Tracking\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Tracking\",\n desc: \"Identify and locate Synthoids. This contract involves reconnaissance \" + \"and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.<br><br>\" + \"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for \" + \"whatever city you are currently in.\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1\n },\n isStealth: true\n });\n this.contracts[\"Bounty Hunter\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Bounty Hunter\",\n desc: \"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.<br><br>\" + \"Successfully completing a Bounty Hunter contract will lower the population in your \" + \"current city, and will also increase its chaos level.\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.contracts[\"Retirement\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Retirement\",\n desc: \"Hunt down and retire (kill) rogue Synthoids.<br><br>\" + \"Successfully completing a Retirement contract will lower the population in your current \" + \"city, and will also increase its chaos level.\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Investigation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Investigation\",\n desc: \"As a field agent, investigate and identify Synthoid \" + \"populations, movements, and operations.<br><br>Successful \" + \"Investigation ops will increase the accuracy of your \" + \"synthoid data.<br><br>\" + \"You will NOT lose HP from failed Investigation ops.\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Undercover Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Undercover Operation\",\n desc: \"Conduct undercover operations to identify hidden \" + \"and underground Synthoid communities and organizations.<br><br>\" + \"Successful Undercover ops will increase the accuracy of your synthoid \" + \"data.\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Sting Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Sting Operation\",\n desc: \"Conduct a sting operation to bait and capture particularly \" + \"notorious Synthoid criminals.\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Raid\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Raid\",\n desc: \"Lead an assault on a known Synthoid community. Note that \" + \"there must be an existing Synthoid community in your current city \" + \"in order for this Operation to be successful.\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Stealth Retirement Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Stealth Retirement Operation\",\n desc: \"Lead a covert operation to retire Synthoids. The \" + \"objective is to complete the task without \" + \"drawing any attention. Stealth and discretion are key.\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isStealth: true,\n isKill: true\n });\n this.operations[\"Assassination\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Assassination\",\n desc: \"Assassinate Synthoids that have been identified as \" + \"important, high-profile social and political leaders \" + \"in the Synthoid communities.\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8\n },\n isStealth: true,\n isKill: true\n });\n }\n\n process(router, player) {\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (_RedPill__WEBPACK_IMPORTED_MODULE_23__[/* redPillFlag */ \"b\"] === false && this.blackops.hasOwnProperty(\"Operation Daedalus\")) {\n return router.toBitVerse(false, false);\n } // If the Player starts doing some other actions, set action to idle and alert\n\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__[/* AugmentationNames */ \"a\"].BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n\n if (this.automateEnabled) {\n msg += `<br><br>Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_25__[/* Settings */ \"a\"].SuppressBladeburnerPopup) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(msg);\n }\n }\n\n this.resetAction();\n } // If the Player has no Stamina, set action to idle\n\n\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n } // A 'tick' for this mechanic is one second (= 5 game cycles)\n\n\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n\n this.storedCycles -= seconds * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond; // Stamina\n\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina); // Count increase for contracts/operations\n\n for (const contract of Object.values(this.contracts)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n\n for (const op of Object.values(this.operations)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n\n if (growthF !== undefined) {\n op.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n } // Chaos goes down very slowly\n\n\n for (const cityName of _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames) {\n const city = this.cities[cityName];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n } // Random Events\n\n\n this.randomEventCounter -= seconds;\n\n if (this.randomEventCounter <= 0) {\n this.randomEvent(); // Add instead of setting because we might have gone over the required time for the event\n\n this.randomEventCounter += Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600);\n }\n\n this.processAction(router, player, seconds); // Automation\n\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId) {\n const res = {\n type: \"\",\n name: \"\"\n };\n const types = Object.keys(_data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"]);\n\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][types[i]]) {\n res.type = types[i];\n break;\n }\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn() {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn() {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn() {\n return Object.keys(_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]);\n }\n\n getGeneralActionNamesNetscriptFn() {\n return Object.keys(_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"]);\n }\n\n getSkillNamesNetscriptFn() {\n return Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n }\n\n startActionNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n } // Special logic for Black Ops\n\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]) {\n // Can't start a BlackOp if you don't have the required rank\n const action = this.getActionObject(actionId);\n if (action == null) throw new Error(`Action not found ${actionId.type}, ${actionId.name}`);\n if (!(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) throw new Error(`Action should be BlackOperation but isn't`); //const blackOp = (action as BlackOperation);\n\n if (action.reqdRank > this.rank) {\n workerScript.log(\"bladeburner.startAction\", `Insufficient rank to start Black Op '${actionId.name}'.`);\n return false;\n } // Can't start a BlackOp if its already been done\n\n\n if (this.blackops[actionId.name] != null) {\n workerScript.log(\"bladeburner.startAction\", `Black Op ${actionId.name} has already been completed.`);\n return false;\n } // Can't start a BlackOp if you haven't done the one before it\n\n\n const blackops = [];\n\n for (const nm in _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n\n blackops.sort(function (a, b) {\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][a].reqdRank - _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][b].reqdRank; // Sort black ops in intended order\n });\n const i = blackops.indexOf(actionId.name);\n\n if (i === -1) {\n workerScript.log(\"bladeburner.startAction\", `Invalid Black Op: '${name}'`);\n return false;\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n workerScript.log(\"bladeburner.startAction\", `Preceding Black Op must be completed before starting '${actionId.name}'.`);\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\"bladeburner.startAction\", `Starting bladeburner action with type '${type}' and name ${name}\"`);\n return true;\n } catch (e) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getActionTime(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n return 30;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return this.getRecruitmentTime(player);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return 60;\n\n default:\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return [1, 1];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return Math.floor(actionObj.count);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return Infinity;\n\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0);\n } else {\n return skill.calculateCost(this.skills[skillName]);\n }\n }\n\n upgradeSkillNetscriptFn(skillName, workerScript) {\n const errorLogText = `Invalid skill: '${skillName}'`;\n\n if (!_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", errorLogText);\n return false;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const cost = skill.calculateCost(currentLevel);\n\n if (skill.maxLvl && currentLevel >= skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", `Skill '${skillName}' is already maxed.`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\"bladeburner.upgradeSkill\", `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`);\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill);\n workerScript.log(\"bladeburner.upgradeSkill\", `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type, name, workerScript) {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type, name, size, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n workerScript.log(\"bladeburner.setTeamSize\", \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", `Invalid size: ${size}`);\n return -1;\n }\n\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", \"Joined Bladeburners faction.\");\n return true;\n } else {\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", `You do not have the required rank (${this.rank}/${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction}).`);\n return false;\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Bladeburner\", this);\n }\n /**\n * Initiatizes a Bladeburner object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Bladeburner, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Bladeburner = Bladeburner;\n\n//# sourceURL=webpack:///./src/Bladeburner/Bladeburner.ts?");
|
||
|
||
/***/ }),
|
||
/* 172 */
|
||
/*!********************************!*\
|
||
!*** ./src/Company/Company.ts ***!
|
||
\********************************/
|
||
/*! exports provided: Company */
|
||
/*! exports used: Company */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Company; });\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CompanyPosition */ 276);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\nconst DefaultConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n};\nclass Company {\n /**\n * Company name\n */\n\n /**\n * Description and general information about company\n */\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n\n /**\n * Company-specific multiplier for earnings\n */\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n\n /**\n * Properties to track the player's progress in this company\n */\n constructor(p = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.rolloverRep = 0;\n }\n\n hasPosition(pos) {\n if (pos instanceof _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__[/* CompanyPosition */ \"a\"]) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"][0]] != null;\n }\n\n hasBusinessConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"][0]] != null;\n }\n\n hasBusinessPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"][0]] != null;\n }\n\n hasEmployeePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][1]] != null;\n }\n\n hasITPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"][0]] != null;\n }\n\n hasSecurityPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"][2]] != null;\n }\n\n hasSoftwareConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]] != null;\n }\n\n hasSoftwarePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"][0]] != null;\n }\n\n hasWaiterPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][0]] != null;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length != 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n }\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n let favorGain = 0,\n rep = this.playerReputation + this.rolloverRep;\n let reqdRep = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorBase * Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorMult, this.favor);\n\n while (rep > 0) {\n if (rep >= reqdRep) {\n ++favorGain;\n rep -= reqdRep;\n } else {\n break;\n }\n\n reqdRep *= _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].FactionReputationToFavorMult;\n }\n\n return [favorGain, rep];\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Company\", this);\n }\n /**\n * Initiatizes a Company from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Company, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Company = Company;\n\n//# sourceURL=webpack:///./src/Company/Company.ts?");
|
||
|
||
/***/ }),
|
||
/* 173 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Server/ServerPurchases.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam, purchaseServer, purchaseRamForHomeComputer */
|
||
/*! exports used: getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam, purchaseRamForHomeComputer, purchaseServer */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getPurchaseServerCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getPurchaseServerLimit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getPurchaseServerMaxRam; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return purchaseServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return purchaseRamForHomeComputer; });\n/* harmony import */ var _AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AllServers */ 29);\n/* harmony import */ var _ServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ServerHelpers */ 36);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_isPowerOfTwo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/isPowerOfTwo */ 704);\n/**\n * Implements functions for purchasing servers or purchasing more RAM for\n * the home computer\n */\n\n\n\n\n\n // Returns the cost of purchasing a server with the given RAM\n// Returns Infinity for invalid 'ram' arguments\n\n/**\n * @param ram Amount of RAM on purchased server (GB)\n * @returns Cost of purchasing the given server. Returns infinity for invalid arguments\n */\n\nfunction getPurchaseServerCost(ram) {\n const sanitizedRam = Math.round(ram);\n\n if (isNaN(sanitizedRam) || !Object(_utils_helpers_isPowerOfTwo__WEBPACK_IMPORTED_MODULE_5__[/* isPowerOfTwo */ \"a\"])(sanitizedRam)) {\n return Infinity;\n }\n\n if (sanitizedRam > getPurchaseServerMaxRam()) {\n return Infinity;\n }\n\n return sanitizedRam * _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].BaseCostFor1GBOfRamServer * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].PurchasedServerCost;\n}\nfunction getPurchaseServerLimit() {\n return Math.round(_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].PurchasedServerLimit * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].PurchasedServerLimit);\n}\nfunction getPurchaseServerMaxRam() {\n const ram = Math.round(_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].PurchasedServerMaxRam * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].PurchasedServerMaxRam); // Round this to the nearest power of 2\n\n return 1 << 31 - Math.clz32(ram);\n} // Manually purchase a server (NOT through Netscript)\n\nfunction purchaseServer(hostname, ram, cost, p) {\n //Check if player has enough money\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough money to purchase this server!\", false);\n return;\n } //Maximum server limit\n\n\n if (p.purchasedServers.length >= getPurchaseServerLimit()) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You have reached the maximum limit of \" + getPurchaseServerLimit() + \" servers. \" + \"You cannot purchase any more. You can \" + \"delete some of your purchased servers using the deleteServer() Netscript function in a script\");\n return;\n }\n\n if (hostname == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You must enter a hostname for your new server!\");\n return;\n } // Create server\n\n\n const newServ = Object(_ServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* safetlyCreateUniqueServer */ \"h\"])({\n adminRights: true,\n hostname: hostname,\n ip: Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* createUniqueRandomIp */ \"c\"])(),\n isConnectedTo: false,\n maxRam: ram,\n organizationName: \"\",\n purchasedByPlayer: true\n });\n Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AddToAllServers */ \"a\"])(newServ); // Add to Player's purchasedServers array\n\n p.purchasedServers.push(newServ.ip); // Connect new server to home computer\n\n const homeComputer = p.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.ip);\n newServ.serversOnNetwork.push(homeComputer.ip);\n p.loseMoney(cost);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"Server successfully purchased with hostname \" + hostname);\n} // Manually upgrade RAM on home computer (NOT through Netscript)\n\nfunction purchaseRamForHomeComputer(p) {\n const cost = p.getUpgradeHomeRamCost();\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You do not have enough money to purchase additional RAM for your home computer\");\n return;\n }\n\n const homeComputer = p.getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(`You cannot upgrade your home computer RAM because it is at its maximum possible value`);\n return;\n }\n\n homeComputer.maxRam *= 2;\n p.loseMoney(cost);\n}\n\n//# sourceURL=webpack:///./src/Server/ServerPurchases.ts?");
|
||
|
||
/***/ }),
|
||
/* 174 */,
|
||
/* 175 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Corporation/Warehouse.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: Warehouse */
|
||
/*! exports used: Warehouse */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Warehouse; });\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Material */ 131);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass Warehouse {\n // Text that describes how the space in this Warehouse is being used\n // Used to create a tooltip in the UI\n // Warehouse's level, which affects its maximum size\n // Amount of space currently used by warehouse\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n // Stores the amount of product to be produced. Used for Smart Supply unlock.\n // The production tracked by smart supply is always based on the previous cycle,\n // so it will always trail the \"true\" production by 1 cycle\n constructor(params = {}) {\n var _params$corp;\n\n _defineProperty(this, \"breakdown\", \"\");\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"sizeUsed\", 0);\n\n _defineProperty(this, \"smartSupplyEnabled\", false);\n\n _defineProperty(this, \"smartSupplyUseLeftovers\", {});\n\n _defineProperty(this, \"smartSupplyStore\", 0);\n\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n this.materials = {\n Water: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Water\"\n }),\n Energy: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Energy\"\n }),\n Food: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Food\"\n }),\n Plants: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Plants\"\n }),\n Metal: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Metal\"\n }),\n Hardware: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Hardware\"\n }),\n Chemicals: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Chemicals\"\n }),\n Drugs: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Drugs\"\n }),\n Robots: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Robots\"\n }),\n AICores: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"AI Cores\"\n }),\n RealEstate: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Real Estate\"\n })\n };\n this.smartSupplyUseLeftovers = {\n Water: true,\n Energy: true,\n Food: true,\n Plants: true,\n Metal: true,\n Hardware: true,\n Chemicals: true,\n Drugs: true,\n Robots: true,\n AICores: true,\n RealEstate: true\n };\n\n if (params.corp && params.industry) {\n this.updateSize(params.corp, params.industry);\n } // Default smart supply to being enabled if the upgrade is unlocked\n\n\n if ((_params$corp = params.corp) !== null && _params$corp !== void 0 && _params$corp.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n } // Re-calculate how much space is being used by this Warehouse\n\n\n updateMaterialSizeUsed() {\n this.sizeUsed = 0;\n this.breakdown = \"\";\n\n for (const matName in this.materials) {\n const mat = this.materials[matName];\n\n if (_MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"].hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName];\n\n if (mat.qty > 0) {\n this.breakdown += matName + \": \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(mat.qty * _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName], \"0,0.0\") + \"<br>\";\n }\n }\n }\n\n if (this.sizeUsed > this.size) {\n console.warn(\"Warehouse size used greater than capacity, something went wrong\");\n }\n }\n\n updateSize(corporation, industry) {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n }\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Warehouse\", this);\n } // Initiatizes a Warehouse object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Warehouse, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Warehouse = Warehouse;\n\n//# sourceURL=webpack:///./src/Corporation/Warehouse.ts?");
|
||
|
||
/***/ }),
|
||
/* 176 */,
|
||
/* 177 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Gang/GangMemberTasks.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: GangMemberTasks */
|
||
/*! exports used: GangMemberTasks */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberTasks; });\n/* harmony import */ var _data_tasks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/tasks */ 701);\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTask */ 441);\n\n\nconst GangMemberTasks = {};\n\n(function () {\n _data_tasks__WEBPACK_IMPORTED_MODULE_0__[/* gangMemberTasksMetadata */ \"a\"].forEach(e => {\n GangMemberTasks[e.name] = new _GangMemberTask__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTask */ \"a\"](e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n\n//# sourceURL=webpack:///./src/Gang/GangMemberTasks.ts?");
|
||
|
||
/***/ }),
|
||
/* 178 */,
|
||
/* 179 */,
|
||
/* 180 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Hacknet/formulas/HacknetServers.ts ***!
|
||
\************************************************/
|
||
/*! exports provided: calculateHashGainRate, calculateLevelUpgradeCost, calculateRamUpgradeCost, calculateCoreUpgradeCost, calculateCacheUpgradeCost, calculateServerCost */
|
||
/*! exports used: calculateCacheUpgradeCost, calculateCoreUpgradeCost, calculateHashGainRate, calculateLevelUpgradeCost, calculateRamUpgradeCost, calculateServerCost */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return calculateHashGainRate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return calculateLevelUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return calculateRamUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateCoreUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateCacheUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return calculateServerCost; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n\n\nfunction calculateHashGainRate(level, ramUsed, maxRam, cores, mult) {\n const baseGain = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].HashesPerLevel * level;\n const ramMultiplier = Math.pow(1.07, Math.log2(maxRam));\n const coreMultiplier = 1 + (cores - 1) / 5;\n const ramRatio = 1 - ramUsed / maxRam;\n return baseGain * ramMultiplier * coreMultiplier * ramRatio * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney;\n}\nfunction calculateLevelUpgradeCost(startingLevel, extraLevels = 1, costMult = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel) {\n return Infinity;\n }\n\n const mult = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return 10 * _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].BaseCost * totalMultiplier * costMult;\n}\nfunction calculateRamUpgradeCost(startingRam, extraLevels = 1, costMult = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].RamBaseCost;\n const mult = Math.pow(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].UpgradeRamMult, numUpgrades);\n totalCost += baseCost * mult;\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n return totalCost;\n}\nfunction calculateCoreUpgradeCost(startingCores, extraLevels = 1, costMult = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores) {\n return Infinity;\n }\n\n const mult = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCores;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].CoreBaseCost;\n totalCost *= costMult;\n return totalCost;\n}\nfunction calculateCacheUpgradeCost(startingCache, extraLevels = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCache >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n return Infinity;\n }\n\n const mult = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].UpgradeCacheMult;\n let totalCost = 0;\n let currentCache = startingCache;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCache - 1);\n ++currentCache;\n }\n\n totalCost *= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].CacheBaseCost;\n return totalCost;\n}\nfunction calculateServerCost(n, mult = 1) {\n if (n - 1 >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxServers) {\n return Infinity;\n }\n\n return _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].BaseCost * Math.pow(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].PurchaseMult, n - 1) * mult;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/formulas/HacknetServers.ts?");
|
||
|
||
/***/ }),
|
||
/* 181 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Bladeburner/Skill.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: Skill */
|
||
/*! exports used: Skill */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Skill; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass Skill {\n // Cost is in Skill Points\n // Additive cost increase per level\n\n /**\n * These benefits are additive. So total multiplier will be level (handled externally) times the\n * effects below\n */\n\n /**\n * This multiplier affects everything that increases synthoid population/community estimate\n * e.g. Field analysis, Investigation Op, Undercover Op\n */\n constructor(params = {\n name: \"foo\",\n desc: \"foo\"\n }) {\n _defineProperty(this, \"baseCost\", 1);\n\n _defineProperty(this, \"costInc\", 1);\n\n _defineProperty(this, \"maxLvl\", 0);\n\n _defineProperty(this, \"successChanceAll\", 0);\n\n _defineProperty(this, \"successChanceStealth\", 0);\n\n _defineProperty(this, \"successChanceKill\", 0);\n\n _defineProperty(this, \"successChanceContract\", 0);\n\n _defineProperty(this, \"successChanceOperation\", 0);\n\n _defineProperty(this, \"successChanceEstimate\", 0);\n\n _defineProperty(this, \"actionTime\", 0);\n\n _defineProperty(this, \"effHack\", 0);\n\n _defineProperty(this, \"effStr\", 0);\n\n _defineProperty(this, \"effDef\", 0);\n\n _defineProperty(this, \"effDex\", 0);\n\n _defineProperty(this, \"effAgi\", 0);\n\n _defineProperty(this, \"effCha\", 0);\n\n _defineProperty(this, \"stamina\", 0);\n\n _defineProperty(this, \"money\", 0);\n\n _defineProperty(this, \"expGain\", 0);\n\n if (!params.name) {\n throw new Error(\"Failed to initialize Bladeburner Skill. No name was specified in ctor\");\n }\n\n if (!params.desc) {\n throw new Error(\"Failed to initialize Bladeburner Skills. No desc was specified in ctor\");\n }\n\n this.name = params.name;\n this.desc = params.desc;\n this.baseCost = params.baseCost ? params.baseCost : 1;\n this.costInc = params.costInc ? params.costInc : 1;\n\n if (params.maxLvl) {\n this.maxLvl = params.maxLvl;\n }\n\n if (params.successChanceAll) {\n this.successChanceAll = params.successChanceAll;\n }\n\n if (params.successChanceStealth) {\n this.successChanceStealth = params.successChanceStealth;\n }\n\n if (params.successChanceKill) {\n this.successChanceKill = params.successChanceKill;\n }\n\n if (params.successChanceContract) {\n this.successChanceContract = params.successChanceContract;\n }\n\n if (params.successChanceOperation) {\n this.successChanceOperation = params.successChanceOperation;\n }\n\n if (params.successChanceEstimate) {\n this.successChanceEstimate = params.successChanceEstimate;\n }\n\n if (params.actionTime) {\n this.actionTime = params.actionTime;\n }\n\n if (params.effHack) {\n this.effHack = params.effHack;\n }\n\n if (params.effStr) {\n this.effStr = params.effStr;\n }\n\n if (params.effDef) {\n this.effDef = params.effDef;\n }\n\n if (params.effDex) {\n this.effDex = params.effDex;\n }\n\n if (params.effAgi) {\n this.effAgi = params.effAgi;\n }\n\n if (params.effCha) {\n this.effCha = params.effCha;\n }\n\n if (params.stamina) {\n this.stamina = params.stamina;\n }\n\n if (params.money) {\n this.money = params.money;\n }\n\n if (params.expGain) {\n this.expGain = params.expGain;\n }\n }\n\n calculateCost(currentLevel) {\n return Math.floor((this.baseCost + currentLevel * this.costInc) * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].BladeburnerSkillCost);\n }\n\n getMultiplier(name) {\n if (name === \"successChanceAll\") return this.successChanceAll;\n if (name === \"successChanceStealth\") return this.successChanceStealth;\n if (name === \"successChanceKill\") return this.successChanceKill;\n if (name === \"successChanceContract\") return this.successChanceContract;\n if (name === \"successChanceOperation\") return this.successChanceOperation;\n if (name === \"successChanceEstimate\") return this.successChanceEstimate;\n if (name === \"actionTime\") return this.actionTime;\n if (name === \"effHack\") return this.effHack;\n if (name === \"effStr\") return this.effStr;\n if (name === \"effDef\") return this.effDef;\n if (name === \"effDex\") return this.effDex;\n if (name === \"effAgi\") return this.effAgi;\n if (name === \"effCha\") return this.effCha;\n if (name === \"stamina\") return this.stamina;\n if (name === \"money\") return this.money;\n if (name === \"expGain\") return this.expGain;\n return 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/Skill.ts?");
|
||
|
||
/***/ }),
|
||
/* 182 */,
|
||
/* 183 */,
|
||
/* 184 */,
|
||
/* 185 */
|
||
/*!*********************************!*\
|
||
!*** ./src/ui/React/Hashes.tsx ***!
|
||
\*********************************/
|
||
/*! exports provided: Hashes */
|
||
/*! exports used: Hashes */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Hashes; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction Hashes(hashes) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"money-gold samefont\"\n }, typeof hashes === \"number\" ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatHashes(hashes) : hashes);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Hashes.tsx?");
|
||
|
||
/***/ }),
|
||
/* 186 */
|
||
/*!*************************************!*\
|
||
!*** ./src/ui/React/StatsTable.tsx ***!
|
||
\*************************************/
|
||
/*! exports provided: StatsTable */
|
||
/*! exports used: StatsTable */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StatsTable; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction StatsTable(rows, title) {\n let titleElem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n\n if (title) {\n titleElem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"u\", null, title)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, titleElem, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, rows.map(row => {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", {\n key: row[0]\n }, row.map((elem, i) => {\n let style = {};\n if (i !== 0) style = {\n textAlign: \"right\",\n paddingLeft: \".25em\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n key: i,\n style: style\n }, elem);\n }));\n }))));\n}\n\n//# sourceURL=webpack:///./src/ui/React/StatsTable.tsx?");
|
||
|
||
/***/ }),
|
||
/* 187 */
|
||
/*!************************************!*\
|
||
!*** ./utils/helpers/addOffset.ts ***!
|
||
\************************************/
|
||
/*! exports provided: addOffset */
|
||
/*! exports used: addOffset */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return addOffset; });\n/**\n * Adds a random offset to a number within a certain percentage\n * @example\n * // Returns between 95-105\n * addOffset(100, 5);\n * @example\n * // Returns between 63-77\n * addOffSet(70, 10);\n * @param midpoint The number to be the midpoint of the offset range\n * @param percentage The percentage (in a range of 0-100) to offset\n */\nfunction addOffset(midpoint, percentage) {\n const maxPercent = 100;\n\n if (percentage < 0 || percentage > maxPercent) {\n return midpoint;\n }\n\n const offset = midpoint * (percentage / maxPercent); // Double the range to account for both sides of the midpoint.\n // tslint:disable-next-line:no-magic-numbers\n\n return midpoint + (Math.random() * (offset * 2) - offset);\n}\n\n//# sourceURL=webpack:///./utils/helpers/addOffset.ts?");
|
||
|
||
/***/ }),
|
||
/* 188 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/PersonObjects/formulas/reputation.ts ***!
|
||
\**************************************************/
|
||
/*! exports provided: getHackingWorkRepGain, getFactionSecurityWorkRepGain, getFactionFieldWorkRepGain */
|
||
/*! exports used: getFactionFieldWorkRepGain, getFactionSecurityWorkRepGain, getHackingWorkRepGain */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getHackingWorkRepGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getFactionSecurityWorkRepGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getFactionFieldWorkRepGain; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\n\nfunction mult(f) {\n let favorMult = 1 + f.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n return favorMult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain;\n}\n\nfunction getHackingWorkRepGain(p, f) {\n return (p.hacking_skill + p.intelligence / 3) / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel * p.faction_rep_mult * p.getIntelligenceBonus(1) * mult(f);\n}\nfunction getFactionSecurityWorkRepGain(p, f) {\n const t = 0.9 * (p.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.strength / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.defense / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.agility / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.intelligence / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 4.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\nfunction getFactionFieldWorkRepGain(p, f) {\n const t = 0.9 * (p.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.strength / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.defense / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.agility / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.charisma / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel + p.intelligence / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 5.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/formulas/reputation.ts?");
|
||
|
||
/***/ }),
|
||
/* 189 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Bladeburner/Skills.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: Skills */
|
||
/*! exports used: Skills */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Skills; });\n/* harmony import */ var _Skill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Skill */ 181);\n/* harmony import */ var _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/SkillNames */ 100);\n\n\nconst Skills = {};\n\n(function () {\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].BladesIntuition] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].BladesIntuition,\n desc: \"Each level of this skill increases your success chance \" + \"for all Contracts, Operations, and BlackOps by 3%\",\n baseCost: 3,\n costInc: 2.1,\n successChanceAll: 3\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Cloak] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Cloak,\n desc: \"Each level of this skill increases your \" + \"success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%\",\n baseCost: 2,\n costInc: 1.1,\n successChanceStealth: 5.5\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].ShortCircuit] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].ShortCircuit,\n desc: \"Each level of this skill increases your success chance \" + \"in Contracts, Operations, and BlackOps that involve retirement by 5.5%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceKill: 5.5\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].DigitalObserver] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].DigitalObserver,\n desc: \"Each level of this skill increases your success chance in \" + \"all Operations and BlackOps by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceOperation: 4\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Tracer] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Tracer,\n desc: \"Each level of this skill increases your success chance in \" + \"all Contracts by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceContract: 4\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Overclock] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Overclock,\n desc: \"Each level of this skill decreases the time it takes \" + \"to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)\",\n baseCost: 3,\n costInc: 1.4,\n maxLvl: 90,\n actionTime: 1\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Reaper] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Reaper,\n desc: \"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%\",\n baseCost: 2,\n costInc: 2.1,\n effStr: 2,\n effDef: 2,\n effDex: 2,\n effAgi: 2\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].EvasiveSystem] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].EvasiveSystem,\n desc: \"Each level of this skill increases your effective \" + \"dexterity and agility for Bladeburner actions by 4%\",\n baseCost: 2,\n costInc: 2.1,\n effDex: 4,\n effAgi: 4\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Datamancer] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Datamancer,\n desc: \"Each level of this skill increases your effectiveness in \" + \"synthoid population analysis and investigation by 5%. \" + \"This affects all actions that can potentially increase \" + \"the accuracy of your synthoid population/community estimates.\",\n baseCost: 3,\n costInc: 1,\n successChanceEstimate: 5\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].CybersEdge] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].CybersEdge,\n desc: \"Each level of this skill increases your max stamina by 2%\",\n baseCost: 1,\n costInc: 3,\n stamina: 2\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].HandsOfMidas] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].HandsOfMidas,\n desc: \"Each level of this skill increases the amount of money you receive from Contracts by 10%\",\n baseCost: 2,\n costInc: 2.5,\n money: 10\n });\n Skills[_data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Hyperdrive] = new _Skill__WEBPACK_IMPORTED_MODULE_0__[/* Skill */ \"a\"]({\n name: _data_SkillNames__WEBPACK_IMPORTED_MODULE_1__[/* SkillNames */ \"a\"].Hyperdrive,\n desc: \"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%\",\n baseCost: 1,\n costInc: 2.5,\n expGain: 10\n });\n})();\n\n//# sourceURL=webpack:///./src/Bladeburner/Skills.ts?");
|
||
|
||
/***/ }),
|
||
/* 190 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Casino/CardDeck/Card.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Suit, Card */
|
||
/*! exports used: Card, Suit */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Suit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Card; });\n// Enum values are lowercased to match css classes\nlet Suit;\n\n(function (Suit) {\n Suit[\"Clubs\"] = \"clubs\";\n Suit[\"Diamonds\"] = \"diamonds\";\n Suit[\"Hearts\"] = \"hearts\";\n Suit[\"Spades\"] = \"spades\";\n})(Suit || (Suit = {}));\n\nclass Card {\n constructor(value, suit) {\n this.value = value;\n this.suit = suit;\n\n if (value < 1 || value > 13) {\n throw new Error(`Card instantiated with improper value: ${value}`);\n }\n }\n\n formatValue() {\n switch (this.value) {\n case 1:\n return \"A\";\n\n case 11:\n return \"J\";\n\n case 12:\n return \"Q\";\n\n case 13:\n return \"K\";\n\n default:\n return `${this.value}`;\n }\n }\n\n isRedSuit() {\n return this.suit === Suit.Hearts || this.suit === Suit.Diamonds;\n }\n\n getStringRepresentation() {\n const value = this.formatValue();\n return `${value} of ${this.suit}`;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Card.ts?");
|
||
|
||
/***/ }),
|
||
/* 191 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Bladeburner/ActionIdentifier.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: ActionIdentifier */
|
||
/*! exports used: ActionIdentifier */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ActionIdentifier; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass ActionIdentifier {\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"type\", -1);\n\n if (params.name) this.name = params.name;\n if (params.type) this.type = params.type;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"ActionIdentifier\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(ActionIdentifier, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.ActionIdentifier = ActionIdentifier;\n\n//# sourceURL=webpack:///./src/Bladeburner/ActionIdentifier.ts?");
|
||
|
||
/***/ }),
|
||
/* 192 */,
|
||
/* 193 */,
|
||
/* 194 */
|
||
/*!************************************!*\
|
||
!*** ./src/Locations/Locations.ts ***!
|
||
\************************************/
|
||
/*! exports provided: Locations */
|
||
/*! exports used: Locations */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Locations; });\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./City */ 323);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cities */ 105);\n/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Location */ 528);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/CityNames */ 21);\n/* harmony import */ var _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/LocationsMetadata */ 712);\n/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\n\n\n\n\n\nconst Locations = {};\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\n\nfunction constructLocation(p) {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"]) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"](p);\n return Locations[p.name];\n} // First construct all cities\n\n\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum].asciiArt = `\n [aevum police headquarters] 26 \n o \n I \\\\ [bachman & associates] \n \\\\ 56 B \n x \\\\ [summit university] \n \\\\ \\\\ 28 \n \\\\ [snap fitness gym] x o--L-----------N \n K \\\\ / \n \\\\ \\\\ Q [casino] \n x 58 \\\\ / [travel agency] \n \\\\ 94 95 o \n 90 x 59 o------o | \n \\\\ / \\\\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\\\ | \\\\ / \n [hospital] \\\\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\\\ [rho construction] \n H [netlink tech.] | J \n | | \\\\ \n | 34 x \\\\ \n [clarke inc.] C | \\\\ [world stock exchange] \n | | \\\\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing].asciiArt = `\n | \n 75 o \n \\\\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\\\ o 78 [kuaigong international] \n \\\\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima].asciiArt = `\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\\\ x 57 \n / / | \\\\ | \n / / | \\\\ | \n o 22 o | \\\\| 29/56 \n | | o \n | [hospital] D / \\\\ 3 2 1 \n o | / \\\\ o-------x------o \n / o / \\\\ / \n 48 o / 55 x \\\\ / \n \\\\ / / x \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ \n / \\\\ / \\\\ \n / \\\\ [travel agency] F o 31 \n / \\\\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n \\\\ [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\\\ 24 25 26 27 \n \\\\ \n [noodle bar] x 14 \n \\\\ \n \\\\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12].asciiArt = `\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\\\ | \\\\ / \n | \\\\ | [iron gym] x 95 \n (79) x \\\\ | / \\\\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\\\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\\\ / \n | C [cia] \\\\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\\\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\\\ \n | o------------o 34 / \\\\ \n (29) | / [carmichael sec.] D \\\\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven].asciiArt = `\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\\\ / \\\\ \n \\\\ o 65 o 69 \n [syscore sec.] H | | \n \\\\ | | [millenium fitness gym] \n \\\\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K `; // Then construct all locations, and add them to the cities as we go.\n\nfor (const metadata of _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__[/* LocationsMetadata */ \"a\"]) {\n const loc = constructLocation(metadata);\n const cityName = loc.city;\n\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city in _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"]) {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][city].addLocation(loc.name);\n }\n } else {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][cityName].addLocation(loc.name);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/Locations.ts?");
|
||
|
||
/***/ }),
|
||
/* 195 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Infiltration/utils.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: random, getArrow */
|
||
/*! exports used: getArrow, random */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getArrow; });\nfunction random(min, max) {\n return Math.random() * (max - min) + min;\n}\nfunction getArrow(event) {\n switch (event.keyCode) {\n case 38:\n case 87:\n return \"↑\";\n\n case 65:\n case 37:\n return \"←\";\n\n case 40:\n case 83:\n return \"↓\";\n\n case 39:\n case 68:\n return \"→\";\n }\n\n return \"\";\n}\n\n//# sourceURL=webpack:///./src/Infiltration/utils.ts?");
|
||
|
||
/***/ }),
|
||
/* 196 */,
|
||
/* 197 */
|
||
/*!*************************!*\
|
||
!*** ./src/TextFile.ts ***!
|
||
\*************************/
|
||
/*! exports provided: TextFile, getTextFile, createTextFile */
|
||
/*! exports used: TextFile, createTextFile, getTextFile */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TextFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getTextFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createTextFile; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n\n\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\n\nclass TextFile {\n /**\n * The full file name.\n */\n\n /**\n * The content of the file.\n */\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n /**\n * Concatenates the raw values to the end of current content.\n */\n\n\n append(txt) {\n this.text += txt;\n }\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n\n\n download() {\n const filename = this.fn;\n const file = new Blob([this.text], {\n type: \"text/plain\"\n });\n /* tslint:disable-next-line:strict-boolean-expressions */\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\");\n const url = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n /**\n * Retrieve the content of the file.\n */\n\n\n read() {\n return this.text;\n }\n /**\n * Shows the content to the user via the game's dialog box.\n */\n\n\n show() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`${this.fn}<br /><br />${this.text}`, true);\n }\n /**\n * Serialize the current file to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"TextFile\", this);\n }\n /**\n * Replaces the current content with the text provided.\n */\n\n\n write(txt) {\n this.text = txt;\n }\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(TextFile, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.TextFile = TextFile;\n/**\n * Retrieve the file object for the filename on the specified server.\n * @param fn The file name to look for\n * @param server The server object to look in\n * @returns The file object, or null if it couldn't find it.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction getTextFile(fn, server) {\n const filename = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n for (const file of server.textFiles) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\n/**\n * Creates a TextFile on the target server.\n * @param fn The file name to create.\n * @param txt The contents of the file.\n * @param server The server that the file should be created on.\n * @returns The instance of the file.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction createTextFile(fn, txt, server) {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n return undefined;\n }\n\n const file = new TextFile(fn, txt);\n server.textFiles.push(file);\n return file;\n}\n\n//# sourceURL=webpack:///./src/TextFile.ts?");
|
||
|
||
/***/ }),
|
||
/* 198 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Hacknet/formulas/HacknetNodes.ts ***!
|
||
\**********************************************/
|
||
/*! exports provided: calculateMoneyGainRate, calculateLevelUpgradeCost, calculateRamUpgradeCost, calculateCoreUpgradeCost, calculateNodeCost */
|
||
/*! exports used: calculateCoreUpgradeCost, calculateLevelUpgradeCost, calculateMoneyGainRate, calculateNodeCost, calculateRamUpgradeCost */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return calculateMoneyGainRate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateLevelUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return calculateRamUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateCoreUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return calculateNodeCost; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n\n\nfunction calculateMoneyGainRate(level, ram, cores, mult) {\n const gainPerLevel = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MoneyGainPerLevel;\n const levelMult = level * gainPerLevel;\n const ramMult = Math.pow(1.035, ram - 1);\n const coresMult = (cores + 5) / 6;\n return levelMult * ramMult * coresMult * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney;\n}\nfunction calculateLevelUpgradeCost(startingLevel, extraLevels = 1, costMult = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel) {\n return Infinity;\n }\n\n const mult = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].LevelBaseCost * Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].BaseCost / 2 * totalMultiplier * costMult;\n}\nfunction calculateRamUpgradeCost(startingRam, extraLevels = 1, costMult = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].RamBaseCost;\n const mult = Math.pow(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].UpgradeRamMult, numUpgrades);\n totalCost += baseCost * mult;\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n return totalCost;\n}\nfunction calculateCoreUpgradeCost(startingCore, extraLevels = 1, costMult = 1) {\n const sanitizedCores = Math.round(extraLevels);\n\n if (isNaN(sanitizedCores) || sanitizedCores < 1) {\n return 0;\n }\n\n if (startingCore >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores) {\n return Infinity;\n }\n\n const coreBaseCost = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].CoreBaseCost;\n const mult = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCore;\n\n for (let i = 0; i < sanitizedCores; ++i) {\n totalCost += coreBaseCost * Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= costMult;\n return totalCost;\n}\nfunction calculateNodeCost(n, mult = 1) {\n if (n <= 0) {\n return 0;\n }\n\n return _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].BaseCost * Math.pow(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].PurchaseNextMult, n - 1) * mult;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/formulas/HacknetNodes.ts?");
|
||
|
||
/***/ }),
|
||
/* 199 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/PersonObjects/formulas/skill.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: calculateSkill, calculateExp */
|
||
/*! exports used: calculateExp, calculateSkill */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateSkill; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateExp; });\nfunction calculateSkill(exp, mult = 1) {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n}\nfunction calculateExp(skill, mult = 1) {\n return Math.exp((skill / mult + 200) / 32) - 534.6;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/formulas/skill.ts?");
|
||
|
||
/***/ }),
|
||
/* 200 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Bladeburner/BlackOperations.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: BlackOperations */
|
||
/*! exports used: BlackOperations */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOperations; });\n/* harmony import */ var _BlackOperation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BlackOperation */ 99);\n\nconst BlackOperations = {};\n\n(function () {\n BlackOperations[\"Operation Typhoon\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Typhoon\",\n desc: \"Obadiah Zenyatta is the leader of a RedWater PMC. It has long \" + \"been known among the intelligence community that Zenyatta, along \" + \"with the rest of the PMC, is a Synthoid.<br><br>\" + \"The goal of Operation Typhoon is to find and eliminate \" + \"Zenyatta and RedWater by any means necessary. After the task \" + \"is completed, the actions must be covered up from the general public.\",\n baseDifficulty: 2000,\n reqdRank: 2.5e3,\n rankGain: 50,\n rankLoss: 10,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Zero\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Zero\",\n desc: \"AeroCorp is one of the world's largest defense contractors. \" + \"Its leader, Steve Watataki, is thought to be a supporter of \" + \"Synthoid rights. He must be removed.<br><br>\" + \"The goal of Operation Zero is to covertly infiltrate AeroCorp and \" + \"uncover any incriminating evidence or \" + \"information against Watataki that will cause him to be removed \" + \"from his position at AeroCorp. Incriminating evidence can be \" + \"fabricated as a last resort. Be warned that AeroCorp has some of \" + \"the most advanced security measures in the world.\",\n baseDifficulty: 2500,\n reqdRank: 5e3,\n rankGain: 60,\n rankLoss: 15,\n hpLoss: 50,\n weights: {\n hack: 0.2,\n str: 0.15,\n def: 0.15,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isStealth: true\n });\n BlackOperations[\"Operation X\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation X\",\n desc: \"We have recently discovered an underground publication \" + \"group called Samizdat. Even though most of their publications \" + \"are nonsensical conspiracy theories, the average human is \" + \"gullible enough to believe them. Many of their works discuss \" + \"Synthoids and pose a threat to society. The publications are spreading \" + \"rapidly in China and other Eastern countries.<br><br>\" + \"Samizdat has done a good job of keeping hidden and anonymous. \" + \"However, we've just received intelligence that their base of \" + \"operations is in Ishima's underground sewer systems. Your task is to \" + \"investigate the sewer systems, and eliminate Samizdat. They must \" + \"never publish anything again.\",\n baseDifficulty: 3000,\n reqdRank: 7.5e3,\n rankGain: 75,\n rankLoss: 15,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Titan\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Titan\",\n desc: \"Several months ago Titan Laboratories' Bioengineering department \" + \"was infiltrated by Synthoids. As far as we know, Titan Laboratories' \" + \"management has no knowledge about this. We don't know what the \" + \"Synthoids are up to, but the research that they could \" + \"be conducting using Titan Laboraties' vast resources is potentially \" + \"very dangerous.<br><br>\" + \"Your goal is to enter and destroy the Bioengineering department's \" + \"facility in Aevum. The task is not just to retire the Synthoids there, but \" + \"also to destroy any information or research at the facility that \" + \"is relevant to the Synthoids and their goals.\",\n baseDifficulty: 4000,\n reqdRank: 10e3,\n rankGain: 100,\n rankLoss: 20,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Ares\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Ares\",\n desc: \"One of our undercover agents, Agent Carter, has informed us of a \" + \"massive weapons deal going down in Dubai between rogue Russian \" + \"militants and a radical Synthoid community. These weapons are next-gen \" + \"plasma and energy weapons. It is critical for the safety of humanity \" + \"that this deal does not happen.<br><br>\" + \"Your task is to intercept the deal. Leave no survivors.\",\n baseDifficulty: 5000,\n reqdRank: 12.5e3,\n rankGain: 125,\n rankLoss: 20,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Archangel\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Archangel\",\n desc: \"Our analysts have discovered that the popular Red Rabbit brothel in \" + \"Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence \" + \"suggests that the profit from this brothel is used to fund a large \" + \"black market arms trafficking operation.<br><br>\" + \"The goal of this operation is to take out the leaders that are running \" + \"the Red Rabbit brothel. Try to limit the number of other casualties, \" + \"but do what you must to complete the mission.\",\n baseDifficulty: 7500,\n reqdRank: 15e3,\n rankGain: 200,\n rankLoss: 20,\n hpLoss: 25,\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Juggernaut\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Juggernaut\",\n desc: \"The CIA has just encountered a new security threat. A new \" + \"criminal group, lead by a shadowy operative who calls himself \" + \"Juggernaut, has been smuggling drugs and weapons (including \" + \"suspected bioweapons) into Sector-12. We also have reason \" + \"to believe the tried to break into one of Universal Energy's \" + \"facilities in order to cause a city-wide blackout. The CIA \" + \"suspects that Juggernaut is a heavily-augmented Synthoid, and \" + \"have thus enlisted our help.<br><br>\" + \"Your mission is to eradicate Juggernaut and his followers.\",\n baseDifficulty: 10e3,\n reqdRank: 20e3,\n rankGain: 300,\n rankLoss: 40,\n hpLoss: 300,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Red Dragon\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Red Dragon\",\n desc: \"The Tetrads criminal organization is suspected of \" + \"reverse-engineering the MK-VI Synthoid design. We believe \" + \"they altered and possibly improved the design and began \" + \"manufacturing their own Synthoid models in order to bolster \" + \"their criminal activities.<br><br>\" + \"Your task is to infiltrate and destroy the Tetrads' base of operations \" + \"in Los Angeles. Intelligence tells us that their base houses \" + \"one of their Synthoid manufacturing units.\",\n baseDifficulty: 12.5e3,\n reqdRank: 25e3,\n rankGain: 500,\n rankLoss: 50,\n hpLoss: 500,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation K\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation K\",\n desc: \"CODE RED SITUATION. Our intelligence tells us that VitaLife \" + \"has discovered a new android cloning technology. This technology \" + \"is supposedly capable of cloning Synthoid, not only physically \" + \"but also their advanced AI modules. We do not believe that \" + \"VitaLife is trying to use this technology illegally or \" + \"maliciously, but if any Synthoids were able to infiltrate the \" + \"corporation and take advantage of this technology then the \" + \"results would be catastrophic.<br><br>\" + \"We do not have the power or jurisdiction to shutdown this down \" + \"through legal or political means, so we must resort to a covert \" + \"operation. Your goal is to destroy this technology and eliminate \" + \"anyone who was involved in its creation.\",\n baseDifficulty: 15e3,\n reqdRank: 30e3,\n rankGain: 750,\n rankLoss: 60,\n hpLoss: 1000,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Deckard\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Deckard\",\n desc: \"Despite your success in eliminating VitaLife's new android-replicating \" + \"technology in Operation K, we've discovered that a small group of \" + \"MK-VI Synthoids were able to make off with the schematics and design \" + \"of the technology before the Operation. It is almost a certainty that \" + \"these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.<br><br>\" + \"The goal of Operation Deckard is to hunt down these Synthoids and retire \" + \"them. I don't need to tell you how critical this mission is.\",\n baseDifficulty: 20e3,\n reqdRank: 40e3,\n rankGain: 1e3,\n rankLoss: 75,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Tyrell\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Tyrell\",\n desc: \"A week ago Blade Industries reported a small break-in at one \" + \"of their Aevum Augmentation storage facitilities. We figured out \" + \"that The Dark Army was behind the heist, and didn't think any more \" + \"of it. However, we've just discovered that several known MK-VI Synthoids \" + \"were part of that break-in group.<br><br>\" + \"We cannot have Synthoids upgrading their already-enhanced abilities \" + \"with Augmentations. Your task is to hunt down the associated Dark Army \" + \"members and eliminate them.\",\n baseDifficulty: 25e3,\n reqdRank: 50e3,\n rankGain: 1.5e3,\n rankLoss: 100,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Wallace\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Wallace\",\n desc: \"Based on information gathered from Operation Tyrell, we've discovered \" + \"that The Dark Army was well aware that there were Synthoids amongst \" + \"their ranks. Even worse, we believe that The Dark Army is working \" + \"together with other criminal organizations such as The Syndicate and \" + \"that they are planning some sort of large-scale takeover of multiple major \" + \"cities, most notably Aevum. We suspect that Synthoids have infiltrated \" + \"the ranks of these criminal factions and are trying to stage another \" + \"Synthoid uprising.<br><br>\" + \"The best way to deal with this is to prevent it before it even happens. \" + \"The goal of Operation Wallace is to destroy the Dark Army and \" + \"Syndicate factions in Aevum immediately. Leave no survivors.\",\n baseDifficulty: 30e3,\n reqdRank: 75e3,\n rankGain: 2e3,\n rankLoss: 150,\n hpLoss: 1500,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Shoulder of Orion\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Shoulder of Orion\",\n desc: \"China's Solaris Space Systems is secretly launching the first \" + \"manned spacecraft in over a decade using Synthoids. We believe \" + \"China is trying to establish the first off-world colonies.<br><br>\" + \"The mission is to prevent this launch without instigating an \" + \"international conflict. When you accept this mission you will be \" + \"officially disavowed by the NSA and the national government until after you \" + \"successfully return. In the event of failure, all of the operation's \" + \"team members must not let themselves be captured alive.\",\n baseDifficulty: 35e3,\n reqdRank: 100e3,\n rankGain: 2.5e3,\n rankLoss: 500,\n hpLoss: 1500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isStealth: true\n });\n BlackOperations[\"Operation Hyron\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Hyron\",\n desc: \"Our intelligence tells us that Fulcrum Technologies is developing \" + \"a quantum supercomputer using human brains as core \" + \"processors. This supercomputer \" + \"is rumored to be able to store vast amounts of data and \" + \"perform computations unmatched by any other supercomputer on the \" + \"planet. But more importantly, the use of organic human brains \" + \"means that the supercomputer may be able to reason abstractly \" + \"and become self-aware.<br><br>\" + \"I do not need to remind you why sentient-level AIs pose a serious \" + \"threat to all of mankind.<br><br>\" + \"The research for this project is being conducted at one of Fulcrum \" + \"Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. \" + \"Infiltrate the compound, delete and destroy the work, and then find and kill the \" + \"project lead.\",\n baseDifficulty: 40e3,\n reqdRank: 125e3,\n rankGain: 3e3,\n rankLoss: 1e3,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Morpheus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Morpheus\",\n desc: \"DreamSense Technologies is an advertising company that uses \" + \"special technology to transmit their ads into the peoples \" + \"dreams and subconcious. They do this using broadcast transmitter \" + \"towers. Based on information from our agents and informants in \" + \"Chonqging, we have reason to believe that one of the broadcast \" + \"towers there has been compromised by Synthoids and is being used \" + \"to spread pro-Synthoid propaganda.<br><br>\" + \"The mission is to destroy this broadcast tower. Speed and \" + \"stealth are of the upmost important for this.\",\n baseDifficulty: 45e3,\n reqdRank: 150e3,\n rankGain: 4e3,\n rankLoss: 1e3,\n hpLoss: 100,\n weights: {\n hack: 0.05,\n str: 0.15,\n def: 0.15,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.05\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isStealth: true\n });\n BlackOperations[\"Operation Ion Storm\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Ion Storm\",\n desc: \"Our analysts have uncovered a gathering of MK-VI Synthoids \" + \"that have taken up residence in the Sector-12 Slums. We \" + \"don't know if they are rogue Synthoids from the Uprising, \" + \"but we do know that they have been stockpiling \" + \"weapons, money, and other resources. This makes them dangerous.<br><br>\" + \"This is a full-scale assault operation to find and retire all of these \" + \"Synthoids in the Sector-12 Slums.\",\n baseDifficulty: 50e3,\n reqdRank: 175e3,\n rankGain: 5e3,\n rankLoss: 1e3,\n hpLoss: 5000,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Annihilus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Annihilus\",\n desc: \"Our superiors have ordered us to eradicate everything and everyone \" + \"in an underground facility located in Aevum. They tell us \" + \"that the facility houses many dangerous Synthoids and \" + \"belongs to a terrorist organization called \" + \"'The Covenant'. We have no prior intelligence about this \" + \"organization, so you are going in blind.\",\n baseDifficulty: 55e3,\n reqdRank: 200e3,\n rankGain: 7.5e3,\n rankLoss: 1e3,\n hpLoss: 10e3,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Ultron\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Ultron\",\n desc: \"OmniTek Incorporated, the original designer and manufacturer of Synthoids, \" + \"has notified us of a malfunction in their AI design. This malfunction, \" + \"when triggered, causes MK-VI Synthoids to become radicalized and seek out \" + \"the destruction of humanity. They say that this bug affects all MK-VI Synthoids, \" + \"not just the rogue ones from the Uprising.<br><br>\" + \"OmniTek has also told us they they believe someone has triggered this \" + \"malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids \" + \"are now amassing in Volhaven to form a terrorist group called Ultron.<br><br>\" + \"Intelligence suggests Ultron is heavily armed and that their members are \" + \"augmented. We believe Ultron is making moves to take control of \" + \"and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).<br><br>\" + \"Your task is to find and destroy Ultron.\",\n baseDifficulty: 60e3,\n reqdRank: 250e3,\n rankGain: 10e3,\n rankLoss: 2e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Centurion\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Centurion\",\n desc: \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>\" + \"Throughout all of humanity's history, we have relied on \" + \"technology to survive, conquer, and progress. Its advancement became our primary goal. \" + \"And at the peak of human civilization technology turned into \" + \"power. Global, absolute power.<br><br>\" + \"It seems that the universe is not without a sense of irony.<br><br>\" + \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\",\n baseDifficulty: 70e3,\n reqdRank: 300e3,\n rankGain: 15e3,\n rankLoss: 5e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n }\n });\n BlackOperations[\"Operation Vindictus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Vindictus\",\n desc: \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>\" + \"The bits are all around us. The daemons that hold the Node \" + \"together can manifest themselves in many different ways.<br><br>\" + \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\",\n baseDifficulty: 75e3,\n reqdRank: 350e3,\n rankGain: 20e3,\n rankLoss: 20e3,\n hpLoss: 20e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n }\n });\n BlackOperations[\"Operation Daedalus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Daedalus\",\n desc: \"Yesterday we obeyed kings and bent our neck to emperors. \" + \"Today we kneel only to truth.\",\n baseDifficulty: 80e3,\n reqdRank: 400e3,\n rankGain: 40e3,\n rankLoss: 10e3,\n hpLoss: 100e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n }\n });\n})();\n\n//# sourceURL=webpack:///./src/Bladeburner/BlackOperations.ts?");
|
||
|
||
/***/ }),
|
||
/* 201 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Bladeburner/GeneralActions.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: GeneralActions */
|
||
/*! exports used: GeneralActions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActions; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 245);\n\nconst GeneralActions = {};\n\n(function () {\n // General Actions\n let actionName;\n actionName = \"Training\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve your abilities at the Bladeburner unit's specialized training \" + \"center. Doing this gives experience for all combat stats and also \" + \"increases your max stamina.\"\n });\n actionName = \"Field Analysis\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Mine and analyze Synthoid-related data. This improves the \" + \"Bladeburner's unit intelligence on Synthoid locations and \" + \"activities. Completing this action will improve the accuracy \" + \"of your Synthoid population estimated in the current city.<br><br>\" + \"Does NOT require stamina.\"\n });\n actionName = \"Recruitment\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Attempt to recruit members for your Bladeburner team. These members \" + \"can help you conduct operations.<br><br>\" + \"Does NOT require stamina.\"\n });\n actionName = \"Diplomacy\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve diplomatic relations with the Synthoid population. \" + \"Completing this action will reduce the Chaos level in your current city.<br><br>\" + \"Does NOT require stamina.\"\n });\n actionName = \"Hyperbolic Regeneration Chamber\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. \" + \"This will slowly heal your wounds and slightly increase your stamina.<br><br>\"\n });\n})();\n\n//# sourceURL=webpack:///./src/Bladeburner/GeneralActions.ts?");
|
||
|
||
/***/ }),
|
||
/* 202 */,
|
||
/* 203 */
|
||
/*!**************************************!*\
|
||
!*** ./src/SourceFile/SourceFile.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: SourceFile */
|
||
/*! exports used: SourceFile */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFile; });\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNode */ 168);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass SourceFile {\n constructor(number, info = \"\") {\n _defineProperty(this, \"lvl\", 1);\n\n _defineProperty(this, \"owned\", false);\n\n const bitnodeKey = \"BitNode\" + number;\n const bitnode = _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_0__[/* BitNodes */ \"a\"][bitnodeKey];\n\n if (bitnode == null) {\n throw new Error(\"Invalid Bit Node for this Source File\");\n }\n\n this.n = number;\n this.name = `Source-File ${number}: ${bitnode.name}`;\n this.info = info;\n }\n\n}\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFile.ts?");
|
||
|
||
/***/ }),
|
||
/* 204 */,
|
||
/* 205 */,
|
||
/* 206 */,
|
||
/* 207 */,
|
||
/* 208 */,
|
||
/* 209 */,
|
||
/* 210 */
|
||
/*!*******************************************!*\
|
||
!*** ./utils/uiHelpers/getElementById.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: getElementById */
|
||
/*! exports used: getElementById */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getElementById; });\n/**\n * Returns a reference to the first object with the specified value of the ID or NAME attribute,\n * throwing an error if it is unable to find it.\n * @param elementId The HTML ID to retrieve the element by.\n * @throws {Error} When the 'elementId' cannot be found.\n */\nfunction getElementById(elementId) {\n const el = document.getElementById(elementId);\n\n if (el === null) {\n throw new Error(`Unable to find element with id '${elementId}'`);\n }\n\n return el;\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/getElementById.ts?");
|
||
|
||
/***/ }),
|
||
/* 211 */,
|
||
/* 212 */
|
||
/*!**********************************************!*\
|
||
!*** ./utils/uiHelpers/removeElementById.ts ***!
|
||
\**********************************************/
|
||
/*! exports provided: removeElementById */
|
||
/*! exports used: removeElementById */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeElementById; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 210);\n/* harmony import */ var _removeElement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeElement */ 343);\n\n\n/**\n * Given its id, this function removes an element AND its children\n * @param id The HTML identifier to search for and remove.\n */\n\nfunction removeElementById(id) {\n try {\n const elem = Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(id);\n Object(_removeElement__WEBPACK_IMPORTED_MODULE_1__[/* removeElement */ \"a\"])(elem);\n } catch (e) {// Probably should log this as we're trying to remove elements that don't exist.\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeElementById.ts?");
|
||
|
||
/***/ }),
|
||
/* 213 */
|
||
/*!************************************************************!*\
|
||
!*** ./src/Netscript/WorkerScriptStartStopEventEmitter.ts ***!
|
||
\************************************************************/
|
||
/*! exports provided: WorkerScriptStartStopEventEmitter */
|
||
/*! exports used: WorkerScriptStartStopEventEmitter */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptStartStopEventEmitter; });\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/EventEmitter */ 344);\n/**\n * Event emitter that triggers when scripts are started/stopped\n */\n\nconst WorkerScriptStartStopEventEmitter = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_0__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts?");
|
||
|
||
/***/ }),
|
||
/* 214 */
|
||
/*!**************************!*\
|
||
!*** ./utils/LogBox.tsx ***!
|
||
\**************************/
|
||
/*! exports provided: logBoxCreate */
|
||
/*! exports used: logBoxCreate */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return logBoxCreate; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _src_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../src/Netscript/killWorkerScript */ 103);\n/* harmony import */ var _uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uiHelpers/createElement */ 113);\n/* harmony import */ var _uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uiHelpers/removeElementById */ 212);\n\n\n\n\n\nlet gameContainer;\n\n(function () {\n function getGameContainer() {\n const container = document.getElementById(\"entire-game-container\");\n\n if (container == null) {\n throw new Error(`Failed to find game container DOM element`);\n }\n\n gameContainer = container;\n document.removeEventListener(\"DOMContentLoaded\", getGameContainer);\n }\n\n document.addEventListener(\"DOMContentLoaded\", getGameContainer);\n})();\n\nfunction ScriptLogPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function close() {\n const content = document.getElementById(props.id);\n if (content == null) return;\n react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unmountComponentAtNode(content);\n Object(_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(props.id);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function closeHandler(event) {\n if (event.keyCode === 27) {\n close();\n }\n }\n\n document.addEventListener(\"keydown\", closeHandler);\n return () => {\n document.removeEventListener(\"keydown\", closeHandler);\n };\n }, []);\n\n function kill() {\n Object(_src_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_2__[/* killWorkerScript */ \"a\"])(props.script, props.script.server, true);\n close();\n }\n\n function drag(event) {\n event.preventDefault();\n let x = event.clientX;\n let y = event.clientY;\n let left = props.container.offsetLeft + props.container.clientWidth / 2;\n let top = props.container.offsetTop + props.container.clientWidth / 5;\n\n function mouseMove(event) {\n left += event.clientX - x;\n top += event.clientY - y;\n props.container.style.left = left + \"px\";\n props.container.style.top = top + \"px\"; // reset right and bottom to avoid the window stretching\n\n props.container.style.right = \"\";\n props.container.style.bottom = \"\";\n x = event.clientX;\n y = event.clientY;\n }\n\n function mouseUp() {\n document.removeEventListener(\"mouseup\", mouseUp);\n document.removeEventListener(\"mousemove\", mouseMove);\n }\n\n document.addEventListener(\"mouseup\", mouseUp);\n document.addEventListener(\"mousemove\", mouseMove);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"log-box-header\",\n onMouseDown: drag\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.script.filename, \" \", props.script.args.map(x => `${x}`).join(\" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"log-box-button\",\n onClick: kill\n }, \"Kill Script\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"log-box-button\",\n onClick: close\n }, \"Close\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"log-box-log-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.script.logs.map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i,\n style: {\n whiteSpace: \"pre-line\"\n }\n }, line, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))))));\n}\n\nfunction logBoxCreate(script) {\n const id = script.server + \"-\" + script.filename + script.args.map(x => `${x}`).join(\"-\");\n if (document.getElementById(id) !== null) return;\n const container = Object(_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"div\", {\n class: \"log-box-container\",\n id: id\n });\n gameContainer.appendChild(container);\n react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ScriptLogPopup, {\n script: script,\n id: id,\n container: container\n }), container);\n}\n\n//# sourceURL=webpack:///./utils/LogBox.tsx?");
|
||
|
||
/***/ }),
|
||
/* 215 */,
|
||
/* 216 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Bladeburner/data/Icons.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: stealthIcon, killIcon */
|
||
/*! exports used: killIcon, stealthIcon */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return stealthIcon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killIcon; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nconst stealthIcon = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 166 132\",\n style: {\n fill: \"#adff2f\"\n }\n}, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"g\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z\"\n})));\nconst killIcon = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16px\",\n height: \"16px\",\n viewBox: \"-22 0 511 511.99561\",\n style: {\n fill: \"#adff2f\"\n }\n}, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0\"\n}));\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Icons.tsx?");
|
||
|
||
/***/ }),
|
||
/* 217 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Hacknet/HashUpgrades.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: HashUpgrades */
|
||
/*! exports used: HashUpgrades */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashUpgrades; });\n/* harmony import */ var _HashUpgrade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HashUpgrade */ 658);\n/* harmony import */ var _data_HashUpgradesMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/HashUpgradesMetadata */ 659);\n/**\n * Map of all Hash Upgrades\n * Key = Hash name, Value = HashUpgrade object\n */\n\n\nconst HashUpgrades = {};\n\nfunction createHashUpgrade(p) {\n HashUpgrades[p.name] = new _HashUpgrade__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrade */ \"a\"](p);\n}\n\nfor (const metadata of _data_HashUpgradesMetadata__WEBPACK_IMPORTED_MODULE_1__[/* HashUpgradesMetadata */ \"a\"]) {\n createHashUpgrade(metadata);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HashUpgrades.ts?");
|
||
|
||
/***/ }),
|
||
/* 218 */
|
||
/*!****************************************!*\
|
||
!*** ./utils/helpers/arrayToString.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: arrayToString */
|
||
/*! exports used: arrayToString */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return arrayToString; });\n/**\n * Returns the input array as a comma separated string.\n *\n * Does several things that Array.toString() doesn't do\n * - Adds brackets around the array\n * - Adds quotation marks around strings\n */\nfunction arrayToString(a) {\n const vals = [];\n\n for (let i = 0; i < a.length; ++i) {\n let elem = a[i];\n\n if (Array.isArray(elem)) {\n elem = arrayToString(elem);\n } else if (typeof elem === \"string\") {\n elem = `\"${elem}\"`;\n }\n\n vals.push(elem);\n }\n\n return `[${vals.join(\", \")}]`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/arrayToString.ts?");
|
||
|
||
/***/ }),
|
||
/* 219 */
|
||
/*!****************************!*\
|
||
!*** ./src/SaveObject.jsx ***!
|
||
\****************************/
|
||
/*! exports provided: saveObject, loadGame */
|
||
/*! exports used: loadGame, saveObject */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return saveObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return loadGame; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias */ 87);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf/Fconf */ 313);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Fconf/FconfSettings */ 67);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Message/MessageHelpers */ 132);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ui/createStatusText */ 476);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ExportBonus */ 247);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 287);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nlet saveObject = new BitburnerSaveObject();\n\nfunction BitburnerSaveObject() {\n this.PlayerSave = \"\";\n this.AllServersSave = \"\";\n this.CompaniesSave = \"\";\n this.FactionsSave = \"\";\n this.SpecialServerIpsSave = \"\";\n this.AliasesSave = \"\";\n this.GlobalAliasesSave = \"\";\n this.MessagesSave = \"\";\n this.StockMarketSave = \"\";\n this.SettingsSave = \"\";\n this.FconfSettingsSave = \"\";\n this.VersionSave = \"\";\n this.AllGangsSave = \"\";\n this.LastExportBonus = \"\";\n}\n\nBitburnerSaveObject.prototype.getSaveString = function () {\n this.PlayerSave = JSON.stringify(_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"]); // Delete all logs from all running scripts\n\n var TempAllServers = JSON.parse(JSON.stringify(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* AllServers */ \"b\"]), _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n for (var ip in TempAllServers) {\n var server = TempAllServers[ip];\n\n if (server == null) {\n continue;\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n var runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n this.AllServersSave = JSON.stringify(TempAllServers);\n this.CompaniesSave = JSON.stringify(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]);\n this.FactionsSave = JSON.stringify(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"]);\n this.SpecialServerIpsSave = JSON.stringify(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"]);\n this.AliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* Aliases */ \"a\"]);\n this.GlobalAliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* GlobalAliases */ \"b\"]);\n this.MessagesSave = JSON.stringify(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* Messages */ \"a\"]);\n this.StockMarketSave = JSON.stringify(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* StockMarket */ \"a\"]);\n this.SettingsSave = JSON.stringify(_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"]);\n this.FconfSettingsSave = JSON.stringify(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__[/* FconfSettings */ \"a\"]);\n this.VersionSave = JSON.stringify(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version);\n this.LastExportBonus = JSON.stringify(_ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* LastExportBonus */ \"a\"]);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang()) {\n this.AllGangsSave = JSON.stringify(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* AllGangs */ \"a\"]);\n }\n\n var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n return saveString;\n};\n\nBitburnerSaveObject.prototype.saveGame = function (db) {\n var saveString = this.getSaveString(); // We'll save to both localstorage and indexedDb\n\n var objectStore = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\");\n var request = objectStore.put(saveString, \"save\");\n\n request.onerror = function (e) {\n console.error(\"Error saving game to IndexedDB: \" + e);\n };\n\n try {\n window.localStorage.setItem(\"bitburnerSave\", saveString);\n } catch (e) {\n if (e.code == 22) {\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Save failed for localStorage! Check console(F12)\");\n console.error(\"Failed to save game to localStorage because the size of the save file \" + \"is too large. However, the game will still be saved to IndexedDb if your browser \" + \"supports it. If you would like to save to localStorage as well, then \" + \"consider killing several of your scripts to \" + \"fix this, or increasing the size of your browsers localStorage\");\n }\n }\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game saved!\");\n}; // Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\n\n\nfunction evaluateVersionCompatibility(ver) {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && typeof _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"string\") {\n console.log(\"Changed Player.companyPosition value to be compatible with v0.41.2\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition.data.positionName;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition == null) {\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = \"\";\n }\n } // The \"companyName\" property of all Companies is renamed to \"name\"\n\n\n for (var companyName in _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"][companyName];\n\n if ((company.name == null || company.name === 0 || company.name === \"\") && company.companyName != null) {\n console.log(\"Changed company name property to be compatible with v0.41.2\");\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n console.log(\"Changed company companyPositions property to be compatible with v0.41.2\");\n const pos = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n\n company.companyPositions = pos;\n }\n }\n } // This version allowed players to hold multiple jobs\n\n\n if (ver < \"0.43.0\") {\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName !== \"\" && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"\") {\n console.log(\"Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].jobs[_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName] = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n\n delete _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n}\n\nfunction loadGame(saveString) {\n if (saveString === \"\" || saveString == null || saveString === undefined) {\n if (!window.localStorage.getItem(\"bitburnerSave\")) {\n console.log(\"No save file to load\");\n return false;\n }\n\n saveString = decodeURIComponent(escape(atob(window.localStorage.getItem(\"bitburnerSave\"))));\n console.log(\"Loading game from localStorage\");\n } else {\n saveString = decodeURIComponent(escape(atob(saveString)));\n console.log(\"Loading game from IndexedDB\");\n }\n\n var saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse .fconf Settings.\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n return true;\n}\n\nfunction loadImportedGame(saveObj, saveString) {\n var tempSaveObj = null;\n var tempPlayer = null; // Check to see if the imported save file can be parsed. If any\n // errors are caught it will fail\n\n try {\n var decodedSaveString = decodeURIComponent(escape(atob(saveString)));\n tempSaveObj = JSON.parse(decodedSaveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n tempPlayer = JSON.parse(tempSaveObj.PlayerSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n tempPlayer.money = new decimal_js__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"](tempPlayer.money);\n JSON.parse(tempSaveObj.AllServersSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.CompaniesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.FactionsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.SpecialServerIpsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n if (tempSaveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"GlobalAliases\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Global Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n JSON.parse(tempSaveObj.MessagesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Messages save failed: ${e}`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n JSON.parse(tempSaveObj.StockMarketSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing StockMarket save failed: ${e}`);\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(tempSaveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n } catch (e) {\n console.error(\"Parsing Version save failed: \" + e);\n }\n }\n\n if (tempPlayer.inGang() && tempSaveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(tempSaveObj.AllGangsSave);\n } catch (e) {\n console.error(`Failed to parse AllGangsSave: {e}`);\n throw e;\n }\n }\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Error importing game: \" + e.toString());\n return false;\n } // Since the save file is valid, load everything for real\n\n\n saveString = decodeURIComponent(escape(atob(saveString)));\n saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to load .fconf settings when importing\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n saveObject.saveGame(_engine__WEBPACK_IMPORTED_MODULE_3__[\"Engine\"].indexedDb);\n location.reload();\n return true;\n}\n\nBitburnerSaveObject.prototype.exportGame = function () {\n const saveString = this.getSaveString(); // Save file name is based on current timestamp and BitNode\n\n const epochTime = Math.round(Date.now() / 1000);\n const bn = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].bitNodeN;\n const filename = `bitburnerSave_BN${bn}x${_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__[/* SourceFileFlags */ \"a\"][bn]}_${epochTime}.json`;\n var file = new Blob([saveString], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n var a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n};\n\nBitburnerSaveObject.prototype.importGame = function () {\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n var fileSelector = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__[/* clearEventListeners */ \"a\"])(\"import-game-file-selector\");\n fileSelector.addEventListener(\"change\", openImportFileHandler, false);\n $(\"#import-game-file-selector\").click();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"ERR: Your browser does not support HTML5 File API. Cannot import.\");\n }\n};\n\nBitburnerSaveObject.prototype.deleteGame = function (db) {\n // Delete from local storage\n if (window.localStorage.getItem(\"bitburnerSave\")) {\n window.localStorage.removeItem(\"bitburnerSave\");\n } // Delete from indexedDB\n\n\n var request = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\").delete(\"save\");\n\n request.onsuccess = function () {\n console.log(\"Successfully deleted save from indexedDb\");\n };\n\n request.onerror = function (e) {\n console.error(`Failed to delete save from indexedDb: ${e}`);\n };\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game deleted!\");\n};\n\nfunction createNewUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"New update!<br>\" + \"Please report any bugs/issues through the github repository \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nfunction createBetaUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"You are playing on the beta environment! This branch of the game \" + \"features the latest developments in the game. This version may be unstable.<br>\" + \"Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nBitburnerSaveObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_toJSON */ \"b\"])(\"BitburnerSaveObject\", this);\n};\n\nBitburnerSaveObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_fromJSON */ \"a\"])(BitburnerSaveObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"].constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nfunction openImportFileHandler(evt) {\n var file = evt.target.files[0];\n\n if (!file) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Invalid file selected\");\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function (e) {\n var contents = e.target.result;\n loadImportedGame(saveObject, contents);\n };\n\n reader.readAsText(file);\n}\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/SaveObject.jsx?");
|
||
|
||
/***/ }),
|
||
/* 220 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/StockMarket/StockMarketCosts.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: getStockMarketAccountCost, getStockMarketTixApiCost, getStockMarket4SDataCost, getStockMarket4STixApiCost */
|
||
/*! exports used: getStockMarket4SDataCost, getStockMarket4STixApiCost */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export getStockMarketAccountCost */\n/* unused harmony export getStockMarketTixApiCost */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getStockMarket4SDataCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getStockMarket4STixApiCost; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Constants */ 5);\n\n\nfunction getStockMarketAccountCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].WSEAccountCost;\n}\nfunction getStockMarketTixApiCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TIXAPICost;\n}\nfunction getStockMarket4SDataCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].MarketData4SCost * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataCost;\n}\nfunction getStockMarket4STixApiCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].MarketDataTixApi4SCost * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataApiCost;\n}\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketCosts.ts?");
|
||
|
||
/***/ }),
|
||
/* 221 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Locations/ui/ApplyToJobButton.tsx ***!
|
||
\***********************************************/
|
||
/*! exports provided: ApplyToJobButton */
|
||
/*! exports used: ApplyToJobButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ApplyToJobButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 396);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for a button that's used to apply for a job\n */\n\n\n\nclass ApplyToJobButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getJobRequirementTooltip = this.getJobRequirementTooltip.bind(this);\n }\n\n getJobRequirementTooltip() {\n const pos = this.props.p.getNextCompanyPosition(this.props.company, this.props.entryPosType);\n\n if (pos == null) {\n return \"\";\n }\n\n if (!this.props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_1__[/* getJobRequirementText */ \"a\"])(this.props.company, pos, true);\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: this.props.onClick,\n style: this.props.style,\n text: this.props.text,\n tooltip: this.getJobRequirementTooltip()\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/ApplyToJobButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 222 */
|
||
/*!*************************!*\
|
||
!*** ./src/RedPill.jsx ***!
|
||
\*************************/
|
||
/*! exports provided: enterBitNode, redPillFlag, hackWorldDaemon */
|
||
/*! exports used: enterBitNode, redPillFlag */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return enterBitNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return redPillFlag; });\n/* unused harmony export hackWorldDaemon */\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Prestige */ 275);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SourceFile/PlayerOwnedSourceFile */ 443);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile/SourceFiles */ 278);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/**\n * Implementation for what happens when you destroy a BitNode\n */\n\n\n\n\n\n\nlet redPillFlag = false;\n\nfunction hackWorldDaemon(router, flume = false, quick = false) {\n router.toBitVerse(flume, quick);\n redPillFlag = true;\n}\n\nfunction giveSourceFile(bitNodeNumber) {\n var sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n var sourceFile = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][sourceFileKey];\n\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n } // Check if player already has this source file\n\n\n var alreadyOwned = false;\n var ownedSourceFile = null;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"The Source-File for the BitNode you just destroyed, \" + sourceFile.name + \", \" + \"is already at max level!\");\n } else {\n ++ownedSourceFile.lvl;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(sourceFile.name + \" was upgraded to level \" + ownedSourceFile.lvl + \" for \" + \"destroying its corresponding BitNode!\");\n }\n } else {\n var playerSrcFile = new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedSourceFile */ \"a\"](bitNodeNumber, 1);\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.push(playerSrcFile);\n\n if (bitNodeNumber === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n // Artificial Intelligence\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You received a Source-File for destroying a BitNode!<br><br>\" + sourceFile.name + \"<br><br>\" + sourceFile.info);\n }\n}\n\nfunction enterBitNode(router, flume, destroyedBitNode, newBitNode) {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][5] === 0 && newBitNode !== 5) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 0;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence_exp = 0;\n }\n }\n\n if (newBitNode === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n redPillFlag = false; // Set new Bit Node\n\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_1__[/* prestigeSourceFile */ \"b\"])(flume);\n}\n\n\n//# sourceURL=webpack:///./src/RedPill.jsx?");
|
||
|
||
/***/ }),
|
||
/* 223 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Exploits/Exploit.ts ***!
|
||
\*********************************/
|
||
/*! exports provided: Exploit, ExploitName, sanitizeExploits */
|
||
/*! exports used: Exploit, ExploitName, sanitizeExploits */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Exploit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ExploitName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return sanitizeExploits; });\n/*\nThe game cannot block every possible exploits. Specially since one of them is\nthat you can just edit your save file and that's impragmatic to prevent.\n\nSo instead we have source file minus 1. It is not obtained by destroying a\nBitNode but instead it is awarded when the player finds innovative ways to break\nthe game, this serves 2 purpose, [one] the developpers don't have to spend time\ntrying to implement anti-cheat measures and [two] finding ways to break a\nhacking game is very much in the spirit of the game.\nSource-File minus 1 is extremely weak because it can be fully level up quickly.\n*/\nlet Exploit;\n\n(function (Exploit) {\n Exploit[\"UndocumentedFunctionCall\"] = \"UndocumentedFunctionCall\";\n Exploit[\"Unclickable\"] = \"Unclickable\";\n Exploit[\"PrototypeTampering\"] = \"PrototypeTampering\";\n Exploit[\"Bypass\"] = \"Bypass\";\n Exploit[\"EditSaveFile\"] = \"EditSaveFile\";\n})(Exploit || (Exploit = {}));\n\nconst names = {\n UndocumentedFunctionCall: \"by looking beyond the documentation.\",\n EditSaveFile: \"by editing your save file.\",\n PrototypeTampering: \"by tampering with Numbers prototype.\",\n Unclickable: \"by clicking the unclickable.\",\n Bypass: \"by circumventing the ram cost of document.\"\n};\nfunction ExploitName(exploit) {\n return names[exploit];\n}\nfunction sanitizeExploits(exploits) {\n return exploits.filter(e => Object.keys(Exploit).includes(e));\n}\n\n//# sourceURL=webpack:///./src/Exploits/Exploit.ts?");
|
||
|
||
/***/ }),
|
||
/* 224 */
|
||
/*!**************************************!*\
|
||
!*** ./src/ui/React/BBAccordion.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: BBAccordion */
|
||
/*! exports used: BBAccordion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BBAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * React component to create an accordion element\n */\n\nclass BBAccordion extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleHeaderClick = this.handleHeaderClick.bind(this);\n this.state = {\n panelOpened: props.panelInitiallyOpened ? props.panelInitiallyOpened : false\n };\n }\n\n handleHeaderClick() {\n this.setState({\n panelOpened: !this.state.panelOpened\n });\n }\n\n render() {\n let className = \"accordion-header\";\n\n if (typeof this.props.headerClass === \"string\") {\n className = this.props.headerClass;\n }\n\n if (this.state.panelOpened) className += \" active\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.handleHeaderClick\n }, this.props.headerContent), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](AccordionPanel, {\n opened: this.state.panelOpened,\n panelClass: this.props.panelClass,\n panelContent: this.props.panelContent\n }));\n }\n\n}\n\nclass AccordionPanel extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n shouldComponentUpdate(nextProps) {\n return this.props.opened || nextProps.opened;\n }\n\n render() {\n let className = \"accordion-panel\";\n\n if (typeof this.props.panelClass === \"string\") {\n className = this.props.panelClass;\n }\n\n if (!this.props.opened) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: className,\n style: {\n display: \"block\"\n }\n }, this.props.panelContent);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/BBAccordion.tsx?");
|
||
|
||
/***/ }),
|
||
/* 225 */,
|
||
/* 226 */,
|
||
/* 227 */,
|
||
/* 228 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/ui/React/StdButtonPurchased.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: StdButtonPurchased */
|
||
/*! exports used: StdButtonPurchased */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StdButtonPurchased; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Stateless button that represents something that has been purchased.\n */\n\nclass StdButtonPurchased extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.hasTooltip = this.hasTooltip.bind(this);\n this.tooltip = this.tooltip.bind(this);\n }\n\n hasTooltip() {\n return this.props.tooltip != null && this.props.tooltip !== \"\";\n }\n\n tooltip() {\n if (!this.props.tooltip) return \"\";\n return this.props.tooltip;\n }\n\n render() {\n let className = \"std-button-bought\";\n\n if (this.hasTooltip()) {\n className += \" tooltip\";\n } // Tooltip will be set using inner HTML\n\n\n let tooltipMarkup = {\n __html: \"\"\n };\n\n if (this.hasTooltip()) {\n tooltipMarkup = {\n __html: this.tooltip()\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.props.onClick,\n style: this.props.style\n }, this.props.text, this.hasTooltip() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: tooltipMarkup\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/StdButtonPurchased.tsx?");
|
||
|
||
/***/ }),
|
||
/* 229 */
|
||
/*!*************************************!*\
|
||
!*** ./src/DarkWeb/DarkWebItems.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: DarkWebItems */
|
||
/*! exports used: DarkWebItems */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DarkWebItems; });\n/* harmony import */ var _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItem */ 252);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n\n\nconst DarkWebItems = {\n BruteSSHProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].BruteSSHProgram.name, 500e3, \"Opens up SSH Ports\"),\n FTPCrackProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports\"),\n RelaySMTPProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports\"),\n HTTPWormProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports\"),\n SQLInjectProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].SQLInjectProgram.name, 250e6, \"Opens up SQL Ports\"),\n DeepscanV1: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5\"),\n DeepscanV2: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10\"),\n AutolinkProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze'\"),\n ServerProfilerProgram: new _DarkWebItem__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItem */ \"a\"](_Programs_Programs__WEBPACK_IMPORTED_MODULE_1__[/* Programs */ \"a\"].ServerProfiler.name, 1e6, \"Displays hacking and Netscript-related information about a server\")\n};\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWebItems.ts?");
|
||
|
||
/***/ }),
|
||
/* 230 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Script/RamCalculationErrorCodes.ts ***!
|
||
\************************************************/
|
||
/*! exports provided: RamCalculationErrorCode */
|
||
/*! exports used: RamCalculationErrorCode */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RamCalculationErrorCode; });\nlet RamCalculationErrorCode;\n\n(function (RamCalculationErrorCode) {\n RamCalculationErrorCode[RamCalculationErrorCode[\"SyntaxError\"] = -1] = \"SyntaxError\";\n RamCalculationErrorCode[RamCalculationErrorCode[\"ImportError\"] = -2] = \"ImportError\";\n RamCalculationErrorCode[RamCalculationErrorCode[\"URLImportError\"] = -3] = \"URLImportError\";\n})(RamCalculationErrorCode || (RamCalculationErrorCode = {}));\n\n//# sourceURL=webpack:///./src/Script/RamCalculationErrorCodes.ts?");
|
||
|
||
/***/ }),
|
||
/* 231 */
|
||
/*!************************************!*\
|
||
!*** ./src/Gang/data/Constants.ts ***!
|
||
\************************************/
|
||
/*! exports provided: GangConstants */
|
||
/*! exports used: GangConstants */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangConstants; });\nconst GangConstants = {\n // Respect is divided by this to get rep gain\n GangRespectToReputationRatio: 25,\n MaximumGangMembers: 12,\n CyclesPerTerritoryAndPowerUpdate: 100,\n // Portion of upgrade multiplier that is kept after ascending\n AscensionMultiplierRatio: 0.15,\n // Names of possible Gangs\n Names: [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"]\n};\n\n//# sourceURL=webpack:///./src/Gang/data/Constants.ts?");
|
||
|
||
/***/ }),
|
||
/* 232 */,
|
||
/* 233 */,
|
||
/* 234 */,
|
||
/* 235 */,
|
||
/* 236 */,
|
||
/* 237 */,
|
||
/* 238 */,
|
||
/* 239 */,
|
||
/* 240 */
|
||
/*!****************************!*\
|
||
!*** ./utils/IPAddress.ts ***!
|
||
\****************************/
|
||
/*! exports provided: createRandomIp */
|
||
/*! exports used: createRandomIp */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createRandomIp; });\n/* harmony import */ var _helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/getRandomByte */ 405);\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\n\nfunction createRandomIp() {\n const ip = Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(99) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9);\n return ip;\n}\n\n//# sourceURL=webpack:///./utils/IPAddress.ts?");
|
||
|
||
/***/ }),
|
||
/* 241 */
|
||
/*!****************************************!*\
|
||
!*** ./utils/helpers/compareArrays.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: compareArrays */
|
||
/*! exports used: compareArrays */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return compareArrays; });\n/**\n * Does a shallow compare of two arrays to determine if they are equal.\n * @param a1 The first array\n * @param a2 The second array\n */\nfunction compareArrays(a1, a2) {\n if (a1.length !== a2.length) {\n return false;\n }\n\n for (let i = 0; i < a1.length; ++i) {\n if (Array.isArray(a1[i])) {\n // If the other element is not an array, then these cannot be equal\n if (!Array.isArray(a2[i])) {\n return false;\n }\n\n const elem1 = a1[i];\n const elem2 = a2[i];\n\n if (!compareArrays(elem1, elem2)) {\n return false;\n }\n } else if (a1[i] !== a2[i]) {\n return false;\n }\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./utils/helpers/compareArrays.ts?");
|
||
|
||
/***/ }),
|
||
/* 242 */,
|
||
/* 243 */,
|
||
/* 244 */,
|
||
/* 245 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Bladeburner/Action.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: Action */
|
||
/*! exports used: Action */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Action; });\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 44);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nclass StatsMultiplier {\n constructor() {\n _defineProperty(this, \"hack\", 0);\n\n _defineProperty(this, \"str\", 0);\n\n _defineProperty(this, \"def\", 0);\n\n _defineProperty(this, \"dex\", 0);\n\n _defineProperty(this, \"agi\", 0);\n\n _defineProperty(this, \"cha\", 0);\n\n _defineProperty(this, \"int\", 0);\n }\n\n}\n\nclass Action {\n // Difficulty scales with level. See getDifficulty() method\n // Rank increase/decrease is affected by this exponent\n // All of these scale with level/difficulty\n // Action Category. Current categories are stealth and kill\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n // Weighting of each stat in determining action success rate\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params = null) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"desc\", \"\");\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"maxLevel\", 1);\n\n _defineProperty(this, \"autoLevel\", true);\n\n _defineProperty(this, \"baseDifficulty\", 100);\n\n _defineProperty(this, \"difficultyFac\", 1.01);\n\n _defineProperty(this, \"rewardFac\", 1.02);\n\n _defineProperty(this, \"successes\", 0);\n\n _defineProperty(this, \"failures\", 0);\n\n _defineProperty(this, \"rankGain\", 0);\n\n _defineProperty(this, \"rankLoss\", 0);\n\n _defineProperty(this, \"hpLoss\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"isStealth\", false);\n\n _defineProperty(this, \"isKill\", false);\n\n _defineProperty(this, \"count\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(1e3, 25e3));\n\n _defineProperty(this, \"weights\", {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7\n });\n\n _defineProperty(this, \"decays\", {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9\n });\n\n _defineProperty(this, \"teamCount\", 0);\n\n // | null = null\n if (params && params.name) this.name = params.name;\n if (params && params.desc) this.desc = params.desc;\n if (params && params.baseDifficulty) this.baseDifficulty = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_2__[/* addOffset */ \"a\"])(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n if (params && params.count) this.count = params.count;\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays; // Check to make sure weights are summed properly\n\n let sum = 0;\n\n for (const weight in this.weights) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\"Invalid weights when constructing Action \" + this.name + \". The weights should sum up to 1. They sum up to :\" + 1);\n }\n\n for (const decay in this.decays) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(\"Invalid decays when constructing \" + \"Action \" + this.name + \". \" + \"Decay value cannot be greater than 1\");\n }\n }\n }\n }\n\n getDifficulty() {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n\n return difficulty;\n }\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n\n\n attempt(inst) {\n return Math.random() < this.getSuccessChance(inst);\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1;\n }\n\n getActionTime(inst) {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].agility * inst.skillMultipliers.effAgi;\n const effDexterity = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].dexterity * inst.skillMultipliers.effDex;\n const statFac = 0.5 * (Math.pow(effAgility, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffAgiExponentialFactor) + Math.pow(effDexterity, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffDexExponentialFactor) + effAgility / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffAgiLinearFactor + effDexterity / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, baseTime * skillFac / statFac);\n return Math.ceil(baseTime * this.getActionTimePenalty());\n } // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n getTeamSuccessBonus(inst) {\n return 1;\n } // eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n getActionTypeSkillSuccessBonus(inst) {\n return 1;\n }\n\n getChaosCompetencePenalty(inst, params) {\n const city = inst.getCurrentCity();\n\n if (params.est) {\n return Math.pow(city.popEst / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationExponent);\n } else {\n return Math.pow(city.pop / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst) {\n const city = inst.getCurrentCity();\n\n if (city.chaos > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].ChaosThreshold) {\n const diff = 1 + (city.chaos - _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* BladeburnerConstants */ \"a\"].ChaosThreshold);\n const mult = Math.pow(diff, 0.1);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst) {\n function clamp(x) {\n return Math.max(0, Math.min(x, 1));\n }\n\n const est = this.getSuccessChance(inst, {\n est: true\n });\n const real = this.getSuccessChance(inst);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;else high *= r;\n return [clamp(low), clamp(high)];\n }\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n\n\n getSuccessChance(inst, params = {\n est: false\n }) {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n\n let difficulty = this.getDifficulty();\n let competence = 0;\n\n for (const stat in this.weights) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n\n competence *= _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n competence *= this.getTeamSuccessBonus(inst);\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n } // Factor skill multipliers into success chance\n\n\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n } // Augmentation multiplier\n\n\n competence *= _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bladeburner_success_chance_mult;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel) {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel) {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Action\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Action, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Action = Action;\n\n//# sourceURL=webpack:///./src/Bladeburner/Action.ts?");
|
||
|
||
/***/ }),
|
||
/* 246 */
|
||
/*!********************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/Sleeve.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: Sleeve */
|
||
/*! exports used: Sleeve */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeve; });\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Person */ 158);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Crime/Crime */ 157);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Faction/FactionWorkTypeEnum */ 126);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Sleeve extends _Person__WEBPACK_IMPORTED_MODULE_1__[/* Person */ \"a\"] {\n /**\n * Stores the name of the class that the player is currently taking\n */\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n\n /**\n * Enum value for current task\n */\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n */\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n\n /**\n * Milliseconds spent on current task\n */\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n\n /**\n * Keeps track of experience + money earned for player\n */\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n\n /**\n * Records experience gain rate for the current task\n */\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n\n /**\n * Stored number of game \"loop\" cycles\n */\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n constructor(p = null) {\n super();\n\n _defineProperty(this, \"className\", \"\");\n\n _defineProperty(this, \"crimeType\", \"\");\n\n _defineProperty(this, \"currentTask\", _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle);\n\n _defineProperty(this, \"currentTaskLocation\", \"\");\n\n _defineProperty(this, \"currentTaskMaxTime\", 0);\n\n _defineProperty(this, \"currentTaskTime\", 0);\n\n _defineProperty(this, \"earningsForSleeves\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForPlayer\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"factionWorkType\", _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None);\n\n _defineProperty(this, \"gainRatesForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"gymStatType\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"memory\", 1);\n\n _defineProperty(this, \"shock\", 1);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"sync\", 1);\n\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n /**\n * Commit crimes\n */\n\n\n commitCrime(p, crimeKey) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][crimeKey];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n this.crimeType = crimeKey;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime;\n return true;\n }\n /**\n * Called to stop the current task\n */\n\n\n finishTask(p) {\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][this.crimeType];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n const keysForIteration = Object.keys(successGainRates);\n\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n } // Do not reset task to IDLE\n\n\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {// For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n return retValue;\n }\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n\n\n gainExperience(p, exp, numCycles = 1, fromOtherSleeve = false) {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n } // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n\n const multFac = this.shock / 100 * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac; // Experience is gained by both this sleeve and player\n\n if (pHackExp > 0) {\n this.hacking_exp += pHackExp;\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.strength_exp += pStrExp;\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.defense_exp += pDefExp;\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.dexterity_exp += pDexExp;\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.agility_exp += pAgiExp;\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.charisma_exp += pChaExp;\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n } // Record earnings for other sleeves\n\n\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100); // Return the experience to be gained by other sleeves\n\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n money: 0\n };\n }\n /**\n * Earn money for player\n */\n\n\n gainMoney(p, task, numCycles = 1) {\n const gain = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain);\n p.recordMoneySource(gain, \"sleeves\");\n }\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n\n\n getMemoryUpgradeCost(n) {\n const amt = Math.round(n);\n\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n\n\n getRepGain(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction) {\n let favorMult = 1;\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company) {\n const companyName = this.currentTaskLocation;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma);\n const favorMult = 1 + company.favor / 100;\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`);\n return 0;\n }\n }\n\n installAugmentation(aug) {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({\n name: aug.name,\n level: 1\n });\n this.updateStatLevels();\n }\n\n log(entry) {\n const MaxLogSize = 50;\n this.logs.push(entry);\n\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n /**\n * Called on every sleeve for a Source File prestige\n */\n\n\n prestige(p) {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0; // Reset task-related stuff\n\n this.resetTaskStatus();\n this.earningsForSleeves = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.earningsForPlayer = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.shockRecovery(p); // Reset augs and multipliers\n\n this.augmentations = [];\n this.resetMultipliers(); // Reset sleeve-related stats\n\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n this.logs = [];\n }\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n\n\n process(p, numCycles = 1) {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n this.storedCycles += numCycles;\n\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let time = this.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n let cyclesUsed = this.storedCycles;\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time; // Shock gradually goes towards 100\n\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n\n switch (this.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle:\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class:\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed); // Gain faction reputation\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"])) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][this.currentTaskLocation];\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n break;\n\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n this.storedCycles -= cyclesUsed;\n return retValue;\n }\n /**\n * Resets all parameters used to keep information about the current task\n */\n\n\n resetTaskStatus() {\n this.earningsForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.gainRatesForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery;\n return true;\n }\n\n synchronize(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro;\n return true;\n }\n /**\n * Take a course at a university\n */\n\n\n takeUniversityCourse(p, universityName, className) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity;\n costMult = 4;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult);\n break;\n\n case \"networks\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult);\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult);\n break;\n\n case \"management\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult);\n break;\n\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult);\n break;\n\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class;\n return true;\n }\n /**\n * Travel to another City. Costs money from player\n */\n\n\n travel(p, newCity) {\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].TravelCost);\n this.city = newCity;\n return true;\n }\n\n tryBuyAugmentation(p, aug) {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n } // Verify that this sleeve does not already have that augmentation.\n\n\n if (this.augmentations.some(a => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost);\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class) {\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"data structures\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"networks\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"management\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n case \"leadership\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym:\n expMult = 4;\n break;\n\n default:\n return;\n } // Set stat gain rate\n\n\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat = this.gymStatType.toLowerCase();\n\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n) {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n\n\n workForCompany(p, companyName) {\n if (!(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"]) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (company == null) {\n return false;\n }\n\n if (companyPosition == null) {\n return false;\n }\n\n this.gainRatesForTask.money = companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney;\n this.gainRatesForTask.hack = companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.str = companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.def = companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.dex = companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.agi = companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.cha = companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.currentTaskLocation = companyName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n return true;\n }\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n\n\n workForFaction(p, factionName, workType) {\n if (factionName === \"\") {\n return false;\n }\n\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName].getInfo(); // Set type of work (hacking/field/security), and the experience gains\n\n const sanitizedWorkType = workType.toLowerCase();\n\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n return true;\n }\n /**\n * Begin a gym workout task\n */\n\n\n workoutAtGym(p, gymName, stat) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n const sanitizedStat = stat.toLowerCase(); // Set cost\n\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult); // Validate \"stat\" argument\n\n if (!sanitizedStat.includes(\"str\") && !sanitizedStat.includes(\"def\") && !sanitizedStat.includes(\"dex\") && !sanitizedStat.includes(\"agi\")) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym;\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_toJSON */ \"b\"])(\"Sleeve\", this);\n }\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_fromJSON */ \"a\"])(Sleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Reviver */ \"c\"].constructors.Sleeve = Sleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/Sleeve.ts?");
|
||
|
||
/***/ }),
|
||
/* 247 */
|
||
/*!*****************************!*\
|
||
!*** ./src/ExportBonus.tsx ***!
|
||
\*****************************/
|
||
/*! exports provided: LastExportBonus, canGetBonus, onExport, setLastExportBonus */
|
||
/*! exports used: LastExportBonus, canGetBonus, onExport, setLastExportBonus */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LastExportBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return canGetBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return onExport; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return setLastExportBonus; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n\nlet LastExportBonus = 0;\nconst bonusTimer = 24 * 60 * 60 * 1000; // 24h\n\nfunction canGetBonus() {\n const now = new Date().getTime();\n if (now - LastExportBonus > bonusTimer) return true;\n return false;\n}\nfunction onExport(p) {\n if (!canGetBonus()) return;\n\n for (const facName of p.factions) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][facName].favor++;\n }\n\n LastExportBonus = new Date().getTime();\n}\nfunction setLastExportBonus(unixTime) {\n LastExportBonus = unixTime;\n}\n\n//# sourceURL=webpack:///./src/ExportBonus.tsx?");
|
||
|
||
/***/ }),
|
||
/* 248 */
|
||
/*!************************************!*\
|
||
!*** ./src/Hacknet/HacknetNode.ts ***!
|
||
\************************************/
|
||
/*! exports provided: HacknetNode */
|
||
/*! exports used: HacknetNode */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNode; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 198);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Hacknet Node Class\n *\n * Hacknet Nodes are specialized machines that passively earn the player money over time.\n * They can be upgraded to increase their production\n */\n\n\n\n\n\nclass HacknetNode {\n // Node's number of cores\n // Node's Level\n // Node's production per second\n // How long this Node has existed, in seconds\n // Node's RAM (GB)\n // Total money earned by this Node\n constructor(name = \"\", prodMult = 1) {\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"moneyGainRatePerSecond\", 0);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"ram\", 1);\n\n _defineProperty(this, \"totalMoneyGenerated\", 0);\n\n this.name = name;\n this.updateMoneyGainRate(prodMult);\n } // Get the cost to upgrade this Node's number of cores\n\n\n calculateCoreUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateCoreUpgradeCost */ \"a\"])(this.cores, levels, costMult);\n } // Get the cost to upgrade this Node's level\n\n\n calculateLevelUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateLevelUpgradeCost */ \"b\"])(this.level, levels, costMult);\n } // Get the cost to upgrade this Node's RAM\n\n\n calculateRamUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateRamUpgradeCost */ \"e\"])(this.ram, levels, costMult);\n } // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\n\n if (isNaN(gain)) {\n console.error(`Hacknet Node ${this.name} calculated earnings of NaN`);\n gain = 0;\n }\n\n this.totalMoneyGenerated += gain;\n this.onlineTimeSeconds += seconds;\n return gain;\n } // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n\n\n upgradeCore(levels = 1, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n\n\n upgradeLevel(levels = 1, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n\n\n upgradeRam(levels = 1, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n\n this.updateMoneyGainRate(prodMult);\n } // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n\n\n updateMoneyGainRate(prodMult) {\n this.moneyGainRatePerSecond = Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateMoneyGainRate */ \"c\"])(this.level, this.ram, this.cores, prodMult);\n\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Error in calculating Hacknet Node production. Please report to game developer\", false);\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"HacknetNode\", this);\n }\n /**\n * Initiatizes a HacknetNode object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(HacknetNode, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.HacknetNode = HacknetNode;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetNode.ts?");
|
||
|
||
/***/ }),
|
||
/* 249 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Netscript/WorkerScript.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: WorkerScript */
|
||
/*! exports used: WorkerScript */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScript; });\n/* harmony import */ var _Environment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Environment */ 660);\n/* harmony import */ var _RamCostGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RamCostGenerator */ 11);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/AllServers */ 29);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * The worker agent for running a script instance. Each running script instance\n * has its own underlying WorkerScript object.\n *\n * Note that these objects are not saved and re-loaded when the game is refreshed.\n * Instead, whenever the game is opened, WorkerScripts are re-created from\n * RunningScript objects\n */\n\n\n\nclass WorkerScript {\n /**\n * Script's arguments\n */\n\n /**\n * Copy of the script's code\n */\n\n /**\n * Holds the timeoutID (numeric value) for whenever this script is blocked by a\n * timed Netscript function. i.e. Holds the return value of setTimeout()\n */\n\n /**\n * Stores names of all functions that have logging disabled\n */\n\n /**\n * Used for dynamic RAM calculation. Stores names of all functions that have\n * already been checked by this script.\n * TODO: Could probably just combine this with loadedFns?\n */\n\n /**\n * Tracks dynamic RAM usage\n */\n\n /**\n * Status message in case of script error. Currently unused I think\n */\n\n /**\n * Used for static RAM calculation. Stores names of all functions that have\n * already been checked by this script\n */\n\n /**\n * Script's output/return value. Currently not used or implemented\n */\n\n /**\n * Script's Static RAM usage. Equivalent to underlying script's RAM usage\n */\n\n /**\n * Whether or not this workerScript is currently running\n */\n constructor(runningScriptObj, pid, nsFuncsGenerator) {\n _defineProperty(this, \"code\", \"\");\n\n _defineProperty(this, \"delay\", null);\n\n _defineProperty(this, \"disableLogs\", {});\n\n _defineProperty(this, \"dynamicLoadedFns\", {});\n\n _defineProperty(this, \"dynamicRamUsage\", _RamCostGenerator__WEBPACK_IMPORTED_MODULE_1__[/* RamCostConstants */ \"a\"].ScriptBaseRamCost);\n\n _defineProperty(this, \"errorMessage\", \"\");\n\n _defineProperty(this, \"loadedFns\", {});\n\n _defineProperty(this, \"output\", \"\");\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"running\", false);\n\n this.name = runningScriptObj.filename;\n this.serverIp = runningScriptObj.server;\n const sanitizedPid = Math.round(pid);\n\n if (typeof sanitizedPid !== \"number\" || isNaN(sanitizedPid)) {\n throw new Error(`Invalid PID when constructing WorkerScript: ${pid}`);\n }\n\n this.pid = sanitizedPid;\n runningScriptObj.pid = sanitizedPid; // Get the underlying script's code\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][this.serverIp];\n\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);\n }\n\n let found = false;\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n found = true;\n this.code = server.scripts[i].code;\n }\n }\n\n if (!found) {\n throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);\n }\n\n this.env = new _Environment__WEBPACK_IMPORTED_MODULE_0__[/* Environment */ \"a\"](null);\n\n if (typeof nsFuncsGenerator === \"function\") {\n this.env.vars = nsFuncsGenerator(this);\n }\n\n this.env.set(\"args\", runningScriptObj.args.slice());\n this.scriptRef = runningScriptObj;\n this.args = runningScriptObj.args.slice();\n }\n /**\n * Returns the Server on which this script is running\n */\n\n\n getServer() {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][this.serverIp];\n if (server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);\n return server;\n }\n /**\n * Returns the Script object for the underlying script.\n * Returns null if it cannot be found (which would be a bug)\n */\n\n\n getScript() {\n const server = this.getServer();\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n return server.scripts[i];\n }\n }\n\n console.error(\"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong\");\n return null;\n }\n /**\n * Returns the script with the specified filename on the specified server,\n * or null if it cannot be found\n */\n\n\n getScriptOnServer(fn, server) {\n if (server == null) {\n server = this.getServer();\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === fn) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n shouldLog(fn) {\n return this.disableLogs[fn] == null;\n }\n\n log(func, txt) {\n if (this.shouldLog(func)) {\n if (func && txt) {\n this.scriptRef.log(`${func}: ${txt}`);\n } else if (func) {\n this.scriptRef.log(func);\n } else {\n this.scriptRef.log(txt);\n }\n }\n }\n\n print(txt) {\n this.scriptRef.log(txt);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Netscript/WorkerScript.ts?");
|
||
|
||
/***/ }),
|
||
/* 250 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Terminal/ITerminal.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: Output, Link, TTimer */
|
||
/*! exports used: Link, Output, TTimer */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Output; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Link; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return TTimer; });\nclass Output {\n constructor(text, color) {\n this.text = text;\n this.color = color;\n }\n\n}\nclass Link {\n constructor(hostname) {\n this.hostname = hostname;\n }\n\n}\nclass TTimer {\n constructor(time, action) {\n this.time = time;\n this.timeLeft = time;\n this.action = action;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Terminal/ITerminal.ts?");
|
||
|
||
/***/ }),
|
||
/* 251 */,
|
||
/* 252 */
|
||
/*!************************************!*\
|
||
!*** ./src/DarkWeb/DarkWebItem.ts ***!
|
||
\************************************/
|
||
/*! exports provided: DarkWebItem */
|
||
/*! exports used: DarkWebItem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DarkWebItem; });\nclass DarkWebItem {\n constructor(program, price, description) {\n this.program = program;\n this.price = price;\n this.description = description;\n }\n\n}\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWebItem.ts?");
|
||
|
||
/***/ }),
|
||
/* 253 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/StockMarket/OrderProcessing.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: processOrders */
|
||
/*! exports used: processOrders */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return processOrders; });\n/* harmony import */ var _BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BuyingAndSelling */ 155);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\n\n\n\n\n\n\n\n\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction processOrders(stock, orderType, posType, refs) {\n const orderBook = refs.stockMarket[\"Orders\"];\n\n if (orderBook == null) {\n const orders = {};\n\n for (const name in refs.stockMarket) {\n const stock = refs.stockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n\n let stockOrders = orderBook[stock.symbol];\n\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\n\nfunction executeOrder(order, refs) {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol]; // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n\n const opts = {\n suppressDialog: true\n };\n let res = true;\n let isBuy = false;\n\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n isBuy = true;\n\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* buyStock */ \"a\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* shortStock */ \"d\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellStock */ \"c\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellShort */ \"b\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n } // Position type, for logging/message purposes\n\n\n const pos = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \") was filled (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(Math.round(order.shares)), \" shares)\"));\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else {\n if (isBuy) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Failed to execute \", order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \"). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares\"));\n }\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/OrderProcessing.tsx?");
|
||
|
||
/***/ }),
|
||
/* 254 */
|
||
/*!*****************************!*\
|
||
!*** ./src/ui/GameRoot.tsx ***!
|
||
\*****************************/
|
||
/*! exports provided: Router, GameRoot */
|
||
/*! exports used: GameRoot, Router */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Router; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SaveObject */ 219);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ExportBonus */ 247);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Locations/Locations */ 194);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Prestige */ 275);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../StockMarket/StockMarket */ 74);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Router */ 26);\n/* harmony import */ var _Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Sidebar/ui/SidebarRoot */ 717);\n/* harmony import */ var _Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Augmentation/ui/AugmentationsRoot */ 783);\n/* harmony import */ var _DevMenu__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../DevMenu */ 792);\n/* harmony import */ var _Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerRoot */ 846);\n/* harmony import */ var _Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Gang/ui/GangRoot */ 866);\n/* harmony import */ var _Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Corporation/ui/CorporationRoot */ 881);\n/* harmony import */ var _Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../Infiltration/ui/InfiltrationRoot */ 921);\n/* harmony import */ var _PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../PersonObjects/Resleeving/ui/ResleeveRoot */ 935);\n/* harmony import */ var _WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./WorkInProgressRoot */ 938);\n/* harmony import */ var _ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../ui/React/GameOptionsRoot */ 939);\n/* harmony import */ var _PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../PersonObjects/Sleeve/ui/SleeveRoot */ 950);\n/* harmony import */ var _Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../Hacknet/ui/HacknetRoot */ 959);\n/* harmony import */ var _Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Locations/ui/GenericLocation */ 558);\n/* harmony import */ var _Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../Locations/ui/City */ 992);\n/* harmony import */ var _Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../Programs/ui/ProgramsRoot */ 993);\n/* harmony import */ var _ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../ScriptEditor/ui/Root */ 994);\n/* harmony import */ var _Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../Milestones/ui/MilestonesRoot */ 1010);\n/* harmony import */ var _Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../Terminal/ui/TerminalRoot */ 1011);\n/* harmony import */ var _Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../Tutorial/ui/TutorialRoot */ 1016);\n/* harmony import */ var _ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../ui/ActiveScripts/ActiveScriptsRoot */ 1017);\n/* harmony import */ var _Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../Faction/ui/FactionsRoot */ 1027);\n/* harmony import */ var _Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../Faction/ui/FactionRoot */ 1028);\n/* harmony import */ var _CharacterInfo__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./CharacterInfo */ 1043);\n/* harmony import */ var _Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../Locations/ui/TravelAgencyRoot */ 465);\n/* harmony import */ var _StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../StockMarket/ui/StockMarketRoot */ 1044);\n/* harmony import */ var _BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../BitNode/ui/BitverseRoot */ 1053);\n/* harmony import */ var _React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./React/CharacterOverview */ 1056);\n/* harmony import */ var _Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerCinematic */ 1060);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../RedPill */ 222);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Context */ 43);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])({\n root: {\n \"-ms-overflow-style\": \"none\"\n /* for Internet Explorer, Edge */\n ,\n \"scrollbar-width\": \"none\"\n /* for Firefox */\n ,\n margin: theme.spacing(0)\n }\n}));\nlet filename = \"\";\nlet code = \"\";\nlet Router = {\n page: () => {\n throw new Error(\"Router called before initialization\");\n },\n toActiveScripts: () => {\n throw new Error(\"Router called before initialization\");\n },\n toAugmentations: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBitVerse: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburner: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCharacterInfo: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCity: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCorporation: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCreateProgram: () => {\n throw new Error(\"Router called before initialization\");\n },\n toDevMenu: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFaction: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFactions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGameOptions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGang: () => {\n throw new Error(\"Router called before initialization\");\n },\n toHacknetNodes: () => {\n throw new Error(\"Router called before initialization\");\n },\n toInfiltration: () => {\n throw new Error(\"Router called before initialization\");\n },\n toJob: () => {\n throw new Error(\"Router called before initialization\");\n },\n toMilestones: () => {\n throw new Error(\"Router called before initialization\");\n },\n toResleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toScriptEditor: () => {\n throw new Error(\"Router called before initialization\");\n },\n toSleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStockMarket: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTerminal: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTravel: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTutorial: () => {\n throw new Error(\"Router called before initialization\");\n },\n toWork: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburnerCinematic: () => {\n throw new Error(\"Router called before initialization\");\n },\n toLocation: () => {\n throw new Error(\"Router called before initialization\");\n }\n};\n\nfunction determineStartPage(player) {\n if (player.isWorking) return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work;\n return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal;\n}\n\nfunction GameRoot({\n player,\n engine,\n terminal\n}) {\n const classes = useStyles();\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(determineStartPage(player));\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(player.currentWorkFactionName ? _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName] : undefined);\n if (faction === undefined && page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction) throw new Error(\"Trying to go to a page without the proper setup\");\n const [flume, setFlume] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [quick, setQuick] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [location, setLocation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(undefined);\n if (location === undefined && (page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job)) throw new Error(\"Trying to go to a page without the proper setup\");\n const [cinematicText, setCinematicText] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n Router = {\n page: () => page,\n toActiveScripts: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts),\n toAugmentations: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations),\n toBladeburner: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner),\n toCharacterInfo: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats),\n toCorporation: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation),\n toCreateProgram: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram),\n toDevMenu: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu),\n toFaction: faction => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions),\n toGameOptions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options),\n toGang: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang),\n toHacknetNodes: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet),\n toMilestones: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones),\n toResleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves),\n toScriptEditor: (fn, c) => {\n filename = fn;\n code = c;\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript);\n },\n toSleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves),\n toStockMarket: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket),\n toTerminal: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal),\n toTutorial: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial),\n toJob: () => {\n setLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_5__[/* Locations */ \"a\"][player.companyName]);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job);\n },\n toCity: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].City);\n },\n toTravel: () => {\n player.gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__[/* LocationName */ \"a\"].TravelAgency);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Travel);\n },\n toBitVerse: (flume, quick) => {\n setFlume(flume);\n setQuick(quick);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse);\n },\n toInfiltration: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration);\n },\n toWork: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work),\n toBladeburnerCinematic: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location);\n }\n };\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n filename = \"\";\n code = \"\";\n window.scrollTo(0, 0);\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_48__[/* Context */ \"a\"].Player.Provider, {\n value: player\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_48__[/* Context */ \"a\"].Router.Provider, {\n value: Router\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__[/* CharacterOverview */ \"a\"], {\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb)\n }), page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__[/* BitverseRoot */ \"a\"], {\n flume: flume,\n enter: _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* enterBitNode */ \"a\"],\n quick: quick\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__[/* InfiltrationRoot */ \"a\"], {\n location: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__[/* BladeburnerCinematic */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__[/* WorkInProgressRoot */ \"a\"], null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n display: \"flex\",\n flexDirection: \"row\",\n width: \"100%\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_17__[/* SidebarRoot */ \"a\"], {\n player: player,\n router: Router,\n page: page\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n className: classes.root,\n flexGrow: 1,\n display: \"block\",\n width: \"100%\",\n px: 1,\n height: \"100vh\"\n }, page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__[/* TerminalRoot */ \"a\"], {\n terminal: terminal,\n router: Router,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__[/* SleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CharacterInfo__WEBPACK_IMPORTED_MODULE_39__[/* CharacterInfo */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__[/* Root */ \"a\"], {\n filename: filename,\n code: code,\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__[/* ActiveScriptsRoot */ \"a\"], {\n workerScripts: _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__[/* workerScripts */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__[/* HacknetRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__[/* ProgramsRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__[/* FactionsRoot */ \"a\"], {\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__[/* FactionRoot */ \"a\"], {\n faction: faction,\n startHackingMissionFn: _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__[/* startHackingMission */ \"g\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__[/* MilestonesRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__[/* TutorialRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DevMenu__WEBPACK_IMPORTED_MODULE_19__[/* DevMenuRoot */ \"a\"], {\n player: player,\n engine: engine,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__[/* GangRoot */ \"a\"], {\n gang: player.gang\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__[/* CorporationRoot */ \"a\"], {\n corp: player.corporation,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__[/* BladeburnerRoot */ \"a\"], {\n bladeburner: player.bladeburner\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__[/* ResleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Travel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__[/* TravelAgencyRoot */ \"a\"], {\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__[/* StockMarketRoot */ \"a\"], {\n buyStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* buyStock */ \"a\"],\n buyStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* shortStock */ \"d\"],\n cancelOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* cancelOrder */ \"c\"],\n eventEmitterForReset: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* eventEmitterForUiReset */ \"e\"],\n initStockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* initStockMarketFnForReact */ \"g\"],\n p: player,\n placeOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* placeOrder */ \"j\"],\n sellStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellStock */ \"c\"],\n sellStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellShort */ \"b\"],\n stockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* StockMarket */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].City ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__[/* LocationCity */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__[/* GameOptionsRoot */ \"a\"], {\n player: player,\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb),\n delete: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].deleteGame(engine.indexedDb),\n export: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame(),\n import: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].importGame(),\n forceKill: () => {\n for (const hostname of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_8__[/* AllServers */ \"b\"])) {\n _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__[/* AllServers */ \"b\"][hostname].runningScripts = [];\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Forcefully deleted all running scripts. Please save and refresh page.\");\n },\n softReset: () => {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Soft Reset!\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n Router.toTerminal();\n }\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__[/* AugmentationsRoot */ \"a\"], {\n exportGameFn: () => {\n _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame();\n Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_3__[/* onExport */ \"c\"])(player);\n },\n installAugmentationsFn: () => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* installAugmentations */ \"d\"])();\n Router.toTerminal();\n }\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], null, \"Cannot load\"))))));\n}\n\n//# sourceURL=webpack:///./src/ui/GameRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 255 */,
|
||
/* 256 */,
|
||
/* 257 */,
|
||
/* 258 */,
|
||
/* 259 */,
|
||
/* 260 */,
|
||
/* 261 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Corporation/Corporation.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: Corporation */
|
||
/*! exports used: Corporation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var _CorporationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CorporationState */ 641);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/CorporationUnlockUpgrades */ 341);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/CorporationUpgrades */ 342);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/LiteratureHelpers */ 431);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! decimal.js */ 77);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n // UI Related Imports\n\n\nclass Corporation {\n //A division/business sector is represented by the object:\n //Financial stats\n //Publicly traded\n // Total existing shares\n // Total shares owned by player\n // Game cycles until player can sell shares again\n // Game cycles until player can issue shares again\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"The Corporation\");\n\n _defineProperty(this, \"divisions\", []);\n\n _defineProperty(this, \"funds\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9));\n\n _defineProperty(this, \"revenue\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"expenses\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"fundingRound\", 0);\n\n _defineProperty(this, \"public\", false);\n\n _defineProperty(this, \"totalShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"numShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"shareSalesUntilPriceUpdate\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n _defineProperty(this, \"shareSaleCooldown\", 0);\n\n _defineProperty(this, \"issueNewSharesCooldown\", 0);\n\n _defineProperty(this, \"dividendPercentage\", 0);\n\n _defineProperty(this, \"dividendTaxPercentage\", 50);\n\n _defineProperty(this, \"issuedShares\", 0);\n\n _defineProperty(this, \"sharePrice\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"state\", new _CorporationState__WEBPACK_IMPORTED_MODULE_0__[/* CorporationState */ \"a\"]());\n\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CorporationUnlockUpgrades */ \"a\"]).length;\n const numUpgrades = Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* CorporationUpgrades */ \"a\"]).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt) {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n\n this.funds = this.funds.plus(amt);\n }\n\n getState() {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1) {\n this.storedCycles += numCycles;\n }\n\n process(player) {\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n this.divisions.forEach(ind => {\n ind.process(marketCycles, state, this);\n }); // Process cooldowns\n\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n } //At the start of a new cycle, calculate profits from previous cycle\n\n\n if (state === \"START\") {\n this.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.divisions.forEach(ind => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n\n this.revenue = this.revenue.plus(ind.lastCycleRevenue);\n this.expenses = this.expenses.plus(ind.lastCycleExpenses);\n });\n const profit = this.revenue.minus(this.expenses);\n const cycleProfit = profit.times(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"There was an error calculating your Corporations funds and they got reset to 0. \" + \"This is a bug. Please report to game developer.<br><br>\" + \"(Your funds have been set to $150b for the inconvenience)\");\n this.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9);\n } // Process dividends\n\n\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (isNaN(this.dividendPercentage) || this.dividendPercentage < 0 || this.dividendPercentage > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].DividendMaxPercentage * 100) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = this.dividendPercentage / 100 * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n const dividendsPerShare = totalDividends / this.totalShares;\n const profit = this.numShares * dividendsPerShare * (1 - this.dividendTaxPercentage / 100);\n player.gainMoney(profit);\n player.recordMoneySource(profit, \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n determineValuation() {\n let val,\n profit = this.revenue.minus(this.expenses).toNumber();\n\n if (this.public) {\n // Account for dividends\n if (this.dividendPercentage > 0) {\n profit *= (100 - this.dividendPercentage) / 100;\n }\n\n val = this.funds.toNumber() + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds.toNumber(), 0) / 3; //Base valuation\n\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n\n val -= val % 1e6; //Round down to nearest millionth\n }\n\n return val * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CorporationValuation;\n }\n\n getTargetSharePrice() {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice() {\n const targetPrice = this.getTargetSharePrice();\n\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice() {\n this.sharePrice = this.getTargetSharePrice();\n } // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n\n\n calculateShareSale(numShares) {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n const maxIterations = Math.ceil(numShares / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`);\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate; // Calculate what new share price would be\n\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd) {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n } //One time upgrades that unlock new features\n\n\n unlock(upgrade) {\n const upgN = upgrade[0],\n price = upgrade[1];\n\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n\n if (this.funds.lt(price)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to unlock this!\");\n return;\n }\n\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds.minus(price); // Apply effects for one-time upgrades\n\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n } //Levelable upgrades\n\n\n upgrade(upgrade) {\n const upgN = upgrade[0],\n basePrice = upgrade[1],\n priceMult = upgrade[2],\n upgradeAmt = upgrade[3]; //Amount by which the upgrade multiplier gets increased (additive)\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n\n if (this.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to purchase this!\");\n return;\n }\n\n ++this.upgrades[upgN];\n this.funds = this.funds.minus(totalCost); //Increase upgrade multiplier\n\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt; //If storage size is being updated, update values in Warehouse objects\n\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n\n for (const city in industry.warehouses) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_3__[/* Warehouse */ \"a\"]) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier() {\n const mult = this.upgradeMultipliers[0];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier() {\n const mult = this.upgradeMultipliers[1];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain() {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier() {\n const mult = this.upgradeMultipliers[3];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier() {\n const mult = this.upgradeMultipliers[4];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier() {\n const mult = this.upgradeMultipliers[5];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier() {\n const mult = this.upgradeMultipliers[6];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier() {\n const mult = this.upgradeMultipliers[7];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier() {\n const mult = this.upgradeMultipliers[8];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier() {\n const mult = this.upgradeMultipliers[9];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n } // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n\n\n getStarterGuide(player) {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__[/* isString */ \"a\"])(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__[/* showLiterature */ \"a\"])(handbookFn);\n return;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_toJSON */ \"b\"])(\"Corporation\", this);\n }\n /**\n * Initiatizes a Corporation object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_fromJSON */ \"a\"])(Corporation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.Corporation = Corporation;\n\n//# sourceURL=webpack:///./src/Corporation/Corporation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 262 */,
|
||
/* 263 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Bladeburner/Operation.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: Operation */
|
||
/*! exports used: Operation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Operation; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Action */ 245);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\nclass Operation extends _Action__WEBPACK_IMPORTED_MODULE_1__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n\n _defineProperty(this, \"reqdRank\", 100);\n\n _defineProperty(this, \"teamCount\", 0);\n\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n } // For actions that have teams. To be implemented by subtypes.\n\n\n getTeamSuccessBonus(inst) {\n if (this.teamCount && this.teamCount > 0) {\n this.teamCount = Math.min(this.teamCount, inst.teamSize);\n const teamMultiplier = Math.pow(this.teamCount, 0.05);\n return teamMultiplier;\n }\n\n return 1;\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst) {\n const city = inst.getCurrentCity();\n\n if (city.chaos > _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold) {\n const diff = 1 + (city.chaos - _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold);\n const mult = Math.pow(diff, 0.1);\n return mult;\n }\n\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Operation\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Operation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Operation = Operation;\n\n//# sourceURL=webpack:///./src/Bladeburner/Operation.ts?");
|
||
|
||
/***/ }),
|
||
/* 264 */
|
||
/*!******************************!*\
|
||
!*** ./src/NetscriptPort.ts ***!
|
||
\******************************/
|
||
/*! exports provided: NetscriptPort */
|
||
/*! exports used: NetscriptPort */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPort; });\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Settings/Settings */ 34);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass NetscriptPort {\n constructor() {\n _defineProperty(this, \"data\", []);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n write(data) {\n this.data.push(data);\n\n if (this.data.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity) {\n return this.data.shift();\n }\n\n return null;\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n tryWrite(data) {\n if (this.data.length >= _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity) {\n return false;\n }\n\n this.data.push(data);\n return true;\n }\n\n read() {\n if (this.data.length === 0) {\n return \"NULL PORT DATA\";\n }\n\n return this.data.shift();\n }\n\n peek() {\n if (this.data.length === 0) {\n return \"NULL PORT DATA\";\n } else {\n const foo = this.data.slice();\n return foo[0];\n }\n }\n\n full() {\n return this.data.length == _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity;\n }\n\n empty() {\n return this.data.length === 0;\n }\n\n clear() {\n this.data.length = 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/NetscriptPort.ts?");
|
||
|
||
/***/ }),
|
||
/* 265 */
|
||
/*!********************************!*\
|
||
!*** ./src/ui/React/Theme.tsx ***!
|
||
\********************************/
|
||
/*! exports provided: colors, theme, TTheme */
|
||
/*! exports used: TTheme, colors */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return colors; });\n/* unused harmony export theme */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 477);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 1057);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/styles */ 1391);\n\n\nconst colors = {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\"\n};\nconst theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n palette: {\n primary: {\n light: colors.primarylight,\n main: colors.primary,\n dark: colors.primarydark\n },\n secondary: {\n light: colors.secondarylight,\n main: colors.secondary,\n dark: colors.secondarydark\n },\n error: {\n light: colors.errorlight,\n main: colors.error,\n dark: colors.errordark\n },\n info: {\n light: colors.infolight,\n main: colors.info,\n dark: colors.infodark\n },\n warning: {\n light: colors.warninglight,\n main: colors.warning,\n dark: colors.warningdark\n },\n background: {\n default: colors.black,\n paper: colors.well\n }\n },\n typography: {\n fontFamily: \"monospace\",\n button: {\n textTransform: \"none\"\n }\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n color: colors.primary\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: colors.primarydark\n }\n }\n }\n },\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n borderBottomColor: \"#fff\"\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: colors.primarydark\n },\n \"&:before\": {\n borderBottomColor: colors.primary\n },\n \"&:after\": {\n borderBottomColor: colors.primarylight\n }\n }\n }\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: colors.primarydark,\n // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: colors.primarylight\n }\n }\n }\n },\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: \"#333\",\n border: \"1px solid \" + colors.well,\n // color: colors.primary,\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: colors.black\n },\n borderRadius: 0\n }\n }\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: colors.primary\n }\n }\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: colors.well\n }\n }\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\"\n }\n }\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: colors.black\n }\n }\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: colors.primary,\n backgroundColor: colors.well,\n borderRadius: 0,\n border: \"2px solid white\"\n }\n }\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: colors.primary,\n backgroundColor: colors.well\n }\n }\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\",\n // firefox\n backgroundColor: colors.black\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: colors.primarydark\n },\n track: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: colors.black,\n border: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: colors.primary\n }\n }\n }\n }\n});\nconst TTheme = ({\n children\n}) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n injectFirst: true\n}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n theme: theme\n}, children));\n\n//# sourceURL=webpack:///./src/ui/React/Theme.tsx?");
|
||
|
||
/***/ }),
|
||
/* 266 */,
|
||
/* 267 */,
|
||
/* 268 */,
|
||
/* 269 */,
|
||
/* 270 */,
|
||
/* 271 */,
|
||
/* 272 */,
|
||
/* 273 */,
|
||
/* 274 */
|
||
/*!*****************************************************!*\
|
||
!*** ./src/Augmentation/PlayerOwnedAugmentation.ts ***!
|
||
\*****************************************************/
|
||
/*! exports provided: PlayerOwnedAugmentation */
|
||
/*! exports used: PlayerOwnedAugmentation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerOwnedAugmentation; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nclass PlayerOwnedAugmentation {\n constructor(name = \"\") {\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"name\", \"\");\n\n this.name = name;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts?");
|
||
|
||
/***/ }),
|
||
/* 275 */
|
||
/*!*************************!*\
|
||
!*** ./src/Prestige.js ***!
|
||
\*************************/
|
||
/*! exports provided: prestigeAugmentation, prestigeSourceFile */
|
||
/*! exports used: prestigeAugmentation, prestigeSourceFile */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return prestigeSourceFile; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Corporation/IndustryData */ 40);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Message/MessageHelpers */ 132);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./NetscriptWorker */ 125);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Netscript/Pid */ 392);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst BitNode8StartingMoney = 250e6; // Prestige by purchasing augmentation\n\nfunction prestigeAugmentation() {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n const megaCorpFactions = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"Omnitek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\"];\n const maintainMembership = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.filter(function (faction) {\n return megaCorpFactions.includes(faction);\n });\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeAugmentation(); // Delete all Worker Scripts objects\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])();\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Must be done before initForeignServers()\n // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp);\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].FTPCrackProgram.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].RelaySMTPProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot].owned) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].setMoney(1e6);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].BruteSSHProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].DeepscanV1.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].AutoLink.name);\n } // Re-create foreign servers\n\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer()); // Gain favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].gainFavor();\n }\n } // Gain favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].gainFavor();\n }\n } // Stop a Terminal action if there is onerror\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.concat(maintainMembership);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.map(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][f].isMember = true);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // Gang\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang.facName];\n\n if (faction instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* joinFaction */ \"d\"])(faction);\n }\n } // Cancel Bladeburner action\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner.prestige();\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Reset Stock market\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } // Red Pill\n\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n var WorldDaemon = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].WorldDaemon]];\n var DaedalusServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].DaedalusServer]];\n\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.ip);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.ip);\n }\n }\n\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n} // Prestige by destroying Bit Node and gaining a Source File\n\n\nfunction prestigeSourceFile(flume) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeSourceFile();\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])(); // Delete all Worker Scripts objects\n\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Must be done before initForeignServers()\n // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp); // Re-create foreign servers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer());\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n\n homeComp.cpuCores = 1; // Reset favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].favor = 0;\n }\n } // Reset favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].favor = 0;\n }\n } // Stop a Terminal action if there is one\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Delete all Augmentations\n\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n delete _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name];\n }\n } // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].augmentations.push({\n name: _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n level: _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12]\n });\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // BitNode 3: Corporatocracy\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 3) {\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"You received a copy of the Corporation Management Handbook on your home computer. \" + \"Read it if you need help getting started with Corporations!\");\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Bit Node 10: Digital Carbon\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 10) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n } // Reset Stock market, gang, and corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* deleteStockMarket */ \"d\"])();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) clearGangUI();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang = null;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].corporation = null;\n Object(_Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__[/* resetIndustryResearchTrees */ \"e\"])();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner = null; // Source-File 9 (level 3) effect\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 3) {\n const hserver = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].createHacknetServer();\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hacknet_node_money_mult);\n hserver.updateHashCapacity();\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n } // Gain int exp\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][5] !== 0 && !flume) _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gainIntelligenceExp(300);\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n}\n\n\n\n//# sourceURL=webpack:///./src/Prestige.js?");
|
||
|
||
/***/ }),
|
||
/* 276 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Company/CompanyPosition.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: CompanyPosition */
|
||
/*! exports used: CompanyPosition */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyPosition; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n\n\n/* tslint:disable:completed-docs */\n\nclass CompanyPosition {\n /**\n * Position title\n */\n\n /**\n * Title of next position to be promoted to\n */\n\n /**\n * Base salary for this position ($ per 200ms game cycle)\n * Will be multiplier by a company-specific multiplier for final salary\n */\n\n /**\n * Reputation multiplier\n */\n\n /**\n * Required stats to earn this position\n */\n\n /**\n * Required company reputation to earn this position\n */\n\n /**\n * Effectiveness of each stat time for job performance\n */\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n constructor(p) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n this.requiredHacking = p.reqdHacking != null ? p.reqdHacking : 0;\n this.requiredStrength = p.reqdStrength != null ? p.reqdStrength : 0;\n this.requiredDefense = p.reqdDefense != null ? p.reqdDefense : 0;\n this.requiredDexterity = p.reqdDexterity != null ? p.reqdDexterity : 0;\n this.requiredAgility = p.reqdAgility != null ? p.reqdAgility : 0;\n this.requiredCharisma = p.reqdCharisma != null ? p.reqdCharisma : 0;\n this.requiredReputation = p.reqdReputation != null ? p.reqdReputation : 0;\n this.hackingEffectiveness = p.hackingEffectiveness != null ? p.hackingEffectiveness : 0;\n this.strengthEffectiveness = p.strengthEffectiveness != null ? p.strengthEffectiveness : 0;\n this.defenseEffectiveness = p.defenseEffectiveness != null ? p.defenseEffectiveness : 0;\n this.dexterityEffectiveness = p.dexterityEffectiveness != null ? p.dexterityEffectiveness : 0;\n this.agilityEffectiveness = p.agilityEffectiveness != null ? p.agilityEffectiveness : 0;\n this.charismaEffectiveness = p.charismaEffectiveness != null ? p.charismaEffectiveness : 0;\n\n if (Math.round(this.hackingEffectiveness + this.strengthEffectiveness + this.defenseEffectiveness + this.dexterityEffectiveness + this.agilityEffectiveness + this.charismaEffectiveness) !== 100) {\n console.error(`CompanyPosition ${this.name} parameters do not sum to 100`);\n }\n\n this.hackingExpGain = p.hackingExpGain != null ? p.hackingExpGain : 0;\n this.strengthExpGain = p.strengthExpGain != null ? p.strengthExpGain : 0;\n this.defenseExpGain = p.defenseExpGain != null ? p.defenseExpGain : 0;\n this.dexterityExpGain = p.dexterityExpGain != null ? p.dexterityExpGain : 0;\n this.agilityExpGain = p.agilityExpGain != null ? p.agilityExpGain : 0;\n this.charismaExpGain = p.charismaExpGain != null ? p.charismaExpGain : 0;\n }\n\n calculateJobPerformance(hack, str, def, dex, agi, cha) {\n const hackRatio = this.hackingEffectiveness * hack / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const strRatio = this.strengthEffectiveness * str / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const defRatio = this.defenseEffectiveness * def / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const dexRatio = this.dexterityEffectiveness * dex / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const agiRatio = this.agilityEffectiveness * agi / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const chaRatio = this.charismaEffectiveness * cha / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n let reputationGain = this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100;\n\n if (isNaN(reputationGain)) {\n console.error(\"Company reputation gain calculated to be NaN\");\n reputationGain = 0;\n }\n\n return reputationGain;\n }\n\n isSoftwareJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"].includes(this.name);\n }\n\n isITJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"].includes(this.name);\n }\n\n isSecurityEngineerJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityEngineerCompanyPositions */ \"i\"].includes(this.name);\n }\n\n isNetworkEngineerJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* NetworkEngineerCompanyPositions */ \"f\"].includes(this.name);\n }\n\n isBusinessJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"].includes(this.name);\n }\n\n isSecurityJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"].includes(this.name);\n }\n\n isAgentJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"].includes(this.name);\n }\n\n isSoftwareConsultantJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"].includes(this.name);\n }\n\n isBusinessConsultantJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"].includes(this.name);\n }\n\n isPartTimeJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* PartTimeCompanyPositions */ \"g\"].includes(this.name);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Company/CompanyPosition.ts?");
|
||
|
||
/***/ }),
|
||
/* 277 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Script/RunningScript.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: RunningScript */
|
||
/*! exports used: RunningScript */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RunningScript; });\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Fconf/FconfSettings */ 67);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 439);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\n\n\n\n\n\nclass RunningScript {\n // Script arguments\n // Map of [key: server ip] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n // Script filename\n // This script's logs. An array of log entries\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n // Total amount of hacking experience earned from this script when offline\n // Total amount of money made by this script when offline\n // Number of seconds that the script has been running offline\n // Total amount of hacking experience earned from this script when online\n // Total amount of money made by this script when online\n // Number of seconds that this script has been running online\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n // How much RAM this script uses for ONE thread\n // IP of the server on which this script is running\n // Number of threads that this script is running with\n constructor(script = null, args = []) {\n _defineProperty(this, \"args\", []);\n\n _defineProperty(this, \"dataMap\", {});\n\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"logUpd\", false);\n\n _defineProperty(this, \"offlineExpGained\", 0);\n\n _defineProperty(this, \"offlineMoneyMade\", 0);\n\n _defineProperty(this, \"offlineRunningTime\", 0.01);\n\n _defineProperty(this, \"onlineExpGained\", 0);\n\n _defineProperty(this, \"onlineMoneyMade\", 0);\n\n _defineProperty(this, \"onlineRunningTime\", 0.01);\n\n _defineProperty(this, \"pid\", -1);\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"server\", \"\");\n\n _defineProperty(this, \"threads\", 1);\n\n if (script == null) {\n return;\n }\n\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n }\n\n log(txt) {\n if (this.logs.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__[/* Settings */ \"a\"].MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].ENABLE_TIMESTAMPS) {\n logEntry = \"[\" + Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__[/* getTimestamp */ \"a\"])() + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog() {\n for (let i = 0; i < this.logs.length; ++i) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(this.logs[i]);\n }\n }\n\n clearLog() {\n this.logs.length = 0;\n } // Update the moneyStolen and numTimesHack maps when hacking\n\n\n recordHack(serverIp, moneyGained, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][0] += moneyGained;\n this.dataMap[serverIp][1] += n;\n } // Update the grow map when calling grow()\n\n\n recordGrow(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][2] += n;\n } // Update the weaken map when calling weaken() {\n\n\n recordWeaken(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][3] += n;\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"RunningScript\", this);\n } // Initializes a RunningScript Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(RunningScript, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.RunningScript = RunningScript;\n\n//# sourceURL=webpack:///./src/Script/RunningScript.ts?");
|
||
|
||
/***/ }),
|
||
/* 278 */
|
||
/*!***************************************!*\
|
||
!*** ./src/SourceFile/SourceFiles.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: SourceFiles */
|
||
/*! exports used: SourceFiles */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFile */ 203);\n\nconst SourceFiles = {};\nSourceFiles[\"SourceFile1\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](1, \"This Source-File lets the player start with 32GB of RAM on his/her \" + \"home computer. It also increases all of the player's multipliers by:<br><br>\" + \"Level 1: 16%<br>\" + \"Level 2: 24%<br>\" + \"Level 3: 28%\");\nSourceFiles[\"SourceFile2\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](2, \"This Source-File allows you to form gangs in other BitNodes \" + \"once your karma decreases to a certain value. It also increases the player's \" + \"crime success rate, crime money, and charisma multipliers by:<br><br>\" + \"Level 1: 24%<br>\" + \"Level 2: 36%<br>\" + \"Level 3: 42%\");\nSourceFiles[\"SourceFile3\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](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:<br>\" + \"Level 1: 8%<br>\" + \"Level 2: 12%<br>\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile4\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](4, \"This Source-File lets you access and use the Singularity Functions in every BitNode. Every \" + \"level of this Source-File opens up more of the Singularity Functions you can use.\");\nSourceFiles[\"SourceFile5\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](5, \"This Source-File grants a special new stat called Intelligence. Intelligence \" + \"is unique because it is permanent and persistent (it never gets reset back to 1). However, \" + \"gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't \" + \"know when you gain experience and how much). Higher Intelligence levels will boost your production \" + \"for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() \" + \"and getServer() Netscript functions, as well as the formulas API, and will raise all of your \" + \"hacking-related multipliers by:<br><br> \" + \"Level 1: 8%<br>\" + \"Level 2: 12%<br>\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile6\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](6, \"This Source-File allows you to access the NSA's Bladeburner Division in other \" + \"BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:<br><br>\" + \"Level 1: 8%<br>\" + \"Level 2: 12%<br>\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile7\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](7, \"This Source-File allows you to access the Bladeburner Netscript API in other \" + \"BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>\" + \"Level 1: 8%<br>\" + \"Level 2: 12%<br>\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile8\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](8, \"This Source-File grants the following benefits:<br><br>\" + \"Level 1: Permanent access to WSE and TIX API<br>\" + \"Level 2: Ability to short stocks in other BitNodes<br>\" + \"Level 3: Ability to use limit/stop orders in other BitNodes<br><br>\" + \"This Source-File also increases your hacking growth multipliers by: \" + \"<br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%\");\nSourceFiles[\"SourceFile9\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](9, \"This Source-File grants the following benefits:<br><br>\" + \"Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>\" + \"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>\" + \"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>\" + \"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT \" + \"when installing Augmentations)\");\nSourceFiles[\"SourceFile10\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](10, \"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this \" + \"Source-File also grants you a Duplicate Sleeve\");\nSourceFiles[\"SourceFile11\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](11, \"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate \" + \"at that company by 1% per favor (rather than just the reputation gain). This Source-File also \" + \" increases the player's company salary and reputation gain multipliers by:<br><br>\" + \"Level 1: 32%<br>\" + \"Level 2: 48%<br>\" + \"Level 3: 56%<br><br>\" + \"It also reduces the price increase for every aug bought by:<br><br>\" + \"Level 1: 4%<br>\" + \"Level 2: 6%<br>\" + \"Level 3: 7%\");\nSourceFiles[\"SourceFile12\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](12, \"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.\");\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFiles.ts?");
|
||
|
||
/***/ }),
|
||
/* 279 */
|
||
/*!***************************!*\
|
||
!*** ./src/Casino/RNG.ts ***!
|
||
\***************************/
|
||
/*! exports provided: BadRNG, WHRNG */
|
||
/*! exports used: BadRNG, WHRNG */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BadRNG; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return WHRNG; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/*\n * very bad RNG, meant to be used as introduction to RNG manipulation. It has a\n * period of 1024.\n */\nclass RNG0 {\n constructor() {\n _defineProperty(this, \"m\", 1024);\n\n _defineProperty(this, \"a\", 341);\n\n _defineProperty(this, \"c\", 1);\n\n this.x = 0;\n this.reset();\n }\n\n step() {\n this.x = (this.a * this.x + this.c) % this.m;\n }\n\n random() {\n this.step();\n return this.x / this.m;\n }\n\n reset() {\n this.x = new Date().getTime() % this.m;\n }\n\n}\n\nconst BadRNG = new RNG0();\n/*\n * Wichmann–Hill PRNG\n * The period is 6e12.\n */\n\nclass WHRNG {\n constructor(totalPlaytime) {\n _defineProperty(this, \"s1\", 0);\n\n _defineProperty(this, \"s2\", 0);\n\n _defineProperty(this, \"s3\", 0);\n\n // This one is seeded by the players total play time.\n const v = totalPlaytime / 1000 % 30000;\n this.s1 = v;\n this.s2 = v;\n this.s3 = v;\n }\n\n step() {\n this.s1 = 171 * this.s1 % 30269;\n this.s2 = 172 * this.s2 % 30307;\n this.s3 = 170 * this.s3 % 30323;\n }\n\n random() {\n this.step();\n return (this.s1 / 30269.0 + this.s2 / 30307.0 + this.s3 / 30323.0) % 1.0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/RNG.ts?");
|
||
|
||
/***/ }),
|
||
/* 280 */,
|
||
/* 281 */,
|
||
/* 282 */,
|
||
/* 283 */,
|
||
/* 284 */
|
||
/*!*****************************!*\
|
||
!*** ./src/Casino/Game.tsx ***!
|
||
\*****************************/
|
||
/*! exports provided: Game */
|
||
/*! exports used: Game */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Game; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\nconst gainLimit = 10e9;\nclass Game extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n win(p, n) {\n p.gainMoney(n);\n p.recordMoneySource(n, \"casino\");\n }\n\n reachedLimit(p) {\n const reached = p.getCasinoWinnings() > gainLimit;\n\n if (reached) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Alright cheater get out of here. You're not allowed here anymore.\"));\n }\n\n return reached;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Game.tsx?");
|
||
|
||
/***/ }),
|
||
/* 285 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Corporation/ResearchMap.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: ResearchMap */
|
||
/*! exports used: ResearchMap */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResearchMap; });\n/* harmony import */ var _Research__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Research */ 648);\n/* harmony import */ var _data_ResearchMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/ResearchMetadata */ 649);\n// The Research Map is an object that holds all Corporation Research objects\n// as values. They are identified by their names\n\n\nconst ResearchMap = {};\n\nfunction addResearch(p) {\n if (ResearchMap[p.name] != null) {\n console.warn(`Duplicate Research being defined: ${p.name}`);\n }\n\n ResearchMap[p.name] = new _Research__WEBPACK_IMPORTED_MODULE_0__[/* Research */ \"a\"](p);\n}\n\nfor (const metadata of _data_ResearchMetadata__WEBPACK_IMPORTED_MODULE_1__[/* researchMetadata */ \"a\"]) {\n addResearch(metadata);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ResearchMap.ts?");
|
||
|
||
/***/ }),
|
||
/* 286 */
|
||
/*!******************************!*\
|
||
!*** ./src/Script/Script.ts ***!
|
||
\******************************/
|
||
/*! exports provided: Script */
|
||
/*! exports used: Script */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Script; });\n/* harmony import */ var _RamCalculations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RamCalculations */ 433);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 311);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Class representing a script file.\n *\n * This does NOT represent a script that is actively running and\n * being evaluated. See RunningScript for that\n */\n\n\n\n\nlet globalModuleSequenceNumber = 0;\nclass Script {\n // Code for this script\n // Filename for the script file\n // url of the script if any, only for NS2.\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n // Only used with NS2 scripts; the list of dependency script filenames. This is constructed\n // whenever the script is first evaluated, and therefore may be out of date if the script\n // has been updated since it was last run.\n // Amount of RAM this Script requres to run\n // IP of server that this script is on.\n constructor(fn = \"\", code = \"\", server = \"\", otherScripts = []) {\n _defineProperty(this, \"code\", \"\");\n\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"url\", \"\");\n\n _defineProperty(this, \"module\", \"\");\n\n _defineProperty(this, \"dependencies\", []);\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"server\", \"\");\n\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // IP of server this script is on\n\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n\n if (this.code !== \"\") {\n this.updateRamUsage(otherScripts);\n }\n }\n /**\n * Download the script as a file\n */\n\n\n download() {\n const filename = this.filename + \".js\";\n const file = new Blob([this.code], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n /**\n * Marks this script as having been updated. It will be recompiled next time something tries\n * to exec it.\n */\n\n\n markUpdated() {\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\n /**\n * Save a script from the script editor\n * @param {string} code - The new contents of the script\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n\n\n saveScript(code, serverIp, otherScripts) {\n // Update code and filename\n this.code = code.replace(/^\\s+|\\s+$/g, \"\");\n const filenameElem = document.getElementById(\"script-editor-filename\");\n\n if (filenameElem == null) {\n console.error(`Failed to get Script filename DOM element`);\n return;\n }\n\n this.filename = filenameElem.value;\n this.server = serverIp;\n this.updateRamUsage(otherScripts);\n this.markUpdated();\n }\n /**\n * Calculates and updates the script's RAM usage based on its code\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n\n\n async updateRamUsage(otherScripts) {\n const res = await Object(_RamCalculations__WEBPACK_IMPORTED_MODULE_0__[/* calculateRamUsage */ \"a\"])(this.code, otherScripts);\n\n if (res > 0) {\n this.ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_3__[/* roundToTwo */ \"a\"])(res);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Script\", this);\n } // Initializes a Script Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Script, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Script = Script;\n\n//# sourceURL=webpack:///./src/Script/Script.ts?");
|
||
|
||
/***/ }),
|
||
/* 287 */
|
||
/*!************************************************!*\
|
||
!*** ./utils/uiHelpers/clearEventListeners.ts ***!
|
||
\************************************************/
|
||
/*! exports provided: clearEventListeners */
|
||
/*! exports used: clearEventListeners */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return clearEventListeners; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 210);\n\n/**\n * Given an element by its ID, removes all event listeners from that element by cloning and\n * replacing. Then returns the new cloned element.\n * @param elemId The HTML ID to retrieve the element by.\n */\n\nfunction clearEventListeners(elemId) {\n try {\n let elem;\n\n if (typeof elemId === \"string\") {\n elem = Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(elemId);\n } else {\n elem = elemId;\n }\n\n const newElem = elem.cloneNode(true);\n\n if (elem.parentNode !== null) {\n elem.parentNode.replaceChild(newElem, elem);\n }\n\n return newElem;\n } catch (e) {\n // tslint:disable-next-line:no-console\n console.error(e);\n return null;\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/clearEventListeners.ts?");
|
||
|
||
/***/ }),
|
||
/* 288 */
|
||
/*!************************************!*\
|
||
!*** ./src/Hacknet/HashManager.ts ***!
|
||
\************************************/
|
||
/*! exports provided: HashManager */
|
||
/*! exports used: HashManager */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashManager; });\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HashUpgrades */ 217);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * This is a central class for storing and managing the player's hashes,\n * which are generated by Hacknet Servers\n *\n * It is also used to keep track of what upgrades the player has bought with\n * his hashes, and contains method for grabbing the data/multipliers from\n * those upgrades\n */\n\n\nclass HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n // Number of hashes currently in storage\n // Map of Hash Upgrade Name -> levels in that upgrade\n constructor() {\n _defineProperty(this, \"capacity\", 0);\n\n _defineProperty(this, \"hashes\", 0);\n\n _defineProperty(this, \"upgrades\", {});\n\n for (const name in _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"]) {\n this.upgrades[name] = 0;\n }\n }\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n\n\n getMult(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null) {\n console.error(`Could not find Hash Study upgrade`);\n return 1;\n }\n\n return 1 + upg.value * currLevel / 100;\n }\n /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n\n\n getStudyMult() {\n const upgName = \"Improve Studying\";\n return this.getMult(upgName);\n }\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n\n\n getTrainingMult() {\n const upgName = \"Improve Gym Training\";\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n\n return upg;\n }\n /**\n * Get the cost (in hashes) of an upgrade\n */\n\n\n getUpgradeCost(upgName) {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${upgName}`);\n return Infinity;\n }\n\n return upg.getCost(currLevel);\n }\n\n prestige() {\n for (const name in _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"]) {\n this.upgrades[name] = 0;\n }\n\n this.hashes = 0; // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n\n this.updateCapacity(0);\n }\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n\n\n refundUpgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName]; // Reduce the level first, so we get the right cost\n\n --this.upgrades[upgName];\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null || currLevel < 0) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return;\n }\n\n const cost = upg.getCost(currLevel);\n this.hashes += cost;\n }\n\n storeHashes(numHashes) {\n this.hashes += numHashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n }\n\n updateCapacity(newCap) {\n if (newCap < 0) {\n this.capacity = 0;\n }\n\n this.capacity = Math.max(newCap, 0);\n }\n /**\n * Returns boolean indicating whether or not the upgrade was successfully purchased\n * Note that this does NOT actually implement the effect\n */\n\n\n upgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n\n if (upg == null) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return false;\n }\n\n const cost = this.getUpgradeCost(upgName);\n\n if (this.hashes < cost) {\n return false;\n }\n\n this.hashes -= cost;\n ++this.upgrades[upgName];\n return true;\n } //Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"HashManager\", this);\n } // Initiatizes a HashManager object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(HashManager, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.HashManager = HashManager;\n\n//# sourceURL=webpack:///./src/Hacknet/HashManager.ts?");
|
||
|
||
/***/ }),
|
||
/* 289 */
|
||
/*!****************************************!*\
|
||
!*** ./src/CodingContractGenerator.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: generateRandomContract, generateRandomContractOnHome, generateContract */
|
||
/*! exports used: generateContract, generateRandomContract, generateRandomContractOnHome */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return generateRandomContract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return generateRandomContractOnHome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateContract; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CodingContracts */ 79);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Server/Server */ 92);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n\n\n\n\n\n\n\n\nfunction generateRandomContract() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const randServer = getRandomServer();\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n randServer.addContract(contract);\n}\nfunction generateRandomContractOnHome() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const serv = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].getHomeComputer();\n const contractFn = getRandomFilename(serv, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n serv.addContract(contract);\n}\nfunction generateContract(params) {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n } // Reward Type - This is always random for now\n\n\n const reward = getRandomReward(); // Server\n\n let server;\n\n if (params.server != null) {\n server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__[/* GetServerByHostname */ \"a\"])(params.server);\n\n if (server == null) {\n server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][params.server];\n }\n\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n } // Filename\n\n\n let fn;\n\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](fn, problemType, reward);\n server.addContract(contract);\n} // Ensures that a contract's reward type is valid\n\nfunction sanitizeRewardType(rewardType) {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation && Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs).length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType() {\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, problemTypes.length - 1);\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward() {\n const reward = {\n name: \"\",\n type: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money)\n };\n reward.type = sanitizeRewardType(reward.type); // Add additional information based on the reward type\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n {\n // Get a random faction that player is a part of. That\n // faction must allow hacking contracts\n const numFactions = factionsThatAllowHacking.length;\n const randFaction = factionsThatAllowHacking[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n {\n const allJobs = Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs);\n\n if (allJobs.length > 0) {\n reward.name = allJobs[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, allJobs.length - 1)];\n } else {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n break;\n }\n\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer() {\n const servers = Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"]);\n let randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n let randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]]; // An infinite loop shouldn't ever happen, but to be safe we'll use\n // a for loop with a limited number of tries\n\n for (let i = 0; i < 200; ++i) {\n if (randServer instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_6__[/* Server */ \"a\"] && !randServer.purchasedByPlayer && randServer.hostname !== _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__[/* SpecialServerNames */ \"b\"].WorldDaemon) {\n break;\n }\n\n randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server, reward) {\n let contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (server.contracts.filter(c => {\n return c.fn === contractFn;\n }).length <= 0) {\n break;\n }\n\n contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n\n//# sourceURL=webpack:///./src/CodingContractGenerator.ts?");
|
||
|
||
/***/ }),
|
||
/* 290 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Corporation/OfficeSpace.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: OfficeSpace */
|
||
/*! exports used: OfficeSpace */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OfficeSpace; });\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Employee__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Employee */ 355);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nclass OfficeSpace {\n constructor(params = {}) {\n _defineProperty(this, \"minEne\", 0);\n\n _defineProperty(this, \"maxEne\", 100);\n\n _defineProperty(this, \"minHap\", 0);\n\n _defineProperty(this, \"maxHap\", 100);\n\n _defineProperty(this, \"maxMor\", 100);\n\n _defineProperty(this, \"employees\", []);\n\n _defineProperty(this, \"employeeProd\", {\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD]: 0,\n total: 0\n });\n\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity() {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation, industry) {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Training;\n }\n } // Process Office properties\n\n\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n } // Calculate changes in Morale/Happiness/Energy for Employees\n\n\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\n\n if (corporation.funds < 0 && industry.lastCycleRevenue < 0) {\n perfMult = Math.pow(0.99, marketCycles);\n } else if (corporation.funds > 0 && industry.lastCycleRevenue > 0) {\n perfMult = Math.pow(1.01, marketCycles);\n }\n\n const hasAutobrew = industry.hasResearch(\"AutoBrew\");\n const hasAutoparty = industry.hasResearch(\"AutoPartyManager\");\n let salaryPaid = 0;\n\n for (let i = 0; i < this.employees.length; ++i) {\n const emp = this.employees[i];\n\n if (hasAutoparty) {\n emp.mor = this.maxMor;\n emp.hap = this.maxHap;\n } else {\n emp.mor *= perfMult;\n emp.hap *= perfMult;\n emp.mor = Math.min(emp.mor, this.maxMor);\n emp.hap = Math.min(emp.hap, this.maxHap);\n }\n\n if (hasAutobrew) {\n emp.ene = this.maxEne;\n } else {\n emp.ene *= perfMult;\n emp.ene = Math.min(emp.ene, this.maxEne);\n }\n\n const salary = emp.process(marketCycles, this);\n salaryPaid += salary;\n }\n\n this.calculateEmployeeProductivity(corporation, industry);\n return salaryPaid;\n }\n\n calculateEmployeeProductivity(corporation, industry) {\n //Reset\n for (const name in this.employeeProd) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\n\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n const prod = employee.calculateProductivity(corporation, industry);\n this.employeeProd[employee.pos] += prod;\n total += prod;\n }\n\n this.employeeProd.total = total;\n }\n\n hireRandomEmployee() {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return; //Generate three random employees (meh, decent, amazing)\n\n const mult = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(76, 100) / 100;\n const int = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n cha = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n exp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n cre = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n eff = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n sal = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n const emp = new _Employee__WEBPACK_IMPORTED_MODULE_5__[/* Employee */ \"a\"]({\n intelligence: int * mult,\n charisma: cha * mult,\n experience: exp * mult,\n creativity: cre * mult,\n efficiency: eff * mult,\n salary: sal * mult\n });\n const name = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* generateRandomString */ \"d\"])(7);\n\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].name === name) {\n return this.hireRandomEmployee();\n }\n }\n\n emp.name = name;\n this.employees.push(emp);\n return emp;\n } //Finds the first unassigned employee and assigns its to the specified job\n\n\n assignEmployeeToJob(job) {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Unassigned) {\n this.employees[i].pos = job;\n return true;\n }\n }\n\n return false;\n } //Finds the first employee with the given job and unassigns it\n\n\n unassignEmployeeFromJob(job) {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === job) {\n this.employees[i].pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Unassigned;\n return true;\n }\n }\n\n return false;\n }\n\n copy() {\n const office = new OfficeSpace();\n office.loc = this.loc;\n office.size = this.size;\n office.minEne = this.minEne;\n office.maxEne = this.maxEne;\n office.minHap = this.minHap;\n office.maxHap = this.maxHap;\n office.maxMor = this.maxMor;\n office.employeeProd = {\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD],\n total: this.employeeProd[\"total\"]\n };\n office.employees = [];\n\n for (const employee of this.employees) {\n office.employees.push(employee.copy());\n }\n\n return office;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"OfficeSpace\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(OfficeSpace, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.OfficeSpace = OfficeSpace;\n\n//# sourceURL=webpack:///./src/Corporation/OfficeSpace.ts?");
|
||
|
||
/***/ }),
|
||
/* 291 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Corporation/IndustryUpgrades.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: IndustryUpgrades */
|
||
/*! exports used: IndustryUpgrades */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryUpgrades; });\n// Industry upgrades\n// The data structure is an array with the following format:\n// [index in array, base price, price mult, benefit mult (if applicable), name, desc]\nconst IndustryUpgrades = {\n \"0\": [0, 500e3, 1, 1.05, \"Coffee\", \"Provide your employees with coffee, increasing their energy by 5%.\"],\n \"1\": [1, 1e9, 1.06, 1.03, \"AdVert.Inc\", \"Hire AdVert.Inc to advertise your company. Each level of \" + \"this upgrade grants your company a static increase of 3 and 1 to its awareness and \" + \"popularity, respectively. It will then increase your company's awareness by 1%, and its popularity \" + \"by a random percentage between 1% and 3%. These effects are increased by other upgrades \" + \"that increase the power of your advertising.\"]\n};\n\n//# sourceURL=webpack:///./src/Corporation/IndustryUpgrades.ts?");
|
||
|
||
/***/ }),
|
||
/* 292 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/utils/MoneySourceTracker.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: MoneySourceTracker */
|
||
/*! exports used: MoneySourceTracker */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoneySourceTracker; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * This is an object that is used to keep track of where all of the player's\n * money is coming from (or going to)\n */\n\nclass MoneySourceTracker {\n constructor() {\n _defineProperty(this, \"bladeburner\", 0);\n\n _defineProperty(this, \"casino\", 0);\n\n _defineProperty(this, \"class\", 0);\n\n _defineProperty(this, \"codingcontract\", 0);\n\n _defineProperty(this, \"corporation\", 0);\n\n _defineProperty(this, \"crime\", 0);\n\n _defineProperty(this, \"gang\", 0);\n\n _defineProperty(this, \"hacking\", 0);\n\n _defineProperty(this, \"hacknetnode\", 0);\n\n _defineProperty(this, \"hospitalization\", 0);\n\n _defineProperty(this, \"infiltration\", 0);\n\n _defineProperty(this, \"sleeves\", 0);\n\n _defineProperty(this, \"stock\", 0);\n\n _defineProperty(this, \"total\", 0);\n\n _defineProperty(this, \"work\", 0);\n }\n\n // Record money earned\n record(amt, source) {\n const sanitizedSource = source.toLowerCase();\n\n if (typeof this[sanitizedSource] !== \"number\") {\n console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);\n return;\n }\n\n this[sanitizedSource] += amt;\n this.total += amt;\n } // Reset the money tracker by setting all stats to 0\n\n\n reset() {\n for (const prop in this) {\n if (typeof this[prop] === \"number\") {\n this[prop] = 0;\n }\n }\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"MoneySourceTracker\", this);\n } // Initiatizes a MoneySourceTracker object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(MoneySourceTracker, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.MoneySourceTracker = MoneySourceTracker;\n\n//# sourceURL=webpack:///./src/utils/MoneySourceTracker.ts?");
|
||
|
||
/***/ }),
|
||
/* 293 */
|
||
/*!*************************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/SleeveCovenantPurchases.ts ***!
|
||
\*************************************************************/
|
||
/*! exports provided: MaxSleevesFromCovenant, BaseCostPerSleeve, PopupId, createSleevePurchasesFromCovenantPopup */
|
||
/*! exports used: BaseCostPerSleeve, MaxSleevesFromCovenant, PopupId, createSleevePurchasesFromCovenantPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return MaxSleevesFromCovenant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseCostPerSleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return PopupId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createSleevePurchasesFromCovenantPopup; });\n/* harmony import */ var _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/CovenantPurchasesRoot */ 1037);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\n\nconst MaxSleevesFromCovenant = 5;\nconst BaseCostPerSleeve = 10e12;\nconst PopupId = \"covenant-sleeve-purchases-popup\";\nfunction createSleevePurchasesFromCovenantPopup(p) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(PopupId, _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__[/* CovenantPurchasesRoot */ \"a\"], {\n p: p,\n closeFn: () => Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(PopupId)\n });\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.ts?");
|
||
|
||
/***/ }),
|
||
/* 294 */,
|
||
/* 295 */,
|
||
/* 296 */,
|
||
/* 297 */,
|
||
/* 298 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Faction/ui/Option.tsx ***!
|
||
\***********************************/
|
||
/*! exports provided: Option */
|
||
/*! exports used: Option */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Option; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React component for a selectable option on the Faction UI. These\n * options including working for the faction, hacking missions, purchasing\n * augmentations, etc.\n */\n\n\nclass Option extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"faction-work-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"faction-work-div-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.onClick,\n text: this.props.buttonText\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.infoText)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/Option.tsx?");
|
||
|
||
/***/ }),
|
||
/* 299 */,
|
||
/* 300 */,
|
||
/* 301 */,
|
||
/* 302 */,
|
||
/* 303 */,
|
||
/* 304 */,
|
||
/* 305 */,
|
||
/* 306 */,
|
||
/* 307 */,
|
||
/* 308 */,
|
||
/* 309 */,
|
||
/* 310 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Hospital/Hospital.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: getHospitalizationCost, calculateHospitalizationCost */
|
||
/*! exports used: calculateHospitalizationCost, getHospitalizationCost */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getHospitalizationCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateHospitalizationCost; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n\nfunction getHospitalizationCost(p) {\n let money;\n\n if (typeof p.money === \"number\") {\n money = p.money;\n } else {\n money = p.money.toNumber();\n }\n\n if (money < 0) {\n return 0;\n }\n\n return Math.min(money * 0.1, (p.max_hp - p.hp) * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HospitalCostPerHp);\n}\nfunction calculateHospitalizationCost(p, damage) {\n const oldhp = p.hp;\n p.hp -= damage;\n const cost = getHospitalizationCost(p);\n p.hp = oldhp;\n return cost;\n}\n\n//# sourceURL=webpack:///./src/Hospital/Hospital.ts?");
|
||
|
||
/***/ }),
|
||
/* 311 */
|
||
/*!*************************************!*\
|
||
!*** ./utils/helpers/roundToTwo.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: roundToTwo */
|
||
/*! exports used: roundToTwo */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return roundToTwo; });\n/**\n * Rounds a number to two decimal places.\n * @param decimal A decimal value to trim to two places.\n */\nfunction roundToTwo(decimal) {\n const leftShift = Math.round(parseFloat(`${decimal}e+2`));\n return +`${leftShift}e-2`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/roundToTwo.ts?");
|
||
|
||
/***/ }),
|
||
/* 312 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/PersonObjects/formulas/intelligence.ts ***!
|
||
\****************************************************/
|
||
/*! exports provided: calculateIntelligenceBonus */
|
||
/*! exports used: calculateIntelligenceBonus */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateIntelligenceBonus; });\nfunction calculateIntelligenceBonus(intelligence, weight = 1) {\n return 1 + weight * Math.pow(intelligence, 0.8) / 600;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/formulas/intelligence.ts?");
|
||
|
||
/***/ }),
|
||
/* 313 */
|
||
/*!****************************!*\
|
||
!*** ./src/Fconf/Fconf.js ***!
|
||
\****************************/
|
||
/*! exports provided: FconfSettings, createFconf, parseFconfSettings, loadFconf */
|
||
/*! exports used: createFconf, loadFconf, parseFconfSettings */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createFconf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return parseFconfSettings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadFconf; });\n/* harmony import */ var _FconfSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FconfSettings */ 67);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\n\nvar FconfComments = {\n ENABLE_BASH_HOTKEYS: \"Improved Bash emulation mode. Setting this to 1 enables several\\n\" + \"new Terminal shortcuts and features that more closely resemble\\n\" + \"a real Bash-style shell. Note that when this mode is enabled,\\n\" + \"the default browser shortcuts are overriden by the new Bash\\n\" + \"shortcuts.\\n\\n\" + \"To see a full list of the Terminal shortcuts that this enables, see:\\n\" + \"http://bitburner.readthedocs.io/en/latest/shortcuts.html\",\n ENABLE_TIMESTAMPS: \"Terminal commands and log entries will be timestamped. The timestamp\\n\" + \"will have the format: M/D h:m\",\n MAIN_MENU_STYLE: \"Customize the main navigation menu on the left-hand side. Current options:\\n\\n\" + \"default, classic, compact\",\n THEME_BACKGROUND_COLOR: \"Sets the background color for not only the Terminal, but also for\\n\" + \"most of the game's UI.\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #000000\",\n THEME_FONT_COLOR: \"Sets the font color for not only the Terminal, but also for\\n\" + \"most of the game's UI.\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #66ff33\",\n THEME_HIGHLIGHT_COLOR: \"Sets the highlight color for not only the Terminal, but also for \\n\" + \"most of the game's UI.\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #ffffff\",\n THEME_PROMPT_COLOR: \"Sets the prompt color in the Terminal\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #f92672\",\n WRAP_INPUT: \"Wrap Terminal Input. If this is enabled, then when a Terminal command is\\n\" + \"too long and overflows, then it will wrap to the next line instead of\\n\" + \"side-scrolling\\n\\n\" + \"Note that after you enable/disable this, you'll have to run a command\\n\" + \"before its effect takes place.\"\n};\nconst MainMenuStyleOptions = [\"default\", \"classic\", \"compact\"]; //Parse Fconf settings from the config text\n//Throws an exception if parsing fails\n\nfunction parseFconfSettings(config) {\n var ast = Object(acorn__WEBPACK_IMPORTED_MODULE_1__[/* parse */ \"b\"])(config, {\n sourceType: \"module\"\n });\n var queue = [];\n queue.push(ast);\n\n while (queue.length != 0) {\n var exp = queue.shift();\n\n switch (exp.type) {\n case \"BlockStatement\":\n case \"Program\":\n for (var i = 0; i < exp.body.length; ++i) {\n if (exp.body[i] instanceof acorn__WEBPACK_IMPORTED_MODULE_1__[/* Node */ \"a\"]) {\n queue.push(exp.body[i]);\n }\n }\n\n break;\n\n case \"AssignmentExpression\":\n var setting, value;\n\n if (exp.left != null && exp.left.name != null) {\n setting = exp.left.name;\n } else {\n break;\n }\n\n if (exp.right != null && exp.right.raw != null) {\n value = exp.right.raw;\n } else {\n break;\n }\n\n parseFconfSetting(setting, value);\n break;\n\n default:\n break;\n }\n\n for (var prop in exp) {\n if (exp.hasOwnProperty(prop)) {\n if (exp[prop] instanceof acorn__WEBPACK_IMPORTED_MODULE_1__[/* Node */ \"a\"]) {\n queue.push(exp[prop]);\n }\n }\n }\n }\n\n setTheme();\n setMainMenuStyle();\n}\n\nfunction parseFconfSetting(setting, value) {\n setting = String(setting);\n value = String(value);\n\n if (setting == null || value == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] == null) {\n console.warn(`Invalid .fconf setting: ${setting}`);\n return;\n }\n\n function sanitizeString(value) {\n value = value.toLowerCase();\n\n if (value.startsWith('\"')) {\n value = value.slice(1);\n }\n\n if (value.endsWith('\"')) {\n value = value.slice(0, -1);\n }\n\n return value;\n }\n\n switch (setting) {\n case \"ENABLE_BASH_HOTKEYS\":\n case \"ENABLE_TIMESTAMPS\":\n case \"WRAP_INPUT\":\n // Need to convert entered value to boolean/strings accordingly\n var value = value.toLowerCase();\n\n if (value === \"1\" || value === \"true\" || value === \"y\") {\n value = true;\n } else {\n value = false;\n }\n\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = value;\n break;\n\n case \"MAIN_MENU_STYLE\":\n var value = sanitizeString(value);\n\n if (MainMenuStyleOptions.includes(value)) {\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = value;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`Invalid option specified for ${setting}. Options: ${MainMenuStyleOptions.toString()}`);\n }\n\n break;\n\n case \"THEME_BACKGROUND_COLOR\":\n case \"THEME_FONT_COLOR\":\n case \"THEME_HIGHLIGHT_COLOR\":\n case \"THEME_PROMPT_COLOR\":\n var value = sanitizeString(value);\n\n if (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(value)) {\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = value;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`Invalid color specified for ${setting}. Must be a hex color code preceded by a pound (#)`);\n }\n\n break;\n\n default:\n break;\n }\n} //Create the .fconf file text from the settings\n\n\nfunction createFconf() {\n var res = \"\";\n\n for (var setting in _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"]) {\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].hasOwnProperty(setting)) {\n //Setting comments (description)\n var comment = FconfComments[setting];\n\n if (comment == null) {\n continue;\n }\n\n var comment = comment.split(\"\\n\");\n\n for (var i = 0; i < comment.length; ++i) {\n res += \"//\" + comment[i] + \"\\n\";\n }\n\n var value = 0;\n\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] === true) {\n value = \"1\";\n } else if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] === false) {\n value = \"0\";\n } else {\n value = '\"' + String(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting]) + '\"';\n }\n\n res += `${setting} = ${value}\\n\\n`;\n }\n }\n\n return res;\n}\n\nfunction loadFconf(saveString) {\n let tempFconfSettings = JSON.parse(saveString);\n\n for (var setting in tempFconfSettings) {\n if (tempFconfSettings.hasOwnProperty(setting)) {\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = tempFconfSettings[setting];\n }\n } // Initialize themes/styles after loading\n\n\n setTheme();\n setMainMenuStyle();\n}\n\nfunction setTheme() {\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_HIGHLIGHT_COLOR == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_FONT_COLOR == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_BACKGROUND_COLOR == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_PROMPT_COLOR == null) {\n console.error(\"Cannot find Theme Settings\");\n return;\n }\n\n if (/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_HIGHLIGHT_COLOR) && /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_FONT_COLOR) && /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_BACKGROUND_COLOR) && /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_PROMPT_COLOR)) {// document.body.style.setProperty(\"--my-highlight-color\", FconfSettings.THEME_HIGHLIGHT_COLOR);\n // document.body.style.setProperty(\"--my-font-color\", FconfSettings.THEME_FONT_COLOR);\n // document.body.style.setProperty(\"--my-background-color\", FconfSettings.THEME_BACKGROUND_COLOR);\n // document.body.style.setProperty(\"--my-prompt-color\", FconfSettings.THEME_PROMPT_COLOR);\n }\n}\n\nfunction setMainMenuStyle() {\n const mainMenu = document.getElementById(\"mainmenu\");\n const hackingMenuHdr = document.getElementById(\"hacking-menu-header\");\n const characterMenuHdr = document.getElementById(\"character-menu-header\");\n const worldMenuHdr = document.getElementById(\"world-menu-header\");\n const helpMenuHdr = document.getElementById(\"help-menu-header\");\n\n function removeAllAccordionHeaderClasses() {\n hackingMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n characterMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n worldMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n helpMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n }\n\n function addClassToAllAccordionHeaders(clsName) {\n hackingMenuHdr.classList.add(clsName);\n characterMenuHdr.classList.add(clsName);\n worldMenuHdr.classList.add(clsName);\n helpMenuHdr.classList.add(clsName);\n }\n\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][\"MAIN_MENU_STYLE\"] === \"default\") {\n removeAllAccordionHeaderClasses();\n mainMenu.classList.remove(\"classic\");\n mainMenu.classList.remove(\"compact\");\n addClassToAllAccordionHeaders(\"mainmenu-accordion-header\");\n } else if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][\"MAIN_MENU_STYLE\"] === \"classic\") {\n removeAllAccordionHeaderClasses();\n mainMenu.classList.remove(\"compact\");\n mainMenu.classList.add(\"classic\");\n addClassToAllAccordionHeaders(\"mainmenu-accordion-header-classic\");\n } else if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][\"MAIN_MENU_STYLE\"] === \"compact\") {\n removeAllAccordionHeaderClasses();\n mainMenu.classList.remove(\"classic\");\n mainMenu.classList.add(\"compact\");\n addClassToAllAccordionHeaders(\"mainmenu-accordion-header-compact\");\n } else {\n return;\n } // Click each header twice to reset lol\n\n\n hackingMenuHdr.click();\n hackingMenuHdr.click();\n characterMenuHdr.click();\n characterMenuHdr.click();\n worldMenuHdr.click();\n worldMenuHdr.click();\n helpMenuHdr.click();\n helpMenuHdr.click();\n}\n\n\n\n//# sourceURL=webpack:///./src/Fconf/Fconf.js?");
|
||
|
||
/***/ }),
|
||
/* 314 */
|
||
/*!************************************!*\
|
||
!*** ./src/Corporation/Product.ts ***!
|
||
\************************************/
|
||
/*! exports provided: Product */
|
||
/*! exports used: Product */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Product; });\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _ProductRatingWeights__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ProductRatingWeights */ 700);\n/* harmony import */ var _Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Locations/createCityMap */ 406);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nclass Product {\n // Product name\n // The demand for this Product in the market. Gradually decreases\n // How much competition there is in the market for this Product\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n // Production cost - estimation of how much money it costs to make this Product\n // Sell cost\n // Variables for handling the creation process of this Product\n // Whether this Product has finished being created\n // Creation progress - A number betwee 0-100 representing percentage\n // City in which the product is/was being created\n // How much money was invested into designing this Product\n // How much money was invested into advertising this Product\n // Aggregate score for this Product's 'rating'\n // This is based on the stats/properties below. The weighting of the\n // stats/properties below differs between different industries\n // Stats/properties of this Product\n // Data refers to the production, sale, and quantity of the products\n // These values are specific to a city\n // For each city, the data is [qty, prod, sell]\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n // Material requirements. An object that maps the name of a material to how much it requires\n // to make 1 unit of the product.\n // Data to keep track of whether production/sale of this Product is\n // manually limited. These values are specific to a city\n // [Whether production/sale is limited, limit amount]\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"dmd\", 0);\n\n _defineProperty(this, \"cmp\", 0);\n\n _defineProperty(this, \"mku\", 0);\n\n _defineProperty(this, \"pCost\", 0);\n\n _defineProperty(this, \"sCost\", 0);\n\n _defineProperty(this, \"fin\", false);\n\n _defineProperty(this, \"prog\", 0);\n\n _defineProperty(this, \"createCity\", \"\");\n\n _defineProperty(this, \"designCost\", 0);\n\n _defineProperty(this, \"advCost\", 0);\n\n _defineProperty(this, \"rat\", 0);\n\n _defineProperty(this, \"qlt\", 0);\n\n _defineProperty(this, \"per\", 0);\n\n _defineProperty(this, \"dur\", 0);\n\n _defineProperty(this, \"rel\", 0);\n\n _defineProperty(this, \"aes\", 0);\n\n _defineProperty(this, \"fea\", 0);\n\n _defineProperty(this, \"data\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([0, 0, 0]));\n\n _defineProperty(this, \"loc\", \"\");\n\n _defineProperty(this, \"siz\", 0);\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prdman\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([false, 0]));\n\n _defineProperty(this, \"sllman\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([false, 0]));\n\n _defineProperty(this, \"marketTa1\", false);\n\n _defineProperty(this, \"marketTa2\", false);\n\n _defineProperty(this, \"marketTa2Price\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])(0));\n\n this.name = params.name ? params.name : \"\";\n this.dmd = params.demand ? params.demand : 0;\n this.cmp = params.competition ? params.competition : 0;\n this.mku = params.markup ? params.markup : 0;\n this.createCity = params.createCity ? params.createCity : \"\";\n this.designCost = params.designCost ? params.designCost : 0;\n this.advCost = params.advCost ? params.advCost : 0;\n this.qlt = params.quality ? params.quality : 0;\n this.per = params.performance ? params.performance : 0;\n this.dur = params.durability ? params.durability : 0;\n this.rel = params.reliability ? params.reliability : 0;\n this.aes = params.aesthetics ? params.aesthetics : 0;\n this.fea = params.features ? params.features : 0;\n this.loc = params.loc ? params.loc : \"\";\n this.siz = params.size ? params.size : 0;\n this.reqMats = params.req ? params.req : {};\n } // empWorkMult is a multiplier that increases progress rate based on\n // productivity of employees\n\n\n createProduct(marketCycles = 1, empWorkMult = 1) {\n if (this.fin) {\n return;\n }\n\n this.prog += marketCycles * 0.01 * empWorkMult;\n } // @param industry - Industry object. Reference to industry that makes this Product\n\n\n finishProduct(employeeProd, industry) {\n this.fin = true; //Calculate properties\n\n const progrMult = this.prog / 100;\n const engrRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] / employeeProd[\"total\"];\n const mgmtRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] / employeeProd[\"total\"];\n const rndRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] / employeeProd[\"total\"];\n const opsRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] / employeeProd[\"total\"];\n const busRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business] / employeeProd[\"total\"];\n const designMult = 1 + Math.pow(this.designCost, 0.1) / 100;\n const balanceMult = 1.2 * engrRatio + 0.9 * mgmtRatio + 1.3 * rndRatio + 1.5 * opsRatio + busRatio;\n const sciMult = 1 + Math.pow(industry.sciResearch.qty, industry.sciFac) / 800;\n const totalMult = progrMult * balanceMult * designMult * sciMult;\n this.qlt = totalMult * (0.1 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.per = totalMult * (0.15 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.dur = totalMult * (0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.rel = totalMult * (0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.aes = totalMult * (0.0 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.1 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.fea = totalMult * (0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * (busRatio + mgmtRatio)); // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n\n if (this.mku === 0) this.mku = 1;\n this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__[/* getRandomInt */ \"a\"])(0, 70); //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n\n for (const matName in industry.reqMats) {\n if (industry.reqMats.hasOwnProperty(matName)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.reqMats[matName] = reqMat;\n }\n } //Calculate the product's size\n //For now, just set it to be the same size as the requirements to make materials\n\n\n this.siz = 0;\n\n for (const matName in industry.reqMats) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName] * reqMat;\n }\n }\n\n calculateRating(industry) {\n const weights = _ProductRatingWeights__WEBPACK_IMPORTED_MODULE_2__[/* ProductRatingWeights */ \"a\"][industry.type];\n\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\n }\n\n this.rat = 0;\n this.rat += weights.Quality ? this.qlt * weights.Quality : 0;\n this.rat += weights.Performance ? this.per * weights.Performance : 0;\n this.rat += weights.Durability ? this.dur * weights.Durability : 0;\n this.rat += weights.Reliability ? this.rel * weights.Reliability : 0;\n this.rat += weights.Aesthetics ? this.aes * weights.Aesthetics : 0;\n this.rat += weights.Features ? this.fea * weights.Features : 0;\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"Product\", this);\n } // Initiatizes a Product object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(Product, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Product = Product;\n\n//# sourceURL=webpack:///./src/Corporation/Product.ts?");
|
||
|
||
/***/ }),
|
||
/* 315 */,
|
||
/* 316 */,
|
||
/* 317 */,
|
||
/* 318 */,
|
||
/* 319 */,
|
||
/* 320 */,
|
||
/* 321 */,
|
||
/* 322 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Bladeburner/City.ts ***!
|
||
\*********************************/
|
||
/*! exports provided: City */
|
||
/*! exports used: City */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return City; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\nclass City {\n /**\n * Name of the city.\n */\n\n /**\n * Population of the city.\n */\n\n /**\n * Population estimation of the city.\n */\n\n /**\n * Number of communities in the city.\n */\n\n /**\n * Estimated number of communities in the city.\n */\n\n /**\n * Chaos level of the city.\n */\n constructor(name = _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].CityNames[2]) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"pop\", 0);\n\n _defineProperty(this, \"popEst\", 0);\n\n _defineProperty(this, \"comms\", 0);\n\n _defineProperty(this, \"commsEst\", 0);\n\n _defineProperty(this, \"chaos\", 0);\n\n this.name = name; // Synthoid population and estimate\n\n this.pop = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, 1.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5); // Number of Synthoid communities population and estimate\n\n this.comms = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(5, 150);\n this.commsEst = this.comms + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(-5, 5);\n if (this.commsEst < 0) this.commsEst = 0;\n this.chaos = 0;\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n changeChaosByPercentage(p) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n\n if (p === 0) {\n return;\n }\n\n this.chaos += this.chaos * (p / 100);\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n\n if (this.popEst < this.pop) {\n this.popEst += n;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst -= n;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n improvePopulationEstimateByPercentage(p, skillMult = 1) {\n p = p * skillMult;\n\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n\n this.popEst *= 1 + p / 100;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst *= 1 - p / 100;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n improveCommunityEstimate(n = 1) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.improveCommunityEstimate()\");\n }\n\n if (this.commsEst < this.comms) {\n this.commsEst += n;\n\n if (this.commsEst > this.comms) {\n this.commsEst = this.comms;\n }\n } else if (this.commsEst > this.comms) {\n this.commsEst -= n;\n\n if (this.commsEst < this.comms) {\n this.commsEst = this.comms;\n }\n }\n }\n /**\n * @params options:\n * estChange(int): How much the estimate should change by\n * estOffset(int): Add offset to estimate (offset by percentage)\n */\n\n\n changePopulationByCount(n, params = {\n estChange: 0,\n estOffset: 0\n }) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n\n this.pop += n;\n\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n\n if (params.estOffset) {\n this.popEst = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__[/* addOffset */ \"a\"])(this.popEst, params.estOffset);\n }\n\n this.popEst = Math.max(this.popEst, 0);\n }\n /**\n * @p is the percentage, not the multiplier. e.g. pass in p = 5 for 5%\n * @params options:\n * changeEstEqually(bool) - Change the population estimate by an equal amount\n * nonZero (bool) - Set to true to ensure that population always changes by at least 1\n */\n\n\n changePopulationByPercentage(p, params = {\n nonZero: false,\n changeEstEqually: false\n }) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n\n if (p === 0) {\n return 0;\n }\n\n let change = Math.round(this.pop * (p / 100)); // Population always changes by at least 1\n\n if (params.nonZero && change === 0) {\n p > 0 ? change = 1 : change = -1;\n }\n\n this.pop += change;\n\n if (params.changeEstEqually) {\n this.popEst += change;\n\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n\n return change;\n }\n\n changeChaosByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n\n if (n === 0) {\n return;\n }\n\n this.chaos += n;\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"City\", this);\n }\n /**\n * Initiatizes a City object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(City, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.City = City;\n\n//# sourceURL=webpack:///./src/Bladeburner/City.ts?");
|
||
|
||
/***/ }),
|
||
/* 323 */
|
||
/*!*******************************!*\
|
||
!*** ./src/Locations/City.ts ***!
|
||
\*******************************/
|
||
/*! exports provided: City */
|
||
/*! exports used: City */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return City; });\n/**\n * Class representing a City in the game\n */\nclass City {\n /**\n * List of all locations in this city\n */\n\n /**\n * Name of this city\n */\n\n /**\n * Metro map ascii art\n */\n constructor(name, locations = [], asciiArt = \"\") {\n this.name = name;\n this.locations = locations;\n this.asciiArt = asciiArt;\n }\n\n addLocation(loc) {\n this.locations.push(loc);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/City.ts?");
|
||
|
||
/***/ }),
|
||
/* 324 */,
|
||
/* 325 */,
|
||
/* 326 */,
|
||
/* 327 */,
|
||
/* 328 */,
|
||
/* 329 */,
|
||
/* 330 */,
|
||
/* 331 */,
|
||
/* 332 */,
|
||
/* 333 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTickersConfig.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: TickerDisplayMode, StockTickersConfig */
|
||
/*! exports used: StockTickersConfig, TickerDisplayMode */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return TickerDisplayMode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickersConfig; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React component for the tickers configuration section of the Stock Market UI.\n * This config lets you change the way stock tickers are displayed (watchlist,\n * all/portoflio mode, etc)\n */\n\n\nlet TickerDisplayMode;\n\n(function (TickerDisplayMode) {\n TickerDisplayMode[TickerDisplayMode[\"AllStocks\"] = 0] = \"AllStocks\";\n TickerDisplayMode[TickerDisplayMode[\"Portfolio\"] = 1] = \"Portfolio\";\n})(TickerDisplayMode || (TickerDisplayMode = {}));\n\nclass StockTickersConfig extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n }\n\n renderDisplayModeButton() {\n let txt = \"\";\n let tooltip = \"\";\n\n if (this.props.tickerDisplayMode === TickerDisplayMode.Portfolio) {\n txt = \"Switch to 'All Stocks' Mode\";\n tooltip = \"Displays all stocks on the WSE\";\n } else {\n txt = \"Switch to 'Portfolio' Mode\";\n tooltip = \"Displays only the stocks for which you have shares or orders\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.changeDisplayMode,\n text: txt,\n tooltip: tooltip\n });\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, this.renderDisplayModeButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.expandAllTickers,\n text: \"Expand Tickers\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.collapseAllTickers,\n text: \"Collapse Tickers\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"text-input\",\n id: \"stock-market-watchlist-filter\",\n onChange: this.props.changeWatchlistFilter,\n placeholder: \"Filter Stocks by symbol (comma-separated list)\",\n type: \"text\"\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickersConfig.tsx?");
|
||
|
||
/***/ }),
|
||
/* 334 */,
|
||
/* 335 */,
|
||
/* 336 */,
|
||
/* 337 */,
|
||
/* 338 */,
|
||
/* 339 */,
|
||
/* 340 */,
|
||
/* 341 */
|
||
/*!***********************************************************!*\
|
||
!*** ./src/Corporation/data/CorporationUnlockUpgrades.ts ***!
|
||
\***********************************************************/
|
||
/*! exports provided: CorporationUnlockUpgrades */
|
||
/*! exports used: CorporationUnlockUpgrades */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationUnlockUpgrades; });\n// Corporation Unlock Upgrades\n// Upgrades for entire corporation, unlocks features, either you have it or you dont\n// The data structure is an array with the following format:\n// [index in Corporation feature upgrades array, price, name, description]\nconst CorporationUnlockUpgrades = {\n //Lets you export goods\n \"0\": [0, 20e9, \"Export\", \"Develop infrastructure to export your materials to your other facilities. \" + \"This allows you to move materials around between different divisions and cities.\"],\n //Lets you buy exactly however many required materials you need for production\n \"1\": [1, 25e9, \"Smart Supply\", \"Use advanced AI to anticipate your supply needs. \" + \"This allows you to purchase exactly however many materials you need for production.\"],\n //Displays each material/product's demand\n \"2\": [2, 5e9, \"Market Research - Demand\", \"Mine and analyze market data to determine the demand of all resources. \" + \"The demand attribute, which affects sales, will be displayed for every material and product.\"],\n //Display's each material/product's competition\n \"3\": [3, 5e9, \"Market Data - Competition\", \"Mine and analyze market data to determine how much competition there is on the market \" + \"for all resources. The competition attribute, which affects sales, will be displayed for \" + \"every material and product.\"],\n \"4\": [4, 10e9, \"VeChain\", \"Use AI and blockchain technology to identify where you can improve your supply chain systems. \" + \"This upgrade will allow you to view a wide array of useful statistics about your \" + \"Corporation.\"],\n \"5\": [5, 500e9, \"Shady Accounting\", \"Utilize unscrupulous accounting practices and pay off government officials to save money \" + \"on taxes. This reduces the dividend tax rate by 5%.\"],\n \"6\": [6, 2e12, \"Government Partnership\", \"Help national governments further their agendas in exchange for lowered taxes. \" + \"This reduces the dividend tax rate by 10%\"]\n};\n\n//# sourceURL=webpack:///./src/Corporation/data/CorporationUnlockUpgrades.ts?");
|
||
|
||
/***/ }),
|
||
/* 342 */
|
||
/*!*****************************************************!*\
|
||
!*** ./src/Corporation/data/CorporationUpgrades.ts ***!
|
||
\*****************************************************/
|
||
/*! exports provided: CorporationUpgrades */
|
||
/*! exports used: CorporationUpgrades */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationUpgrades; });\n// Corporation Upgrades\n// Upgrades for entire corporation, levelable upgrades\n// The data structure is an array with the following format\n// [index in Corporation upgrades array, base price, price mult, benefit mult (additive), name, desc]\nconst CorporationUpgrades = {\n //Smart factories, increases production\n \"0\": [0, 2e9, 1.06, 0.03, \"Smart Factories\", \"Advanced AI automatically optimizes the operation and productivity \" + \"of factories. Each level of this upgrade increases your global production by 3% (additive).\"],\n //Smart warehouses, increases storage size\n \"1\": [1, 2e9, 1.06, 0.1, \"Smart Storage\", \"Advanced AI automatically optimizes your warehouse storage methods. \" + \"Each level of this upgrade increases your global warehouse storage size by 10% (additive).\"],\n //Advertise through dreams, passive popularity/ awareness gain\n \"2\": [2, 4e9, 1.1, 0.001, \"DreamSense\", \"Use DreamSense LCC Technologies to advertise your corporation \" + \"to consumers through their dreams. Each level of this upgrade provides a passive \" + \"increase in awareness of all of your companies (divisions) by 0.004 / market cycle,\" + \"and in popularity by 0.001 / market cycle. A market cycle is approximately \" + \"15 seconds.\"],\n //Makes advertising more effective\n \"3\": [3, 4e9, 1.12, 0.005, \"Wilson Analytics\", \"Purchase data and analysis from Wilson, a marketing research \" + \"firm. Each level of this upgrades increases the effectiveness of your \" + \"advertising by 0.5% (additive).\"],\n //Augmentation for employees, increases cre\n \"4\": [4, 1e9, 1.06, 0.1, \"Nuoptimal Nootropic Injector Implants\", \"Purchase the Nuoptimal Nootropic \" + \"Injector augmentation for your employees. Each level of this upgrade \" + \"globally increases the creativity of your employees by 10% (additive).\"],\n //Augmentation for employees, increases cha\n \"5\": [5, 1e9, 1.06, 0.1, \"Speech Processor Implants\", \"Purchase the Speech Processor augmentation for your employees. \" + \"Each level of this upgrade globally increases the charisma of your employees by 10% (additive).\"],\n //Augmentation for employees, increases int\n \"6\": [6, 1e9, 1.06, 0.1, \"Neural Accelerators\", \"Purchase the Neural Accelerator augmentation for your employees. \" + \"Each level of this upgrade globally increases the intelligence of your employees \" + \"by 10% (additive).\"],\n //Augmentation for employees, increases eff\n \"7\": [7, 1e9, 1.06, 0.1, \"FocusWires\", \"Purchase the FocusWire augmentation for your employees. Each level \" + \"of this upgrade globally increases the efficiency of your employees by 10% (additive).\"],\n //Improves sales of materials/products\n \"8\": [8, 1e9, 1.07, 0.01, \"ABC SalesBots\", \"Always Be Closing. Purchase these robotic salesmen to increase the amount of \" + \"materials and products you sell. Each level of this upgrade globally increases your sales \" + \"by 1% (additive).\"],\n //Improves scientific research rate\n \"9\": [9, 5e9, 1.07, 0.05, \"Project Insight\", \"Purchase 'Project Insight', a R&D service provided by the secretive \" + \"Fulcrum Technologies. Each level of this upgrade globally increases the amount of \" + \"Scientific Research you produce by 5% (additive).\"]\n};\n\n//# sourceURL=webpack:///./src/Corporation/data/CorporationUpgrades.ts?");
|
||
|
||
/***/ }),
|
||
/* 343 */
|
||
/*!******************************************!*\
|
||
!*** ./utils/uiHelpers/removeElement.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: removeElement */
|
||
/*! exports used: removeElement */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeElement; });\n/**\n * For a given element, this function removes it AND its children\n * @param elem The element to remove.\n */\nfunction removeElement(elem) {\n if (elem === null) {\n // tslint:disable-next-line:no-console\n console.debug(\"The element passed into 'removeElement' was null.\");\n return;\n }\n\n if (!(elem instanceof Element)) {\n // tslint:disable-next-line:no-console\n console.debug(\"The element passed into 'removeElement' was not an instance of an Element.\");\n return;\n }\n\n while (elem.firstChild !== null) {\n elem.removeChild(elem.firstChild);\n }\n\n if (elem.parentNode !== null) {\n elem.parentNode.removeChild(elem);\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeElement.ts?");
|
||
|
||
/***/ }),
|
||
/* 344 */
|
||
/*!***********************************!*\
|
||
!*** ./src/utils/EventEmitter.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: EventEmitter */
|
||
/*! exports used: EventEmitter */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return EventEmitter; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\nclass EventEmitter {\n /**\n * Map of Subscriber name -> Callback function\n */\n constructor(subs) {\n _defineProperty(this, \"subscribers\", {});\n\n if (Array.isArray(subs)) {\n for (const s of subs) {\n this.addSubscriber(s);\n }\n }\n }\n\n addSubscriber(s) {\n this.subscribers[s.id] = s.cb;\n }\n\n emitEvent(...args) {\n for (const s in this.subscribers) {\n const sub = this.subscribers[s];\n sub(args);\n }\n }\n\n removeSubscriber(id) {\n delete this.subscribers[id];\n }\n\n}\n\n//# sourceURL=webpack:///./src/utils/EventEmitter.ts?");
|
||
|
||
/***/ }),
|
||
/* 345 */,
|
||
/* 346 */,
|
||
/* 347 */,
|
||
/* 348 */,
|
||
/* 349 */,
|
||
/* 350 */
|
||
/*!***********************************!*\
|
||
!*** ./src/ui/React/WorldMap.tsx ***!
|
||
\***********************************/
|
||
/*! exports provided: WorldMap */
|
||
/*! exports used: WorldMap */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorldMap; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n\n\n\nfunction City(props) {\n if (props.city !== props.currentCity) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltip\",\n style: {\n color: \"white\",\n whiteSpace: \"nowrap\",\n margin: \"0px\",\n padding: \"0px\"\n },\n onClick: () => props.onTravel(props.city)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, props.city[0]));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, props.city[0]);\n}\n\nfunction WorldMap(props) {\n // prettier-ignore\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ,_ . ._. _. .\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" , _-\\\\','|~\\\\~ ~/ ;-'_ _-' ,;_;_, ~~-\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" /~~-\\\\_/-'~'--' \\\\~~| ', ,' / / ~|-_\\\\_/~/~ ~~--~~~~'--_\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / ,/'-/~ '\\\\ ,' _ , '\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven\n }), \",'|~ ._/-, /~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ~/-'~\\\\_, '-,| '|. ' ~ ,\\\\ /'~ / /_ /~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \".-~ '| '',\\\\~|\\\\ _\\\\~ ,_ , \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing\n }), \" /,\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" '\\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12\n }), \" /'~ |_/~\\\\\\\\,-,~ \\\\ \\\" ,_,/ |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | / ._-~'\\\\_ _~| \\\\ ) \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ __-\\\\ '/ ~ |\\\\ \\\\_ / ~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ., '\\\\ |, ~-_ - | \\\\\\\\_' ~| /\\\\ \\\\~ ,\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ~-_' _; '\\\\ '-, \\\\,' /\\\\/ |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" '\\\\_,~'\\\\_ \\\\_ _, /' ' |, /|'\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / \\\\_ ~ | / \\\\ ~'; -,_.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | ~\\\\ | | , '-_, ,; ~ ~\\\\\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\, \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum\n }), \" / \\\\ / /| ,-, , -,\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | ,/ | |' |/ ,- ~ \\\\ '.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ,| ,/ \\\\ ,/ \\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima\n }), \" |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / | ~ -~~-, / _\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | ,-' ~ /\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / ,' ~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ',| ~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ~'\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/WorldMap.tsx?");
|
||
|
||
/***/ }),
|
||
/* 351 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Bladeburner/ui/SuccessChance.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: SuccessChance */
|
||
/*! exports used: SuccessChance */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SuccessChance; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\nfunction SuccessChance(props) {\n if (props.chance[0] === props.chance[1]) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.chance[0] * 100, 1), \"%\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.chance[0] * 100, 1), \"% ~ \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.chance[1] * 100, 1), \"%\");\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SuccessChance.tsx?");
|
||
|
||
/***/ }),
|
||
/* 352 */,
|
||
/* 353 */,
|
||
/* 354 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Crime/CrimeHelpers.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: determineCrimeSuccess, findCrime */
|
||
/*! exports used: determineCrimeSuccess, findCrime */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return determineCrimeSuccess; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return findCrime; });\n/* harmony import */ var _Crimes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Crimes */ 60);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\nfunction determineCrimeSuccess(p, type) {\n let chance = 0;\n let found = false;\n\n for (const i in _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"]) {\n const crime = _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"][i];\n\n if (crime.type == type) {\n chance = crime.successRate(p);\n found = true;\n break;\n }\n }\n\n if (!found) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`, false);\n return false;\n }\n\n if (Math.random() <= chance) {\n //Success\n return true;\n } else {\n //Failure\n return false;\n }\n}\nfunction findCrime(roughName) {\n if (roughName.includes(\"shoplift\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Shoplift;\n } else if (roughName.includes(\"rob\") && roughName.includes(\"store\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].RobStore;\n } else if (roughName.includes(\"mug\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Mug;\n } else if (roughName.includes(\"larceny\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Larceny;\n } else if (roughName.includes(\"drugs\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].DealDrugs;\n } else if (roughName.includes(\"bond\") && roughName.includes(\"forge\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].BondForgery;\n } else if (roughName.includes(\"traffick\") && roughName.includes(\"arms\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].TraffickArms;\n } else if (roughName.includes(\"homicide\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Homicide;\n } else if (roughName.includes(\"grand\") && roughName.includes(\"auto\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].GrandTheftAuto;\n } else if (roughName.includes(\"kidnap\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Kidnap;\n } else if (roughName.includes(\"assassinate\") || roughName.includes(\"assassination\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Assassination;\n } else if (roughName.includes(\"heist\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Heist;\n }\n\n return null;\n}\n\n//# sourceURL=webpack:///./src/Crime/CrimeHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 355 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Corporation/Employee.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Employee */
|
||
/*! exports used: Employee */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Employee; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\nclass Employee {\n constructor(params = {}) {\n _defineProperty(this, \"pro\", 0);\n\n _defineProperty(this, \"cyclesUntilRaise\", _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].CyclesPerEmployeeRaise);\n\n this.name = params.name ? params.name : \"Bobby\"; //Morale, happiness, and energy are 0-100\n\n this.mor = params.morale ? params.morale : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(50, 100);\n this.hap = params.happiness ? params.happiness : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(50, 100);\n this.ene = params.energy ? params.energy : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(50, 100);\n this.int = params.intelligence ? params.intelligence : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.cha = params.charisma ? params.charisma : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.exp = params.experience ? params.experience : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.cre = params.creativity ? params.creativity : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.eff = params.efficiency ? params.efficiency : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.sal = params.salary ? params.salary : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(0.1, 5);\n this.loc = params.loc ? params.loc : \"\";\n this.pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Unassigned;\n } //Returns the amount the employee needs to be paid\n\n\n process(marketCycles = 1, office) {\n const gain = 0.003 * marketCycles,\n det = gain * Math.random();\n this.exp += gain; // Employee salaries slowly go up over time\n\n this.cyclesUntilRaise -= marketCycles;\n\n if (this.cyclesUntilRaise <= 0) {\n this.sal += _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].EmployeeRaiseAmount;\n this.cyclesUntilRaise += _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].CyclesPerEmployeeRaise;\n } //Training\n\n\n const trainingEff = gain * Math.random();\n\n if (this.pos === _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Training) {\n //To increase creativity and intelligence special upgrades are needed\n this.cha += trainingEff;\n this.exp += trainingEff;\n this.eff += trainingEff;\n }\n\n this.ene -= det;\n this.hap -= det;\n\n if (this.ene < office.minEne) {\n this.ene = office.minEne;\n }\n\n if (this.hap < office.minHap) {\n this.hap = office.minHap;\n }\n\n const salary = this.sal * marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle;\n return salary;\n }\n\n calculateProductivity(corporation, industry) {\n const effCre = this.cre * corporation.getEmployeeCreMultiplier() * industry.getEmployeeCreMultiplier(),\n effCha = this.cha * corporation.getEmployeeChaMultiplier() * industry.getEmployeeChaMultiplier(),\n effInt = this.int * corporation.getEmployeeIntMultiplier() * industry.getEmployeeIntMultiplier(),\n effEff = this.eff * corporation.getEmployeeEffMultiplier() * industry.getEmployeeEffMultiplier();\n const prodBase = this.mor * this.hap * this.ene * 1e-6;\n let prodMult = 0;\n\n switch (this.pos) {\n //Calculate productivity based on position. This is multipled by prodBase\n //to get final value\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Operations:\n prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Engineer:\n prodMult = effInt + 0.1 * effCha + 1.5 * this.exp + effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Business:\n prodMult = 0.4 * effInt + effCha + 0.5 * this.exp;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Management:\n prodMult = 2 * effCha + this.exp + 0.2 * effCre + 0.7 * effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].RandD:\n prodMult = 1.5 * effInt + 0.8 * this.exp + effCre + 0.5 * effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Unassigned:\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Training:\n prodMult = 0;\n break;\n\n default:\n console.error(`Invalid employee position: ${this.pos}`);\n break;\n }\n\n return prodBase * prodMult;\n } //Process benefits from having an office party thrown\n\n\n throwParty(money) {\n const mult = 1 + money / 10e6;\n this.mor *= mult;\n this.mor = Math.min(100, this.mor);\n this.hap *= mult;\n this.hap = Math.min(100, this.hap);\n return mult;\n } //'panel' is the DOM element on which to create the UI\n\n\n createUI(panel, corporation, industry) {\n const effCre = this.cre * corporation.getEmployeeCreMultiplier() * industry.getEmployeeCreMultiplier(),\n effCha = this.cha * corporation.getEmployeeChaMultiplier() * industry.getEmployeeChaMultiplier(),\n effInt = this.int * corporation.getEmployeeIntMultiplier() * industry.getEmployeeIntMultiplier(),\n effEff = this.eff * corporation.getEmployeeEffMultiplier() * industry.getEmployeeEffMultiplier();\n panel.style.color = \"white\";\n panel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"p\", {\n id: \"cmpy-mgmt-employee-\" + this.name + \"-panel-text\",\n innerHTML: \"Morale: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.mor, 3) + \"<br>\" + \"Happiness: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.hap, 3) + \"<br>\" + \"Energy: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.ene, 3) + \"<br>\" + \"Intelligence: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effInt, 3) + \"<br>\" + \"Charisma: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effCha, 3) + \"<br>\" + \"Experience: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.exp, 3) + \"<br>\" + \"Creativity: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effCre, 3) + \"<br>\" + \"Efficiency: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effEff, 3) + \"<br>\" + \"Salary: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ \"a\"].format(this.sal, \"$0.000a\") + \"/ s<br>\"\n })); //Selector for employee position\n\n const selector = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"select\", {});\n\n for (const key in _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"]) {\n if (_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].hasOwnProperty(key)) {\n selector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"option\", {\n text: _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"][key],\n value: _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"][key]\n }));\n }\n }\n\n selector.addEventListener(\"change\", () => {\n this.pos = selector.options[selector.selectedIndex].value;\n }); //Set initial value of selector\n\n for (let i = 0; i < selector.length; ++i) {\n if (selector.options[i].value === this.pos) {\n selector.selectedIndex = i;\n break;\n }\n }\n\n panel.appendChild(selector);\n }\n\n copy() {\n const employee = new Employee();\n employee.name = this.name;\n employee.mor = this.mor;\n employee.hap = this.hap;\n employee.ene = this.ene;\n employee.int = this.int;\n employee.cha = this.cha;\n employee.exp = this.exp;\n employee.cre = this.cre;\n employee.eff = this.eff;\n employee.sal = this.sal;\n employee.pro = this.pro;\n employee.cyclesUntilRaise = this.cyclesUntilRaise;\n employee.loc = this.loc;\n employee.pos = this.pos;\n return employee;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Employee\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Employee, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Employee = Employee;\n\n//# sourceURL=webpack:///./src/Corporation/Employee.ts?");
|
||
|
||
/***/ }),
|
||
/* 356 */,
|
||
/* 357 */,
|
||
/* 358 */,
|
||
/* 359 */,
|
||
/* 360 */
|
||
/*!********************************!*\
|
||
!*** ./src/ui/React/Favor.tsx ***!
|
||
\********************************/
|
||
/*! exports provided: Favor */
|
||
/*! exports used: Favor */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Favor; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction Favor(favor) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"light-yellow samefont\"\n }, typeof favor === \"number\" ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatFavor(favor) : favor);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Favor.tsx?");
|
||
|
||
/***/ }),
|
||
/* 361 */,
|
||
/* 362 */,
|
||
/* 363 */,
|
||
/* 364 */,
|
||
/* 365 */,
|
||
/* 366 */,
|
||
/* 367 */,
|
||
/* 368 */,
|
||
/* 369 */,
|
||
/* 370 */,
|
||
/* 371 */,
|
||
/* 372 */,
|
||
/* 373 */,
|
||
/* 374 */,
|
||
/* 375 */,
|
||
/* 376 */,
|
||
/* 377 */,
|
||
/* 378 */,
|
||
/* 379 */,
|
||
/* 380 */,
|
||
/* 381 */,
|
||
/* 382 */,
|
||
/* 383 */,
|
||
/* 384 */,
|
||
/* 385 */,
|
||
/* 386 */,
|
||
/* 387 */,
|
||
/* 388 */,
|
||
/* 389 */,
|
||
/* 390 */
|
||
/*!*********************************!*\
|
||
!*** ./src/DarkWeb/DarkWeb.tsx ***!
|
||
\*********************************/
|
||
/*! exports provided: checkIfConnectedToDarkweb, executeDarkwebTerminalCommand, listAllDarkwebItems, buyDarkwebItem */
|
||
/*! exports used: buyDarkwebItem, checkIfConnectedToDarkweb, listAllDarkwebItems */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkIfConnectedToDarkweb; });\n/* unused harmony export executeDarkwebTerminalCommand */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return listAllDarkwebItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyDarkwebItem; });\n/* harmony import */ var _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItems */ 229);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 435);\n\n\n\n\n\n //Posts a \"help\" message if connected to DarkWeb\n\nfunction checkIfConnectedToDarkweb() {\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n const darkwebIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(\"Darkweb Server\");\n\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__[/* isValidIPAddress */ \"a\"])(darkwebIp)) {\n return;\n }\n\n if (darkwebIp == _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getCurrentServer().ip) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You are now connected to the dark web. From the dark web you can purchase illegal items. \" + \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] \" + \"to purchase an item.\");\n }\n }\n} //Handler for dark web commands. The terminal's executeCommand() function will pass\n//dark web-specific commands into this. It will pass in the raw split command array\n//rather than the command string\n\nfunction executeDarkwebTerminalCommand(commandArray) {\n if (commandArray.length == 0) {\n return;\n }\n\n switch (commandArray[0]) {\n case \"buy\":\n {\n if (commandArray.length != 2) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Incorrect number of arguments. Usage: \");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy -l\");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy [item name]\");\n return;\n }\n\n const arg = commandArray[1];\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n listAllDarkwebItems();\n } else {\n buyDarkwebItem(arg);\n }\n\n break;\n }\n\n default:\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Command not found\");\n break;\n }\n}\nfunction listAllDarkwebItems() {\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(`${item.program} - ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(item.price)} - ${item.description}`);\n }\n}\nfunction buyDarkwebItem(itemName) {\n itemName = itemName.toLowerCase(); // find the program that matches, if any\n\n let item = null;\n\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n } // return if invalid\n\n\n if (item === null) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Unrecognized item: \" + itemName);\n return;\n } // return if the player already has it.\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hasProgram(item.program)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You already have the \" + item.program + \" program\");\n return;\n } // return if the player doesn't have enough money\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].money.lt(item.price)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Not enough money to purchase \" + item.program);\n return;\n } // buy and push\n\n\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\");\n}\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWeb.tsx?");
|
||
|
||
/***/ }),
|
||
/* 391 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Terminal/HelpText.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: TerminalHelpText, HelpTexts */
|
||
/*! exports used: HelpTexts, TerminalHelpText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return TerminalHelpText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HelpTexts; });\n/* tslint:disable:max-line-length completed-docs variable-name*/\nconst TerminalHelpText = [\"Type 'help name' to learn more about the command \", \"\", 'alias [-g] [name=\"value\"] Create or display Terminal aliases', \"analyze Get information about the current machine \", \"backdoor Install a backdoor on the current machine \", \"buy [-l/program] Purchase a program through the Dark Web\", \"cat [file] Display a .msg, .lit, or .txt file\", \"cd [dir] Change to a new directory\", \"check [script] [args...] Print a script's logs to Terminal\", \"clear Clear all text on the terminal \", \"cls See 'clear' command \", \"connect [ip/hostname] Connects to a remote server\", \"download [script/text file] Downloads scripts or text files to your computer\", \"expr [math expression] Evaluate a mathematical expression\", \"free Check the machine's memory (RAM) usage\", \"hack Hack the current machine\", \"help [command] Display this help text, or the help text for a command\", \"home Connect to home computer\", \"hostname Displays the hostname of the machine\", \"ifconfig Displays the IP address of the machine\", \"kill [script/pid] [args...] Stops the specified script on the current server \", \"killall Stops all running scripts on the current machine\", \"ls [dir] [| grep pattern] Displays all files on the machine\", \"lscpu Displays the number of CPU cores on the machine\", \"mem [script] [-t] [n] Displays the amount of RAM required to run the script\", \"mv [src] [dest] Move/rename a text or script file\", \"nano [file] Text editor - Open up and edit a script or text file\", \"ps Display all scripts that are currently running\", \"rm [file] Delete a file from the server\", \"run [name] [-t] [n] [args...] Execute a program or script\", \"scan Prints all immediately-available network connections\", \"scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away\", \"scp [file] [server] Copies a file to a destination server\", \"sudov Shows whether you have root access on this computer\", \"tail [script] [args...] Displays dynamic logs for the specified script\", \"theme [preset] | bg txt hlgt Change the color scheme of the UI\", \"top Displays all running scripts and their RAM usage\", \"unalias [alias name] Deletes the specified alias\", \"wget [url] [target file] Retrieves code/text from a web server\"];\nconst HelpTexts = {\n alias: ['alias [-g] [name=\"value\"] ', \" \", \"Create or display aliases. An alias enables a replacement of a word with another string. \", \"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME \", \"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, \", \"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: \", \" \", 'alias nuke=\"run NUKE.exe\"', \" \", \"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. \", \"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For \", \"example, if the following alias was set: \", \" \", 'alias worm=\"HTTPWorm.exe\"', \" \", \"and then you tried to run the following terminal command: \", \" \", \"run worm\", \" \", \"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted \", \"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: \", \" \", 'alias -g worm=\"HTTPWorm.exe\"', \" \", \"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. \", \" \", \"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form \", \"'alias NAME=VALUE' on the Terminal. \", \" \", \"The 'unalias' command can be used to remove aliases.\", \" \"],\n analyze: [\"analze\", \" \", \"Prints details and statistics about the current server. The information that is printed includes basic \", \"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also \", \"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is \", \"available on the server, etc.\"],\n backdoor: [\"backdoor\", \" \", \"Install a backdoor on the current machine, grants a secret bonus depending on the machine.\", \" \", \"Requires root access to run.\", \" \"],\n buy: [\"buy [-l / program]\", \" \", \"Purchase a program through the Dark Web. Requires a TOR router to use.\", \" \", \"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the \", \"dark web to the Terminal, as well as their costs.\", \" \", \"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.\"],\n cat: [\"cat [file]\", \" \", \"Display message (.msg), literature (.lit), or text (.txt) files. Examples:\", \" \", \"cat j1.msg\", \" \", \"cat foo.lit\", \" \", \"cat servers.txt\"],\n cd: [\"cd [dir]\", \" \", \"Change to the specified directory. Note that this works even for directories that don't exist. If you \", \"change to a directory that does not exist, it will not be 'created'. Examples:\", \" \", \"cd scripts/hacking\", \" \", \"cd /logs\", \" \", \"cd ../\"],\n check: [\"check [script name] [args...]\", \" \", \"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by \", \"a space. Remember that a running script is uniquely \", \"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: \", \" \", \"run foo.script 1 2 foodnstuff\", \" \", \"Then to run the 'check' command on this script you would have to pass the same arguments in: \", \" \", \"check foo.script 1 2 foodnstuff\"],\n clear: [\"clear\", \" \", \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \", \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command\"],\n cls: [\"cls\", \" \", \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \", \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command\"],\n connect: [\"connect [hostname/ip]\", \" \", \"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument \", \"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To \", \"see which servers can be connected to, use the 'scan' command.\"],\n download: [\"download [script/text file]\", \" \", \"Downloads a script or text file to your computer (like your real life computer).\", \" \", \"You can also download all of your scripts/text files as a zip file using the following Terminal commands:\", \" \", \"Download all scripts and text files: download *\", \" \", \"Download all scripts: download *.script\", \" \", \"Download all text files: download *.txt\", \" \"],\n expr: [\"expr [mathematical expression]\", \" \", \"Evaluate a simple mathematical expression. Supports native JavaScript operators:\", \" \", \"+, -, /, *, **, %\", \" \", \"Example:\", \" \", \"expr 25 * 2 ** 10\", \" \", \"Note that letters (non-digits) are not allowed and will be removed from the input.\"],\n free: [\"free\", \" \", \"Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as \", \"how much of it is being used.\"],\n hack: [\"hack\", \" \", \"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics\", \" \"],\n help: [\"help [command]\", \" \", \"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief \", \"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print \", \"more detailed information about the Terminal command. Examples: \", \" \", \"help alias\", \" \", \"help scan-analyze\"],\n home: [\"home\" + \"Connect to your home computer. This will work no matter what server you are currently connected to.\"],\n hostname: [\"hostname\", \" \", \"Prints the hostname of the current server\"],\n ifconfig: [\"ipconfig\", \" \", \"Prints the IP address of the current server\"],\n kill: [\"kill [script name] [args...]\", \" \", \"kill [pid]\", \" \", \"Kill the script specified by the script name and arguments OR by its PID.\", \" \", \"If you are killing the script using its filename and arguments, then each \", \"argument must be separated by a space. Remember that a running script is \", \"uniquely identified by both its name and the arguments that are used to start \", \"it. So, if a script was ran with the following arguments:\", \" \", \"run foo.script 1 sigma-cosmetics\", \" \", \"Then to kill this script the same arguments would have to be used:\", \" \", \"kill foo.script 1 sigma-cosmetics\", \" \", \"If you are killing the script using its PID, then the PID argument must be numeric\"],\n killall: [\"killall\", \" \", \"Kills all scripts on the current server. \", \"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. \", \"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. \", \"The script will not be stopped/killed until after that time has elapsed.\"],\n ls: [\"ls [dir] [| grep pattern]\", \" \", \"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. \", \"The files will be displayed in alphabetical order. \", \" \", \"The 'dir' optional parameter can be used to display files/directories in another directory.\", \" \", \"The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.\", \" \", \"Examples:\", \" \", \"List all files with the '.script' extension in the current directory:\", \" \", \"ls | grep .script\", \" \", \"List all files with the '.js' extension in the root directory:\", \" \", \"ls / | grep .js\", \" \", \"List all files with the word 'purchase' in the filename, in the 'scripts' directory:\", \" \", \"ls scripts | grep purchase\"],\n lscpu: [\"lscpu\", \" \", \"Prints the number of CPU Cores the current server has\"],\n mem: [\"mem [script name] [-t] [num threads]\", \" \", \"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print \", \"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then \", \"an argument for the number of threads must be passed in afterwards. Examples:\", \" \", \"mem foo.script\", \" \", \"mem foo.script -t 50\", \" \", \"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example \", \"above will print the amount of RAM needed to run 'foo.script' with 50 threads.\"],\n mv: [\"mv [src] [dest]\", \" \", \"Move the source file to the specified destination. This can also be used to rename files. \", \"This command only works for scripts and text files (.txt). This command CANNOT be used to \", \"convert to different file types\", \" \", \"Note that, unlike the Linux 'mv' command, the destination argument must be the \", \"full filepath. \", \"Examples: \", \" \", \"mv hacking-controller.script scripts/hacking-controller.script\", \" \", \"mv myScript.js myOldScript.js\"],\n nano: [\"nano [file name]\", \" \", \"Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be \", \"edited using the Text Editor. If the file does not already exist, then a new, empty one \", \"will be created\"],\n ps: [\"ps\", \" \", \"Prints all scripts that are running on the current server\"],\n rm: [\"rm [file]\", \" \", \"Removes the specified file from the current server. A file can be a script, a program, or a message file. \", \" \", \"WARNING: This is permanent and cannot be undone\"],\n run: [\"run [file name] [-t] [num threads] [args...]\", \" \", \"Execute a program or a script.\", \" \", \"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used \", \"to indicate that the script should be run with the specified number of threads. If the flag is omitted, \", \"then the script will be run with a single thread by default. \", \"If the '-t' flag is used, then it MUST come immediately \", \"after the script name, and the [num threads] argument MUST come immediately afterwards. \", \" \", \"[args...] represents a variable number of arguments that will be passed into the script. See the documentation \", \"about script arguments. Each specified argument must be separated by a space. \", \" \"],\n scan: [\"scan\", \" \", \"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect \", \"to using the 'connect' Terminal command.\"],\n \"scan-analyze\": [\"scan-analyze [depth] [-a]\", \" \", \"Prints detailed information about all servers up to [depth] nodes away on the network. Calling \", \"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal \", \"command. This command also shows the relative paths to reach each server.\", \" \", \"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have \", \"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to \", \"5 and 10, respectively.\", \" \", \"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, \", \"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM \", \"it has.\", \" \", \"By default, this command will not display servers that you have purchased. However, you can pass in the \", \"-a flag at the end of the command if you would like to enable that.\"],\n scp: [\"scp [filename] [target server]\", \" \", \"Copies the specified file from the current server to the target server. \", \"This command only works for script files (.script extension), literature files (.lit extension), \", \"and text files (.txt extension). \", \"The second argument passed in must be the hostname or IP of the target server.\"],\n sudov: [\"sudov\", \" \", \"Prints whether or not you have root access to the current machine\"],\n tail: [\"tail [script name] [args...]\", \" \", \"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated \", \"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used \", \"to run it. So, if a script was ran with the following arguments: \", \" \", \"run foo.script 10 50000\", \" \", \"Then in order to check its logs with 'tail' the same arguments must be used: \", \" \", \"tail foo.script 10 50000\"],\n theme: [\"theme [preset] | [#background #text #highlight]\", \" \", \"Change the color of the game's user interface\", \" \", \"This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. \", \"However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values \", \"for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and \", \"must be either 3 or 6 digits. Example:\", \" \", \"theme #ffffff #385 #235012\", \" \", \"A color picker such as \", \"<a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> \", \"can be used to get your desired hex color values\", \" \", \"Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.\"],\n top: [\"top\", \" \", \"Prints a list of all scripts running on the current server as well as their thread count and how much \", \"RAM they are using in total.\"],\n unalias: [\"unalias [alias name]\", \" \", \"Deletes the specified alias. Note that the double quotation marks are required. \", \" \", \"As an example, if an alias was declared using:\", \" \", 'alias r=\"run\"', \" \", \"Then it could be removed using:\", \" \", \"unalias r\", \" \", \"It is not necessary to differentiate between global and non-global aliases when using 'unalias'\"],\n wget: [\"wget [url] [target file]\", \" \", \"Retrieves data from a URL and downloads it to a file on the current server. The data can only \", \"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, \", \"it will be overwritten by this command.\", \" \", \"Note that it will not be possible to download data from many websites because they do not allow \", \"cross-origin resource sharing (CORS). Example:\", \" \", \"wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt\"]\n};\n\n//# sourceURL=webpack:///./src/Terminal/HelpText.ts?");
|
||
|
||
/***/ }),
|
||
/* 392 */
|
||
/*!******************************!*\
|
||
!*** ./src/Netscript/Pid.ts ***!
|
||
\******************************/
|
||
/*! exports provided: generateNextPid, resetPidCounter */
|
||
/*! exports used: generateNextPid, resetPidCounter */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateNextPid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return resetPidCounter; });\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScripts */ 153);\n\nlet pidCounter = 1;\n/**\n * Find and return the next availble PID for a script\n */\n\nfunction generateNextPid() {\n let tempCounter = pidCounter; // Cap the number of search iterations at some arbitrary value to avoid\n // infinite loops. We'll assume that players wont have 1mil+ running scripts\n\n let found = false;\n\n for (let i = 0; i < 1e6;) {\n if (!_WorkerScripts__WEBPACK_IMPORTED_MODULE_0__[/* workerScripts */ \"a\"].has(tempCounter + i)) {\n found = true;\n tempCounter = tempCounter + i;\n break;\n }\n\n if (i === Number.MAX_SAFE_INTEGER - 1) {\n i = 1;\n } else {\n ++i;\n }\n }\n\n if (found) {\n pidCounter = tempCounter + 1;\n\n if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\nfunction resetPidCounter() {\n pidCounter = 1;\n}\n\n//# sourceURL=webpack:///./src/Netscript/Pid.ts?");
|
||
|
||
/***/ }),
|
||
/* 393 */
|
||
/*!***********************************!*\
|
||
!*** ./src/NetscriptFunctions.js ***!
|
||
\***********************************/
|
||
/*! exports provided: NetscriptFunctions */
|
||
/*! exports used: NetscriptFunctions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptFunctions; });\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sprintf-js */ 472);\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sprintf_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! arg */ 437);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/RamCostGenerator */ 11);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Prestige */ 275);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Crime/CrimeHelpers */ 354);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Company/CompanyPosition */ 276);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./DarkWeb/DarkWebItems */ 229);\n/* harmony import */ var _Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Corporation/Actions */ 53);\n/* harmony import */ var _Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Corporation/data/CorporationUnlockUpgrades */ 341);\n/* harmony import */ var _Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Corporation/data/CorporationUpgrades */ 342);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Hacking */ 81);\n/* harmony import */ var _Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/formulas/grow */ 434);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Gang/Gang */ 394);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Gang/GangMemberTasks */ 177);\n/* harmony import */ var _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Gang/GangMemberUpgrades */ 154);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Faction/FactionWorkTypeEnum */ 126);\n/* harmony import */ var _Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Hacking/netscriptCanHack */ 407);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetNodes */ 198);\n/* harmony import */ var _Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetServers */ 180);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Hacknet/data/Constants */ 32);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Locations/data/LocationNames */ 9);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./PersonObjects/formulas/skill */ 199);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Message/Message */ 97);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Missions */ 119);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Script/Script */ 286);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Script/RunningScript */ 277);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Server/ServerPurchases */ 173);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./StockMarket/PlayerInfluencing */ 395);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./StockMarket/StockMarketHelpers */ 156);\n/* harmony import */ var _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./StockMarket/data/OrderTypes */ 80);\n/* harmony import */ var _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./StockMarket/data/PositionTypes */ 52);\n/* harmony import */ var _StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./StockMarket/data/StockSymbols */ 68);\n/* harmony import */ var _StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./StockMarket/StockMarketCosts */ 220);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./TextFile */ 197);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./NetscriptWorker */ 125);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 103);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./JSInterpreter */ 440);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./NetscriptPort */ 264);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveHelpers */ 442);\n/* harmony import */ var _Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./Exploits/Exploit.ts */ 223);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./ui/numeralFormat */ 3);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./utils/helpers/is2DArray */ 706);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../utils/LogBox */ 214);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 218);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 436);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 212);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultInterpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__[/* Interpreter */ \"a\"](\"\", () => undefined); // the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\n\nfunction toNative(pseudoObj) {\n if (pseudoObj == null) return null;\n\n if (!pseudoObj.hasOwnProperty(\"properties\") || !pseudoObj.hasOwnProperty(\"getter\") || !pseudoObj.hasOwnProperty(\"setter\") || !pseudoObj.hasOwnProperty(\"proto\")) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj;\n\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n nativeObj[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n } else {\n // Object.\n nativeObj = {};\n\n for (var key in pseudoObj.properties) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n\n return nativeObj;\n}\n\nfunction NetscriptFunctions(workerScript) {\n const updateDynamicRam = function (fnName, ramCost) {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n\n workerScript.dynamicLoadedFns[fnName] = true;\n let threads = workerScript.scriptRef.threads;\n\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.serverIp}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost * threads;\n\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Dynamic RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n const scan = eval('ns.scan');\n\n * Using map access to do the same\n const scan = ns['scan'];\n\n * Saving script in the improper order.\n Increase the cost of an imported script, save it, then run the\n parent. To fix this just re-open & save every script in order\n from most imported to least imported (parent script).\n\n Sorry :(`);\n }\n };\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} ip - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {Server} The specified Server\n */\n\n\n const safeGetServer = function (ip, callingFnName = \"\") {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid IP/hostname: ${ip}`);\n }\n\n return server;\n };\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n\n\n const getRunningScript = function (fn, ip, callingFnName, scriptArgs) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` + `This is probably a bug. Please report to game developer`);\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (ip == null) {\n ip = workerScript.serverIp;\n }\n\n const server = safeGetServer(ip, callingFnName);\n return Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(fn, scriptArgs, server);\n } // If no arguments are specified, return the current RunningScript\n\n\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid, callingFnName) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const name of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"])) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][name];\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScriptByPid */ \"b\"])(pid, server);\n if (runningScript) return runningScript;\n }\n\n return null;\n };\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n\n\n const getCannotFindRunningScriptErrorMessage = function (fn, ip, scriptArgs) {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${ip} with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`;\n };\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n\n\n const checkTixApiAccess = function (callingFn = \"\") {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n /**\n * Gets a stock, given its symbol. Throws an error if the symbol is invalid\n * @param {string} symbol - Stock's symbol\n * @returns {Stock} stock object\n */\n\n\n const getStockFromSymbol = function (symbol, callingFn = \"\") {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n\n\n const failOnHacknetServer = function (server, callingFn = \"\") {\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__[/* HacknetServer */ \"a\"]) {\n workerScript.log(callingFn, `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n }; // Utility function to get Hacknet Node object\n\n\n const getHacknetNode = function (i, callingFn = \"\") {\n if (isNaN(i)) {\n throw makeRuntimeErrorMsg(callingFn, \"Invalid index specified for Hacknet Node: \" + i);\n }\n\n if (i < 0 || i >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length) {\n throw makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i]];\n\n if (hserver == null) {\n throw makeRuntimeErrorMsg(callingFn, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`);\n }\n\n return hserver;\n } else {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i];\n }\n };\n\n const makeRuntimeErrorMsg = function (caller, msg) {\n const stack = new Error().stack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n\n for (const stackline of stack) {\n let filename;\n\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n\n if (!filename) continue;\n\n function parseChromeStackline(line) {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n\n if (lineMatch && funcMatch) {\n return {\n line: lineMatch[1],\n func: funcMatch[1]\n };\n }\n\n return null;\n }\n\n let call = {\n line: \"-1\",\n func: \"unknown\"\n };\n const chromeCall = parseChromeStackline(stackline);\n\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line) {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return {\n line: lineMatch[1],\n func: line.slice(0, lio)\n };\n }\n\n return null;\n }\n\n let firefoxCall = parseFirefoxStackline(stackline);\n\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `<br><br>Stack:<br>${userstack.join(\"<br>\")}`;\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, rejectMsg);\n };\n\n const checkFormulasAccess = function (func, n) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][n] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== n) {\n let extra = \"\";\n\n if (n !== 5) {\n extra = ` and Source-File ${n}-1`;\n }\n\n throw makeRuntimeErrorMsg(`formulas.${func}`, `Requires Source-File 5-1${extra} to run.`);\n }\n };\n\n const checkSingularityAccess = function (func, n) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 4) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][4] < n) {\n throw makeRuntimeErrorMsg(func, `This singularity function requires Source-File 4-${n} to run.`);\n }\n }\n };\n\n const checkBladeburnerAccess = function (func, skipjoined = false) {\n const apiAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.some(a => {\n return a.n === 7;\n });\n\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n\n if (!skipjoined) {\n const bladeburnerAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"];\n\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func, city) {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities.hasOwnProperty(city)) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const checkSleeveAPIAccess = function (func) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 10 && !_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][10]) {\n throw makeRuntimeErrorMsg(`sleeve.${func}`, \"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10\");\n }\n };\n\n const checkSleeveNumber = function (func, sleeveNumber) {\n if (sleeveNumber >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, msg);\n throw makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getCodingContract = function (func, ip, fn) {\n const server = safeGetServer(ip, func);\n const contract = server.getContract(fn);\n\n if (contract == null) {\n throw makeRuntimeErrorMsg(`codingcontract.${func}`, `Cannot find contract '${fn}' on server '${ip}'`);\n }\n\n return contract;\n };\n\n const checkGangApiAccess = function (func) {\n const hasAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__[/* Gang */ \"a\"];\n\n if (!hasAccess) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func, name) {\n for (const member of _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members) if (member.name === name) return member;\n\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func, name) {\n const task = _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__[/* GangMemberTasks */ \"a\"][name];\n\n if (!task) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n const getBladeburnerActionObject = function (func, type, name) {\n const actionId = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionIdFromTypeAndName(type, name);\n\n if (!actionId) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n const actionObj = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionObject(actionId);\n\n if (!actionObj) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n const getCompany = function (func, name) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][name];\n\n if (company == null || !(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n throw makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n\n return company;\n };\n\n const getFaction = function (func, name) {\n if (!Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* factionExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n };\n\n const getAugmentation = function (func, name) {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* augmentationExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][name];\n };\n\n function getDivision(divisionName) {\n const division = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation.divisions.find(div => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName, cityName, materialName) {\n const warehouse = getWarehouse(divisionName, cityName);\n const material = warehouse.materials[materialName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName, productName) {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName, cityName, employeeName) {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find(e => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n const runAfterReset = function (cbScript = null) {\n //Run a script after reset\n if (cbScript && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(cbScript)) {\n const home = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (const script of home.scripts) {\n if (script.filename === cbScript) {\n const ramUsage = script.ramUsage;\n const ramAvailable = home.maxRam - home.ramUsed;\n\n if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n\n const runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__[/* RunningScript */ \"a\"](script, []); // No args\n\n runningScriptObj.threads = 1; // Only 1 thread\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* startWorkerScript */ \"e\"])(runningScriptObj, home);\n }\n }\n }\n };\n\n const hack = function (ip, manual, {\n threads: requestedThreads,\n stock\n } = {}) {\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"hack\", requestedThreads);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hack\", `Invalid IP/hostname: ${ip}.`);\n } // Calculate the hacking time\n\n\n var hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // This is in seconds\n // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg);\n }\n\n workerScript.log(\"hack\", `Executing ${ip} in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(hackingTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n var hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n var rand = Math.random();\n var expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n var expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n let maxThreadNeeded = Math.ceil(1 / percentHacked * (server.moneyAvailable / server.moneyMax));\n\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads; // Over-the-top safety checks\n\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n\n server.moneyAvailable -= moneyDrained;\n\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoneyGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainMoney(moneyGained);\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].recordMoneySource(moneyGained, \"hacking\");\n workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnSuccess);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\"hack\", `Successfully hacked '${server.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerHack */ \"c\"])(server, moneyGained);\n }\n\n if (manual) {\n server.backdoorInstalled = true;\n }\n\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\"hack\", `Failed to hack '${server.hostname}'. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args) {\n let out = \"\";\n\n for (let arg of args) {\n arg = toNative(arg);\n\n if (typeof arg === \"object\") {\n out += JSON.stringify(arg);\n continue;\n }\n\n out += `${arg}`;\n }\n\n return out;\n };\n\n const functions = {\n hacknet: {\n numNodes: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length;\n },\n maxNumNodes: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"].MaxServers;\n }\n\n return Infinity;\n },\n purchaseNode: function () {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHacknet */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getPurchaseNodeCost: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetServer */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n } else {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetNode */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n },\n getNodeStats: function (i) {\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const res = {\n name: hasUpgraded ? node.hostname : node.name,\n level: node.level,\n ram: hasUpgraded ? node.maxRam : node.ram,\n cores: node.cores,\n production: hasUpgraded ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: hasUpgraded ? node.totalHashesGenerated : node.totalMoneyGenerated\n };\n\n if (hasUpgraded) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseLevelUpgrade */ \"n\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeRam: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseRamUpgrade */ \"o\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCore: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCoreUpgrade */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCache: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n const res = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCacheUpgrade */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n\n if (res) {\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n\n return res;\n },\n getLevelUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.hashes;\n },\n hashCapacity: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.capacity;\n },\n hashCost: function (upgName) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (upgName, upgTarget) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHashUpgrade */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], upgName, upgTarget);\n },\n getHashUpgradeLevel: function (upgName) {\n const level = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.upgrades[upgName];\n\n if (level === undefined) {\n throw makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return level;\n },\n getStudyMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getStudyMult();\n },\n getTrainingMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getTrainingMult();\n }\n },\n sprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"],\n vsprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"],\n scan: function (ip = workerScript.serverIp, hostnames = true) {\n updateDynamicRam(\"scan\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scan\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scan\", `Invalid IP/hostname: ${ip}.`);\n }\n\n var out = [];\n\n for (var i = 0; i < server.serversOnNetwork.length; i++) {\n var entry;\n\n if (hostnames) {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).hostname;\n } else {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).ip;\n }\n\n if (entry == null) {\n continue;\n }\n\n out.push(entry);\n }\n\n workerScript.log(\"scan\", `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"hack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hack\"));\n return hack(ip, false, {\n threads: requestedThreads,\n stock: stock\n });\n },\n hackAnalyzeThreads: function (ip, hackAmount) {\n updateDynamicRam(\"hackAnalyzeThreads\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzeThreads\")); // Check argument validity\n\n const server = safeGetServer(ip, \"hackAnalyzeThreads\");\n\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(workerScript, `Invalid growth argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`);\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n }\n\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyzePercent: function (ip) {\n updateDynamicRam(\"hackAnalyzePercent\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzePercent\"));\n const server = safeGetServer(ip, \"hackAnalyzePercent\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * 100;\n },\n hackChance: function (ip) {\n updateDynamicRam(\"hackChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackChance\"));\n const server = safeGetServer(ip, \"hackChance\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n sleep: function (time) {\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n\n workerScript.log(\"sleep\", `Sleeping for ${time} milliseconds`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n grow: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"grow\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"grow\"));\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"grow\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"grow\", `Invalid IP/hostname: ${ip}.`);\n }\n\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp); // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanGrow */ \"a\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg);\n }\n\n var growTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"grow\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(growTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(growTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* processSingleServerGrowth */ \"g\"])(server, threads, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.ip, threads);\n var expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\"grow\", `Available money on '${server.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatPercentage(logGrowPercent, 6)}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerGrow */ \"b\"])(server, moneyAfter - moneyBefore);\n }\n\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (ip, growth) {\n updateDynamicRam(\"growthAnalyze\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"growthAnalyze\")); // Check argument validity\n\n const server = safeGetServer(ip, \"growthAnalyze\");\n\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw makeRuntimeErrorMsg(\"growthAnalyze\", `Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* numCycleForGrowth */ \"e\"])(server, Number(growth), _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n weaken: function (ip, {\n threads: requestedThreads\n } = {}) {\n updateDynamicRam(\"weaken\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"weaken\"));\n var threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"weaken\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"weaken\", `Invalid IP/hostname: ${ip}`);\n } // No root access or skill level too low\n\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanWeaken */ \"c\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg);\n }\n\n const weakenTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"weaken\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(weakenTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(weakenTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) return Promise.reject(workerScript);\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.ip, threads);\n const expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n workerScript.log(\"weaken\", `'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n return Promise.resolve(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads);\n });\n },\n print: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n\n workerScript.print(argsToString(arguments));\n },\n tprint: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(`${workerScript.scriptRef.filename}: ${argsToString(arguments)}`);\n },\n tprintf: function (format, ...args) {\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(Object(sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"])(format, args));\n },\n clearLog: function () {\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (fn) {\n if (fn === \"ALL\") {\n for (fn in possibleLogs) {\n workerScript.disableLogs[fn] = true;\n }\n\n workerScript.log(\"disableLog\", `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"disableLog\", `Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n workerScript.log(\"disableLog\", `Disabled logging for ${fn}`);\n }\n },\n enableLog: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n\n return workerScript.disableLogs[fn] ? false : true;\n },\n getScriptLogs: function (fn, ip, ...scriptArgs) {\n const runningScriptObj = getRunningScript(fn, ip, \"getScriptLogs\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return \"\";\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n let runningScriptObj;\n\n if (arguments.length === 0) {\n runningScriptObj = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScriptObj = getRunningScriptByPid(fn, \"tail\");\n } else {\n runningScriptObj = getRunningScript(fn, ip, \"tail\", scriptArgs);\n }\n\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_75__[/* logBoxCreate */ \"a\"])(runningScriptObj);\n },\n nuke: function (ip) {\n updateDynamicRam(\"nuke\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"nuke\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"nuke\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", `Already have root access to '${server.hostname}'.`);\n } else {\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n }\n\n return true;\n },\n brutessh: function (ip) {\n updateDynamicRam(\"brutessh\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"brutessh\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"brutessh\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\n }\n\n if (!server.sshPortOpen) {\n workerScript.log(\"brutessh\", `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"brutessh\", `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n ftpcrack: function (ip) {\n updateDynamicRam(\"ftpcrack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ftpcrack\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\n }\n\n if (!server.ftpPortOpen) {\n workerScript.log(\"ftpcrack\", `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"ftpcrack\", `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n relaysmtp: function (ip) {\n updateDynamicRam(\"relaysmtp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"relaysmtp\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\n }\n\n if (!server.smtpPortOpen) {\n workerScript.log(\"relaysmtp\", `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"relaysmtp\", `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n httpworm: function (ip) {\n updateDynamicRam(\"httpworm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"httpworm\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"httpworm\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\n }\n\n if (!server.httpPortOpen) {\n workerScript.log(\"httpworm\", `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"httpworm\", `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n sqlinject: function (ip) {\n updateDynamicRam(\"sqlinject\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sqlinject\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"sqlinject\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\n }\n\n if (!server.sqlPortOpen) {\n workerScript.log(\"sqlinject\", `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"sqlinject\", `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n run: function (scriptname, threads = 1) {\n updateDynamicRam(\"run\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"run\"));\n\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"run\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n },\n exec: function (scriptname, ip, threads = 1) {\n updateDynamicRam(\"exec\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"exec\"));\n\n if (scriptname === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 3; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid IP/hostname: ${ip}`);\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"exec\", server, scriptname, argsForNewScript, workerScript, threads);\n },\n spawn: function (scriptname, threads) {\n updateDynamicRam(\"spawn\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"spawn\"));\n\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"spawn\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n }, spawnDelay * 1e3);\n workerScript.log(\"spawn\", `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"spawn\", \"Exiting...\");\n }\n },\n kill: function (filename, ip, ...scriptArgs) {\n updateDynamicRam(\"kill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"kill\"));\n let res;\n const killByPid = typeof filename === \"number\";\n\n if (killByPid) {\n // Kill by pid\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(filename);\n } else {\n // Kill by filename/ip\n if (filename === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(ip);\n const runningScriptObj = getRunningScript(filename, ip, \"kill\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", getCannotFindRunningScriptErrorMessage(filename, ip, scriptArgs));\n return false;\n }\n\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(runningScriptObj, server.ip);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `Killing '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}.`);\n }\n\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", `No script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `No such script '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`);\n }\n\n return false;\n }\n },\n killall: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"killall\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"killall\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"killall\", `Invalid IP/hostname: ${ip}`);\n }\n\n const scriptsRunning = server.runningScripts.length > 0;\n\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n workerScript.log(\"killall\", `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`);\n return scriptsRunning;\n },\n exit: function () {\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"exit\", \"Exiting...\");\n } else {\n workerScript.log(\"exit\", \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: function (scriptname, ip1, ip2) {\n updateDynamicRam(\"scp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scp\"));\n\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n var res = false;\n scriptname.forEach(function (script) {\n if (NetscriptFunctions(workerScript).scp(script, ip1, ip2)) {\n res = true;\n }\n });\n return res;\n } // Invalid file type\n\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n } // Invalid file name\n\n\n if (!scriptname.endsWith(\".lit\") && !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for .script, .lit, and .txt files\");\n }\n\n var destServer, currServ;\n\n if (ip2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip2);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip2}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n } else if (ip1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || ip1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", \"Could not find server ip for this script. This is a bug. Report to dev.\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n } // Scp for lit files\n\n\n if (scriptname.endsWith(\".lit\")) {\n var found = false;\n\n for (var i = 0; i < currServ.messages.length; ++i) {\n if (!(currServ.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && currServ.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true; // Already exists\n }\n }\n\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for text files\n\n\n if (scriptname.endsWith(\".txt\")) {\n var found = false,\n txtFile;\n\n for (var i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n found = true;\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptname) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n }\n }\n\n var newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_61__[/* TextFile */ \"a\"](txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for script files\n\n\n let sourceScript = null;\n\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptname == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n\n if (sourceScript == null) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n } // Overwrite script if it already exists\n\n\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptname == destServer.scripts[i].filename) {\n workerScript.log(\"scp\", `WARNING: File '${scriptname}' overwritten on '${destServer.hostname}'`);\n const oldScript = destServer.scripts[i]; // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n\n if (oldScript.code === sourceScript.code) return true;\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return true;\n }\n } // Create new script if it does not already exist\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.ip;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n },\n ls: function (ip, grep) {\n updateDynamicRam(\"ls\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ls\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(ip/hostname, [grep filter])\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ls\", `Invalid IP/hostname: ${ip}`);\n } // Get the grep filter, if one exists\n\n\n let filter = false;\n\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n if (server.messages[i].filename.includes(filter)) {\n allFiles.push(server.messages[i].filename);\n }\n } else if (server.messages[i].includes(filter)) {\n allFiles.push(server.messages[i]);\n }\n } else {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n allFiles.push(server.messages[i].filename);\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n }\n\n for (var i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (var i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n } // Sort the files alphabetically then print each\n\n\n allFiles.sort();\n return allFiles;\n },\n ps: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"ps\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ps\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ps\", `Invalid IP/hostname: ${ip}`);\n }\n\n const processes = [];\n\n for (const i in server.runningScripts) {\n const script = server.runningScripts[i];\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid\n });\n }\n\n return processes;\n },\n hasRootAccess: function (ip) {\n updateDynamicRam(\"hasRootAccess\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hasRootAccess\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", `Invalid IP/hostname: ${ip}`);\n }\n\n return server.hasAdminRights;\n },\n getIp: function () {\n updateDynamicRam(\"getIp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getIp\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getIp\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.ip;\n },\n getHostname: function () {\n updateDynamicRam(\"getHostname\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHostname\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(workerScript, \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.hostname;\n },\n getHackingLevel: function () {\n updateDynamicRam(\"getHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingLevel\"));\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].updateSkillLevels();\n workerScript.log(\"getHackingLevel\", `returned ${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill;\n },\n getHackingMultipliers: function () {\n updateDynamicRam(\"getHackingMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingMultipliers\"));\n return {\n chance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n speed: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n growth: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult\n };\n },\n getHacknetMultipliers: function () {\n updateDynamicRam(\"getHacknetMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHacknetMultipliers\"));\n return {\n production: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n purchaseCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n ramCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n coreCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n levelCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult\n };\n },\n getBitNodeMultipliers: function () {\n updateDynamicRam(\"getBitNodeMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getBitNodeMultipliers\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n\n let copy = Object.assign({}, _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"]);\n return copy;\n },\n getServer: function (ip) {\n updateDynamicRam(\"getServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServer\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getServer\", \"Requires Source-File 5 to run.\");\n }\n\n const server = safeGetServer(ip, \"getServer\");\n const copy = Object.assign({}, server); // These fields should be hidden.\n\n copy.contracts = undefined;\n copy.messages = undefined;\n copy.runningScripts = undefined;\n copy.scripts = undefined;\n copy.textFiles = undefined;\n copy.programs = undefined;\n copy.serversOnNetwork = undefined;\n return copy;\n },\n getServerMoneyAvailable: function (ip) {\n updateDynamicRam(\"getServerMoneyAvailable\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMoneyAvailable\"));\n const server = safeGetServer(ip, \"getServerMoneyAvailable\");\n\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\"getServerMoneyAvailable\", `returned player's money: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber())}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber();\n }\n\n workerScript.log(\"getServerMoneyAvailable\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyAvailable)} for '${server.hostname}'`);\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.hackDifficulty, 3)} for '${server.hostname}'`);\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerBaseSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerBaseSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerBaseSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerBaseSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.baseDifficulty, 3)} for '${server.hostname}'`);\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerMinSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMinSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerMinSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerMinSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.minDifficulty, 3)} for ${server.hostname}`);\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (ip) {\n updateDynamicRam(\"getServerRequiredHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRequiredHackingLevel\"));\n const server = safeGetServer(ip, \"getServerRequiredHackingLevel\");\n\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerRequiredHackingLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatSkill(server.requiredHackingSkill, 0)} for '${server.hostname}'`);\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (ip) {\n updateDynamicRam(\"getServerMaxMoney\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxMoney\"));\n const server = safeGetServer(ip, \"getServerMaxMoney\");\n\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n\n workerScript.log(\"getServerMaxMoney\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyMax)} for '${server.hostname}'`);\n return server.moneyMax;\n },\n getServerGrowth: function (ip) {\n updateDynamicRam(\"getServerGrowth\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerGrowth\"));\n const server = safeGetServer(ip, \"getServerGrowth\");\n\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n\n workerScript.log(\"getServerGrowth\", `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (ip) {\n updateDynamicRam(\"getServerNumPortsRequired\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerNumPortsRequired\"));\n const server = safeGetServer(ip, \"getServerNumPortsRequired\");\n\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n\n workerScript.log(\"getServerNumPortsRequired\", `returned ${server.numOpenPortsRequired} for '${server.hostname}'`);\n return server.numOpenPortsRequired;\n },\n getServerRam: function (ip) {\n updateDynamicRam(\"getServerRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRam\"));\n const server = safeGetServer(ip, \"getServerRam\");\n workerScript.log(\"getServerRam\", `returned [${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}, ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}]`);\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (ip) {\n updateDynamicRam(\"getServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxRam\"));\n const server = safeGetServer(ip, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (ip) {\n updateDynamicRam(\"getServerUsedRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerUsedRam\"));\n const server = safeGetServer(ip, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}`);\n return server.ramUsed;\n },\n serverExists: function (ip) {\n updateDynamicRam(\"serverExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"serverExists\"));\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip) !== null;\n },\n fileExists: function (filename, ip = workerScript.serverIp) {\n updateDynamicRam(\"fileExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"fileExists\"));\n\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"fileExists\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n\n for (var i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (!(server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && filename.toLowerCase() === server.messages[i]) {\n return true;\n }\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(filename, server);\n\n if (txtFile != null) {\n return true;\n }\n\n return false;\n },\n isRunning: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n updateDynamicRam(\"isRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isRunning\"));\n\n if (fn === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, ip, \"isRunning\", scriptArgs) != null;\n }\n },\n getStockSymbols: function () {\n updateDynamicRam(\"getStockSymbols\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSymbols\"));\n checkTixApiAccess(\"getStockSymbols\");\n return Object.values(_StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__[/* StockSymbols */ \"a\"]);\n },\n getStockPrice: function (symbol) {\n updateDynamicRam(\"getStockPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPrice\"));\n checkTixApiAccess(\"getStockPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockPrice\");\n return stock.price;\n },\n getStockAskPrice: function (symbol) {\n updateDynamicRam(\"getStockAskPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockAskPrice\"));\n checkTixApiAccess(\"getStockAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockAskPrice\");\n return stock.getAskPrice();\n },\n getStockBidPrice: function (symbol) {\n updateDynamicRam(\"getStockBidPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockBidPrice\"));\n checkTixApiAccess(\"getStockBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockBidPrice\");\n return stock.getBidPrice();\n },\n getStockPosition: function (symbol) {\n updateDynamicRam(\"getStockPosition\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPosition\"));\n checkTixApiAccess(\"getStockPosition\");\n var stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(\"getStockPosition\", `Invalid stock symbol: ${symbol}`);\n }\n\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getStockMaxShares: function (symbol) {\n updateDynamicRam(\"getStockMaxShares\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockMaxShares\"));\n checkTixApiAccess(\"getStockMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getStockMaxShares\");\n return stock.maxShares;\n },\n getStockPurchaseCost: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockPurchaseCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPurchaseCost\"));\n checkTixApiAccess(\"getStockPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getStockPurchaseCost\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return Infinity;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getBuyTransactionCost */ \"b\"])(stock, shares, pos);\n\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getStockSaleGain: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockSaleGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSaleGain\"));\n checkTixApiAccess(\"getStockSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getStockSaleGain\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return 0;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getSellTransactionGain */ \"c\"])(stock, shares, pos);\n\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buyStock: function (symbol, shares) {\n updateDynamicRam(\"buyStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"buyStock\"));\n checkTixApiAccess(\"buyStock\");\n const stock = getStockFromSymbol(symbol, \"buyStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* buyStock */ \"a\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellStock: function (symbol, shares) {\n updateDynamicRam(\"sellStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellStock\"));\n checkTixApiAccess(\"sellStock\");\n const stock = getStockFromSymbol(symbol, \"sellStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellStock */ \"c\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n shortStock: function (symbol, shares) {\n updateDynamicRam(\"shortStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"shortStock\"));\n checkTixApiAccess(\"shortStock\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"], \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"shortStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellShort: function (symbol, shares) {\n updateDynamicRam(\"sellShort\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellShort\"));\n checkTixApiAccess(\"sellShort\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(\"sellShort\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"sellShort\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellShort */ \"b\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n placeOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"placeOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"placeOrder\"));\n checkTixApiAccess(\"placeOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"placeOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"placeOrder\");\n let orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* placeOrder */ \"j\"])(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"cancelOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"cancelOrder\"));\n checkTixApiAccess(\"cancelOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFrom(symbol, \"cancelOrder\");\n\n if (isNaN(shares) || isNaN(price)) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`);\n }\n\n var orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n\n var params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos\n };\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* cancelOrder */ \"c\"])(params, workerScript);\n },\n getOrders: function () {\n updateDynamicRam(\"getOrders\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(workerScript, \"You must either be in BitNode-8 or have Source-File 8 Level 3.\");\n }\n }\n\n const orders = {};\n const stockMarketOrders = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* StockMarket */ \"a\"][\"Orders\"];\n\n for (let symbol in stockMarketOrders) {\n const orderBook = stockMarketOrders[symbol];\n\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos\n });\n }\n }\n }\n\n return orders;\n },\n getStockVolatility: function (symbol) {\n updateDynamicRam(\"getStockVolatility\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockVolatility\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockVolatility\");\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getStockForecast: function (symbol) {\n updateDynamicRam(\"getStockForecast\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockForecast\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockForecast\");\n var forecast = 50;\n stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function () {\n updateDynamicRam(\"purchase4SMarketData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData) {\n workerScript.log(\"purchase4SMarketData\", \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])())) {\n workerScript.log(\"purchase4SMarketData\", \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])());\n workerScript.log(\"purchase4SMarketData\", \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function () {\n updateDynamicRam(\"purchase4SMarketDataTixApi\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Not enough money to purchase 4S Market Data TIX API\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])());\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Purchased 4S Market Data TIX API\");\n return true;\n },\n getPurchasedServerLimit: function () {\n updateDynamicRam(\"getPurchasedServerLimit\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerLimit\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])();\n },\n getPurchasedServerMaxRam: function () {\n updateDynamicRam(\"getPurchasedServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerMaxRam\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerMaxRam */ \"c\"])();\n },\n getPurchasedServerCost: function (ram) {\n updateDynamicRam(\"getPurchasedServerCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerCost\"));\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (hostname, ram) {\n updateDynamicRam(\"purchaseServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length >= Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()) {\n workerScript.log(\"purchaseServer\", `You have reached the maximum limit of ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()} servers. You cannot purchase any more.`);\n return \"\";\n }\n\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"purchaseServer\", `Invalid argument: ram='${ram}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"purchaseServer\", `Not enough money to purchase server. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return \"\";\n }\n\n var newServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(newServ);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.push(newServ.ip);\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.ip);\n newServ.serversOnNetwork.push(homeComputer.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n workerScript.log(\"purchaseServer\", `Purchased new server with hostname '${newServ.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return newServ.hostname;\n },\n deleteServer: function (hostname) {\n updateDynamicRam(\"deleteServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"deleteServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* GetServerByHostname */ \"a\"])(hostnameStr);\n\n if (server == null) {\n workerScript.log(\"deleteServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n workerScript.log(\"deleteServer\", \"Cannot delete non-purchased server.\");\n return false;\n }\n\n var ip = server.ip; // Can't delete server you're currently connected to\n\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", \"You are currently connected to the server you are trying to delete.\");\n return false;\n } // A server cannot delete itself\n\n\n if (ip === workerScript.serverIp) {\n workerScript.log(\"deleteServer\", \"Cannot delete the server this script is running on.\");\n return false;\n } // Delete all scripts running on server\n\n\n if (server.runningScripts.length > 0) {\n workerScript.log(\"deleteServer\", `Cannot delete server '${server.hostname}' because it still has scripts running.`);\n return false;\n } // Delete from player's purchasedServers array\n\n\n var found = false;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length; ++i) {\n if (ip == _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers[i]) {\n found = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"deleteServer\", `Could not identify server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n } // Delete from all servers\n\n\n delete _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][ip]; // Delete from home computer\n\n found = false;\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (ip == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", `Deleted server '${hostnameStr}`);\n return true;\n }\n } // Wasn't found on home computer\n\n\n workerScript.log(\"deleteServer\", `Could not find server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n },\n getPurchasedServers: function (hostname = true) {\n updateDynamicRam(\"getPurchasedServers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServers\"));\n var res = [];\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.forEach(function (ip) {\n if (hostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getPurchasedServers\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n res.push(server.hostname);\n } else {\n res.push(ip);\n }\n });\n return res;\n },\n write: function (port, data = \"\", mode = \"a\") {\n updateDynamicRam(\"write\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"write\"));\n\n if (!isNaN(port)) {\n // Write to port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"write\", `Trying to write to invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"write\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.write(data);\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Write to script or text file\n let fn = port;\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* removeLeadingSlash */ \"h\"])(fn);\n } // Coerce 'data' to be a string\n\n\n try {\n data = String(data);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n // Create a new script\n script = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](fn, data, server.ip, server.scripts);\n server.scripts.push(script);\n return true;\n }\n\n mode === \"w\" ? script.code = data : script.code += data;\n script.updateRamUsage(server.scripts);\n script.markUpdated();\n } else {\n // Write to text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile == null) {\n txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* createTextFile */ \"b\"])(fn, data, server);\n return true;\n }\n\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n\n return true;\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWrite: function (port, data = \"\") {\n updateDynamicRam(\"tryWrite\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"tryWrite\"));\n\n if (!isNaN(port)) {\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.tryWrite(data);\n } else {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid argument: ${port}`);\n }\n },\n read: function (port) {\n updateDynamicRam(\"read\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"read\"));\n\n if (!isNaN(port)) {\n // Read from port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"read\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"read\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.read();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Read from script or text file\n let fn = port;\n let server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Read from script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n return \"\";\n }\n\n return script.code;\n } else {\n // Read from text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw makeRuntimeErrorMsg(\"read\", `Invalid argument: ${port}`);\n }\n },\n peek: function (port) {\n updateDynamicRam(\"peek\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"peek\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"peek\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.peek();\n },\n clear: function (port) {\n updateDynamicRam(\"clear\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"clear\"));\n\n if (!isNaN(port)) {\n // Clear port\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"clear\", `Trying to clear invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"clear\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.clear();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Clear text file\n var fn = port;\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${port}`);\n }\n\n return 0;\n },\n getPortHandle: function (port) {\n updateDynamicRam(\"getPortHandle\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPortHandle\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port} Must be an integer between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}.`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port;\n },\n rm: function (fn, ip) {\n updateDynamicRam(\"rm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"rm\"));\n\n if (ip == null || ip === \"\") {\n ip = workerScript.serverIp;\n }\n\n const s = safeGetServer(ip, \"rm\");\n const status = s.removeFile(fn);\n\n if (!status.res) {\n workerScript.log(\"rm\", status.msg);\n }\n\n return status.res;\n },\n scriptRunning: function (scriptname, ip) {\n updateDynamicRam(\"scriptRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptRunning\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptRunning\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n\n return false;\n },\n scriptKill: function (scriptname, ip) {\n updateDynamicRam(\"scriptKill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptKill\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptKill\", `Invalid IP/hostname: ${ip}`);\n }\n\n var suc = false;\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip);\n suc = true;\n }\n }\n\n return suc;\n },\n getScriptName: function () {\n return workerScript.name;\n },\n getScriptRam: function (scriptname, ip = workerScript.serverIp) {\n updateDynamicRam(\"getScriptRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptRam\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptRam\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n\n return 0;\n },\n getRunningScript: function (fn, ip) {\n updateDynamicRam(\"getRunningScript\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getRunningScript\"));\n let runningScript;\n\n if (arguments.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n const scriptArgs = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n scriptArgs.push(arguments[i]);\n }\n\n runningScript = getRunningScript(fn, ip, \"getRunningScript\", scriptArgs);\n }\n\n if (runningScript === null) return null;\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads\n };\n },\n getHackTime: function (ip) {\n updateDynamicRam(\"getHackTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackTime\"));\n const server = safeGetServer(ip, \"getHackTime\");\n\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getGrowTime: function (ip) {\n updateDynamicRam(\"getGrowTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getGrowTime\"));\n const server = safeGetServer(ip, \"getGrowTime\");\n\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getWeakenTime: function (ip) {\n updateDynamicRam(\"getWeakenTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getWeakenTime\"));\n const server = safeGetServer(ip, \"getWeakenTime\");\n\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getScriptIncome: function (scriptname, ip) {\n updateDynamicRam(\"getScriptIncome\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptIncome\"));\n\n if (arguments.length === 0) {\n var res = []; // First element is total income of all currently running scripts\n\n let total = 0;\n\n for (const script of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n\n res.push(total); // Second element is total income you've earned from scripts since you installed Augs\n\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug / (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptIncome\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptIncome\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname, ip) {\n updateDynamicRam(\"getScriptExpGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptExpGain\"));\n\n if (arguments.length === 0) {\n var total = 0;\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n\n return total;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptExpGain\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptExpGain\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (n, format) {\n if (isNaN(n) || isNaN(parseFloat(n)) || typeof format !== \"string\") {\n return \"\";\n }\n\n return _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].format(parseFloat(n), format);\n },\n tFormat: function (milliseconds, milliPrecision = false) {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function () {\n updateDynamicRam(\"getTimeSinceLastAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getTimeSinceLastAug\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug;\n },\n prompt: function (txt) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(txt)) {\n txt = JSON.stringify(txt);\n } // The id for this popup will consist of the first 20 characters of the prompt string..\n // Thats hopefully good enough to be unique\n\n\n const popupId = `prompt-popup-${txt.slice(0, 20)}`;\n const textElement = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: txt\n });\n return new Promise(function (resolve) {\n const yesBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"Yes\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(true);\n }\n });\n const noBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"No\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(false);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__[/* createPopup */ \"a\"])(popupId, [textElement, yesBtn, noBtn]);\n });\n },\n wget: async function (url, target, ip = workerScript.serverIp) {\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n workerScript.log(\"wget\", `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n\n var s = safeGetServer(ip, \"wget\");\n return new Promise(function (resolve) {\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target)) {\n res = s.writeToScriptFile(target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n workerScript.log(\"wget\", \"Failed.\");\n return resolve(false);\n }\n\n if (res.overwritten) {\n workerScript.log(\"wget\", `Successfully retrieved content and overwrote '${target}' on '${ip}'`);\n return resolve(true);\n }\n\n workerScript.log(\"wget\", `Successfully retrieved content to new file '${target}' on '${ip}'`);\n return resolve(true);\n }, \"text\").fail(function (e) {\n workerScript.log(\"wget\", JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function () {\n updateDynamicRam(\"getFavorToDonate\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFavorToDonate\"));\n return Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n },\n\n /* Singularity Functions */\n universityCourse: function (universityName, className) {\n updateDynamicRam(\"universityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"universityCourse\"));\n checkSingularityAccess(\"universityCourse\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"universityCourse\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"universityCourse\", txt);\n }\n\n var costMult, expMult;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Summit University' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Rothman University' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n var task;\n\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience;\n break;\n\n case \"Data Structures\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassDataStructures;\n break;\n\n case \"Networks\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassNetworks;\n break;\n\n case \"Algorithms\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassAlgorithms;\n break;\n\n case \"Management\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassManagement;\n break;\n\n case \"Leadership\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassLeadership;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid class name: ${className}.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, task);\n workerScript.log(\"universityCourse\", `Started ${task} at ${universityName}`);\n return true;\n },\n gymWorkout: function (gymName, stat) {\n updateDynamicRam(\"gymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gymWorkout\"));\n checkSingularityAccess(\"gymWorkout\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"gymWorkout\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"gymWorkout\", txt);\n }\n\n var costMult, expMult;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid gym name: ${gymName}. gymWorkout() failed`);\n return false;\n }\n\n switch (stat.toLowerCase()) {\n case \"strength\".toLowerCase():\n case \"str\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n break;\n\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n break;\n\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n break;\n\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid stat: ${stat}.`);\n return false;\n }\n\n workerScript.log(\"gymWorkout\", `Started training ${stat} at ${gymName}`);\n return true;\n },\n travelToCity: function (cityname) {\n updateDynamicRam(\"travelToCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"travelToCity\"));\n checkSingularityAccess(\"travelToCity\", 1);\n\n switch (cityname) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Chongqing:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].NewTokyo:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Ishima:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven:\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost)) {\n throw makeRuntimeErrorMsg(\"travelToCity\", \"Not enough money to travel.\");\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city = cityname;\n workerScript.log(\"travelToCity\", `Traveled to ${cityname}`);\n return true;\n\n default:\n workerScript.log(\"travelToCity\", `Invalid city name: '${cityname}'.`);\n return false;\n }\n },\n purchaseTor: function () {\n updateDynamicRam(\"purchaseTor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseTor\"));\n checkSingularityAccess(\"purchaseTor\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] != null) {\n workerScript.log(\"purchaseTor\", \"You already have a TOR router!\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n workerScript.log(\"purchaseTor\", \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost);\n var darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"purchaseTor\", \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (programName) {\n updateDynamicRam(\"purchaseProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseProgram\"));\n checkSingularityAccess(\"purchaseProgram\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] == null) {\n workerScript.log(\"purchaseProgram\", \"You do not have the TOR router.\");\n return false;\n }\n\n programName = programName.toLowerCase();\n let item = null;\n\n for (const key in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == programName) {\n item = i;\n }\n }\n\n if (item == null) {\n workerScript.log(\"purchaseProgram\", `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(item.price)) {\n workerScript.log(\"purchaseProgram\", `Not enough money to purchase '${item.program}'. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(item.price)}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", `You already have the '${item.program}' program`);\n return true;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n workerScript.log(\"purchaseProgram\", `You have purchased the '${item.program}' program. The new program can be found on your home computer.`);\n return true;\n },\n getCurrentServer: function () {\n updateDynamicRam(\"getCurrentServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCurrentServer\"));\n checkSingularityAccess(\"getCurrentServer\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().hostname;\n },\n connect: function (hostname) {\n updateDynamicRam(\"connect\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"connect\"));\n checkSingularityAccess(\"connect\", 1);\n\n if (!hostname) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n let target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(hostname);\n\n if (target == null) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n return;\n }\n\n if (hostname === \"home\") {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i);\n\n if (other.ip == hostname || other.hostname == hostname) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = target.ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function () {\n updateDynamicRam(\"manualHack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"manualHack\"));\n checkSingularityAccess(\"manualHack\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n return hack(server.hostname, true);\n },\n installBackdoor: function () {\n updateDynamicRam(\"installBackdoor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installBackdoor\"));\n checkSingularityAccess(\"installBackdoor\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n const installTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) / 4 * 1000; // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg);\n }\n\n workerScript.log(\"installBackdoor\", `Installing backdoor on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(installTime, true)}`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(installTime, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n workerScript.log(\"installBackdoor\", `Successfully installed backdoor on '${server.hostname}'`);\n server.backdoorInstalled = true;\n return Promise.resolve();\n });\n },\n getStats: function () {\n updateDynamicRam(\"getStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStats\"));\n checkSingularityAccess(\"getStats\", 1);\n workerScript.log(\"getStats\", `getStats is deprecated, please use getPlayer`);\n return {\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence\n };\n },\n getCharacterInformation: function () {\n updateDynamicRam(\"getCharacterInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCharacterInformation\"));\n checkSingularityAccess(\"getCharacterInformation\", 1);\n workerScript.log(\"getCharacterInformation\", `getCharacterInformation is deprecated, please use getPlayer`);\n return {\n bitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n jobTitles: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n mult: {\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n companyRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n crimeMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crimeSuccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n factionRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n workMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult\n },\n timeWorked: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].timeWorked,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n workHackExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charismaExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp\n };\n },\n getPlayer: function () {\n updateDynamicRam(\"getPlayer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPlayer\"));\n const data = {\n hacking_skill: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n max_hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence,\n hacking_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n hacking_speed_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n hacking_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n hacking_grow_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult,\n hacking_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strength_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defense_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterity_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agility_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charisma_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp,\n hacking_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n strength_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n defense_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n dexterity_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n agility_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n charisma_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_mult,\n hacking_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n defense_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n agility_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n charisma_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp_mult,\n company_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n faction_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n numPeopleKilled: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].numPeopleKilled,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber(),\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n location: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location,\n companyName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName,\n crime_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crime_success_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n isWorking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking,\n workType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workType,\n currentWorkFactionName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionName,\n currentWorkFactionDescription: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionDescription,\n workHackExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGainRate,\n workStrExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGainRate,\n workDefExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGainRate,\n workDexExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGainRate,\n workAgiExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGainRate,\n workChaExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGainRate,\n workRepGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGainRate,\n workMoneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGainRate,\n workMoneyLossRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyLossRate,\n workHackExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n createProgramName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramName,\n createProgramReqLvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramReqLvl,\n className: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].className,\n crimeType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crimeType,\n work_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult,\n hacknet_node_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult,\n hasWseAccount: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount,\n hasTixApiAccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess,\n has4SData: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData,\n has4SDataTixApi: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi,\n bladeburner_max_stamina_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_analysis_mult,\n bladeburner_success_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_success_chance_mult,\n bitNodeN: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n totalPlaytime: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].totalPlaytime,\n playtimeSinceLastAug: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug,\n playtimeSinceLastBitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastBitnode,\n jobs: {},\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")\n };\n Object.assign(data.jobs, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs);\n return data;\n },\n hospitalize: function () {\n updateDynamicRam(\"hospitalize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hospitalize\"));\n checkSingularityAccess(\"hospitalize\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hospitalize();\n },\n isBusy: function () {\n updateDynamicRam(\"isBusy\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isBusy\"));\n checkSingularityAccess(\"isBusy\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking || _Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"];\n },\n stopAction: function () {\n updateDynamicRam(\"stopAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"stopAction\"));\n checkSingularityAccess(\"stopAction\", 1);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"stopAction\", txt);\n return true;\n }\n\n return false;\n },\n upgradeHomeRam: function () {\n updateDynamicRam(\"upgradeHomeRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"upgradeHomeRam\"));\n checkSingularityAccess(\"upgradeHomeRam\", 2); // Check if we're at max RAM\n\n const homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"upgradeHomeRam\", `You don't have enough money. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return false;\n }\n\n homeComputer.maxRam *= 2;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"upgradeHomeRam\", `Purchased additional RAM for home computer! It now has ${homeComputer.maxRam}GB of RAM.`);\n return true;\n },\n getUpgradeHomeRamCost: function () {\n updateDynamicRam(\"getUpgradeHomeRamCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getUpgradeHomeRamCost\"));\n checkSingularityAccess(\"getUpgradeHomeRamCost\", 2);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n },\n workForCompany: function (companyName) {\n updateDynamicRam(\"workForCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForCompany\"));\n checkSingularityAccess(\"workForCompany\", 2); // Sanitize input\n\n if (companyName == null) {\n companyName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName;\n } // Make sure its a valid company\n\n\n if (companyName == null || companyName === \"\" || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n workerScript.log(\"workForCompany\", `Invalid company: '${companyName}'`);\n return false;\n } // Make sure player is actually employed at the comapny\n\n\n if (!Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", `You do not have a job at '${companyName}'`);\n return false;\n } // Cant work while in a mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForCompany\", \"You are in the middle of a mission.\");\n return false;\n } // Check to make sure company position data is valid\n\n\n const companyPositionName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPositionName === \"\" || !(companyPosition instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__[/* CompanyPosition */ \"a\"])) {\n workerScript.log(\"workForCompany\", \"You do not have a job\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForCompany\", txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWorkPartTime(companyName);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWork(companyName);\n }\n\n workerScript.log(\"workForCompany\", `Began working at '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName}' as a '${companyPositionName}'`);\n return true;\n },\n applyToCompany: function (companyName, field) {\n updateDynamicRam(\"applyToCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"applyToCompany\"));\n checkSingularityAccess(\"applyToCompany\", 2);\n getCompany(\"applyToCompany\", companyName);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = companyName;\n var res;\n\n switch (field.toLowerCase()) {\n case \"software\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareJob(true);\n break;\n\n case \"software consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareConsultantJob(true);\n break;\n\n case \"it\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForItJob(true);\n break;\n\n case \"security engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityEngineerJob(true);\n break;\n\n case \"network engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForNetworkEngineerJob(true);\n break;\n\n case \"business\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessJob(true);\n break;\n\n case \"business consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessConsultantJob(true);\n break;\n\n case \"security\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityJob(true);\n break;\n\n case \"agent\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForAgentJob(true);\n break;\n\n case \"employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForEmployeeJob(true);\n break;\n\n case \"part-time employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeEmployeeJob(true);\n break;\n\n case \"waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForWaiterJob(true);\n break;\n\n case \"part-time waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeWaiterJob(true);\n break;\n\n default:\n workerScript.log(\"applyToCompany\", `Invalid job: '${field}'.`);\n return false;\n } // The Player object's applyForJob function can return string with special error messages\n\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res)) {\n workerScript.log(\"applyToCompany\", res);\n return false;\n }\n\n if (res) {\n workerScript.log(\"applyToCompany\", `You were offered a new job at '${companyName}' as a '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName]}'`);\n } else {\n workerScript.log(\"applyToCompany\", `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`);\n }\n\n return res;\n },\n getCompanyRep: function (companyName) {\n updateDynamicRam(\"getCompanyRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyRep\"));\n checkSingularityAccess(\"getCompanyRep\", 2);\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (companyName) {\n updateDynamicRam(\"getCompanyFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavor\"));\n checkSingularityAccess(\"getCompanyFavor\", 2);\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (companyName) {\n updateDynamicRam(\"getCompanyFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavorGain\"));\n checkSingularityAccess(\"getCompanyFavorGain\", 2);\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain()[0];\n },\n checkFactionInvitations: function () {\n updateDynamicRam(\"checkFactionInvitations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"checkFactionInvitations\"));\n checkSingularityAccess(\"checkFactionInvitations\", 2); // Make a copy of Player.factionInvitations\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.slice();\n },\n joinFaction: function (name) {\n updateDynamicRam(\"joinFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"joinFaction\"));\n checkSingularityAccess(\"joinFaction\", 2);\n getFaction(\"joinFaction\", name);\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.includes(name)) {\n workerScript.log(\"joinFaction\", `You have not been invited by faction '${name}'`);\n return false;\n }\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* joinFaction */ \"d\"])(fac); // Update Faction Invitation list to account for joined + banned factions\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i] == name || _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"joinFaction\", `Joined the '${name}' faction.`);\n return true;\n },\n workForFaction: function (name, type) {\n updateDynamicRam(\"workForFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForFaction\"));\n checkSingularityAccess(\"workForFaction\", 2);\n getFaction(\"workForFaction\", name); // if the player is in a gang and the target faction is any of the gang faction, fail\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang() && _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][name] !== undefined) {\n workerScript.log(\"workForFaction\", `Faction '${name}' does not offer work at the moment.`);\n return;\n }\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForFaction\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(name)) {\n workerScript.log(\"workForFaction\", `You are not a member of '${name}'`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForFaction\", txt);\n }\n\n var fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name]; // Arrays listing factions that allow each time of work\n\n var hackAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Netburners\", \"Tian Di Hui\", \"CyberSec\"];\n var fdWkAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Tetrads\", \"Slum Snakes\"];\n var scWkAvailable = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Syndicate\", \"Tetrads\", \"Slum Snakes\", \"Tian Di Hui\"];\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!hackAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionHackWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!fdWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionFieldWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out field missions for '${fac.name}'`);\n return true;\n\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!scWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionSecurityWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out security work for '${fac.name}'`);\n return true;\n\n default:\n workerScript.log(\"workForFaction\", `Invalid work type: '${type}`);\n }\n\n return true;\n },\n getFactionRep: function (name) {\n updateDynamicRam(\"getFactionRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionRep\"));\n checkSingularityAccess(\"getFactionRep\", 2);\n const faction = getFaction(\"getFactionRep\", name);\n return faction.playerReputation;\n },\n getFactionFavor: function (name) {\n updateDynamicRam(\"getFactionFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavor\"));\n checkSingularityAccess(\"getFactionFavor\", 2);\n const faction = getFaction(\"getFactionFavor\", name);\n return faction.favor;\n },\n getFactionFavorGain: function (name) {\n updateDynamicRam(\"getFactionFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavorGain\"));\n checkSingularityAccess(\"getFactionFavorGain\", 2);\n const faction = getFaction(\"getFactionFavorGain\", name);\n return faction.getFavorGain()[0];\n },\n donateToFaction: function (name, amt) {\n updateDynamicRam(\"donateToFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"donateToFaction\"));\n checkSingularityAccess(\"donateToFaction\", 3);\n const faction = getFaction(\"donateToFaction\", name);\n\n if (typeof amt !== \"number\" || amt <= 0) {\n workerScript.log(\"donateToFaction\", `Invalid donation amount: '${amt}'.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(amt)) {\n workerScript.log(\"donateToFaction\", `You do not have enough money to donate ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} to '${name}'`);\n return false;\n }\n\n const repNeededToDonate = Math.round(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\"donateToFaction\", `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`);\n return false;\n }\n\n const repGain = amt / _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor * _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult;\n faction.playerReputation += repGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(amt);\n workerScript.log(\"donateToFaction\", `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} donated to '${name}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatReputation(repGain)} reputation`);\n return true;\n },\n createProgram: function (name) {\n updateDynamicRam(\"createProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"createProgram\"));\n checkSingularityAccess(\"createProgram\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"createProgram\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"createProgram\", txt);\n }\n\n name = name.toLowerCase();\n let p = null;\n\n for (const key in _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"]) {\n if (_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key].name.toLowerCase() == name) {\n p = _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key];\n }\n }\n\n if (p == null) {\n workerScript.log(\"createProgram\", `The specified program does not exist: '${name}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(p.name)) {\n workerScript.log(\"createProgram\", `You already have the '${p.name}' program`);\n return false;\n }\n\n if (!p.create.req(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n workerScript.log(\"createProgram\", `Hacking level is too low to create '${p.name}' (level ${p.create.level} req)`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startCreateProgramWork(p.name, p.create.time, p.create.level);\n workerScript.log(\"createProgram\", `Began creating program: '${name}'`);\n return true;\n },\n commitCrime: function (crimeRoughName) {\n updateDynamicRam(\"commitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"commitCrime\"));\n checkSingularityAccess(\"commitCrime\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"commitCrime\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"commitCrime\", txt);\n } // Set Location to slums\n\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Slums);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n // couldn't find crime\n throw makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n\n workerScript.log(\"commitCrime\", `Attempting to commit ${crime.name}...`);\n return crime.commit(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], 1, {\n workerscript: workerScript\n });\n },\n getCrimeChance: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeChance\"));\n checkSingularityAccess(\"getCrimeChance\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getCrimeStats: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeStats\"));\n checkSingularityAccess(\"getCrimeStats\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getOwnedAugmentations: function (purchased = false) {\n updateDynamicRam(\"getOwnedAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedAugmentations\"));\n checkSingularityAccess(\"getOwnedAugmentations\", 3);\n var res = [];\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[i].name);\n }\n\n if (purchased) {\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[i].name);\n }\n }\n\n return res;\n },\n getOwnedSourceFiles: function () {\n updateDynamicRam(\"getOwnedSourceFiles\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedSourceFiles\"));\n checkSingularityAccess(\"getOwnedSourceFiles\", 3);\n let res = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n res.push({\n n: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].n,\n lvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].lvl\n });\n }\n\n return res;\n },\n getAugmentationsFromFaction: function (facname) {\n updateDynamicRam(\"getAugmentationsFromFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationsFromFaction\"));\n checkSingularityAccess(\"getAugmentationsFromFaction\", 3);\n const faction = getFaction(\"getAugmentationsFromFaction\", facname); // If player has a gang with this faction, return all augmentations.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(facname)) {\n const res = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n res.push(augName);\n }\n }\n\n return res;\n }\n\n return faction.augmentations.slice();\n },\n getAugmentationCost: function (name) {\n updateDynamicRam(\"getAugmentationCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationCost\"));\n checkSingularityAccess(\"getAugmentationCost\", 3);\n const aug = getAugmentation(\"getAugmentationCost\", name);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (name) {\n updateDynamicRam(\"getAugmentationPrereq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrereq\"));\n checkSingularityAccess(\"getAugmentationPrereq\", 3);\n const aug = getAugmentation(\"getAugmentationPrereq\", name);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (name) {\n updateDynamicRam(\"getAugmentationPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrice\"));\n checkSingularityAccess(\"getAugmentationPrice\", 3);\n const aug = getAugmentation(\"getAugmentationPrice\", name);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (name) {\n updateDynamicRam(\"getAugmentationRepReq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationRepReq\"));\n checkSingularityAccess(\"getAugmentationRepReq\", 3);\n const aug = getAugmentation(\"getAugmentationRepReq\", name);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (name) {\n updateDynamicRam(\"getAugmentationStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationStats\"));\n checkSingularityAccess(\"getAugmentationStats\", 3);\n const aug = getAugmentation(\"getAugmentationStats\", name);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (faction, name) {\n updateDynamicRam(\"purchaseAugmentation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseAugmentation\"));\n checkSingularityAccess(\"purchaseAugmentation\", 3);\n const fac = getFaction(\"purchaseAugmentation\", faction);\n const aug = getAugmentation(\"purchaseAugmentation\", name);\n let augs = [];\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(faction)) {\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const tempAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!tempAug.isSpecial) {\n augs.push(augName);\n }\n }\n } else {\n augs = fac.augmentations;\n }\n\n if (!augs.includes(name)) {\n workerScript.log(\"purchaseAugmentation\", `Faction '${faction}' does not have the '${name}' augmentation.`);\n return false;\n }\n\n const isNeuroflux = aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor;\n\n if (!isNeuroflux) {\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n }\n\n if (fac.playerReputation < aug.baseRepRequirement) {\n workerScript.log(\"purchaseAugmentation\", `You do not have enough reputation with '${fac.name}'.`);\n return false;\n }\n\n const res = Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* purchaseAugmentation */ \"f\"])(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", res);\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res) && res.startsWith(\"You purchased\")) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (cbScript) {\n updateDynamicRam(\"softReset\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"softReset\"));\n checkSingularityAccess(\"softReset\", 3);\n workerScript.log(\"softReset\", \"Soft resetting. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n runAfterReset(cbScript);\n }, 0); // Prevent workerScript from \"finishing execution naturally\"\n\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n installAugmentations: function (cbScript) {\n updateDynamicRam(\"installAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installAugmentations\"));\n checkSingularityAccess(\"installAugmentations\", 3);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", \"You do not have any Augmentations to be installed.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"installAugmentations\", \"Installing Augmentations. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* installAugmentations */ \"d\"])();\n runAfterReset(cbScript);\n }, 0);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n // Gang API\n gang: {\n createGang: function (faction) {\n updateDynamicRam(\"createGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"createGang\")); // this list is copied from Faction/ui/Root.tsx\n\n const GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].canAccessGang() || !GangNames.includes(faction)) return false;\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang()) return false;\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(faction)) return false;\n const isHacking = faction === \"NiteSec\" || faction === \"The Black Hand\";\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startGang(faction, isHacking);\n return true;\n },\n inGang: function () {\n updateDynamicRam(\"inGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"inGang\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang();\n },\n getMemberNames: function () {\n updateDynamicRam(\"getMemberNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members.map(member => member.name);\n },\n getGangInformation: function () {\n updateDynamicRam(\"getGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n return {\n faction: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName,\n isHacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.isHackingGang,\n moneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.moneyGainRate,\n power: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getPower(),\n respect: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respect,\n respectGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respectGainRate,\n territory: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getTerritory(),\n territoryClashChance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryClashChance,\n territoryWarfareEngaged: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged,\n wantedLevel: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wanted,\n wantedLevelGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wantedGainRate\n };\n },\n getOtherGangInformation: function () {\n updateDynamicRam(\"getOtherGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy = {};\n\n for (const gang in _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"]) {\n cpy[gang] = Object.assign({}, _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (name) {\n updateDynamicRam(\"getMemberInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const member = getGangMember(\"getMemberInformation\", name);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice()\n };\n },\n canRecruitMember: function () {\n updateDynamicRam(\"canRecruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.canRecruitMember();\n },\n recruitMember: function (name) {\n updateDynamicRam(\"recruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const recruited = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.recruitMember(name);\n\n if (recruited) {\n workerScript.log(\"recruitMember\", `Successfully recruited Gang Member '${name}'`);\n } else {\n workerScript.log(\"recruitMember\", `Failed to recruit Gang Member '${name}'`);\n }\n\n return recruited;\n },\n getTaskNames: function () {\n updateDynamicRam(\"getTaskNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const tasks = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (memberName, taskName) {\n updateDynamicRam(\"setMemberTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const success = member.assignToTask(taskName);\n\n if (success) {\n workerScript.log(\"setMemberTask\", `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`);\n } else {\n workerScript.log(\"setMemberTask\", `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`);\n }\n\n return success;\n },\n getTaskStats: function (taskName) {\n updateDynamicRam(\"getTaskStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskStats\"));\n checkGangApiAccess(\"getTaskStats\");\n const task = getGangTask(\"getTaskStats\", taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: function () {\n updateDynamicRam(\"getEquipmentNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(_Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"]);\n },\n getEquipmentCost: function (equipName) {\n updateDynamicRam(\"getEquipmentCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg === null) return Infinity;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (equipName) {\n updateDynamicRam(\"getEquipmentType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (equipName) {\n updateDynamicRam(\"getEquipmentStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n\n if (!equipment) {\n throw makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n\n return Object.assign({}, equipment.mults);\n },\n purchaseEquipment: function (memberName, equipName) {\n updateDynamicRam(\"purchaseEquipment\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang);\n\n if (res) {\n workerScript.log(\"purchaseEquipment\", `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\"purchaseEquipment\", `Failed to purchase '${equipName}' for Gang member '${memberName}'`);\n }\n\n return res;\n },\n ascendMember: function (name) {\n updateDynamicRam(\"ascendMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const member = getGangMember(\"ascendMember\", name);\n if (!member.canAscend()) return;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.ascendMember(member, workerScript);\n },\n setTerritoryWarfare: function (engage) {\n updateDynamicRam(\"setTerritoryWarfare\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n\n if (engage) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = true;\n workerScript.log(\"setTerritoryWarfare\", \"Engaging in Gang Territory Warfare\");\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = false;\n workerScript.log(\"setTerritoryWarfare\", \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (otherGang) {\n updateDynamicRam(\"getChanceToWinClash\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n\n if (_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang] == null) {\n throw makeRuntimeErrorMsg(`gang.${getChanceToWinClash}`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName].power;\n const otherPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang].power;\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.storedCycles / 5);\n }\n },\n // end gang namespace\n // Bladeburner API\n bladeburner: {\n getContractNames: function () {\n updateDynamicRam(\"getContractNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function () {\n updateDynamicRam(\"getOperationNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function () {\n updateDynamicRam(\"getBlackOpNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (name = \"\") {\n updateDynamicRam(\"getBlackOpRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", name);\n return action.reqdRank;\n },\n getGeneralActionNames: function () {\n updateDynamicRam(\"getGeneralActionNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function () {\n updateDynamicRam(\"getSkillNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (type = \"\", name = \"\") {\n updateDynamicRam(\"startAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.startActionNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function () {\n updateDynamicRam(\"stopBladeburnerAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.resetAction();\n },\n getCurrentAction: function () {\n updateDynamicRam(\"getCurrentAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTypeAndNameFromActionId(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.action);\n },\n getActionTime: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionTimeNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionEstimatedSuccessChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionEstimatedSuccessChance\"));\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (type = \"\", name = \"\", level) {\n updateDynamicRam(\"getActionRepGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\n\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank;\n },\n getActionCountRemaining: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCountRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionMaxLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCurrentLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (type = \"\", name = \"\", autoLevel = true) {\n updateDynamicRam(\"setActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (type = \"\", name = \"\", level = 1) {\n updateDynamicRam(\"setActionLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n\n if (level < 1 || level > action.maxLevel) {\n throw makeRuntimeErrorMsg(\"bladeburner.setActionLevel\", `Level must be between 1 and ${action.maxLevel}, is ${level}`);\n }\n\n action.level = level;\n },\n getRank: function () {\n updateDynamicRam(\"getRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.rank;\n },\n getSkillPoints: function () {\n updateDynamicRam(\"getSkillPoints\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.skillPoints;\n },\n getSkillLevel: function (skillName = \"\") {\n updateDynamicRam(\"getSkillLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (skillName = \"\") {\n updateDynamicRam(\"getSkillUpgradeCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (skillName) {\n updateDynamicRam(\"upgradeSkill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (type = \"\", name = \"\", size) {\n updateDynamicRam(\"setTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (cityName) {\n updateDynamicRam(\"getCityEstimatedPopulation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedPopulation\"));\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].popEst;\n },\n getCityEstimatedCommunities: function (cityName) {\n updateDynamicRam(\"getCityEstimatedCommunities\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedCommunities\"));\n checkBladeburnerAccess(\"getCityEstimatedCommunities\");\n checkBladeburnerCity(\"getCityEstimatedCommunities\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].commsEst;\n },\n getCityChaos: function (cityName) {\n updateDynamicRam(\"getCityChaos\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].chaos;\n },\n getCity: function () {\n updateDynamicRam(\"getCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city;\n },\n switchCity: function (cityName) {\n updateDynamicRam(\"switchCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city = cityName;\n },\n getStamina: function () {\n updateDynamicRam(\"getStamina\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n return [_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.stamina, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function () {\n updateDynamicRam(\"joinBladeburnerFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function () {\n updateDynamicRam(\"joinBladeburnerDivision\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerDivision\"));\n checkBladeburnerAccess(\"joinBladeburnerDivision\", true);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][7] > 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 8) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"]) {\n return true; // Already member\n } else if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility >= 100) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"](_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"joinBladeburnerDivision\", \"You have been accepted into the Bladeburner division\");\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n\n return true;\n } else {\n workerScript.log(\"joinBladeburnerDivision\", \"You do not meet the requirements for joining the Bladeburner division\");\n return false;\n }\n }\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.storedCycles / 5);\n }\n },\n // End Bladeburner\n // Hi, if you're reading this you're a bit nosy.\n // There's a corporation API but it's very imbalanced right now.\n // It's here so players can test with if they want.\n corporation: {\n expandIndustry: function (industryName, divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewIndustry */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, industryName, divisionName);\n },\n expandCity: function (divisionName, cityName) {\n const division = getDivision(divisionName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewCity */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, division, cityName);\n },\n unlockUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__[/* CorporationUnlockUpgrades */ \"a\"]).find(upgrade => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UnlockUpgrade */ \"x\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n levelUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__[/* CorporationUpgrades */ \"a\"]).find(upgrade => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* LevelUpgrade */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n issueDividends: function (percent) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* IssueDividends */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, percent);\n },\n sellMaterial: function (divisionName, cityName, materialName, amt, price) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellMaterial */ \"o\"])(material, amt, price);\n },\n sellProduct: function (divisionName, cityName, productName, amt, price, all) {\n const product = getProduct(divisionName, productName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellProduct */ \"p\"])(product, cityName, amt, price, all);\n },\n discontinueProduct: function (divisionName, productName) {\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (divisionName, cityName, enabled) {\n const warehouse = getWarehouse(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetSmartSupply */ \"u\"])(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function () {},\n buyMaterial: function (divisionName, cityName, materialName, amt) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyMaterial */ \"c\"])(material, amt);\n },\n employees: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n return office.employees.map(e => Object.assign({}, e));\n },\n assignJob: function (divisionName, cityName, employeeName, job) {\n const employee = getEmployee(divisionName, cityName, employeeName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* AssignJob */ \"a\"])(employee, job);\n },\n hireEmployee: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (divisionName, cityName, size) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeOfficeSize */ \"y\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, size);\n },\n throwParty: function (divisionName, cityName, costPerEmployee) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ThrowParty */ \"w\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, costPerEmployee);\n },\n purchaseWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* PurchaseWarehouse */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeWarehouse */ \"z\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n buyCoffee: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyCoffee */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, cityName));\n },\n hireAdVert: function (divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* HireAdVert */ \"f\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n makeProduct: function (divisionName, cityName, productName, designInvest, marketingInvest) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* MakeProduct */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n research: function (divisionName, researchName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* Research */ \"n\"])(getDivision(divisionName), researchName);\n },\n exportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ExportMaterial */ \"e\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n cancelExportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* CancelExportMaterial */ \"d\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA1 */ \"q\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA2 */ \"r\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA1 */ \"s\"])(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA2 */ \"t\"])(getProduct(divisionName, productName), on);\n },\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (divisionName) {\n return getDivision(divisionName);\n },\n getOffice: function (divisionName, cityName) {\n return getOffice(divisionName, cityName);\n },\n getWarehouse: function (divisionName, cityName) {\n return getWarehouse(divisionName, cityName);\n },\n getMaterial: function (divisionName, cityName, materialName) {\n return getMaterial(divisionName, cityName, materialName);\n },\n getProduct: function (divisionName, productName) {\n return getProduct(divisionName, productName);\n },\n getEmployee: function (divisionName, cityName, employeeName) {\n return getEmployee(divisionName, cityName, employeeName);\n }\n },\n // End Corporation API\n // Coding Contract API\n codingcontract: {\n attempt: function (answer, fn, ip = workerScript.serverIp, {\n returnReward\n } = {}) {\n updateDynamicRam(\"attempt\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", ip, fn); // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n\n if (Object(_utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__[/* is2DArray */ \"a\"])(answer)) {\n let answerComponents = [];\n\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", answer[i].toString(), \"]\"].join(\"\"));\n }\n\n answer = answerComponents.join(\",\");\n } else {\n answer = String(answer);\n }\n\n const serv = safeGetServer(ip, \"codingcontract.attempt\");\n\n if (contract.isSolution(answer)) {\n const reward = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainCodingContractReward(contract.reward, contract.getDifficulty());\n workerScript.log(\"attempt\", `Successfully completed Coding Contract '${fn}'. Reward: ${reward}`);\n serv.removeContract(fn);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. Contract is now self-destructing`);\n serv.removeContract(fn);\n } else {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. ${contract.getMaxNumTries() - contract.tries} attempts remaining.`);\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getContractType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", ip, fn);\n return contract.getType();\n },\n getData: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", ip, fn);\n const data = contract.getData();\n\n if (data.constructor === Array) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getDescription\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", ip, fn);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getNumTriesRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", ip, fn);\n return contract.getMaxNumTries() - contract.tries;\n }\n },\n // End coding contracts\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: function () {\n updateDynamicRam(\"getNumSleeves\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length;\n },\n setToShockRecovery: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToShockRecovery\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].shockRecovery(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToSynchronize: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToSynchronize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].synchronize(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToCommitCrime: function (sleeveNumber = 0, crimeName = \"\") {\n updateDynamicRam(\"setToCommitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].commitCrime(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], crimeName);\n },\n setToUniversityCourse: function (sleeveNumber = 0, universityName = \"\", className = \"\") {\n updateDynamicRam(\"setToUniversityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].takeUniversityCourse(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], universityName, className);\n },\n travel: function (sleeveNumber = 0, cityName = \"\") {\n updateDynamicRam(\"travel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].travel(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], cityName);\n },\n setToCompanyWork: function (sleeveNumber = 0, companyName = \"\") {\n updateDynamicRam(\"setToCompanyWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber); // Cannot work at the same company that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Company && other.currentTaskLocation === companyName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForCompany(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], companyName);\n },\n setToFactionWork: function (sleeveNumber = 0, factionName = \"\", workType = \"\") {\n updateDynamicRam(\"setToFactionWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber); // Cannot work at the same faction that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Faction && other.currentTaskLocation === factionName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForFaction(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], factionName, workType);\n },\n setToGymWorkout: function (sleeveNumber = 0, gymName = \"\", stat = \"\") {\n updateDynamicRam(\"setToGymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workoutAtGym(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], gymName, stat);\n },\n getSleeveStats: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking_skill: sl.hacking_skill,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma\n };\n },\n getTask: function (sleeveNumber = 0) {\n updateDynamicRam(\"getTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n task: _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"][sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__[/* FactionWorkType */ \"a\"][sl.factionWorkType]\n };\n },\n getInformation: function (sleeveNumber = 0) {\n updateDynamicRam(\"getInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: sl.max_hp,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n // There's no reason not to give that infomation here as well. Worst case scenario it isn't used.\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n companyRep: sl.company_rep_mult,\n crimeMoney: sl.crime_money_mult,\n crimeSuccess: sl.crime_success_mult,\n defense: sl.defense_mult,\n defenseExp: sl.defense_exp_mult,\n dexterity: sl.dexterity_mult,\n dexterityExp: sl.dexterity_exp_mult,\n factionRep: sl.faction_rep_mult,\n hacking: sl.hacking_mult,\n hackingExp: sl.hacking_exp_mult,\n strength: sl.strength_mult,\n strengthExp: sl.strength_exp_mult,\n workMoney: sl.work_money_mult\n },\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money\n },\n workRepGain: sl.getRepGain(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])\n };\n },\n getSleeveAugmentations: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n const augs = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations[i].name);\n }\n\n return augs;\n },\n getSleevePurchasableAugs: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleevePurchasableAugs\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n const purchasableAugs = Object(_PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__[/* findSleevePurchasableAugs */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const augs = [];\n\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.startingCost\n });\n }\n\n return augs;\n },\n purchaseSleeveAug: function (sleeveNumber = 0, augName = \"\") {\n updateDynamicRam(\"purchaseSleeveAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug) {\n throw makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].tryBuyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], aug);\n }\n },\n // End sleeve\n formulas: {\n basic: {\n calculateSkill: function (exp, mult = 1) {\n checkFormulasAccess(\"basic.calculateSkill\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateSkill */ \"b\"])(exp, mult);\n },\n calculateExp: function (skill, mult = 1) {\n checkFormulasAccess(\"basic.calculateExp\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateExp */ \"a\"])(skill, mult);\n },\n hackChance: function (server, player) {\n checkFormulasAccess(\"basic.hackChance\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, player);\n },\n hackExp: function (server, player) {\n checkFormulasAccess(\"basic.hackExp\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, player);\n },\n hackPercent: function (server, player) {\n checkFormulasAccess(\"basic.hackPercent\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n },\n growPercent: function (server, threads, player, cores = 1) {\n checkFormulasAccess(\"basic.growPercent\", 5);\n return Object(_Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__[/* calculateServerGrowth */ \"a\"])(server, threads, player, cores);\n },\n hackTime: function (server, player) {\n checkFormulasAccess(\"basic.hackTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, player);\n },\n growTime: function (server, player) {\n checkFormulasAccess(\"basic.growTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, player);\n },\n weakenTime: function (server, player) {\n checkFormulasAccess(\"basic.weakenTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, player);\n }\n },\n hacknetNodes: {\n moneyGainRate: function (level, ram, cores, mult = 1) {\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateMoneyGainRate */ \"c\"])(level, ram, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateLevelUpgradeCost */ \"b\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateCoreUpgradeCost */ \"a\"])(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (n, mult) {\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateNodeCost */ \"d\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetNodes.constants\", 5);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetNodeConstants */ \"a\"]);\n }\n },\n hacknetServers: {\n hashGainRate: function (level, ramUsed, maxRam, cores, mult = 1) {\n checkFormulasAccess(\"hacknetServers.hashGainRate\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateHashGainRate */ \"c\"])(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateLevelUpgradeCost */ \"d\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCoreUpgradeCost */ \"b\"])(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (startingCache, extraCache = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCacheUpgradeCost */ \"a\"])(startingCache, extraCache, costMult);\n },\n hashUpgradeCost: function (upgName, level) {\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\", 9);\n const upg = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgrade(upgName);\n\n if (!upg) {\n throw makeRuntimeErrorMsg(\"formulas.hacknetServers.calculateHashUpgradeCost\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return upg.getCost(level);\n },\n hacknetServerCost: function (n, mult) {\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateServerCost */ \"f\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetServers.constants\", 9);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"]);\n }\n }\n },\n // end formulas\n heart: {\n // Easter egg function\n break: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].karma;\n }\n },\n exploit: function () {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].UndocumentedFunctionCall);\n },\n bypass: function (doc) {\n // reset both fields first\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined; // set one to true and check that it affected the other.\n\n document.completely_unused_field = true;\n\n if (doc.completely_unused_field && workerScript.ramUsage === 1.6) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].Bypass);\n }\n\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined;\n },\n flags: function (data) {\n data = toNative(data); // We always want the help flag.\n\n const args = {};\n\n for (const d of data) {\n let t = String;\n\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n\n const ret = arg__WEBPACK_IMPORTED_MODULE_1__(args, {\n argv: workerScript.args\n });\n\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n\n return ret;\n }\n };\n\n function getFunctionNames(obj) {\n const functionNames = [];\n\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value == \"function\") {\n functionNames.push(key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value));\n }\n }\n\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(functions)].map(a => [a, true]));\n return functions;\n} // End NetscriptFunction()\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/NetscriptFunctions.js?");
|
||
|
||
/***/ }),
|
||
/* 394 */
|
||
/*!**************************!*\
|
||
!*** ./src/Gang/Gang.ts ***!
|
||
\**************************/
|
||
/*! exports provided: Gang */
|
||
/*! exports used: Gang */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/Constants */ 231);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _GangMember__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./GangMember */ 702);\n/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\n\n\n\n\n\n\n\n\n\n\nclass Gang {\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n this.isHackingGang = hacking;\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0; // When processing gains, this stores the number of cycles until some\n // limit is reached, and then calculates and applies the gains only at that limit\n\n this.storedCycles = 0; // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n\n this.storedTerritoryAndPowerCycles = 0;\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n this.notifyMemberDeath = true;\n }\n\n getPower() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power;\n }\n\n getTerritory() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].territory;\n }\n\n process(numCycles = 1, player) {\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_7__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n\n this.storedCycles += numCycles; // Only process if there are at least 2 seconds, and at most 5 seconds\n\n if (this.storedCycles < 2 * CyclesPerSecond) return;\n const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);\n\n try {\n this.processGains(cycles, player);\n this.processExperienceGains(cycles);\n this.processTerritoryAndPowerGains(cycles);\n this.storedCycles -= cycles;\n } catch (e) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player) {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n respectGains += this.members[i].calculateRespectGain(this);\n moneyGains += this.members[i].calculateMoneyGain(this);\n const wantedLevelGain = this.members[i].calculateWantedLevelGain(this);\n wantedLevelGains += wantedLevelGain;\n if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.\n }\n\n this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain; // Faction reputation gains is respect gain divided by some constant\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][this.facName];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"])) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\");\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n\n const favorMult = 1 + fac.favor / 100;\n fac.playerReputation += player.faction_rep_mult * gain * favorMult / _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].GangRespectToReputationRatio; // Keep track of respect gained per member\n\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\n }\n\n if (!(this.wanted === 1 && wantedLevelGains < 0)) {\n const oldWanted = this.wanted;\n let newWanted = oldWanted + wantedLevelGains * numCycles;\n newWanted = newWanted * (1 - justice * 0.001); // safeguard\n // Prevent overflow\n\n if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n\n player.gainMoney(moneyGains * numCycles);\n player.recordMoneySource(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1) {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate; // Process power first\n\n const gangName = this.facName;\n\n for (const name in _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"]) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"].hasOwnProperty(name)) {\n if (name == gangName) {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\n\n if (gainRoll < 0.5) {\n // Multiplicative gain (50% chance)\n // This is capped per cycle, to prevent it from getting out of control\n const multiplicativeGain = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power * 0.005;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const additiveGain = 0.75 * gainRoll * _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].territory;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += additiveGain;\n }\n }\n }\n } // Determine if territory should be processed\n\n\n if (this.territoryWarfareEngaged) {\n this.territoryClashChance = 1;\n } else if (this.territoryClashChance > 0) {\n // Engagement turned off, but still a positive clash chance. So there's\n // still a chance of clashing but it slowly goes down over time\n this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01);\n } // Then process territory\n\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.length; ++i) {\n const others = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.filter(e => {\n return e !== _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n });\n const other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__[/* getRandomInt */ \"a\"])(0, others.length - 1);\n const thisGang = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n const otherGang = others[other]; // If either of the gangs involved in this clash is the player, determine\n // whether to skip or process it using the clash chance\n\n if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power;\n const otherPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang, loseGang) {\n const powerBonus = Math.max(1, 1 + Math.log(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][winGang].power / _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].power) / Math.log(50));\n const gains = Math.min(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory += territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory -= territoryGain;\n\n if (thisGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n }\n } else {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory -= territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory += territoryGain;\n\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n }\n }\n }\n }\n\n processExperienceGains(numCycles = 1) {\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].gainExperience(numCycles);\n this.members[i].updateSkillLevels();\n }\n }\n\n clash(won = false) {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2; // If the clash was lost, the player loses a small percentage of power\n else _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power *= 1 / 1.008; // Deaths can only occur during X% of clashes\n\n if (Math.random() < 0.65) return;\n\n for (let i = this.members.length - 1; i >= 0; --i) {\n const member = this.members[i]; // Only members assigned to Territory Warfare can die\n\n if (member.task !== \"Territory Warfare\") continue; // Chance to die is decreased based on defense\n\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember() {\n if (this.members.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember() {\n // First N gang members are free (can be recruited at 0 respect)\n const numFreeMembers = 3;\n if (this.members.length < numFreeMembers) return 0;\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name) {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false; // Check for already-existing names\n\n const sameNames = this.members.filter(m => m.name === name);\n if (sameNames.length >= 1) return false;\n const member = new _GangMember__WEBPACK_IMPORTED_MODULE_10__[/* GangMember */ \"a\"](name);\n this.members.push(member);\n return true;\n } // Money and Respect gains multiplied by this number (< 1)\n\n\n getWantedPenalty() {\n return this.respect / (this.respect + this.wanted);\n } //Calculates power GAIN, which is added onto the Gang's existing power\n\n\n calculatePower() {\n let memberTotal = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\") continue;\n memberTotal += this.members[i].calculatePower();\n }\n\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member) {\n // Player loses a percentage of total respect, plus whatever respect that member has earned\n const totalRespect = this.respect;\n const lostRespect = 0.05 * totalRespect + member.earnedRespect;\n this.respect = Math.max(0, totalRespect - lostRespect);\n\n for (let i = 0; i < this.members.length; ++i) {\n if (member.name === this.members[i].name) {\n this.members.splice(i, 1);\n break;\n }\n } // Notify of death\n\n\n if (this.notifyMemberDeath) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member, workerScript) {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n\n if (workerScript) {\n workerScript.log(\"ascend\", `Ascended Gang member ${member.name}`);\n }\n\n return res;\n } catch (e) {\n if (workerScript == null) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n }\n\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n } // Cost of upgrade gets cheaper as gang increases in respect + power\n\n\n getDiscount() {\n const power = this.getPower();\n const respect = this.respect;\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount = Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n } // Returns only valid tasks for this gang. Excludes 'Unassigned'\n\n\n getAllTaskNames() {\n return Object.keys(_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"]).filter(taskName => {\n const task = _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"][taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false; // yes you need both checks\n\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg) {\n if (upg == null) {\n return Infinity;\n }\n\n return upg.cost / this.getDiscount();\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Gang\", this);\n }\n /**\n * Initiatizes a Gang object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Gang, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Gang = Gang;\n\n//# sourceURL=webpack:///./src/Gang/Gang.ts?");
|
||
|
||
/***/ }),
|
||
/* 395 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/StockMarket/PlayerInfluencing.ts ***!
|
||
\**********************************************/
|
||
/*! exports provided: forecastForecastChangeFromHack, forecastForecastChangeFromCompanyWork, influenceStockThroughServerHack, influenceStockThroughServerGrow, influenceStockThroughCompanyWork */
|
||
/*! exports used: influenceStockThroughCompanyWork, influenceStockThroughServerGrow, influenceStockThroughServerHack */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export forecastForecastChangeFromHack */\n/* unused harmony export forecastForecastChangeFromCompanyWork */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return influenceStockThroughServerHack; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return influenceStockThroughServerGrow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return influenceStockThroughCompanyWork; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _StockMarket__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockMarket */ 74);\n/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\n\n\n// Change in second-order forecast due to hacks/grows\nconst forecastForecastChangeFromHack = 0.1; // Change in second-order forecast due to company work\n\nconst forecastForecastChangeFromCompanyWork = 0.001;\n/**\n * Potentially decreases a stock's second-order forecast when its corresponding\n * server is hacked. The chance of the hack decreasing the stock's second-order\n * forecast is dependent on what percentage of the server's money is hacked\n * @param {Server} server - Server being hack()ed\n * @param {number} moneyHacked - Amount of money stolen from the server\n */\n\nfunction influenceStockThroughServerHack(server, moneyHacked) {\n const orgName = server.organizationName;\n let stock = null;\n\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][orgName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\n}\n/**\n * Potentially increases a stock's second-order forecast when its corresponding\n * server is grown (grow()). The chance of the grow() to increase the stock's\n * second-order forecast is dependent on how much money is added to the server\n * @param {Server} server - Server being grow()n\n * @param {number} moneyHacked - Amount of money added to the server\n */\n\nfunction influenceStockThroughServerGrow(server, moneyGrown) {\n const orgName = server.organizationName;\n let stock = null;\n\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][orgName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\n}\n/**\n * Potentially increases a stock's second-order forecast when the player works for\n * its corresponding company.\n * @param {Company} company - Company being worked for\n * @param {number} performanceMult - Effectiveness of player's work. Affects influence\n * @param {number} cyclesOfWork - # game cycles of work being processed\n */\n\nfunction influenceStockThroughCompanyWork(company, performanceMult, cyclesOfWork) {\n const compName = company.name;\n let stock = null;\n\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][compName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n if (Math.random() < 0.002 * cyclesOfWork) {\n const change = forecastForecastChangeFromCompanyWork * performanceMult;\n stock.changeForecastForecast(stock.otlkMagForecast + change);\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/PlayerInfluencing.ts?");
|
||
|
||
/***/ }),
|
||
/* 396 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Company/GetJobRequirementText.ts ***!
|
||
\**********************************************/
|
||
/*! exports provided: getJobRequirementText */
|
||
/*! exports used: getJobRequirementText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getJobRequirementText; });\n/**\n * Returns a string with the given CompanyPosition's stat requirements\n */\nfunction getJobRequirementText(company, pos, tooltiptext = false) {\n let reqText = \"\";\n const offset = company.jobStatReqOffset;\n const reqHacking = pos.requiredHacking > 0 ? pos.requiredHacking + offset : 0;\n const reqStrength = pos.requiredStrength > 0 ? pos.requiredStrength + offset : 0;\n const reqDefense = pos.requiredDefense > 0 ? pos.requiredDefense + offset : 0;\n const reqDexterity = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqAgility = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqCharisma = pos.requiredCharisma > 0 ? pos.requiredCharisma + offset : 0;\n const reqRep = pos.requiredReputation;\n\n if (tooltiptext) {\n reqText = \"Requires:<br>\";\n reqText += reqHacking.toString() + \" hacking<br>\";\n reqText += reqStrength.toString() + \" strength<br>\";\n reqText += reqDefense.toString() + \" defense<br>\";\n reqText += reqDexterity.toString() + \" dexterity<br>\";\n reqText += reqAgility.toString() + \" agility<br>\";\n reqText += reqCharisma.toString() + \" charisma<br>\";\n reqText += reqRep.toString() + \" reputation\";\n } else {\n reqText = \"(Requires \";\n\n if (reqHacking > 0) {\n reqText += reqHacking + \" hacking, \";\n }\n\n if (reqStrength > 0) {\n reqText += reqStrength + \" strength, \";\n }\n\n if (reqDefense > 0) {\n reqText += reqDefense + \" defense, \";\n }\n\n if (reqDexterity > 0) {\n reqText += reqDexterity + \" dexterity, \";\n }\n\n if (reqAgility > 0) {\n reqText += reqAgility + \" agility, \";\n }\n\n if (reqCharisma > 0) {\n reqText += reqCharisma + \" charisma, \";\n }\n\n if (reqRep > 1) {\n reqText += reqRep + \" reputation, \";\n }\n\n reqText = reqText.substring(0, reqText.length - 2);\n reqText += \")\";\n }\n\n return reqText;\n}\n\n//# sourceURL=webpack:///./src/Company/GetJobRequirementText.ts?");
|
||
|
||
/***/ }),
|
||
/* 397 */,
|
||
/* 398 */,
|
||
/* 399 */,
|
||
/* 400 */,
|
||
/* 401 */,
|
||
/* 402 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/ui/React/ReputationRate.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: ReputationRate */
|
||
/*! exports used: ReputationRate */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ReputationRate; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n\n\nfunction ReputationRate(reputation) {\n return Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_1__[/* Reputation */ \"a\"])(`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatReputation(reputation)} / sec`);\n}\n\n//# sourceURL=webpack:///./src/ui/React/ReputationRate.tsx?");
|
||
|
||
/***/ }),
|
||
/* 403 */,
|
||
/* 404 */
|
||
/*!****************************************!*\
|
||
!*** ./src/ui/React/CinematicText.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: CinematicText */
|
||
/*! exports used: CinematicText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CinematicLine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CinematicLine */ 1055);\n\n\nfunction CinematicText(props) {\n const [i, setI] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newI = i + 1;\n setI(newI);\n\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, props.lines.slice(0, i).map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n key: i\n }, line)), props.lines.length > i && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CinematicLine__WEBPACK_IMPORTED_MODULE_1__[/* CinematicLine */ \"a\"], {\n key: i,\n text: props.lines[i],\n onDone: advance\n }), !props.auto && props.onDone && done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: props.onDone\n }, \"Continue ...\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicText.tsx?");
|
||
|
||
/***/ }),
|
||
/* 405 */
|
||
/*!****************************************!*\
|
||
!*** ./utils/helpers/getRandomByte.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: getRandomByte */
|
||
/*! exports used: getRandomByte */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getRandomByte; });\n/* harmony import */ var _getRandomInt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getRandomInt */ 18);\n\n/**\n * Gets a random value in the range of a byte (0 - 255), or up to the maximum.\n * @param max The maximum value (up to 255).\n */\n\nfunction getRandomByte(max) {\n // Technically 2^8 is 256, but the values are 0-255, not 1-256.\n const byteMaximum = 255;\n const upper = Math.max(Math.min(max, byteMaximum), 0);\n return Object(_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(0, upper);\n}\n\n//# sourceURL=webpack:///./utils/helpers/getRandomByte.ts?");
|
||
|
||
/***/ }),
|
||
/* 406 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Locations/createCityMap.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: createCityMap */
|
||
/*! exports used: createCityMap */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createCityMap; });\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Cities */ 105);\n/**\n * Utility function that creates a \"city map\", which is an object where\n * each city is a key (property).\n *\n * This map uses the official name of the city, NOT its key in the 'Cities' object\n */\n\nfunction createCityMap(initValue) {\n const map = {};\n const cities = Object.keys(_Cities__WEBPACK_IMPORTED_MODULE_0__[/* Cities */ \"a\"]);\n\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n return map;\n}\n\n//# sourceURL=webpack:///./src/Locations/createCityMap.ts?");
|
||
|
||
/***/ }),
|
||
/* 407 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Hacking/netscriptCanHack.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: netscriptCanHack, netscriptCanGrow, netscriptCanWeaken */
|
||
/*! exports used: netscriptCanGrow, netscriptCanHack, netscriptCanWeaken */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return netscriptCanHack; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return netscriptCanGrow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return netscriptCanWeaken; });\n/**\n * Functions used to determine whether the target can be hacked (or grown/weakened).\n * Meant to be used for Netscript implementation\n *\n * The returned status object's message should be used for logging in Netscript\n */\nfunction baseCheck(server, fnName) {\n const hostname = server.hostname;\n\n if (!(\"requiredHackingSkill\" in server)) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because it is a Hacknet Node`\n };\n }\n\n if (server.hasAdminRights === false) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because you do not have root access`\n };\n }\n\n return {\n res: true\n };\n}\n\nfunction netscriptCanHack(server, p) {\n const initialCheck = baseCheck(server, \"hack\");\n\n if (!initialCheck.res) {\n return initialCheck;\n }\n\n const s = server;\n\n if (s.requiredHackingSkill > p.hacking_skill) {\n return {\n res: false,\n msg: `Cannot hack ${server.hostname} server because your hacking skill is not high enough`\n };\n }\n\n return {\n res: true\n };\n}\nfunction netscriptCanGrow(server) {\n return baseCheck(server, \"grow\");\n}\nfunction netscriptCanWeaken(server) {\n return baseCheck(server, \"weaken\");\n}\n\n//# sourceURL=webpack:///./src/Hacking/netscriptCanHack.ts?");
|
||
|
||
/***/ }),
|
||
/* 408 */,
|
||
/* 409 */,
|
||
/* 410 */,
|
||
/* 411 */,
|
||
/* 412 */,
|
||
/* 413 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Casino/CardDeck/Hand.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Hand */
|
||
/*! exports used: Hand */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Hand; });\n/**\n * Represents a Hand of cards.\n *\n * This class is IMMUTABLE\n */\nclass Hand {\n constructor(cards) {\n this.cards = cards;\n }\n\n addCards(...cards) {\n return new Hand([...this.cards, ...cards]);\n }\n\n removeByIndex(i) {\n if (i >= this.cards.length) {\n throw new Error(`Tried to remove invalid card from Hand by index: ${i}`);\n }\n\n return new Hand([...this.cards.slice().splice(i, 1)]);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Hand.ts?");
|
||
|
||
/***/ }),
|
||
/* 414 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTickerTxButton.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: StockTickerTxButton */
|
||
/*! exports used: StockTickerTxButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerTxButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * React Component for a button that initiates a transaction on the Stock Market UI\n * (Buy, Sell, Buy Max, etc.)\n */\n\nfunction StockTickerTxButton(props) {\n let className = \"stock-market-input std-button\";\n const hasTooltip = props.tooltip != null;\n\n if (hasTooltip) {\n className += \" tooltip\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: props.onClick\n }, props.text, props.tooltip != null && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerTxButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 415 */
|
||
/*!************************************************!*\
|
||
!*** ./src/StockMarket/ui/PlaceOrderPopup.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: PlaceOrderPopup */
|
||
/*! exports used: PlaceOrderPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlaceOrderPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\nfunction PlaceOrderPopup(props) {\n const [price, setPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function onClick() {\n if (price === null) return;\n if (isNaN(price)) return;\n props.place(price);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setPrice(null);else setPrice(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.text), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n type: \"number\",\n onChange: onChange,\n placeholder: \"price\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: onClick\n }, props.placeText));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/PlaceOrderPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 416 */,
|
||
/* 417 */,
|
||
/* 418 */,
|
||
/* 419 */,
|
||
/* 420 */,
|
||
/* 421 */,
|
||
/* 422 */,
|
||
/* 423 */,
|
||
/* 424 */,
|
||
/* 425 */,
|
||
/* 426 */,
|
||
/* 427 */,
|
||
/* 428 */,
|
||
/* 429 */,
|
||
/* 430 */
|
||
/*!************************************!*\
|
||
!*** ./src/Faction/FactionInfo.ts ***!
|
||
\************************************/
|
||
/*! exports provided: FactionInfo, FactionInfos */
|
||
/*! exports used: FactionInfos */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export FactionInfo */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionInfos; });\n/**\n * Contains the \"information\" property for all the Factions, which is just a description of each faction\n */\nclass FactionInfo {\n /**\n * The multiplier to apply to augmentation base purchase price.\n */\n\n /**\n * The multiplier to apply to augmentation reputation base requirement.\n */\n\n /**\n * The names of all other factions considered to be enemies to this faction.\n */\n\n /**\n * The descriptive text to show on the faction's page.\n */\n\n /**\n * A flag indicating if the faction supports field work to earn reputation.\n */\n\n /**\n * A flag indicating if the faction supports hacking missions to earn reputation.\n */\n\n /**\n * A flag indicating if the faction supports hacking work to earn reputation.\n */\n\n /**\n * A flag indicating if the faction supports security work to earn reputation.\n */\n constructor(infoText, enemies, offerHackingMission, offerHackingWork, offerFieldWork, offerSecurityWork) {\n this.infoText = infoText;\n this.enemies = enemies;\n this.offerHackingMission = offerHackingMission;\n this.offerHackingWork = offerHackingWork;\n this.offerFieldWork = offerFieldWork;\n this.offerSecurityWork = offerSecurityWork; // These are always all 1 for now.\n\n this.augmentationPriceMult = 1;\n this.augmentationRepRequirementMult = 1;\n }\n\n offersWork() {\n return this.offerFieldWork || this.offerHackingMission || this.offerHackingWork || this.offerSecurityWork;\n }\n\n}\n/**\n * A map of all factions and associated info to them.\n */\n// tslint:disable-next-line:variable-name\n\nconst FactionInfos = {\n // Endgame\n Illuminati: new FactionInfo(\"Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. \" + \"And from this chaos, we are the invisible hand that guides them to order. \", [], true, true, true, false),\n Daedalus: new FactionInfo(\"Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.\", [], true, true, true, false),\n \"The Covenant\": new FactionInfo(\"Surrender yourself. Give up your empty individuality to become part of something great, something eternal. \" + \"Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.<br>\" + \"<br>\" + \"Only then can you discover immortality.\", [], true, true, true, false),\n // Megacorporations, each forms its own faction\n ECorp: new FactionInfo(\"ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide \" + \"range of Internet-related software and commercial hardware, ECorp makes the world's information \" + \"universally accessible.\", [], true, true, true, true),\n MegaCorp: new FactionInfo(\"MegaCorp does what no other dares to do. We imagine. We create. We invent. We create what others have \" + \"never even dreamed of. Our work fills the world's needs for food, water, power, and transporation on an \" + \"unprecendented scale, in ways that no other company can.<br>\" + \"<br>\" + \"In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.\", [], true, true, true, true),\n \"Bachman & Associates\": new FactionInfo(\"Where Law and Business meet - thats where we are.<br>\" + \"<br>\" + \"Legal Insight - Business Instinct - Innovative Experience.\", [], true, true, true, true),\n \"Blade Industries\": new FactionInfo(\"Augmentation is Salvation.\", [], true, true, true, true),\n NWO: new FactionInfo(\"Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to \" + \"be given purpose and direction in life. That is why they created God. And that is why they created \" + \"civilization - not because of willingness, but because of a need to be incorporated into higher orders of \" + \"structure and meaning.\", [], true, true, true, true),\n \"Clarke Incorporated\": new FactionInfo(\"The Power of the Genome - Unlocked.\", [], true, true, true, true),\n \"OmniTek Incorporated\": new FactionInfo(\"Simply put, our mission is to design and build robots that make a difference.\", [], true, true, true, true),\n \"Four Sigma\": new FactionInfo(\"The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven \" + \"by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.\", [], true, true, true, true),\n \"KuaiGong International\": new FactionInfo(\"Dream big. Work hard. Make history.\", [], true, true, true, true),\n // Other Corporations\n \"Fulcrum Secret Technologies\": new FactionInfo(\"The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it \" + \"would be necessary to create them. And now we can.\", [], true, true, false, true),\n // Hacker groups\n BitRunners: new FactionInfo(\"Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's \" + \"all transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, \" + \"to live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they \" + \"leave behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be \" + \"reconstructed. Transformed. Used.<br>\" + \"<br>\" + \"Those who run the bits, run the world.\", [], true, true, false, false),\n \"The Black Hand\": new FactionInfo(\"The world, so afraid of strong government, now has no government. Only power - Digital power. Financial \" + \"power. Technological power. And those at the top rule with an invisible hand. They built a society where the \" + \"rich get richer, and everyone else suffers.<br>\" + \"<br>\" + \"So much pain. So many lives. Their darkness must end.\", [], true, true, true, false),\n NiteSec: new FactionInfo(\" __..__ <br>\" + \" _.nITESECNIt. <br>\" + \" .-'NITESECNITESEc. <br>\" + \" .' NITESECNITESECn <br>\" + \" / NITESECNITESEC; <br>\" + \" : :NITESECNITESEC; <br>\" + \" ; $ NITESECNITESECN <br>\" + \" : _, ,N'ITESECNITESEC <br>\" + \" : .+^^`, : `NITESECNIT <br>\" + \" ) /), `-,-=,NITESECNI <br>\" + \" / ^ ,-;|NITESECN; <br>\" + \" / _.' '-';NITESECN <br>\" + \" ( , ,-''`^NITE' <br>\" + \" )` :`. .' <br>\" + \" )-- ; `- / <br>\" + \" ' _.-' : <br>\" + \" ( _.-' . <br>\" + \" ------. <br>\" + \" . <br>\" + \" _.nIt <br>\" + \" _.nITESECNi <br>\" + \" nITESECNIT^' <br>\" + \" NITE^' ___ <br>\" + \" / .gP''''Tp. <br>\" + \" : d' . `b <br>\" + \" ; d' o `b ; <br>\" + \" / d; `b| <br>\" + \" /, $; @ `: <br>\" + \" /' $$ ; <br>\" + \" .' $$b o | <br>\" + \" .' d$$$; : <br>\" + \" / .d$$$$; , ; <br>\" + \" d .dNITESEC $ | <br>\" + \" :bp.__.gNITESEC$$ :$ ; <br>\" + \" NITESECNITESECNIT $$b : <br>\", [], true, true, false, false),\n // City factions, essentially governments\n Aevum: new FactionInfo(\"The Silicon City.\", [\"Chongqing\", \"New Tokyo\", \"Ishima\", \"Volhaven\"], true, true, true, true),\n Chongqing: new FactionInfo(\"Serve the People.\", [\"Sector-12\", \"Aevum\", \"Volhaven\"], true, true, true, true),\n Ishima: new FactionInfo(\"The East Asian Order of the Future.\", [\"Sector-12\", \"Aevum\", \"Volhaven\"], true, true, true, true),\n \"New Tokyo\": new FactionInfo(\"Asia's World City.\", [\"Sector-12\", \"Aevum\", \"Volhaven\"], true, true, true, true),\n \"Sector-12\": new FactionInfo(\"The City of the Future.\", [\"Chongqing\", \"New Tokyo\", \"Ishima\", \"Volhaven\"], true, true, true, true),\n Volhaven: new FactionInfo(\"Benefit, Honor, and Glory.\", [\"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\"], true, true, true, true),\n // Criminal Organizations/Gangs\n \"Speakers for the Dead\": new FactionInfo(\"It is better to reign in Hell than to serve in Heaven.\", [], true, true, true, true),\n \"The Dark Army\": new FactionInfo(\"The World doesn't care about right or wrong. It only cares about power.\", [], true, true, true, false),\n \"The Syndicate\": new FactionInfo(\"Honor holds you back.\", [], true, true, true, true),\n Silhouette: new FactionInfo(\"Corporations have filled the void of power left behind by the collapse of Western government. The issue is \" + \"they've become so big that you don't know who they're working for. And if you're employed at one of these \" + \"corporations, you don't even know who you're working for.<br>\" + \"<br>\" + \"That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.\", [], true, true, true, false),\n Tetrads: new FactionInfo(\"Following the mandate of Heaven and carrying out the way.\", [], false, false, true, true),\n \"Slum Snakes\": new FactionInfo(\"Slum Snakes rule!\", [], false, false, true, true),\n // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.\n Netburners: new FactionInfo(\"~~//*>H4CK||3T 8URN3R5**>?>\\\\~~\", [], true, true, false, false),\n \"Tian Di Hui\": new FactionInfo(\"Obey Heaven and work righteously.\", [], true, true, false, true),\n CyberSec: new FactionInfo(\"The Internet is the first thing that was built that we don't fully understand, the largest \" + \"experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by it, \" + \"society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to \" + \"protect the world from imminent collapse.\", [], true, true, false, false),\n // Special Factions\n Bladeburners: new FactionInfo(\"It's too bad they won't live. But then again, who does?<br><br>Note that for this faction, reputation can \" + \"only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your \" + \"reputation.\", [], false, false, false, false)\n};\n\n//# sourceURL=webpack:///./src/Faction/FactionInfo.ts?");
|
||
|
||
/***/ }),
|
||
/* 431 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Literature/LiteratureHelpers.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: showLiterature */
|
||
/*! exports used: showLiterature */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return showLiterature; });\n/* harmony import */ var _Literatures__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Literatures */ 643);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\nfunction showLiterature(fn) {\n const litObj = _Literatures__WEBPACK_IMPORTED_MODULE_0__[/* Literatures */ \"a\"][fn];\n\n if (litObj == null) {\n return;\n }\n\n const txt = `<i>${litObj.title}</i><br><br>${litObj.txt}`;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(txt);\n}\n\n//# sourceURL=webpack:///./src/Literature/LiteratureHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 432 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Server/BaseServer.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: BaseServer */
|
||
/*! exports used: BaseServer */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseServer; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Script/Script */ 286);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../TextFile */ 197);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Abstract Base Class for any Server object\n */\n\n\n\n\n\n\n\nclass BaseServer {\n // Coding Contract files on this server\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n // Flag indicating whether the FTP port is open\n // Flag indicating whether player has admin/root access to this server\n // Hostname. Must be unique\n // Flag indicating whether HTTP Port is open\n // IP Address. Must be unique\n // Flag indicating whether player is curently connected to this server\n // RAM (GB) available on this server\n // Message files AND Literature files on this Server\n // For Literature files, this array contains only the filename (string)\n // For Messages, it contains the actual Message object\n // TODO Separate literature files into its own property\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n // Programs on this servers. Contains only the names of the programs\n // RAM (GB) used. i.e. unavailable RAM\n // RunningScript files on this server\n // Script files on this Server\n // Contains the IP Addresses of all servers that are immediately\n // reachable from this one\n // Flag indicating whether SMTP Port is open\n // Flag indicating whether SQL Port is open\n // Flag indicating whether the SSH Port is open\n // Text files on this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])()\n }) {\n _defineProperty(this, \"contracts\", []);\n\n _defineProperty(this, \"cpuCores\", 1);\n\n _defineProperty(this, \"ftpPortOpen\", false);\n\n _defineProperty(this, \"hasAdminRights\", false);\n\n _defineProperty(this, \"hostname\", \"\");\n\n _defineProperty(this, \"httpPortOpen\", false);\n\n _defineProperty(this, \"ip\", \"\");\n\n _defineProperty(this, \"isConnectedTo\", false);\n\n _defineProperty(this, \"maxRam\", 0);\n\n _defineProperty(this, \"messages\", []);\n\n _defineProperty(this, \"organizationName\", \"\");\n\n _defineProperty(this, \"programs\", []);\n\n _defineProperty(this, \"ramUsed\", 0);\n\n _defineProperty(this, \"runningScripts\", []);\n\n _defineProperty(this, \"scripts\", []);\n\n _defineProperty(this, \"serversOnNetwork\", []);\n\n _defineProperty(this, \"smtpPortOpen\", false);\n\n _defineProperty(this, \"sqlPortOpen\", false);\n\n _defineProperty(this, \"sshPortOpen\", false);\n\n _defineProperty(this, \"textFiles\", []);\n\n this.ip = params.ip ? params.ip : Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])();\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false; //Access information\n\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract) {\n this.contracts.push(contract);\n }\n\n getContract(contractName) {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n\n return null;\n }\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n\n\n getRunningScript(scriptName, scriptArgs) {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__[/* compareArrays */ \"a\"])(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n\n\n getScript(scriptName) {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n\n\n isRunning(fn) {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract) {\n if (contract instanceof _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"]) {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract;\n });\n }\n }\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n\n\n removeFile(fn) {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\"\n };\n }\n\n this.scripts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n }\n\n return {\n res: false,\n msg: \"No such file exists\"\n };\n }\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n\n\n runScript(script) {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram) {\n this.maxRam = ram;\n }\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n\n\n writeToScriptFile(fn, code) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n return ret;\n } // Check if the script already exists, and overwrite it if it does\n\n\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n } // Otherwise, create a new script\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_1__[/* Script */ \"a\"](fn, code, this.ip, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n } // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n\n\n writeToTextFile(fn, txt) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n } // Check if the text file already exists, and overwrite if it does\n\n\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n } // Otherwise create a new text file\n\n\n const newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_3__[/* TextFile */ \"a\"](fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Server/BaseServer.ts?");
|
||
|
||
/***/ }),
|
||
/* 433 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Script/RamCalculations.js ***!
|
||
\***************************************/
|
||
/*! exports provided: calculateRamUsage */
|
||
/*! exports used: calculateRamUsage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateRamUsage; });\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! acorn-walk */ 319);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RamCalculationErrorCodes */ 230);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Netscript/RamCostGenerator */ 11);\n/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\n\n\n\n // These special strings are used to reference the presence of a given logical\n// construct within a user script.\n\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\"; // The global scope of a script is registered under this key during parsing.\n\nconst memCheckGlobalKey = \".__GLOBAL__\";\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\n\nasync function parseOnlyRamCalculate(otherScripts, code, workerScript) {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap = {}; // Scripts we've parsed.\n\n const completedParses = new Set(); // Scripts we've discovered that need to be parsed.\n\n const parseQueue = []; // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n\n function parseCode(code, moduleName) {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName); // Add any additional modules to the parse queue;\n\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n } // Splice all the references in\n\n\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n } // Parse the initial module, which is the \"main\" script that is being run\n\n\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule); // Process additional modules, which occurs if the \"main\" script has any imports\n\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift(); // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n\n let code;\n\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].URLImportError;\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError;\n }\n\n let script = null;\n let fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n\n for (const s of otherScripts) {\n if (s.filename === fn) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n } // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n\n\n let ram = _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptBaseRamCost;\n const unresolvedRefs = Object.keys(dependencyMap).filter(s => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift(); // Check if this is one of the special keys, and add the appropriate ram cost if so.\n\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptHacknetNodesRamCost;\n }\n\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n\n for (let ident of Object.keys(dependencyMap).filter(k => k.startsWith(prefix))) {\n for (let dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (let dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n } // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n\n\n try {\n function applyFuncRam(func) {\n if (typeof func === \"function\") {\n try {\n let res;\n\n if (func.constructor.name === \"AsyncFunction\") {\n res = 0; // Async functions will always be 0 RAM\n } else {\n res = func.apply(null, []);\n }\n\n if (typeof res === \"number\") {\n return res;\n }\n\n return 0;\n } catch (e) {\n console.error(`Error applying function: ${e}`);\n return 0;\n }\n } else {\n return 0;\n }\n } // Only count each function once\n\n\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n } // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n\n\n let func;\n\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n } else {\n func = workerScript.env.vars[ref];\n }\n\n ram += applyFuncRam(func);\n } catch (error) {\n continue;\n }\n }\n\n return ram;\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n}\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\n\n\nfunction parseOnlyCalculateDeps(code, currentModule) {\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_1__[/* parse */ \"b\"])(code, {\n sourceType: \"module\",\n ecmaVersion: \"latest\"\n }); // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap = {};\n dependencyMap[globalKey] = new Set(); // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n\n let internalToExternal = {};\n var additionalModules = []; // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n\n function addRef(key, name) {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n\n if (name in internalToExternal) {\n s.add(internalToExternal[name]);\n }\n\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n } //A list of identifiers that resolve to \"native Javascript code\"\n\n\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype); // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n\n function commonVisitors() {\n return {\n Identifier: (node, st) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n\n addRef(st.key, node.name);\n },\n WhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node, st, walkDeeper) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n }\n };\n }\n\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](ast, {\n key: globalKey\n }, Object.assign({\n ImportDeclaration: (node, st) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName); // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n\n dependencyMap[st.key].add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n dependencyMap[st.key].add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: node => {\n const key = currentModule + \".\" + node.id.name;\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](node, {\n key: key\n }, commonVisitors());\n }\n }, commonVisitors()));\n return {\n dependencyMap: dependencyMap,\n additionalModules: additionalModules\n };\n}\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\n\n\nasync function calculateRamUsage(codeCopy, otherScripts) {\n // We don't need a real WorkerScript for this. Just an object that keeps\n // track of whatever's needed for RAM calculations\n const workerScript = {\n loadedFns: {},\n env: {\n vars: _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCosts */ \"b\"]\n }\n };\n\n try {\n return await parseOnlyRamCalculate(otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n}\n\n//# sourceURL=webpack:///./src/Script/RamCalculations.js?");
|
||
|
||
/***/ }),
|
||
/* 434 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Server/formulas/grow.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: calculateServerGrowth */
|
||
/*! exports used: calculateServerGrowth */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateServerGrowth; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\nfunction calculateServerGrowth(server, threads, p, cores = 1) {\n const numServerGrowthCycles = Math.max(Math.floor(threads), 0); //Get adjusted growth rate, which accounts for server security\n\n const growthRate = _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerBaseGrowthRate;\n let adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;\n\n if (adjGrowthRate > _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate) {\n adjGrowthRate = _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate;\n } //Calculate adjusted server growth rate based on parameters\n\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n const numServerGrowthCyclesAdjusted = numServerGrowthCycles * serverGrowthPercentage * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate; //Apply serverGrowth for the calculated number of growth cycles\n\n const coreBonus = 1 + (cores - 1) / 16;\n return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.hacking_grow_mult * coreBonus);\n}\n\n//# sourceURL=webpack:///./src/Server/formulas/grow.ts?");
|
||
|
||
/***/ }),
|
||
/* 435 */
|
||
/*!*******************************************!*\
|
||
!*** ./utils/helpers/isValidIPAddress.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: isValidIPAddress */
|
||
/*! exports used: isValidIPAddress */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isValidIPAddress; });\n/**\n * Checks whether a IP Address string is valid.\n * @param ipaddress A string representing a potential IP Address\n */\nfunction isValidIPAddress(ipaddress) {\n const byteRange = \"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\";\n const regexStr = `^${byteRange}\\.${byteRange}\\.${byteRange}\\.${byteRange}$`;\n const ipAddressRegex = new RegExp(regexStr);\n return ipAddressRegex.test(ipaddress);\n}\n\n//# sourceURL=webpack:///./utils/helpers/isValidIPAddress.ts?");
|
||
|
||
/***/ }),
|
||
/* 436 */
|
||
/*!****************************************!*\
|
||
!*** ./utils/uiHelpers/createPopup.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: createPopup */
|
||
/*! exports used: createPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createPopup; });\n/* harmony import */ var _createElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createElement */ 113);\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getElementById */ 210);\n\n\n\n/**\n * Creates the necessary DOM elements to present an in-game popup to the player.\n * @param id The (hopefully) unique identifier for the popup container.\n * @param elems The collection of HTML Elements to show within the popup.\n */\nfunction createPopup(id, elems, options = {}) {\n const container = Object(_createElement__WEBPACK_IMPORTED_MODULE_0__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-container\",\n display: \"flex\",\n id: id\n });\n const content = Object(_createElement__WEBPACK_IMPORTED_MODULE_0__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-content\",\n id: `${id}-content`\n });\n\n for (const elem of elems) {\n content.appendChild(elem);\n } // Configurable Options\n\n\n if (options.backgroundColor) {\n content.style.backgroundColor = options.backgroundColor;\n }\n\n container.appendChild(content);\n Object(_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(\"entire-game-container\").appendChild(container);\n return container;\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/createPopup.ts?");
|
||
|
||
/***/ }),
|
||
/* 437 */,
|
||
/* 438 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Script/RunningScriptHelpers.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: getRamUsageFromRunningScript */
|
||
/*! exports used: getRamUsageFromRunningScript */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getRamUsageFromRunningScript; });\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n\nfunction getRamUsageFromRunningScript(script) {\n if (script.ramUsage != null && script.ramUsage > 0) {\n return script.ramUsage; // Use cached value\n }\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][script.server];\n\n if (server == null) {\n return 0;\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === script.filename) {\n // Cache the ram usage for the next call\n script.ramUsage = server.scripts[i].ramUsage;\n return script.ramUsage;\n }\n }\n\n return 0;\n}\n\n//# sourceURL=webpack:///./src/Script/RunningScriptHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 439 */
|
||
/*!***************************************!*\
|
||
!*** ./utils/helpers/getTimestamp.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: getTimestamp */
|
||
/*! exports used: getTimestamp */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getTimestamp; });\n/**\n * Returns a MM/DD HH:MM timestamp for the current time\n */\nfunction getTimestamp() {\n const d = new Date(); // A negative slice value takes from the end of the string rather than the beginning.\n\n const stringWidth = -2;\n const formattedHours = `0${d.getHours()}`.slice(stringWidth);\n const formattedMinutes = `0${d.getMinutes()}`.slice(stringWidth);\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/getTimestamp.ts?");
|
||
|
||
/***/ }),
|
||
/* 440 */
|
||
/*!******************************!*\
|
||
!*** ./src/JSInterpreter.js ***!
|
||
\******************************/
|
||
/*! exports provided: Interpreter */
|
||
/*! exports used: Interpreter */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Interpreter; });\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! acorn */ 176);\n\n/**\n * @license\n * JavaScript Interpreter\n *\n * Copyright 2013 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Interpreting JavaScript in JavaScript.\n * @author fraser@google.com (Neil Fraser)\n */\n\n\"use strict\";\n/**\n * Create a new interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n * @param {Function=} opt_initFunc Optional initialization function. Used to\n * define APIs. When called it is passed the interpreter object and the\n * global scope object.\n * @param {Number} Bitburner-specific number used for determining exception line numbers\n * @constructor\n */\n\n\nvar Interpreter = function (code, opt_initFunc, lineOffset = 0) {\n this.sourceCode = code;\n this.sourceCodeLineOffset = lineOffset;\n\n if (typeof code === \"string\") {\n code = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](code, Interpreter.PARSE_OPTIONS);\n }\n\n this.ast = code;\n this.initFunc_ = opt_initFunc;\n this.paused_ = false;\n this.polyfills_ = []; // Unique identifier for native functions. Used in serialization.\n\n this.functionCounter_ = 0; // Map node types to our step function names; a property lookup is faster\n // than string concatenation with \"step\" prefix.\n\n this.stepFunctions_ = Object.create(null);\n var stepMatch = /^step([A-Z]\\w*)$/;\n var m;\n\n for (var methodName in this) {\n if (typeof this[methodName] === \"function\" && (m = methodName.match(stepMatch))) {\n this.stepFunctions_[m[1]] = this[methodName].bind(this);\n }\n } // Create and initialize the global scope.\n\n\n this.global = this.createScope(this.ast, null); // Run the polyfills.\n\n this.ast = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](this.polyfills_.join(\"\\n\"), Interpreter.PARSE_OPTIONS);\n this.polyfills_ = undefined; // Allow polyfill strings to garbage collect.\n\n this.stripLocations_(this.ast, undefined, undefined);\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack = [state];\n this.run();\n this.value = undefined; // Point at the main program.\n\n this.ast = code;\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack.length = 0;\n this.stateStack[0] = state; // Get a handle on Acorn's node_t object. It's tricky to access.\n\n this.nodeConstructor = state.node.constructor; // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n\n this[\"stateStack\"] = this.stateStack;\n};\n/**\n * @const {!Object} Configuration used for all Acorn parsing.\n */\n\n\nInterpreter.PARSE_OPTIONS = {\n ecmaVersion: 5,\n locations: true\n};\n/**\n * Property descriptor of readonly properties.\n */\n\nInterpreter.READONLY_DESCRIPTOR = {\n configurable: true,\n enumerable: true,\n writable: false\n};\n/**\n * Property descriptor of non-enumerable properties.\n */\n\nInterpreter.NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: true\n};\n/**\n * Property descriptor of readonly, non-enumerable properties.\n */\n\nInterpreter.READONLY_NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: false\n};\n/**\n * Property descriptor of variables.\n */\n\nInterpreter.VARIABLE_DESCRIPTOR = {\n configurable: false,\n enumerable: true,\n writable: true\n};\n/**\n * Unique symbol for indicating that a step has encountered an error, has\n * added it to the stack, and will be thrown within the user's program.\n * When STEP_ERROR is thrown in the JS-Interpreter, the error can be ignored.\n */\n\nInterpreter.STEP_ERROR = {};\n/**\n * Unique symbol for indicating that a reference is a variable on the scope,\n * not an object property.\n */\n\nInterpreter.SCOPE_REFERENCE = {};\n/**\n * Unique symbol for indicating, when used as the value of the value\n * parameter in calls to setProperty and friends, that the value\n * should be taken from the property descriptor instead.\n */\n\nInterpreter.VALUE_IN_DESCRIPTOR = {};\n/**\n * For cycle detection in array to string and error conversion;\n * see spec bug github.com/tc39/ecma262/issues/289\n * Since this is for atomic actions only, it can be a class property.\n */\n\nInterpreter.toStringCycles_ = [];\n/**\n * Determine error/exception line number in Bitburner source code\n * @param {Object} AST Node that causes Error/Exception\n */\n\nInterpreter.prototype.getErrorLineNumber = function (node) {\n var code = this.sourceCode;\n\n if (node == null || node.start == null) {\n return NaN;\n }\n\n try {\n code = code.substring(0, node.start);\n return (code.match(/\\n/g) || []).length + 1 - this.sourceCodeLineOffset;\n } catch (e) {\n return NaN;\n }\n};\n/**\n * Generate the appropriate line number error message for Bitburner\n * @param {Number} lineNumber\n */\n\n\nInterpreter.prototype.getErrorLineNumberMessage = function (lineNumber) {\n if (isNaN(lineNumber)) {\n return \" (Unknown line number)\";\n } else if (lineNumber <= 0) {\n return \" (Error occurred in an imported function)\";\n } else {\n return \" (Line Number \" + lineNumber + \". This line number is probably incorrect \" + \"if your script is importing any functions. This is being worked on)\";\n }\n};\n/**\n * Add more code to the interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n */\n\n\nInterpreter.prototype.appendCode = function (code) {\n var state = this.stateStack[0];\n\n if (!state || state.node[\"type\"] !== \"Program\") {\n throw Error(\"Expecting original AST to start with a Program node.\");\n }\n\n if (typeof code === \"string\") {\n code = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](code, Interpreter.PARSE_OPTIONS);\n }\n\n if (!code || code[\"type\"] !== \"Program\") {\n throw Error(\"Expecting new AST to start with a Program node.\");\n }\n\n this.populateScope_(code, state.scope); // Append the new program to the old one.\n\n for (var i = 0, node; node = code[\"body\"][i]; i++) {\n state.node[\"body\"].push(node);\n }\n\n state.done = false;\n};\n/**\n * Execute one step of the interpreter.\n * @return {boolean} True if a step was executed, false if no more instructions.\n */\n\n\nInterpreter.prototype.step = function () {\n var stack = this.stateStack;\n var state = stack[stack.length - 1];\n\n if (!state) {\n return false;\n }\n\n var node = state.node,\n type = node[\"type\"];\n\n if (type === \"Program\" && state.done) {\n return false;\n } else if (this.paused_) {\n return true;\n }\n\n try {\n var nextState = this.stepFunctions_[type](stack, state, node);\n } catch (e) {\n // Eat any step errors. They have been thrown on the stack.\n if (e !== Interpreter.STEP_ERROR) {\n // Uh oh. This is a real error in the JS-Interpreter. Rethrow.\n throw e;\n }\n }\n\n if (nextState) {\n stack.push(nextState);\n }\n\n if (!node[\"end\"]) {\n // This is polyfill code. Keep executing until we arrive at user code.\n return this.step();\n }\n\n return true;\n};\n/**\n * Execute the interpreter to program completion. Vulnerable to infinite loops.\n * @return {boolean} True if a execution is asynchronously blocked,\n * false if no more instructions.\n */\n\n\nInterpreter.prototype.run = function () {\n while (!this.paused_ && this.step()) {}\n\n return this.paused_;\n};\n/**\n * Initialize the global scope with buitin properties and functions.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initGlobalScope = function (scope) {\n // Initialize uneditable global properties.\n this.setProperty(scope, \"NaN\", NaN, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"Infinity\", Infinity, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"undefined\", undefined, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"window\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"this\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"self\", scope); // Editable.\n // Create the objects which will become Object.prototype and\n // Function.prototype, which are needed to bootstrap everything else.\n\n this.OBJECT_PROTO = new Interpreter.Object(null);\n this.FUNCTION_PROTO = new Interpreter.Object(this.OBJECT_PROTO); // Initialize global objects.\n\n this.initFunction(scope);\n this.initObject(scope); // Unable to set scope's parent prior (OBJECT did not exist).\n // Note that in a browser this would be 'Window', whereas in Node.js it would\n // be 'Object'. This interpreter is closer to Node in that it has no DOM.\n\n scope.proto = this.OBJECT_PROTO;\n this.setProperty(scope, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.initArray(scope);\n this.initString(scope);\n this.initBoolean(scope);\n this.initNumber(scope);\n this.initDate(scope);\n this.initRegExp(scope);\n this.initError(scope);\n this.initMath(scope);\n this.initJSON(scope); // Initialize global functions.\n\n var thisInterpreter = this;\n var func = this.createNativeFunction(function (x) {\n throw EvalError(\"Can't happen\");\n }, false);\n func.eval = true;\n this.setProperty(scope, \"eval\", func);\n this.setProperty(scope, \"parseInt\", this.createNativeFunction(parseInt, false));\n this.setProperty(scope, \"parseFloat\", this.createNativeFunction(parseFloat, false));\n this.setProperty(scope, \"isNaN\", this.createNativeFunction(isNaN, false));\n this.setProperty(scope, \"isFinite\", this.createNativeFunction(isFinite, false));\n var strFunctions = [[escape, \"escape\"], [unescape, \"unescape\"], [decodeURI, \"decodeURI\"], [decodeURIComponent, \"decodeURIComponent\"], [encodeURI, \"encodeURI\"], [encodeURIComponent, \"encodeURIComponent\"]];\n\n for (var i = 0; i < strFunctions.length; i++) {\n var wrapper = function (nativeFunc) {\n return function (str) {\n try {\n return nativeFunc(str);\n } catch (e) {\n // decodeURI('%xy') will throw an error. Catch and rethrow.\n thisInterpreter.throwException(thisInterpreter.URI_ERROR, e.message);\n }\n };\n }(strFunctions[i][0]);\n\n this.setProperty(scope, strFunctions[i][1], this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n } // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n\n\n this[\"OBJECT\"] = this.OBJECT;\n this[\"OBJECT_PROTO\"] = this.OBJECT_PROTO;\n this[\"FUNCTION\"] = this.FUNCTION;\n this[\"FUNCTION_PROTO\"] = this.FUNCTION_PROTO;\n this[\"ARRAY\"] = this.ARRAY;\n this[\"ARRAY_PROTO\"] = this.ARRAY_PROTO;\n this[\"REGEXP\"] = this.REGEXP;\n this[\"REGEXP_PROTO\"] = this.REGEXP_PROTO;\n this[\"DATE\"] = this.DATE;\n this[\"DATE_PROTO\"] = this.DATE_PROTO; // The following properties are obsolete. Do not use.\n\n this[\"UNDEFINED\"] = undefined;\n this[\"NULL\"] = null;\n this[\"NAN\"] = NaN;\n this[\"TRUE\"] = true;\n this[\"FALSE\"] = false;\n this[\"STRING_EMPTY\"] = \"\";\n this[\"NUMBER_ZERO\"] = 0;\n this[\"NUMBER_ONE\"] = 1; // Run any user-provided initialization.\n\n if (this.initFunc_) {\n this.initFunc_(this, scope);\n }\n};\n/**\n * Initialize the Function class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initFunction = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n var identifierRegexp = /^[A-Za-z_$][\\w$]*$/; // Function constructor.\n\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Function().\n var newFunc = this;\n } else {\n // Called as Function().\n var newFunc = thisInterpreter.createObjectProto(thisInterpreter.FUNCTION_PROTO);\n }\n\n if (arguments.length) {\n var code = String(arguments[arguments.length - 1]);\n } else {\n var code = \"\";\n }\n\n var argsStr = Array.prototype.slice.call(arguments, 0, -1).join(\",\").trim();\n\n if (argsStr) {\n var args = argsStr.split(/\\s*,\\s*/);\n\n for (var i = 0; i < args.length; i++) {\n var name = args[i];\n\n if (!identifierRegexp.test(name)) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid function argument: \" + name);\n }\n }\n\n argsStr = args.join(\", \");\n } // Interestingly, the scope for constructed functions is the global scope,\n // even if they were constructed in some other scope.\n\n\n newFunc.parentScope = thisInterpreter.global; // Acorn needs to parse code in the context of a function or else 'return'\n // statements will be syntax errors.\n\n try {\n var ast = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](\"(function(\" + argsStr + \") {\" + code + \"})\", Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code: \" + e.message);\n }\n\n if (ast[\"body\"].length !== 1) {\n // Function('a', 'return a + 6;}; {alert(1);');\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code in function body.\");\n }\n\n newFunc.node = ast[\"body\"][0][\"expression\"];\n thisInterpreter.setProperty(newFunc, \"length\", newFunc.node[\"length\"], Interpreter.READONLY_DESCRIPTOR);\n return newFunc;\n };\n\n wrapper.id = this.functionCounter_++;\n this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO);\n this.setProperty(scope, \"Function\", this.FUNCTION); // Manually setup type and prototype because createObj doesn't recognize\n // this object as a function (this.FUNCTION did not exist).\n\n this.setProperty(this.FUNCTION, \"prototype\", this.FUNCTION_PROTO);\n this.FUNCTION.nativeFunc = wrapper; // Configure Function.prototype.\n\n this.setProperty(this.FUNCTION_PROTO, \"constructor\", this.FUNCTION, Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n this.FUNCTION_PROTO.nativeFunc = function () {};\n\n this.FUNCTION_PROTO.nativeFunc.id = this.functionCounter_++;\n this.setProperty(this.FUNCTION_PROTO, \"length\", 0, Interpreter.READONLY_DESCRIPTOR);\n\n var boxThis = function (value) {\n // In non-strict mode 'this' must be an object.\n if ((!value || !value.isObject) && !thisInterpreter.getScope().strict) {\n if (value === undefined || value === null) {\n // 'Undefined' and 'null' are changed to global object.\n value = thisInterpreter.global;\n } else {\n // Primitives must be boxed in non-strict mode.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n value = box;\n }\n }\n\n return value;\n };\n\n wrapper = function (thisArg, args) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1]; // Rewrite the current 'CallExpression' to apply a different function.\n\n state.func_ = this; // Assign the 'this' object.\n\n state.funcThis_ = boxThis(thisArg); // Bind any provided arguments.\n\n state.arguments_ = [];\n\n if (args !== null && args !== undefined) {\n if (args.isObject) {\n state.arguments_ = thisInterpreter.arrayPseudoToNative(args);\n } else {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"CreateListFromArrayLike called on non-object\");\n }\n }\n\n state.doneExec_ = false;\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"apply\", wrapper);\n\n wrapper = function (thisArg\n /*, var_args */\n ) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1]; // Rewrite the current 'CallExpression' to call a different function.\n\n state.func_ = this; // Assign the 'this' object.\n\n state.funcThis_ = boxThis(thisArg); // Bind any provided arguments.\n\n state.arguments_ = [];\n\n for (var i = 1; i < arguments.length; i++) {\n state.arguments_.push(arguments[i]);\n }\n\n state.doneExec_ = false;\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"call\", wrapper);\n this.polyfills_.push( // Polyfill copied from:\n // developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\n \"Object.defineProperty(Function.prototype, 'bind',\", \"{configurable: true, writable: true, value:\", \"function(oThis) {\", \"if (typeof this !== 'function') {\", \"throw TypeError('What is trying to be bound is not callable');\", \"}\", \"var aArgs = Array.prototype.slice.call(arguments, 1),\", \"fToBind = this,\", \"fNOP = function() {},\", \"fBound = function() {\", \"return fToBind.apply(this instanceof fNOP\", \"? this\", \": oThis,\", \"aArgs.concat(Array.prototype.slice.call(arguments)));\", \"};\", \"if (this.prototype) {\", \"fNOP.prototype = this.prototype;\", \"}\", \"fBound.prototype = new fNOP();\", \"return fBound;\", \"}\", \"});\", \"\"); // Function has no parent to inherit from, so it needs its own mandatory\n // toString and valueOf functions.\n\n wrapper = function () {\n return this.toString();\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"toString\", wrapper);\n this.setProperty(this.FUNCTION, \"toString\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function () {\n return this.valueOf();\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"valueOf\", wrapper);\n this.setProperty(this.FUNCTION, \"valueOf\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n};\n/**\n * Initialize the Object class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initObject = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Object constructor.\n\n wrapper = function (value) {\n if (value === undefined || value === null) {\n // Create a new object.\n if (thisInterpreter.calledWithNew()) {\n // Called as new Object().\n return this;\n } else {\n // Called as Object().\n return thisInterpreter.createObjectProto(thisInterpreter.OBJECT_PROTO);\n }\n }\n\n if (!value.isObject) {\n // Wrap the value as an object.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n return box;\n } // Return the provided object.\n\n\n return value;\n };\n\n this.OBJECT = this.createNativeFunction(wrapper, true); // Throw away the created prototype and use the root prototype.\n\n this.setProperty(this.OBJECT, \"prototype\", this.OBJECT_PROTO);\n this.setProperty(this.OBJECT_PROTO, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(scope, \"Object\", this.OBJECT);\n /**\n * Checks if the provided value is null or undefined.\n * If so, then throw an error in the call stack.\n * @param {Interpreter.Value} value Value to check.\n */\n\n var throwIfNullUndefined = function (value) {\n if (value === undefined || value === null) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Cannot convert '\" + value + \"' to object\");\n }\n }; // Static methods on Object.\n\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n var props = obj.isObject ? obj.properties : obj;\n return thisInterpreter.arrayNativeToPseudo(Object.getOwnPropertyNames(props));\n };\n\n this.setProperty(this.OBJECT, \"getOwnPropertyNames\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n\n if (obj.isObject) {\n obj = obj.properties;\n }\n\n return thisInterpreter.arrayNativeToPseudo(Object.keys(obj));\n };\n\n this.setProperty(this.OBJECT, \"keys\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (proto) {\n // Support for the second argument is the responsibility of a polyfill.\n if (proto === null) {\n return thisInterpreter.createObjectProto(null);\n }\n\n if (proto === undefined || !proto.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object prototype may only be an Object or null\");\n }\n\n return thisInterpreter.createObjectProto(proto);\n };\n\n this.setProperty(this.OBJECT, \"create\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Add a polyfill to handle create's second argument.\n\n this.polyfills_.push(\"(function() {\", \"var create_ = Object.create;\", \"Object.create = function(proto, props) {\", \"var obj = create_(proto);\", \"props && Object.defineProperties(obj, props);\", \"return obj;\", \"};\", \"})();\", \"\");\n\n wrapper = function (obj, prop, descriptor) {\n prop = String(prop);\n\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.defineProperty called on non-object\");\n }\n\n if (!descriptor || !descriptor.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Property description must be an object\");\n }\n\n if (!obj.properties[prop] && obj.preventExtensions) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Can't define property '\" + prop + \"', object is not extensible\");\n } // The polyfill guarantees no inheritance and no getter functions.\n // Therefore the descriptor properties map is the native object needed.\n\n\n thisInterpreter.setProperty(obj, prop, Interpreter.VALUE_IN_DESCRIPTOR, descriptor.properties);\n return obj;\n };\n\n this.setProperty(this.OBJECT, \"defineProperty\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.polyfills_.push( // Flatten the descriptor to remove any inheritance or getter functions.\n \"(function() {\", \"var defineProperty_ = Object.defineProperty;\", \"Object.defineProperty = function(obj, prop, d1) {\", \"var d2 = {};\", \"if ('configurable' in d1) d2.configurable = d1.configurable;\", \"if ('enumerable' in d1) d2.enumerable = d1.enumerable;\", \"if ('writable' in d1) d2.writable = d1.writable;\", \"if ('value' in d1) d2.value = d1.value;\", \"if ('get' in d1) d2.get = d1.get;\", \"if ('set' in d1) d2.set = d1.set;\", \"return defineProperty_(obj, prop, d2);\", \"};\", \"})();\", \"Object.defineProperty(Object, 'defineProperties',\", \"{configurable: true, writable: true, value:\", \"function(obj, props) {\", \"var keys = Object.keys(props);\", \"for (var i = 0; i < keys.length; i++) {\", \"Object.defineProperty(obj, keys[i], props[keys[i]]);\", \"}\", \"return obj;\", \"}\", \"});\", \"\");\n\n wrapper = function (obj, prop) {\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.getOwnPropertyDescriptor called on non-object\");\n }\n\n prop = String(prop);\n\n if (!(prop in obj.properties)) {\n return undefined;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj.properties, prop);\n var getter = obj.getter[prop];\n var setter = obj.setter[prop];\n\n if (getter || setter) {\n descriptor.get = getter;\n descriptor.set = setter;\n delete descriptor.value;\n delete descriptor.writable;\n } // Preserve value, but remove it for the nativeToPseudo call.\n\n\n var value = descriptor.value;\n var hasValue = (\"value\" in descriptor);\n delete descriptor.value;\n var pseudoDescriptor = thisInterpreter.nativeToPseudo(descriptor);\n\n if (hasValue) {\n thisInterpreter.setProperty(pseudoDescriptor, \"value\", value);\n }\n\n return pseudoDescriptor;\n };\n\n this.setProperty(this.OBJECT, \"getOwnPropertyDescriptor\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n return thisInterpreter.getPrototype(obj);\n };\n\n this.setProperty(this.OBJECT, \"getPrototypeOf\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n return Boolean(obj) && !obj.preventExtensions;\n };\n\n this.setProperty(this.OBJECT, \"isExtensible\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n if (obj && obj.isObject) {\n obj.preventExtensions = true;\n }\n\n return obj;\n };\n\n this.setProperty(this.OBJECT, \"preventExtensions\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on Object.\n\n this.setNativeFunctionPrototype(this.OBJECT, \"toString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"toLocaleString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"valueOf\", Interpreter.Object.prototype.valueOf);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n\n if (!this.isObject) {\n return this.hasOwnProperty(prop);\n }\n\n return String(prop) in this.properties;\n };\n\n this.setNativeFunctionPrototype(this.OBJECT, \"hasOwnProperty\", wrapper);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n\n if (!this.isObject) {\n return this.propertyIsEnumerable(prop);\n }\n\n return Object.prototype.propertyIsEnumerable.call(this.properties, prop);\n };\n\n this.setNativeFunctionPrototype(this.OBJECT, \"propertyIsEnumerable\", wrapper);\n\n wrapper = function (obj) {\n while (true) {\n // Note, circular loops shouldn't be possible.\n obj = thisInterpreter.getPrototype(obj);\n\n if (!obj) {\n // No parent; reached the top.\n return false;\n }\n\n if (obj === this) {\n return true;\n }\n }\n };\n\n this.setNativeFunctionPrototype(this.OBJECT, \"isPrototypeOf\", wrapper);\n};\n/**\n * Initialize the Array class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initArray = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Array constructor.\n\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Array().\n var newArray = this;\n } else {\n // Called as Array().\n var newArray = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n }\n\n var first = arguments[0];\n\n if (arguments.length === 1 && typeof first === \"number\") {\n if (isNaN(Interpreter.legalArrayLength(first))) {\n thisInterpreter.throwException(thisInterpreter.RANGE_ERROR, \"Invalid array length\");\n }\n\n newArray.properties.length = first;\n } else {\n for (var i = 0; i < arguments.length; i++) {\n newArray.properties[i] = arguments[i];\n }\n\n newArray.properties.length = i;\n }\n\n return newArray;\n };\n\n this.ARRAY = this.createNativeFunction(wrapper, true);\n this.ARRAY_PROTO = this.ARRAY.properties[\"prototype\"];\n this.setProperty(scope, \"Array\", this.ARRAY); // Static methods on Array.\n\n wrapper = function (obj) {\n return obj && obj.class === \"Array\";\n };\n\n this.setProperty(this.ARRAY, \"isArray\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on Array.\n\n wrapper = function () {\n return Array.prototype.pop.call(this.properties);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"pop\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.push.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"push\", wrapper);\n\n wrapper = function () {\n return Array.prototype.shift.call(this.properties);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"shift\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.unshift.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"unshift\", wrapper);\n\n wrapper = function () {\n Array.prototype.reverse.call(this.properties);\n return this;\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"reverse\", wrapper);\n\n wrapper = function (index, howmany\n /*, var_args*/\n ) {\n var list = Array.prototype.splice.apply(this.properties, arguments);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"splice\", wrapper);\n\n wrapper = function (opt_begin, opt_end) {\n var list = Array.prototype.slice.call(this.properties, opt_begin, opt_end);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"slice\", wrapper);\n\n wrapper = function (opt_separator) {\n return Array.prototype.join.call(this.properties, opt_separator);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"join\", wrapper);\n\n wrapper = function (var_args) {\n var list = [];\n var length = 0; // Start by copying the current array.\n\n var iLength = thisInterpreter.getProperty(this, \"length\");\n\n for (var i = 0; i < iLength; i++) {\n if (thisInterpreter.hasProperty(this, i)) {\n var element = thisInterpreter.getProperty(this, i);\n list[length] = element;\n }\n\n length++;\n } // Loop through all arguments and copy them in.\n\n\n for (var i = 0; i < arguments.length; i++) {\n var value = arguments[i];\n\n if (thisInterpreter.isa(value, thisInterpreter.ARRAY)) {\n var jLength = thisInterpreter.getProperty(value, \"length\");\n\n for (var j = 0; j < jLength; j++) {\n if (thisInterpreter.hasProperty(value, j)) {\n list[length] = thisInterpreter.getProperty(value, j);\n }\n\n length++;\n }\n } else {\n list[length] = value;\n }\n }\n\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"concat\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.indexOf.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"indexOf\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.lastIndexOf.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"lastIndexOf\", wrapper);\n\n wrapper = function () {\n Array.prototype.sort.call(this.properties);\n return this;\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"sort\", wrapper);\n this.polyfills_.push( // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n \"Object.defineProperty(Array.prototype, 'every',\", \"{configurable: true, writable: true, value:\", \"function(callbackfn, thisArg) {\", \"if (!this || typeof callbackfn !== 'function') throw TypeError();\", \"var T, k;\", \"var O = Object(this);\", \"var len = O.length >>> 0;\", \"if (arguments.length > 1) T = thisArg;\", \"k = 0;\", \"while (k < len) {\", \"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;\", \"k++;\", \"}\", \"return true;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n \"Object.defineProperty(Array.prototype, 'filter',\", \"{configurable: true, writable: true, value:\", \"function(fun/*, thisArg*/) {\", \"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();\", \"var t = Object(this);\", \"var len = t.length >>> 0;\", \"var res = [];\", \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\", \"for (var i = 0; i < len; i++) {\", \"if (i in t) {\", \"var val = t[i];\", \"if (fun.call(thisArg, val, i, t)) res.push(val);\", \"}\", \"}\", \"return res;\", \"}\", \"});\", // Polyfill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n \"if (!Array.prototype.find) {\", \"Object.defineProperty(Array.prototype, 'find', {\", \"value: function(predicate) {\", \"if (this == null) {\", \"throw new TypeError('\\\"this\\\" is null or not defined');\", \"}\", \"var o = Object(this);\", \"var len = o.length >>> 0;\", \"if (typeof predicate !== 'function') {\", \"throw new TypeError('predicate must be a function');\", \"}\", \"var thisArg = arguments[1];\", \"var k = 0;\", \"while (k < len) {\", \"var kValue = o[k];\", \"if (predicate.call(thisArg, kValue, k, o)) {\", \"return kValue;\", \"}\", \"k++;\", \"}\", \"return undefined;\", \"},\", \"configurable: true,\", \"writable: true\", \"});\", \"}\", // Poly fill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\n \"if (!Array.prototype.findIndex) {\", \"Object.defineProperty(Array.prototype, 'findIndex', {\", \"value: function(predicate) {\", \"if (this == null) {\", \"throw new TypeError('\\\"this\\\" is null or not defined');\", \"}\", \"var o = Object(this);\", \"var len = o.length >>> 0;\", \"if (typeof predicate !== 'function') {\", \"throw new TypeError('predicate must be a function');\", \"}\", \"var thisArg = arguments[1];\", \"var k = 0;\", \"while (k < len) {\", \"var kValue = o[k];\", \"if (predicate.call(thisArg, kValue, k, o)) {\", \"return k;\", \"}\", \"k++;\", \"}\", \"return -1;\", \"},\", \"configurable: true,\", \"writable: true\", \"});\", \"}\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n \"Object.defineProperty(Array.prototype, 'forEach',\", \"{configurable: true, writable: true, value:\", \"function(callback, thisArg) {\", \"if (!this || typeof callback !== 'function') throw TypeError();\", \"var T, k;\", \"var O = Object(this);\", \"var len = O.length >>> 0;\", \"if (arguments.length > 1) T = thisArg;\", \"k = 0;\", \"while (k < len) {\", \"if (k in O) callback.call(T, O[k], k, O);\", \"k++;\", \"}\", \"}\", \"});\", // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Polyfill\n \"Object.defineProperty(Array.prototype, 'includes', {\", \"value: function(searchElement, fromIndex) {\", \"if (this == null) {\", \"throw new TypeError('\\\"this\\\" is null or not defined');\", \"}\", \"// 1. Let O be ? ToObject(this value).\", \"var o = Object(this);\", '// 2. Let len be ? ToLength(? Get(O, \"length\")).', \"var len = o.length >>> 0;\", \"// 3. If len is 0, return false.\", \"if (len === 0) {\", \"return false;\", \"}\", \"// 4. Let n be ? ToInteger(fromIndex).\", \"// (If fromIndex is undefined, this step produces the value 0.)\", \"var n = fromIndex | 0;\", \"// 5. If n ≥ 0, then\", \"// a. Let k be n.\", \"// 6. Else n < 0,\", \"// a. Let k be len + n.\", \"// b. If k < 0, let k be 0.\", \"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\", \"function sameValueZero(x, y) {\", \"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\", \"}\", \"// 7. Repeat, while k < len\", \"while (k < len) {\", \"// a. Let elementK be the result of ? Get(O, ! ToString(k)).\", \"// b. If SameValueZero(searchElement, elementK) is true, return true.\", \"if (sameValueZero(o[k], searchElement)) {\", \"return true;\", \"}\", \"// c. Increase k by 1. \", \"k++;\", \"}\", \"// 8. Return false\", \"return false;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map\n \"Object.defineProperty(Array.prototype, 'map',\", \"{configurable: true, writable: true, value:\", \"function(callback, thisArg) {\", \"if (!this || typeof callback !== 'function') new TypeError;\", \"var T, A, k;\", \"var O = Object(this);\", \"var len = O.length >>> 0;\", \"if (arguments.length > 1) T = thisArg;\", \"A = new Array(len);\", \"k = 0;\", \"while (k < len) {\", \"if (k in O) A[k] = callback.call(T, O[k], k, O);\", \"k++;\", \"}\", \"return A;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\n \"Object.defineProperty(Array.prototype, 'reduce',\", \"{configurable: true, writable: true, value:\", \"function(callback /*, initialValue*/) {\", \"if (!this || typeof callback !== 'function') throw TypeError();\", \"var t = Object(this), len = t.length >>> 0, k = 0, value;\", \"if (arguments.length === 2) {\", \"value = arguments[1];\", \"} else {\", \"while (k < len && !(k in t)) k++;\", \"if (k >= len) {\", \"throw TypeError('Reduce of empty array with no initial value');\", \"}\", \"value = t[k++];\", \"}\", \"for (; k < len; k++) {\", \"if (k in t) value = callback(value, t[k], k, t);\", \"}\", \"return value;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight\n \"Object.defineProperty(Array.prototype, 'reduceRight',\", \"{configurable: true, writable: true, value:\", \"function(callback /*, initialValue*/) {\", \"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();\", \"var t = Object(this), len = t.length >>> 0, k = len - 1, value;\", \"if (arguments.length >= 2) {\", \"value = arguments[1];\", \"} else {\", \"while (k >= 0 && !(k in t)) k--;\", \"if (k < 0) {\", \"throw TypeError('Reduce of empty array with no initial value');\", \"}\", \"value = t[k--];\", \"}\", \"for (; k >= 0; k--) {\", \"if (k in t) value = callback(value, t[k], k, t);\", \"}\", \"return value;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n \"Object.defineProperty(Array.prototype, 'some',\", \"{configurable: true, writable: true, value:\", \"function(fun/*, thisArg*/) {\", \"if (!this || typeof fun !== 'function') throw TypeError();\", \"var t = Object(this);\", \"var len = t.length >>> 0;\", \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\", \"for (var i = 0; i < len; i++) {\", \"if (i in t && fun.call(thisArg, t[i], i, t)) {\", \"return true;\", \"}\", \"}\", \"return false;\", \"}\", \"});\", \"(function() {\", \"var sort_ = Array.prototype.sort;\", \"Array.prototype.sort = function(opt_comp) {\", // Fast native sort.\n \"if (typeof opt_comp !== 'function') {\", \"return sort_.call(this);\", \"}\", // Slow bubble sort.\n \"for (var i = 0; i < this.length; i++) {\", \"var changes = 0;\", \"for (var j = 0; j < this.length - i - 1; j++) {\", \"if (opt_comp(this[j], this[j + 1]) > 0) {\", \"var swap = this[j];\", \"this[j] = this[j + 1];\", \"this[j + 1] = swap;\", \"changes++;\", \"}\", \"}\", \"if (!changes) break;\", \"}\", \"return this;\", \"};\", \"})();\", \"Object.defineProperty(Array.prototype, 'toLocaleString',\", \"{configurable: true, writable: true, value:\", \"function() {\", \"var out = [];\", \"for (var i = 0; i < this.length; i++) {\", \"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();\", \"}\", \"return out.join(',');\", \"}\", \"});\", \"\");\n};\n/**\n * Initialize the String class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initString = function (scope) {\n var thisInterpreter = this;\n var wrapper; // String constructor.\n\n wrapper = function (value) {\n value = String(value);\n\n if (thisInterpreter.calledWithNew()) {\n // Called as new String().\n this.data = value;\n return this;\n } else {\n // Called as String().\n return value;\n }\n };\n\n this.STRING = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"String\", this.STRING); // Static methods on String.\n\n this.setProperty(this.STRING, \"fromCharCode\", this.createNativeFunction(String.fromCharCode, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on String.\n // Methods with exclusively primitive arguments.\n\n var functions = [\"charAt\", \"charCodeAt\", \"concat\", \"indexOf\", \"lastIndexOf\", \"slice\", \"substr\", \"substring\", \"toLocaleLowerCase\", \"toLocaleUpperCase\", \"toLowerCase\", \"toUpperCase\", \"trim\"];\n\n for (var i = 0; i < functions.length; i++) {\n this.setNativeFunctionPrototype(this.STRING, functions[i], String.prototype[functions[i]]);\n }\n\n wrapper = function (compareString, locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return String(this).localeCompare(compareString, locales, options);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"localeCompare\", wrapper);\n\n wrapper = function (separator, limit) {\n if (thisInterpreter.isa(separator, thisInterpreter.REGEXP)) {\n separator = separator.data;\n }\n\n var jsList = String(this).split(separator, limit);\n return thisInterpreter.arrayNativeToPseudo(jsList);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"split\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n\n var m = String(this).match(regexp);\n return m && thisInterpreter.arrayNativeToPseudo(m);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"match\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n\n return String(this).search(regexp);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"search\", wrapper);\n\n wrapper = function (substr, newSubstr) {\n // Support for function replacements is the responsibility of a polyfill.\n if (thisInterpreter.isa(substr, thisInterpreter.REGEXP)) {\n substr = substr.data;\n }\n\n return String(this).replace(substr, newSubstr);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"replace\", wrapper); // Add a polyfill to handle replace's second argument being a function.\n\n this.polyfills_.push(\"(function() {\", \"var replace_ = String.prototype.replace;\", \"String.prototype.replace = function(substr, newSubstr) {\", \"if (typeof newSubstr !== 'function') {\", // string.replace(string|regexp, string)\n \"return replace_.call(this, substr, newSubstr);\", \"}\", \"var str = this;\", \"if (substr instanceof RegExp) {\", // string.replace(regexp, function)\n \"var subs = [];\", \"var m = substr.exec(str);\", \"while (m) {\", \"m.push(m.index, str);\", \"var inject = newSubstr.apply(null, m);\", \"subs.push([m.index, m[0].length, inject]);\", \"m = substr.global ? substr.exec(str) : null;\", \"}\", \"for (var i = subs.length - 1; i >= 0; i--) {\", \"str = str.substring(0, subs[i][0]) + subs[i][2] + \" + \"str.substring(subs[i][0] + subs[i][1]);\", \"}\", \"} else {\", // string.replace(string, function)\n \"var i = str.indexOf(substr);\", \"if (i !== -1) {\", \"var inject = newSubstr(str.substr(i, substr.length), i, str);\", \"str = str.substring(0, i) + inject + \" + \"str.substring(i + substr.length);\", \"}\", \"}\", \"return str;\", \"};\", \"})();\", // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n \"if (!String.prototype.endsWith) {\", \"String.prototype.endsWith = function(search, this_len) {\", \"if (this_len === undefined || this_len > this.length) {\", \"this_len = this.length;\", \"}\", \"return this.substring(this_len - search.length, this_len) === search;\", \"};\", \"}\", //Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n \"if (!String.prototype.includes) {\", \"String.prototype.includes = function(search, start) {\", \"'use strict';\", \"if (typeof start !== 'number') {\", \"start = 0;\", \"}\", \" \", \"if (start + search.length > this.length) {\", \"return false;\", \"} else {\", \"return this.indexOf(search, start) !== -1;\", \"}\", \"};\", \"}\", // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n \"if (!String.prototype.startsWith) {\", \"String.prototype.startsWith = function(search, pos) {\", \"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\", \"};\", \"}\", \"\");\n};\n/**\n * Initialize the Boolean class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initBoolean = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Boolean constructor.\n\n wrapper = function (value) {\n value = Boolean(value);\n\n if (thisInterpreter.calledWithNew()) {\n // Called as new Boolean().\n this.data = value;\n return this;\n } else {\n // Called as Boolean().\n return value;\n }\n };\n\n this.BOOLEAN = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Boolean\", this.BOOLEAN);\n};\n/**\n * Initialize the Number class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initNumber = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Number constructor.\n\n wrapper = function (value) {\n value = Number(value);\n\n if (thisInterpreter.calledWithNew()) {\n // Called as new Number().\n this.data = value;\n return this;\n } else {\n // Called as Number().\n return value;\n }\n };\n\n this.NUMBER = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Number\", this.NUMBER);\n var numConsts = [\"MAX_VALUE\", \"MIN_VALUE\", \"NaN\", \"NEGATIVE_INFINITY\", \"POSITIVE_INFINITY\"];\n\n for (var i = 0; i < numConsts.length; i++) {\n this.setProperty(this.NUMBER, numConsts[i], Number[numConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n } // Instance methods on Number.\n\n\n wrapper = function (fractionDigits) {\n try {\n return Number(this).toExponential(fractionDigits);\n } catch (e) {\n // Throws if fractionDigits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toExponential\", wrapper);\n\n wrapper = function (digits) {\n try {\n return Number(this).toFixed(digits);\n } catch (e) {\n // Throws if digits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toFixed\", wrapper);\n\n wrapper = function (precision) {\n try {\n return Number(this).toPrecision(precision);\n } catch (e) {\n // Throws if precision isn't within range (depends on implementation).\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toPrecision\", wrapper);\n\n wrapper = function (radix) {\n try {\n return Number(this).toString(radix);\n } catch (e) {\n // Throws if radix isn't within 2-36.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toString\", wrapper);\n\n wrapper = function (locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return Number(this).toLocaleString(locales, options);\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toLocaleString\", wrapper);\n};\n/**\n * Initialize the Date class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initDate = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Date constructor.\n\n wrapper = function (value, var_args) {\n if (!thisInterpreter.calledWithNew()) {\n // Called as Date().\n // Calling Date() as a function returns a string, no arguments are heeded.\n return Date();\n } // Called as new Date().\n\n\n var args = [null].concat(Array.from(arguments));\n this.data = new (Function.prototype.bind.apply(Date, args))();\n return this;\n };\n\n this.DATE = this.createNativeFunction(wrapper, true);\n this.DATE_PROTO = this.DATE.properties[\"prototype\"];\n this.setProperty(scope, \"Date\", this.DATE); // Static methods on Date.\n\n this.setProperty(this.DATE, \"now\", this.createNativeFunction(Date.now, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.DATE, \"parse\", this.createNativeFunction(Date.parse, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.DATE, \"UTC\", this.createNativeFunction(Date.UTC, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on Date.\n\n var functions = [\"getDate\", \"getDay\", \"getFullYear\", \"getHours\", \"getMilliseconds\", \"getMinutes\", \"getMonth\", \"getSeconds\", \"getTime\", \"getTimezoneOffset\", \"getUTCDate\", \"getUTCDay\", \"getUTCFullYear\", \"getUTCHours\", \"getUTCMilliseconds\", \"getUTCMinutes\", \"getUTCMonth\", \"getUTCSeconds\", \"getYear\", \"setDate\", \"setFullYear\", \"setHours\", \"setMilliseconds\", \"setMinutes\", \"setMonth\", \"setSeconds\", \"setTime\", \"setUTCDate\", \"setUTCFullYear\", \"setUTCHours\", \"setUTCMilliseconds\", \"setUTCMinutes\", \"setUTCMonth\", \"setUTCSeconds\", \"setYear\", \"toDateString\", \"toISOString\", \"toJSON\", \"toGMTString\", \"toLocaleDateString\", \"toLocaleString\", \"toLocaleTimeString\", \"toTimeString\", \"toUTCString\"];\n\n for (var i = 0; i < functions.length; i++) {\n wrapper = function (nativeFunc) {\n return function (var_args) {\n var args = [];\n\n for (var i = 0; i < arguments.length; i++) {\n args[i] = thisInterpreter.pseudoToNative(arguments[i]);\n }\n\n return this.data[nativeFunc].apply(this.data, args);\n };\n }(functions[i]);\n\n this.setNativeFunctionPrototype(this.DATE, functions[i], wrapper);\n }\n};\n/**\n * Initialize Regular Expression object.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initRegExp = function (scope) {\n var thisInterpreter = this;\n var wrapper; // RegExp constructor.\n\n wrapper = function (pattern, flags) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new RegExp().\n var rgx = this;\n } else {\n // Called as RegExp().\n var rgx = thisInterpreter.createObjectProto(thisInterpreter.REGEXP_PROTO);\n }\n\n pattern = pattern ? pattern.toString() : \"\";\n flags = flags ? flags.toString() : \"\";\n thisInterpreter.populateRegExp(rgx, new RegExp(pattern, flags));\n return rgx;\n };\n\n this.REGEXP = this.createNativeFunction(wrapper, true);\n this.REGEXP_PROTO = this.REGEXP.properties[\"prototype\"];\n this.setProperty(scope, \"RegExp\", this.REGEXP);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"global\", undefined, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"ignoreCase\", undefined, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"multiline\", undefined, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"source\", \"(?:)\", Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (str) {\n return this.data.test(str);\n };\n\n this.setNativeFunctionPrototype(this.REGEXP, \"test\", wrapper);\n\n wrapper = function (str) {\n str = str.toString(); // Get lastIndex from wrapped regex, since this is settable.\n\n this.data.lastIndex = Number(thisInterpreter.getProperty(this, \"lastIndex\"));\n var match = this.data.exec(str);\n thisInterpreter.setProperty(this, \"lastIndex\", this.data.lastIndex);\n\n if (match) {\n var result = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n\n for (var i = 0; i < match.length; i++) {\n thisInterpreter.setProperty(result, i, match[i]);\n } // match has additional properties.\n\n\n thisInterpreter.setProperty(result, \"index\", match.index);\n thisInterpreter.setProperty(result, \"input\", match.input);\n return result;\n }\n\n return null;\n };\n\n this.setNativeFunctionPrototype(this.REGEXP, \"exec\", wrapper);\n};\n/**\n * Initialize the Error class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initError = function (scope) {\n var thisInterpreter = this; // Error constructor.\n\n this.ERROR = this.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Error().\n var newError = this;\n } else {\n // Called as Error().\n var newError = thisInterpreter.createObject(thisInterpreter.ERROR);\n }\n\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n\n return newError;\n }, true);\n this.setProperty(scope, \"Error\", this.ERROR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"message\", \"\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"name\", \"Error\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n var createErrorSubclass = function (name) {\n var constructor = thisInterpreter.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new XyzError().\n var newError = this;\n } else {\n // Called as XyzError().\n var newError = thisInterpreter.createObject(constructor);\n }\n\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n\n return newError;\n }, true);\n thisInterpreter.setProperty(constructor, \"prototype\", thisInterpreter.createObject(thisInterpreter.ERROR));\n thisInterpreter.setProperty(constructor.properties[\"prototype\"], \"name\", name, Interpreter.NONENUMERABLE_DESCRIPTOR);\n thisInterpreter.setProperty(scope, name, constructor);\n return constructor;\n };\n\n this.EVAL_ERROR = createErrorSubclass(\"EvalError\");\n this.RANGE_ERROR = createErrorSubclass(\"RangeError\");\n this.REFERENCE_ERROR = createErrorSubclass(\"ReferenceError\");\n this.SYNTAX_ERROR = createErrorSubclass(\"SyntaxError\");\n this.TYPE_ERROR = createErrorSubclass(\"TypeError\");\n this.URI_ERROR = createErrorSubclass(\"URIError\");\n};\n/**\n * Initialize Math object.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initMath = function (scope) {\n var thisInterpreter = this;\n var myMath = this.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"Math\", myMath);\n var mathConsts = [\"E\", \"LN2\", \"LN10\", \"LOG2E\", \"LOG10E\", \"PI\", \"SQRT1_2\", \"SQRT2\"];\n\n for (var i = 0; i < mathConsts.length; i++) {\n this.setProperty(myMath, mathConsts[i], Math[mathConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n\n var numFunctions = [\"abs\", \"acos\", \"asin\", \"atan\", \"atan2\", \"ceil\", \"cos\", \"exp\", \"floor\", \"log\", \"max\", \"min\", \"pow\", \"random\", \"round\", \"sin\", \"sqrt\", \"tan\"];\n\n for (var i = 0; i < numFunctions.length; i++) {\n this.setProperty(myMath, numFunctions[i], this.createNativeFunction(Math[numFunctions[i]], false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n};\n/**\n * Initialize JSON object.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initJSON = function (scope) {\n var thisInterpreter = this;\n var myJSON = thisInterpreter.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"JSON\", myJSON);\n\n var wrapper = function (text) {\n try {\n var nativeObj = JSON.parse(text.toString());\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, e.message);\n }\n\n return thisInterpreter.nativeToPseudo(nativeObj);\n };\n\n this.setProperty(myJSON, \"parse\", this.createNativeFunction(wrapper, false));\n\n wrapper = function (value) {\n var nativeObj = thisInterpreter.pseudoToNative(value);\n\n try {\n var str = JSON.stringify(nativeObj);\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, e.message);\n }\n\n return str;\n };\n\n this.setProperty(myJSON, \"stringify\", this.createNativeFunction(wrapper, false));\n};\n/**\n * Is an object of a certain class?\n * @param {Interpreter.Value} child Object to check.\n * @param {Interpreter.Object} constructor Constructor of object.\n * @return {boolean} True if object is the class or inherits from it.\n * False otherwise.\n */\n\n\nInterpreter.prototype.isa = function (child, constructor) {\n if (child === null || child === undefined || !constructor) {\n return false;\n }\n\n var proto = constructor.properties[\"prototype\"];\n\n if (child === proto) {\n return true;\n } // The first step up the prototype chain is harder since the child might be\n // a primitive value. Subsequent steps can just follow the .proto property.\n\n\n child = this.getPrototype(child);\n\n while (child) {\n if (child === proto) {\n return true;\n }\n\n child = child.proto;\n }\n\n return false;\n};\n/**\n * Is a value a legal integer for an array length?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\n\n\nInterpreter.legalArrayLength = function (x) {\n var n = x >>> 0; // Array length must be between 0 and 2^32-1 (inclusive).\n\n return n === Number(x) ? n : NaN;\n};\n/**\n * Is a value a legal integer for an array index?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\n\n\nInterpreter.legalArrayIndex = function (x) {\n var n = x >>> 0; // Array index cannot be 2^32-1, otherwise length would be 2^32.\n // 0xffffffff is 2^32-1.\n\n return String(n) === String(x) && n !== 0xffffffff ? n : NaN;\n};\n/**\n * Typedef for JS values.\n * @typedef {!Interpreter.Object|boolean|number|string|undefined|null}\n */\n\n\nInterpreter.Value;\n/**\n * Class for an object.\n * @param {Interpreter.Object} proto Prototype object or null.\n * @constructor\n */\n\nInterpreter.Object = function (proto) {\n this.getter = Object.create(null);\n this.setter = Object.create(null);\n this.properties = Object.create(null);\n this.proto = proto;\n};\n/** @type {Interpreter.Object} */\n\n\nInterpreter.Object.prototype.proto = null;\n/** @type {boolean} */\n\nInterpreter.Object.prototype.isObject = true;\n/** @type {string} */\n\nInterpreter.Object.prototype.class = \"Object\";\n/** @type {Date|RegExp|boolean|number|string|undefined|null} */\n\nInterpreter.Object.prototype.data = null;\n/**\n * Convert this object into a string.\n * @return {string} String value.\n * @override\n */\n\nInterpreter.Object.prototype.toString = function () {\n if (this.class === \"Array\") {\n // Array\n var cycles = Interpreter.toStringCycles_;\n cycles.push(this);\n\n try {\n var strs = [];\n\n for (var i = 0; i < this.properties.length; i++) {\n var value = this.properties[i];\n strs[i] = value && value.isObject && cycles.indexOf(value) !== -1 ? \"...\" : value;\n }\n } finally {\n cycles.pop();\n }\n\n return strs.join(\",\");\n }\n\n if (this.class === \"Error\") {\n var cycles = Interpreter.toStringCycles_;\n\n if (cycles.indexOf(this) !== -1) {\n return \"[object Error]\";\n }\n\n var name, message; // Bug: Does not support getters and setters for name or message.\n\n var obj = this;\n\n do {\n if (\"name\" in obj.properties) {\n name = obj.properties[\"name\"];\n break;\n }\n } while (obj = obj.proto);\n\n var obj = this;\n\n do {\n if (\"message\" in obj.properties) {\n message = obj.properties[\"message\"];\n break;\n }\n } while (obj = obj.proto);\n\n cycles.push(this);\n\n try {\n name = name && name.toString();\n message = message && message.toString();\n } finally {\n cycles.pop();\n }\n\n return message ? name + \": \" + message : String(name);\n } // RegExp, Date, and boxed primitives.\n\n\n if (this.data !== null) {\n return String(this.data);\n }\n\n return \"[object \" + this.class + \"]\";\n};\n/**\n * Return the object's value.\n * @return {Interpreter.Value} Value.\n * @override\n */\n\n\nInterpreter.Object.prototype.valueOf = function () {\n if (this.data === undefined || this.data === null || this.data instanceof RegExp) {\n return this; // An Object.\n }\n\n if (this.data instanceof Date) {\n return this.data.valueOf(); // Milliseconds.\n }\n\n return this.data; // Boxed primitive.\n};\n/**\n * Create a new data object based on a constructor's prototype.\n * @param {Interpreter.Object} constructor Parent constructor function,\n * or null if scope object.\n * @return {!Interpreter.Object} New data object.\n */\n\n\nInterpreter.prototype.createObject = function (constructor) {\n return this.createObjectProto(constructor && constructor.properties[\"prototype\"]);\n};\n/**\n * Create a new data object based on a prototype.\n * @param {Interpreter.Object} proto Prototype object.\n * @return {!Interpreter.Object} New data object.\n */\n\n\nInterpreter.prototype.createObjectProto = function (proto) {\n if (typeof proto !== \"object\") {\n throw Error(\"Non object prototype\");\n }\n\n var obj = new Interpreter.Object(proto); // Functions have prototype objects.\n\n if (this.isa(obj, this.FUNCTION)) {\n this.setProperty(obj, \"prototype\", this.createObjectProto(this.OBJECT_PROTO || null));\n obj.class = \"Function\";\n } // Arrays have length.\n\n\n if (this.isa(obj, this.ARRAY)) {\n this.setProperty(obj, \"length\", 0, {\n configurable: false,\n enumerable: false,\n writable: true\n });\n obj.class = \"Array\";\n }\n\n if (this.isa(obj, this.ERROR)) {\n obj.class = \"Error\";\n }\n\n return obj;\n};\n/**\n * Initialize a pseudo regular expression object based on a native regular\n * expression object.\n * @param {!Interpreter.Object} pseudoRegexp The existing object to set.\n * @param {!RegExp} nativeRegexp The native regular expression.\n */\n\n\nInterpreter.prototype.populateRegExp = function (pseudoRegexp, nativeRegexp) {\n pseudoRegexp.data = nativeRegexp; // lastIndex is settable, all others are read-only attributes\n\n this.setProperty(pseudoRegexp, \"lastIndex\", nativeRegexp.lastIndex, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"source\", nativeRegexp.source, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"global\", nativeRegexp.global, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"ignoreCase\", nativeRegexp.ignoreCase, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"multiline\", nativeRegexp.multiline, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n};\n/**\n * Create a new function.\n * @param {!Object} node AST node defining the function.\n * @param {!Object} scope Parent scope.\n * @return {!Interpreter.Object} New function.\n */\n\n\nInterpreter.prototype.createFunction = function (node, scope) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.parentScope = scope;\n func.node = node;\n this.setProperty(func, \"length\", func.node[\"params\"].length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n/**\n * Create a new native function.\n * @param {!Function} nativeFunc JavaScript function.\n * @param {boolean=} opt_constructor If true, the function's\n * prototype will have its constructor property set to the function.\n * If false, the function cannot be called as a constructor (e.g. escape).\n * Defaults to undefined.\n * @return {!Interpreter.Object} New function.\n */\n\n\nInterpreter.prototype.createNativeFunction = function (nativeFunc, opt_constructor) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.nativeFunc = nativeFunc;\n nativeFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", nativeFunc.length, Interpreter.READONLY_DESCRIPTOR);\n\n if (opt_constructor) {\n this.setProperty(func.properties[\"prototype\"], \"constructor\", func, Interpreter.NONENUMERABLE_DESCRIPTOR);\n } else if (opt_constructor === false) {\n func.illegalConstructor = true;\n this.setProperty(func, \"prototype\", undefined);\n }\n\n return func;\n};\n/**\n * Create a new native asynchronous function.\n * @param {!Function} asyncFunc JavaScript function.\n * @return {!Interpreter.Object} New function.\n */\n\n\nInterpreter.prototype.createAsyncFunction = function (asyncFunc) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.asyncFunc = asyncFunc;\n asyncFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", asyncFunc.length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n/**\n * Converts from a native JS object or value to a JS interpreter object.\n * Can handle JSON-style values, does NOT handle cycles.\n * @param {*} nativeObj The native JS object to be converted.\n * @return {Interpreter.Value} The equivalent JS interpreter object.\n */\n\n\nInterpreter.prototype.nativeToPseudo = function (nativeObj) {\n if (typeof nativeObj !== \"object\" && typeof nativeObj !== \"function\" || nativeObj === null) {\n return nativeObj;\n }\n\n if (nativeObj instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, nativeObj);\n return pseudoRegexp;\n }\n\n if (nativeObj instanceof Date) {\n var pseudoDate = this.createObjectProto(this.DATE_PROTO);\n pseudoDate.data = nativeObj;\n return pseudoDate;\n }\n\n if (nativeObj instanceof Function) {\n var interpreter = this;\n\n var wrapper = function () {\n return interpreter.nativeToPseudo(nativeObj.apply(interpreter, Array.prototype.slice.call(arguments).map(function (i) {\n return interpreter.pseudoToNative(i);\n })));\n };\n\n return this.createNativeFunction(wrapper, undefined);\n }\n\n var pseudoObj;\n\n if (Array.isArray(nativeObj)) {\n // Array.\n pseudoObj = this.createObjectProto(this.ARRAY_PROTO);\n\n for (var i = 0; i < nativeObj.length; i++) {\n if (i in nativeObj) {\n this.setProperty(pseudoObj, i, this.nativeToPseudo(nativeObj[i]));\n }\n }\n } else {\n // Object.\n pseudoObj = this.createObjectProto(this.OBJECT_PROTO);\n\n for (var key in nativeObj) {\n this.setProperty(pseudoObj, key, this.nativeToPseudo(nativeObj[key]));\n }\n }\n\n return pseudoObj;\n};\n/**\n * Converts from a JS interpreter object to native JS object.\n * Can handle JSON-style values, plus cycles.\n * @param {Interpreter.Value} pseudoObj The JS interpreter object to be\n * converted.\n * @param {Object=} opt_cycles Cycle detection (used in recursive calls).\n * @return {*} The equivalent native JS object or value.\n */\n\n\nInterpreter.prototype.pseudoToNative = function (pseudoObj, opt_cycles) {\n if (typeof pseudoObj !== \"object\" && typeof pseudoObj !== \"function\" || pseudoObj === null) {\n return pseudoObj;\n }\n\n if (this.isa(pseudoObj, this.REGEXP)) {\n // Regular expression.\n return pseudoObj.data;\n }\n\n if (this.isa(pseudoObj, this.DATE)) {\n // Date.\n return pseudoObj.data;\n }\n\n var cycles = opt_cycles || {\n pseudo: [],\n native: []\n };\n var i = cycles.pseudo.indexOf(pseudoObj);\n\n if (i !== -1) {\n return cycles.native[i];\n }\n\n cycles.pseudo.push(pseudoObj);\n var nativeObj;\n\n if (this.isa(pseudoObj, this.ARRAY)) {\n // Array.\n nativeObj = [];\n cycles.native.push(nativeObj);\n var length = this.getProperty(pseudoObj, \"length\");\n\n for (var i = 0; i < length; i++) {\n if (this.hasProperty(pseudoObj, i)) {\n nativeObj[i] = this.pseudoToNative(this.getProperty(pseudoObj, i), cycles);\n }\n }\n } else {\n // Object.\n nativeObj = {};\n cycles.native.push(nativeObj);\n var val;\n\n for (var key in pseudoObj.properties) {\n val = pseudoObj.properties[key];\n nativeObj[key] = this.pseudoToNative(val, cycles);\n }\n }\n\n cycles.pseudo.pop();\n cycles.native.pop();\n return nativeObj;\n};\n/**\n * Converts from a native JS array to a JS interpreter array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Array} nativeArray The JS array to be converted.\n * @return {!Interpreter.Object} The equivalent JS interpreter array.\n */\n\n\nInterpreter.prototype.arrayNativeToPseudo = function (nativeArray) {\n var pseudoArray = this.createObjectProto(this.ARRAY_PROTO);\n var props = Object.getOwnPropertyNames(nativeArray);\n\n for (var i = 0; i < props.length; i++) {\n this.setProperty(pseudoArray, props[i], nativeArray[props[i]]);\n }\n\n return pseudoArray;\n};\n/**\n * Converts from a JS interpreter array to native JS array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Interpreter.Object} pseudoArray The JS interpreter array,\n * or JS interpreter object pretending to be an array.\n * @return {!Array} The equivalent native JS array.\n */\n\n\nInterpreter.prototype.arrayPseudoToNative = function (pseudoArray) {\n var nativeArray = [];\n\n for (var key in pseudoArray.properties) {\n nativeArray[key] = this.getProperty(pseudoArray, key);\n } // pseudoArray might be an object pretending to be an array. In this case\n // it's possible that length is non-existent, invalid, or smaller than the\n // largest defined numeric property. Set length explicitly here.\n\n\n nativeArray.length = Interpreter.legalArrayLength(this.getProperty(pseudoArray, \"length\")) || 0;\n return nativeArray;\n};\n/**\n * Look up the prototype for this value.\n * @param {Interpreter.Value} value Data object.\n * @return {Interpreter.Object} Prototype object, null if none.\n */\n\n\nInterpreter.prototype.getPrototype = function (value) {\n switch (typeof value) {\n case \"number\":\n return this.NUMBER.properties[\"prototype\"];\n\n case \"boolean\":\n return this.BOOLEAN.properties[\"prototype\"];\n\n case \"string\":\n return this.STRING.properties[\"prototype\"];\n }\n\n if (value) {\n return value.proto;\n }\n\n return null;\n};\n/**\n * Fetch a property value from a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line numbers\n * @return {Interpreter.Value} Property value (may be undefined).\n */\n\n\nInterpreter.prototype.getProperty = function (obj, name, node) {\n name = String(name);\n\n if (obj === undefined || obj === null) {\n let lineNum;\n\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n\n this.throwException(this.TYPE_ERROR, \"Cannot read property '\" + name + \"' of \" + obj, lineNum);\n }\n\n if (name === \"length\") {\n // Special cases for magic length property.\n if (this.isa(obj, this.STRING)) {\n return String(obj).length;\n }\n } else if (name.charCodeAt(0) < 0x40) {\n // Might have numbers in there?\n // Special cases for string array indexing\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n\n if (!isNaN(n) && n < String(obj).length) {\n return String(obj)[n];\n }\n }\n }\n\n do {\n if (obj.properties && name in obj.properties) {\n var getter = obj.getter[name];\n\n if (getter) {\n // Flag this function as being a getter and thus needing immediate\n // execution (rather than being the value of the property).\n getter.isGetter = true;\n return getter;\n }\n\n return obj.properties[name];\n }\n } while (obj = this.getPrototype(obj));\n\n return undefined;\n};\n/**\n * Does the named property exist on a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @return {boolean} True if property exists.\n */\n\n\nInterpreter.prototype.hasProperty = function (obj, name) {\n if (!obj.isObject) {\n throw TypeError(\"Primitive data type has no properties\");\n }\n\n name = String(name);\n\n if (name === \"length\" && this.isa(obj, this.STRING)) {\n return true;\n }\n\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n\n if (!isNaN(n) && n < String(obj).length) {\n return true;\n }\n }\n\n do {\n if (obj.properties && name in obj.properties) {\n return true;\n }\n } while (obj = this.getPrototype(obj));\n\n return false;\n};\n/**\n * Set a property value on a data object.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Interpreter.Value} value New property value.\n * Use Interpreter.VALUE_IN_DESCRIPTOR if value is handled by\n * descriptor instead.\n * @param {Object=} opt_descriptor Optional descriptor object.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\n\n\nInterpreter.prototype.setProperty = function (obj, name, value, opt_descriptor) {\n name = String(name);\n\n if (obj === undefined || obj === null) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of \" + obj);\n }\n\n if (opt_descriptor && (\"get\" in opt_descriptor || \"set\" in opt_descriptor) && (\"value\" in opt_descriptor || \"writable\" in opt_descriptor)) {\n this.throwException(this.TYPE_ERROR, \"Invalid property descriptor. \" + \"Cannot both specify accessors and a value or writable attribute\");\n }\n\n var strict = !this.stateStack || this.getScope().strict;\n\n if (!obj.isObject) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't create property '\" + name + \"' on '\" + obj + \"'\");\n }\n\n return;\n }\n\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n\n if (name === \"length\" || !isNaN(n) && n < String(obj).length) {\n // Can't set length or letters on String objects.\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot assign to read only \" + \"property '\" + name + \"' of String '\" + obj.data + \"'\");\n }\n\n return;\n }\n }\n\n if (obj.class === \"Array\") {\n // Arrays have a magic length variable that is bound to the elements.\n var length = obj.properties.length;\n var i;\n\n if (name === \"length\") {\n // Delete elements if length is smaller.\n if (opt_descriptor) {\n if (!(\"value\" in opt_descriptor)) {\n return;\n }\n\n value = opt_descriptor.value;\n }\n\n value = Interpreter.legalArrayLength(value);\n\n if (isNaN(value)) {\n this.throwException(this.RANGE_ERROR, \"Invalid array length\");\n }\n\n if (value < length) {\n for (i in obj.properties) {\n i = Interpreter.legalArrayIndex(i);\n\n if (!isNaN(i) && value <= i) {\n delete obj.properties[i];\n }\n }\n }\n } else if (!isNaN(i = Interpreter.legalArrayIndex(name))) {\n // Increase length if this index is larger.\n obj.properties.length = Math.max(length, i + 1);\n }\n }\n\n if (obj.preventExtensions && !(name in obj.properties)) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't add property '\" + name + \"', object is not extensible\");\n }\n\n return;\n }\n\n if (opt_descriptor) {\n // Define the property.\n if (\"get\" in opt_descriptor) {\n if (opt_descriptor.get) {\n obj.getter[name] = opt_descriptor.get;\n } else {\n delete obj.getter[name];\n }\n }\n\n if (\"set\" in opt_descriptor) {\n if (opt_descriptor.set) {\n obj.setter[name] = opt_descriptor.set;\n } else {\n delete obj.setter[name];\n }\n }\n\n var descriptor = {};\n\n if (\"configurable\" in opt_descriptor) {\n descriptor.configurable = opt_descriptor.configurable;\n }\n\n if (\"enumerable\" in opt_descriptor) {\n descriptor.enumerable = opt_descriptor.enumerable;\n }\n\n if (\"writable\" in opt_descriptor) {\n descriptor.writable = opt_descriptor.writable;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n\n if (\"value\" in opt_descriptor) {\n descriptor.value = opt_descriptor.value;\n delete obj.getter[name];\n delete obj.setter[name];\n } else if (value !== Interpreter.VALUE_IN_DESCRIPTOR) {\n descriptor.value = value;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n\n try {\n Object.defineProperty(obj.properties, name, descriptor);\n } catch (e) {\n this.throwException(this.TYPE_ERROR, \"Cannot redefine property: \" + name);\n }\n } else {\n // Set the property.\n if (value === Interpreter.VALUE_IN_DESCRIPTOR) {\n throw ReferenceError(\"Value not specified.\");\n } // Determine the parent (possibly self) where the property is defined.\n\n\n var defObj = obj;\n\n while (!(name in defObj.properties)) {\n defObj = this.getPrototype(defObj);\n\n if (!defObj) {\n // This is a new property.\n defObj = obj;\n break;\n }\n }\n\n if (defObj.setter && defObj.setter[name]) {\n return defObj.setter[name];\n }\n\n if (defObj.getter && defObj.getter[name]) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of object '\" + obj + \"' which only has a getter\");\n }\n } else {\n // No setter, simple assignment.\n try {\n obj.properties[name] = value;\n } catch (e) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot assign to read only \" + \"property '\" + name + \"' of object '\" + obj + \"'\");\n }\n }\n }\n }\n};\n/**\n * Convenience method for adding a native function as a non-enumerable property\n * onto an object's prototype.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {!Function} wrapper Function object.\n */\n\n\nInterpreter.prototype.setNativeFunctionPrototype = function (obj, name, wrapper) {\n this.setProperty(obj.properties[\"prototype\"], name, this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n};\n/**\n * Returns the current scope from the stateStack.\n * @return {!Interpreter.Object} Current scope dictionary.\n */\n\n\nInterpreter.prototype.getScope = function () {\n var scope = this.stateStack[this.stateStack.length - 1].scope;\n\n if (!scope) {\n throw Error(\"No scope found.\");\n }\n\n return scope;\n};\n/**\n * Create a new scope dictionary.\n * @param {!Object} node AST node defining the scope container\n * (e.g. a function).\n * @param {Interpreter.Object} parentScope Scope to link to.\n * @return {!Interpreter.Object} New scope.\n */\n\n\nInterpreter.prototype.createScope = function (node, parentScope) {\n var scope = this.createObjectProto(null);\n scope.parentScope = parentScope;\n\n if (!parentScope) {\n this.initGlobalScope(scope);\n }\n\n this.populateScope_(node, scope); // Determine if this scope starts with 'use strict'.\n\n scope.strict = false;\n\n if (parentScope && parentScope.strict) {\n scope.strict = true;\n } else {\n var firstNode = node[\"body\"] && node[\"body\"][0];\n\n if (firstNode && firstNode.expression && firstNode.expression[\"type\"] === \"Literal\" && firstNode.expression.value === \"use strict\") {\n scope.strict = true;\n }\n }\n\n return scope;\n};\n/**\n * Create a new special scope dictionary. Similar to createScope(), but\n * doesn't assume that the scope is for a function body.\n * This is used for 'catch' clauses and 'with' statements.\n * @param {!Interpreter.Object} parentScope Scope to link to.\n * @param {Interpreter.Object=} opt_scope Optional object to transform into\n * scope.\n * @return {!Interpreter.Object} New scope.\n */\n\n\nInterpreter.prototype.createSpecialScope = function (parentScope, opt_scope) {\n if (!parentScope) {\n throw Error(\"parentScope required\");\n }\n\n var scope = opt_scope || this.createObjectProto(null);\n scope.parentScope = parentScope;\n scope.strict = parentScope.strict;\n return scope;\n};\n/**\n * Retrieves a value from the scope chain.\n * @param {string} name Name of variable.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\n\n\nInterpreter.prototype.getValueFromScope = function (name, node) {\n var scope = this.getScope();\n\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n return scope.properties[name];\n }\n\n scope = scope.parentScope;\n } // The root scope is also an object which has inherited properties and\n // could also have getters.\n\n\n if (scope === this.global && this.hasProperty(scope, name)) {\n return this.getProperty(scope, name);\n } // Typeof operator is unique: it can safely look at non-defined variables.\n\n\n var prevNode = this.stateStack[this.stateStack.length - 1].node;\n\n if (prevNode[\"type\"] === \"UnaryExpression\" && prevNode[\"operator\"] === \"typeof\") {\n return undefined;\n }\n\n var lineNum;\n\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\", lineNum);\n};\n/**\n * Sets a value to the current scope.\n * @param {string} name Name of variable.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\n\n\nInterpreter.prototype.setValueToScope = function (name, value) {\n var scope = this.getScope();\n var strict = scope.strict;\n\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n scope.properties[name] = value;\n return undefined;\n }\n\n scope = scope.parentScope;\n } // The root scope is also an object which has readonly properties and\n // could also have setters.\n\n\n if (scope === this.global && (!strict || this.hasProperty(scope, name))) {\n return this.setProperty(scope, name, value);\n }\n\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\");\n};\n/**\n * Create a new scope for the given node.\n * @param {!Object} node AST node (program or function).\n * @param {!Interpreter.Object} scope Scope dictionary to populate.\n * @private\n */\n\n\nInterpreter.prototype.populateScope_ = function (node, scope) {\n if (node[\"type\"] === \"VariableDeclaration\") {\n for (var i = 0; i < node[\"declarations\"].length; i++) {\n this.setProperty(scope, node[\"declarations\"][i][\"id\"][\"name\"], undefined, Interpreter.VARIABLE_DESCRIPTOR);\n }\n } else if (node[\"type\"] === \"FunctionDeclaration\") {\n this.setProperty(scope, node[\"id\"][\"name\"], this.createFunction(node, scope), Interpreter.VARIABLE_DESCRIPTOR);\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"FunctionExpression\") {\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"ExpressionStatement\") {\n return; // Expressions can't contain variable/function declarations.\n }\n\n var nodeClass = node[\"constructor\"];\n\n for (var name in node) {\n var prop = node[name];\n\n if (prop && typeof prop === \"object\") {\n if (Array.isArray(prop)) {\n for (var i = 0; i < prop.length; i++) {\n if (prop[i] && prop[i].constructor === nodeClass) {\n this.populateScope_(prop[i], scope);\n }\n }\n } else {\n if (prop.constructor === nodeClass) {\n this.populateScope_(prop, scope);\n }\n }\n }\n }\n};\n/**\n * Remove start and end values from AST, or set start and end values to a\n * constant value. Used to remove highlighting from polyfills and to set\n * highlighting in an eval to cover the entire eval expression.\n * @param {!Object} node AST node.\n * @param {number=} start Starting character of all nodes, or undefined.\n * @param {number=} end Ending character of all nodes, or undefined.\n * @private\n */\n\n\nInterpreter.prototype.stripLocations_ = function (node, start, end) {\n if (start) {\n node[\"start\"] = start;\n } else {\n delete node[\"start\"];\n }\n\n if (end) {\n node[\"end\"] = end;\n } else {\n delete node[\"end\"];\n }\n\n for (var name in node) {\n if (node.hasOwnProperty(name)) {\n var prop = node[name];\n\n if (prop && typeof prop === \"object\") {\n this.stripLocations_(prop, start, end);\n }\n }\n }\n};\n/**\n * Is the current state directly being called with as a construction with 'new'.\n * @return {boolean} True if 'new foo()', false if 'foo()'.\n */\n\n\nInterpreter.prototype.calledWithNew = function () {\n return this.stateStack[this.stateStack.length - 1].isConstructor;\n};\n/**\n * Gets a value from the scope chain or from an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\n\n\nInterpreter.prototype.getValue = function (ref, node) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.getValueFromScope(ref[1], node);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.getProperty(ref[0], ref[1], node);\n }\n};\n/**\n * Sets a value to the scope chain or to an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\n\n\nInterpreter.prototype.setValue = function (ref, value) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.setValueToScope(ref[1], value);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.setProperty(ref[0], ref[1], value);\n }\n};\n/**\n * Completion Value Types.\n * @enum {number}\n */\n\n\nInterpreter.Completion = {\n NORMAL: 0,\n BREAK: 1,\n CONTINUE: 2,\n RETURN: 3,\n THROW: 4\n};\n/**\n * Throw an exception in the interpreter that can be handled by an\n * interpreter try/catch statement. If unhandled, a real exception will\n * be thrown. Can be called with either an error class and a message, or\n * with an actual object to be thrown.\n * @param {!Interpreter.Object} errorClass Type of error (if message is\n * provided) or the value to throw (if no message).\n * @param {string=} opt_message Message being thrown.\n */\n\nInterpreter.prototype.throwException = function (errorClass, opt_message, lineNumber) {\n if (opt_message === undefined) {\n var error = errorClass; // This is a value to throw, not an error class.\n } else {\n var error = this.createObject(errorClass);\n this.setProperty(error, \"message\", opt_message, Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n\n var lineNumErrorMsg;\n\n if (lineNumber != null) {\n lineNumErrorMsg = this.getErrorLineNumberMessage(lineNumber);\n }\n\n this.unwind(Interpreter.Completion.THROW, error, undefined, lineNumErrorMsg); // Abort anything related to the current step.\n\n throw Interpreter.STEP_ERROR;\n};\n/**\n * Unwind the stack to the innermost relevant enclosing TryStatement,\n * For/ForIn/WhileStatement or Call/NewExpression. If this results in\n * the stack being completely unwound the thread will be terminated\n * and the appropriate error being thrown.\n * @param {Interpreter.Completion} type Completion type.\n * @param {Interpreter.Value=} value Value computed, returned or thrown.\n * @param {string=} label Target label for break or return.\n */\n\n\nInterpreter.prototype.unwind = function (type, value, label, lineNumberMsg = \"\") {\n if (type === Interpreter.Completion.NORMAL) {\n throw TypeError(\"Should not unwind for NORMAL completions\");\n }\n\n for (var stack = this.stateStack; stack.length > 0; stack.pop()) {\n var state = stack[stack.length - 1];\n\n switch (state.node[\"type\"]) {\n case \"TryStatement\":\n state.cv = {\n type: type,\n value: value,\n label: label\n };\n return;\n\n case \"CallExpression\":\n case \"NewExpression\":\n if (type === Interpreter.Completion.RETURN) {\n state.value = value;\n return;\n } else if (type !== Interpreter.Completion.THROW) {\n throw Error(\"Unsynatctic break/continue not rejected by Acorn\");\n }\n\n }\n\n if (type === Interpreter.Completion.BREAK) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop || state.isSwitch) {\n stack.pop();\n return;\n }\n } else if (type === Interpreter.Completion.CONTINUE) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop) {\n return;\n }\n }\n } // Unhandled completion. Throw a real error.\n\n\n var realError;\n\n if (this.isa(value, this.ERROR)) {\n var errorTable = {\n EvalError: EvalError,\n RangeError: RangeError,\n ReferenceError: ReferenceError,\n SyntaxError: SyntaxError,\n TypeError: TypeError,\n URIError: URIError\n };\n var name = this.getProperty(value, \"name\").toString();\n var message = this.getProperty(value, \"message\").valueOf();\n var type = errorTable[name] || Error;\n realError = type(message + lineNumberMsg);\n } else {\n realError = String(value) + lineNumberMsg;\n }\n\n throw realError;\n};\n/**\n * Create a call to a getter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @private\n */\n\n\nInterpreter.prototype.createGetter_ = function (func, left) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is explicitly provided (o).\n var funcThis = Array.isArray(left) ? left[0] : left;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [];\n return state;\n};\n/**\n * Create a call to a setter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value to set.\n * @private\n */\n\n\nInterpreter.prototype.createSetter_ = function (func, left, value) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is implicitly the global object (x).\n var funcThis = Array.isArray(left) ? left[0] : this.global;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [value];\n return state;\n};\n/**\n * Class for a state.\n * @param {!Object} node AST node for the state.\n * @param {!Interpreter.Object} scope Scope object for the state.\n * @constructor\n */\n\n\nInterpreter.State = function (node, scope) {\n this.node = node;\n this.scope = scope;\n}; ///////////////////////////////////////////////////////////////////////////////\n// Functions to handle each node type.\n///////////////////////////////////////////////////////////////////////////////\n\n\nInterpreter.prototype[\"stepArrayExpression\"] = function (stack, state, node) {\n var elements = node[\"elements\"];\n var n = state.n_ || 0;\n\n if (!state.array_) {\n state.array_ = this.createObjectProto(this.ARRAY_PROTO);\n state.array_.properties.length = elements.length;\n } else {\n this.setProperty(state.array_, n, state.value);\n n++;\n }\n\n while (n < elements.length) {\n // Skip missing elements - they're not defined, not undefined.\n if (elements[n]) {\n state.n_ = n;\n return new Interpreter.State(elements[n], state.scope);\n }\n\n n++;\n }\n\n stack.pop();\n stack[stack.length - 1].value = state.array_;\n};\n\nInterpreter.prototype[\"stepAssignmentExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"left\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n\n if (!state.doneRight_) {\n if (!state.leftReference_) {\n state.leftReference_ = state.value;\n }\n\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n\n if (!state.doneGetter_ && node[\"operator\"] !== \"=\") {\n var leftValue = this.getValue(state.leftReference_, node);\n state.leftValue_ = leftValue;\n\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = leftValue;\n return this.createGetter_(func, state.leftReference_);\n }\n }\n\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n\n var value = state.leftValue_;\n var rightValue = state.value;\n\n switch (node[\"operator\"]) {\n case \"=\":\n value = rightValue;\n break;\n\n case \"+=\":\n value += rightValue;\n break;\n\n case \"-=\":\n value -= rightValue;\n break;\n\n case \"*=\":\n value *= rightValue;\n break;\n\n case \"/=\":\n value /= rightValue;\n break;\n\n case \"%=\":\n value %= rightValue;\n break;\n\n case \"<<=\":\n value <<= rightValue;\n break;\n\n case \">>=\":\n value >>= rightValue;\n break;\n\n case \">>>=\":\n value >>>= rightValue;\n break;\n\n case \"&=\":\n value &= rightValue;\n break;\n\n case \"^=\":\n value ^= rightValue;\n break;\n\n case \"|=\":\n value |= rightValue;\n break;\n\n default:\n throw SyntaxError(\"Unknown assignment expression: \" + node[\"operator\"]);\n }\n\n var setter = this.setValue(state.leftReference_, value);\n\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = value;\n return this.createSetter_(setter, state.leftReference_, value);\n } // Return if no setter function.\n\n\n stack.pop();\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBinaryExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n\n if (!state.doneRight_) {\n state.doneRight_ = true;\n state.leftValue_ = state.value;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n\n stack.pop();\n var leftValue = state.leftValue_;\n var rightValue = state.value;\n var value;\n\n switch (node[\"operator\"]) {\n case \"==\":\n value = leftValue == rightValue;\n break;\n\n case \"!=\":\n value = leftValue != rightValue;\n break;\n\n case \"===\":\n value = leftValue === rightValue;\n break;\n\n case \"!==\":\n value = leftValue !== rightValue;\n break;\n\n case \">\":\n value = leftValue > rightValue;\n break;\n\n case \">=\":\n value = leftValue >= rightValue;\n break;\n\n case \"<\":\n value = leftValue < rightValue;\n break;\n\n case \"<=\":\n value = leftValue <= rightValue;\n break;\n\n case \"+\":\n value = leftValue + rightValue;\n break;\n\n case \"-\":\n value = leftValue - rightValue;\n break;\n\n case \"*\":\n value = leftValue * rightValue;\n break;\n\n case \"/\":\n value = leftValue / rightValue;\n break;\n\n case \"%\":\n value = leftValue % rightValue;\n break;\n\n case \"&\":\n value = leftValue & rightValue;\n break;\n\n case \"|\":\n value = leftValue | rightValue;\n break;\n\n case \"^\":\n value = leftValue ^ rightValue;\n break;\n\n case \"<<\":\n value = leftValue << rightValue;\n break;\n\n case \">>\":\n value = leftValue >> rightValue;\n break;\n\n case \">>>\":\n value = leftValue >>> rightValue;\n break;\n\n case \"in\":\n if (!rightValue || !rightValue.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"'in' expects an object, not '\" + rightValue + \"'\", lineNum);\n }\n\n value = this.hasProperty(rightValue, leftValue);\n break;\n\n case \"instanceof\":\n if (!this.isa(rightValue, this.FUNCTION)) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"Right-hand side of instanceof is not an object\", lineNum);\n }\n\n value = leftValue.isObject ? this.isa(leftValue, rightValue) : false;\n break;\n\n default:\n throw SyntaxError(\"Unknown binary operator: \" + node[\"operator\"]);\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBlockStatement\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n\n stack.pop();\n};\n\nInterpreter.prototype[\"stepBreakStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.BREAK, undefined, label);\n};\n\nInterpreter.prototype[\"stepCallExpression\"] = function (stack, state, node) {\n if (!state.doneCallee_) {\n state.doneCallee_ = 1; // Components needed to determine value of 'this'.\n\n var nextState = new Interpreter.State(node[\"callee\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n\n if (state.doneCallee_ === 1) {\n // Determine value of the function.\n state.doneCallee_ = 2;\n var func = state.value;\n\n if (Array.isArray(func)) {\n state.func_ = this.getValue(func, node);\n\n if (func[0] === Interpreter.SCOPE_REFERENCE) {\n // (Globally or locally) named function. Is it named 'eval'?\n state.directEval_ = func[1] === \"eval\";\n } else {\n // Method function, 'this' is object (ignored if invoked as 'new').\n state.funcThis_ = func[0];\n }\n\n func = state.func_;\n\n if (func && typeof func === \"object\" && func.isGetter) {\n // Clear the getter flag and call the getter function.\n func.isGetter = false;\n state.doneCallee_ = 1;\n return this.createGetter_(func, state.value);\n }\n } else {\n // Already evaluated function: (function(){...})();\n state.func_ = func;\n }\n\n state.arguments_ = [];\n state.n_ = 0;\n }\n\n var func = state.func_;\n\n if (!state.doneArgs_) {\n if (state.n_ !== 0) {\n state.arguments_.push(state.value);\n }\n\n if (node[\"arguments\"][state.n_]) {\n return new Interpreter.State(node[\"arguments\"][state.n_++], state.scope);\n } // Determine value of 'this' in function.\n\n\n if (node[\"type\"] === \"NewExpression\") {\n if (func.illegalConstructor) {\n // Illegal: new escape();\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a constructor\", lineNum);\n } // Constructor, 'this' is new object.\n\n\n var proto = func.properties[\"prototype\"];\n\n if (typeof proto !== \"object\" || proto === null) {\n // Non-object prototypes default to Object.prototype.\n proto = this.OBJECT_PROTO;\n }\n\n state.funcThis_ = this.createObjectProto(proto);\n state.isConstructor = true;\n } else if (state.funcThis_ === undefined) {\n // Global function, 'this' is global object (or 'undefined' if strict).\n state.funcThis_ = state.scope.strict ? undefined : this.global;\n }\n\n state.doneArgs_ = true;\n }\n\n if (!state.doneExec_) {\n state.doneExec_ = true;\n\n if (!func || !func.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a function\", lineNum);\n }\n\n var funcNode = func.node;\n\n if (funcNode) {\n var scope = this.createScope(funcNode[\"body\"], func.parentScope); // Add all arguments.\n\n for (var i = 0; i < funcNode[\"params\"].length; i++) {\n var paramName = funcNode[\"params\"][i][\"name\"];\n var paramValue = state.arguments_.length > i ? state.arguments_[i] : undefined;\n this.setProperty(scope, paramName, paramValue);\n } // Build arguments variable.\n\n\n var argsList = this.createObjectProto(this.ARRAY_PROTO);\n\n for (var i = 0; i < state.arguments_.length; i++) {\n this.setProperty(argsList, i, state.arguments_[i]);\n }\n\n this.setProperty(scope, \"arguments\", argsList); // Add the function's name (var x = function foo(){};)\n\n var name = funcNode[\"id\"] && funcNode[\"id\"][\"name\"];\n\n if (name) {\n this.setProperty(scope, name, func);\n }\n\n this.setProperty(scope, \"this\", state.funcThis_, Interpreter.READONLY_DESCRIPTOR);\n state.value = undefined; // Default value if no explicit return.\n\n return new Interpreter.State(funcNode[\"body\"], scope);\n } else if (func.eval) {\n var code = state.arguments_[0];\n\n if (typeof code !== \"string\") {\n // JS does not parse String objects:\n // eval(new String('1 + 1')) -> '1 + 1'\n state.value = code;\n } else {\n try {\n var ast = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](code.toString(), Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.SYNTAX_ERROR, \"Invalid code: \" + e.message, lineNum);\n }\n\n var evalNode = new this.nodeConstructor();\n evalNode[\"type\"] = \"EvalProgram_\";\n evalNode[\"body\"] = ast[\"body\"];\n this.stripLocations_(evalNode, node[\"start\"], node[\"end\"]); // Create new scope and update it with definitions in eval().\n\n var scope = state.directEval_ ? state.scope : this.global;\n\n if (scope.strict) {\n // Strict mode get its own scope in eval.\n scope = this.createScope(ast, scope);\n } else {\n // Non-strict mode pollutes the current scope.\n this.populateScope_(ast, scope);\n }\n\n this.value = undefined; // Default value if no code.\n\n return new Interpreter.State(evalNode, scope);\n }\n } else if (func.nativeFunc) {\n state.value = func.nativeFunc.apply(state.funcThis_, state.arguments_);\n } else if (func.asyncFunc) {\n var thisInterpreter = this;\n\n var callback = function (value) {\n state.value = value;\n thisInterpreter.paused_ = false;\n };\n\n var argsWithCallback = state.arguments_.concat(callback);\n this.paused_ = true;\n func.asyncFunc.apply(state.funcThis_, argsWithCallback);\n return;\n } else {\n /* A child of a function is a function but is not callable. For example:\n var F = function() {};\n F.prototype = escape;\n var f = new F();\n f();\n */\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func.class + \" is not a function\", lineNum);\n }\n } else {\n // Execution complete. Put the return value on the stack.\n stack.pop();\n\n if (state.isConstructor && typeof state.value !== \"object\") {\n stack[stack.length - 1].value = state.funcThis_;\n } else {\n stack[stack.length - 1].value = state.value;\n }\n }\n};\n\nInterpreter.prototype[\"stepCatchClause\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true; // Create an empty scope.\n\n var scope = this.createSpecialScope(state.scope); // Add the argument.\n\n this.setProperty(scope, node[\"param\"][\"name\"], state.throwValue); // Execute catch clause.\n\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepConditionalExpression\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n\n if (mode === 0) {\n state.mode_ = 1;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n\n if (mode === 1) {\n state.mode_ = 2;\n var value = Boolean(state.value);\n\n if (value && node[\"consequent\"]) {\n // Execute 'if' block.\n return new Interpreter.State(node[\"consequent\"], state.scope);\n } else if (!value && node[\"alternate\"]) {\n // Execute 'else' block.\n return new Interpreter.State(node[\"alternate\"], state.scope);\n } // eval('1;if(false){2}') -> undefined\n\n\n this.value = undefined;\n }\n\n stack.pop();\n\n if (node[\"type\"] === \"ConditionalExpression\") {\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepContinueStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.CONTINUE, undefined, label);\n};\n\nInterpreter.prototype[\"stepDebuggerStatement\"] = function (stack, state, node) {\n // Do nothing. May be overridden by developers.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepDoWhileStatement\"] = function (stack, state, node) {\n if (node[\"type\"] === \"DoWhileStatement\" && state.test_ === undefined) {\n // First iteration of do/while executes without checking test.\n state.value = true;\n state.test_ = true;\n }\n\n if (!state.test_) {\n state.test_ = true;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n\n if (!state.value) {\n // Done, exit loop.\n stack.pop();\n } else if (node[\"body\"]) {\n // Execute the body.\n state.test_ = false;\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepEmptyStatement\"] = function (stack, state, node) {\n stack.pop();\n};\n\nInterpreter.prototype[\"stepEvalProgram_\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n\n stack.pop();\n stack[stack.length - 1].value = this.value;\n};\n\nInterpreter.prototype[\"stepExpressionStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"expression\"], state.scope);\n }\n\n stack.pop(); // Save this value to interpreter.value for use as a return value if\n // this code is inside an eval function.\n\n this.value = state.value;\n};\n\nInterpreter.prototype[\"stepForInStatement\"] = function (stack, state, node) {\n // First, initialize a variable if exists. Only do so once, ever.\n if (!state.doneInit_) {\n state.doneInit_ = true;\n\n if (node[\"left\"][\"declarations\"] && node[\"left\"][\"declarations\"][0][\"init\"]) {\n if (state.scope.strict) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.SYNTAX_ERROR, \"for-in loop variable declaration may not have an initializer.\", lineNum);\n } // Variable initialization: for (var x = 4 in y)\n\n\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n } // Second, look up the object. Only do so once, ever.\n\n\n if (!state.doneObject_) {\n state.doneObject_ = true;\n\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n\n if (!state.isLoop) {\n // First iteration.\n state.isLoop = true;\n state.object_ = state.value;\n state.visited_ = Object.create(null);\n } // Third, find the property name for this iteration.\n\n\n if (state.name_ === undefined) {\n gotPropName: while (true) {\n if (state.object_ && state.object_.isObject) {\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_.properties);\n }\n\n while (true) {\n var prop = state.props_.shift();\n\n if (prop === undefined) {\n break; // Reached end of this object's properties.\n }\n\n if (!Object.prototype.hasOwnProperty.call(state.object_.properties, prop)) {\n continue; // Property has been deleted in the loop.\n }\n\n if (state.visited_[prop]) {\n continue; // Already seen this property on a child.\n }\n\n state.visited_[prop] = true;\n\n if (!Object.prototype.propertyIsEnumerable.call(state.object_.properties, prop)) {\n continue; // Skip non-enumerable property.\n }\n\n state.name_ = prop;\n break gotPropName;\n }\n } else if (state.object_ !== null && state.object_ !== undefined) {\n // Primitive value (other than null or undefined).\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_);\n }\n\n while (true) {\n var prop = state.props_.shift();\n\n if (prop === undefined) {\n break; // Reached end of this value's properties.\n }\n\n state.visited_[prop] = true;\n\n if (!Object.prototype.propertyIsEnumerable.call(state.object_, prop)) {\n continue; // Skip non-enumerable property.\n }\n\n state.name_ = prop;\n break gotPropName;\n }\n }\n\n state.object_ = this.getPrototype(state.object_);\n state.props_ = null;\n\n if (state.object_ === null) {\n // Done, exit loop.\n stack.pop();\n return;\n }\n }\n } // Fourth, find the variable\n\n\n if (!state.doneVariable_) {\n state.doneVariable_ = true;\n var left = node[\"left\"];\n\n if (left[\"type\"] === \"VariableDeclaration\") {\n // Inline variable declaration: for (var x in y)\n state.variable_ = [Interpreter.SCOPE_REFERENCE, left[\"declarations\"][0][\"id\"][\"name\"]];\n } else {\n // Arbitrary left side: for (foo().bar in y)\n state.variable_ = null;\n var nextState = new Interpreter.State(left, state.scope);\n nextState.components = true;\n return nextState;\n }\n }\n\n if (!state.variable_) {\n state.variable_ = state.value;\n } // Fifth, set the variable.\n\n\n if (!state.doneSetter_) {\n state.doneSetter_ = true;\n var value = state.name_;\n var setter = this.setValue(state.variable_, value);\n\n if (setter) {\n return this.createSetter_(setter, state.variable_, value);\n }\n } // Next step will be step three.\n\n\n state.name_ = undefined; // Reevaluate the variable since it could be a setter on the global object.\n\n state.doneVariable_ = false;\n state.doneSetter_ = false; // Sixth and finally, execute the body if there was one. this.\n\n if (node[\"body\"]) {\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepForStatement\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n\n if (mode === 0) {\n state.mode_ = 1;\n\n if (node[\"init\"]) {\n return new Interpreter.State(node[\"init\"], state.scope);\n }\n } else if (mode === 1) {\n state.mode_ = 2;\n\n if (node[\"test\"]) {\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n } else if (mode === 2) {\n state.mode_ = 3;\n\n if (node[\"test\"] && !state.value) {\n // Done, exit loop.\n stack.pop();\n } else {\n // Execute the body.\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n } else if (mode === 3) {\n state.mode_ = 1;\n\n if (node[\"update\"]) {\n return new Interpreter.State(node[\"update\"], state.scope);\n }\n }\n};\n\nInterpreter.prototype[\"stepFunctionDeclaration\"] = function (stack, state, node) {\n // This was found and handled when the scope was populated.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepFunctionExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.createFunction(node, state.scope);\n};\n\nInterpreter.prototype[\"stepIdentifier\"] = function (stack, state, node) {\n stack.pop();\n\n if (state.components) {\n stack[stack.length - 1].value = [Interpreter.SCOPE_REFERENCE, node[\"name\"]];\n return;\n }\n\n var value = this.getValueFromScope(node[\"name\"], node); // An identifier could be a getter if it's a property on the global object.\n\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var scope = state.scope;\n\n while (!this.hasProperty(scope, node[\"name\"])) {\n scope = scope.parentScope;\n }\n\n var func = value;\n return this.createGetter_(func, this.global);\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepIfStatement\"] = Interpreter.prototype[\"stepConditionalExpression\"];\n\nInterpreter.prototype[\"stepLabeledStatement\"] = function (stack, state, node) {\n // No need to hit this node again on the way back up the stack.\n stack.pop(); // Note that a statement might have multiple labels.\n\n var labels = state.labels || [];\n labels.push(node[\"label\"][\"name\"]);\n var nextState = new Interpreter.State(node[\"body\"], state.scope);\n nextState.labels = labels;\n return nextState;\n};\n\nInterpreter.prototype[\"stepLiteral\"] = function (stack, state, node) {\n stack.pop();\n var value = node[\"value\"];\n\n if (value instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, value);\n value = pseudoRegexp;\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepLogicalExpression\"] = function (stack, state, node) {\n if (node[\"operator\"] !== \"&&\" && node[\"operator\"] !== \"||\") {\n throw SyntaxError(\"Unknown logical operator: \" + node[\"operator\"]);\n }\n\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n\n if (!state.doneRight_) {\n if (node[\"operator\"] === \"&&\" && !state.value || node[\"operator\"] === \"||\" && state.value) {\n // Shortcut evaluation.\n stack.pop();\n stack[stack.length - 1].value = state.value;\n } else {\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n } else {\n stack.pop();\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepMemberExpression\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n }\n\n var propName;\n\n if (!node[\"computed\"]) {\n state.object_ = state.value; // obj.foo -- Just access 'foo' directly.\n\n propName = node[\"property\"][\"name\"];\n } else if (!state.doneProperty_) {\n state.object_ = state.value; // obj[foo] -- Compute value of 'foo'.\n\n state.doneProperty_ = true;\n return new Interpreter.State(node[\"property\"], state.scope);\n } else {\n propName = state.value;\n }\n\n stack.pop();\n\n if (state.components) {\n stack[stack.length - 1].value = [state.object_, propName];\n } else {\n var value = this.getProperty(state.object_, propName);\n\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var func = value;\n return this.createGetter_(func, state.object_);\n }\n\n stack[stack.length - 1].value = value;\n }\n};\n\nInterpreter.prototype[\"stepNewExpression\"] = Interpreter.prototype[\"stepCallExpression\"];\n\nInterpreter.prototype[\"stepObjectExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var property = node[\"properties\"][n];\n\n if (!state.object_) {\n // First execution.\n state.object_ = this.createObjectProto(this.OBJECT_PROTO);\n state.properties_ = Object.create(null);\n } else {\n // Determine property name.\n var key = property[\"key\"];\n\n if (key[\"type\"] === \"Identifier\") {\n var propName = key[\"name\"];\n } else if (key[\"type\"] === \"Literal\") {\n var propName = key[\"value\"];\n } else {\n throw SyntaxError(\"Unknown object structure: \" + key[\"type\"]);\n } // Set the property computed in the previous execution.\n\n\n if (!state.properties_[propName]) {\n // Create temp object to collect value, getter, and/or setter.\n state.properties_[propName] = {};\n }\n\n state.properties_[propName][property[\"kind\"]] = state.value;\n state.n_ = ++n;\n property = node[\"properties\"][n];\n }\n\n if (property) {\n return new Interpreter.State(property[\"value\"], state.scope);\n }\n\n for (var key in state.properties_) {\n var kinds = state.properties_[key];\n\n if (\"get\" in kinds || \"set\" in kinds) {\n // Set a property with a getter or setter.\n var descriptor = {\n configurable: true,\n enumerable: true,\n get: kinds[\"get\"],\n set: kinds[\"set\"]\n };\n this.setProperty(state.object_, key, null, descriptor);\n } else {\n // Set a normal property with a value.\n this.setProperty(state.object_, key, kinds[\"init\"]);\n }\n }\n\n stack.pop();\n stack[stack.length - 1].value = state.object_;\n};\n\nInterpreter.prototype[\"stepProgram\"] = function (stack, state, node) {\n var expression = node[\"body\"].shift();\n\n if (expression) {\n state.done = false;\n return new Interpreter.State(expression, state.scope);\n }\n\n state.done = true; // Don't pop the stateStack.\n // Leave the root scope on the tree in case the program is appended to.\n};\n\nInterpreter.prototype[\"stepReturnStatement\"] = function (stack, state, node) {\n if (node[\"argument\"] && !state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n }\n\n this.unwind(Interpreter.Completion.RETURN, state.value, undefined);\n};\n\nInterpreter.prototype[\"stepSequenceExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"expressions\"][n];\n\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n\n stack.pop();\n stack[stack.length - 1].value = state.value;\n};\n\nInterpreter.prototype[\"stepSwitchStatement\"] = function (stack, state, node) {\n if (!state.test_) {\n state.test_ = 1;\n return new Interpreter.State(node[\"discriminant\"], state.scope);\n }\n\n if (state.test_ === 1) {\n state.test_ = 2; // Preserve switch value between case tests.\n\n state.switchValue_ = state.value;\n state.defaultCase_ = -1;\n }\n\n while (true) {\n var index = state.index_ || 0;\n var switchCase = node[\"cases\"][index];\n\n if (!state.matched_ && switchCase && !switchCase[\"test\"]) {\n // Test on the default case is null.\n // Bypass (but store) the default case, and get back to it later.\n state.defaultCase_ = index;\n state.index_ = index + 1;\n continue;\n }\n\n if (!switchCase && !state.matched_ && state.defaultCase_ !== -1) {\n // Ran through all cases, no match. Jump to the default.\n state.matched_ = true;\n state.index_ = state.defaultCase_;\n continue;\n }\n\n if (switchCase) {\n if (!state.matched_ && !state.tested_ && switchCase[\"test\"]) {\n state.tested_ = true;\n return new Interpreter.State(switchCase[\"test\"], state.scope);\n }\n\n if (state.matched_ || state.value === state.switchValue_) {\n state.matched_ = true;\n var n = state.n_ || 0;\n\n if (switchCase[\"consequent\"][n]) {\n state.isSwitch = true;\n state.n_ = n + 1;\n return new Interpreter.State(switchCase[\"consequent\"][n], state.scope);\n }\n } // Move on to next case.\n\n\n state.tested_ = false;\n state.n_ = 0;\n state.index_ = index + 1;\n } else {\n stack.pop();\n return;\n }\n }\n};\n\nInterpreter.prototype[\"stepThisExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.getValueFromScope(\"this\", node);\n};\n\nInterpreter.prototype[\"stepThrowStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n } else {\n this.throwException(state.value);\n }\n};\n\nInterpreter.prototype[\"stepTryStatement\"] = function (stack, state, node) {\n if (!state.doneBlock_) {\n state.doneBlock_ = true;\n return new Interpreter.State(node[\"block\"], state.scope);\n }\n\n if (state.cv && state.cv.type === Interpreter.Completion.THROW && !state.doneHandler_ && node[\"handler\"]) {\n state.doneHandler_ = true;\n var nextState = new Interpreter.State(node[\"handler\"], state.scope);\n nextState.throwValue = state.cv.value;\n state.cv = undefined; // This error has been handled, don't rethrow.\n\n return nextState;\n }\n\n if (!state.doneFinalizer_ && node[\"finalizer\"]) {\n state.doneFinalizer_ = true;\n return new Interpreter.State(node[\"finalizer\"], state.scope);\n }\n\n stack.pop();\n\n if (state.cv) {\n // There was no catch handler, or the catch/finally threw an error.\n // Throw the error up to a higher try.\n this.unwind(state.cv.type, state.cv.value, state.cv.label);\n }\n};\n\nInterpreter.prototype[\"stepUnaryExpression\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = node[\"operator\"] === \"delete\";\n return nextState;\n }\n\n stack.pop();\n var value = state.value;\n\n if (node[\"operator\"] === \"-\") {\n value = -value;\n } else if (node[\"operator\"] === \"+\") {\n value = +value;\n } else if (node[\"operator\"] === \"!\") {\n value = !value;\n } else if (node[\"operator\"] === \"~\") {\n value = ~value;\n } else if (node[\"operator\"] === \"delete\") {\n var result = true; // If value is not an array, then it is a primitive, or some other value.\n // If so, skip the delete and return true.\n\n if (Array.isArray(value)) {\n var obj = value[0];\n\n if (obj === Interpreter.SCOPE_REFERENCE) {\n // 'delete foo;' is the same as 'delete window.foo'.\n obj = state.scope;\n }\n\n var name = String(value[1]);\n\n try {\n delete obj.properties[name];\n } catch (e) {\n if (state.scope.strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot delete property '\" + name + \"' of '\" + obj + \"'\");\n } else {\n result = false;\n }\n }\n }\n\n value = result;\n } else if (node[\"operator\"] === \"typeof\") {\n value = value && value.class === \"Function\" ? \"function\" : typeof value;\n } else if (node[\"operator\"] === \"void\") {\n value = undefined;\n } else {\n throw SyntaxError(\"Unknown unary operator: \" + node[\"operator\"]);\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepUpdateExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n\n if (!state.leftSide_) {\n state.leftSide_ = state.value;\n }\n\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n\n if (!state.doneGetter_) {\n var leftValue = this.getValue(state.leftSide_, node);\n state.leftValue_ = leftValue;\n\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = leftValue;\n return this.createGetter_(func, state.leftSide_);\n }\n }\n\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n\n var leftValue = Number(state.leftValue_);\n var changeValue;\n\n if (node[\"operator\"] === \"++\") {\n changeValue = leftValue + 1;\n } else if (node[\"operator\"] === \"--\") {\n changeValue = leftValue - 1;\n } else {\n throw SyntaxError(\"Unknown update expression: \" + node[\"operator\"]);\n }\n\n var returnValue = node[\"prefix\"] ? changeValue : leftValue;\n var setter = this.setValue(state.leftSide_, changeValue);\n\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = returnValue;\n return this.createSetter_(setter, state.leftSide_, changeValue);\n } // Return if no setter function.\n\n\n stack.pop();\n stack[stack.length - 1].value = returnValue;\n};\n\nInterpreter.prototype[\"stepVariableDeclaration\"] = function (stack, state, node) {\n var declarations = node[\"declarations\"];\n var n = state.n_ || 0;\n var declarationNode = declarations[n];\n\n if (state.init_ && declarationNode) {\n // This setValue call never needs to deal with calling a setter function.\n // Note that this is setting the init value, not defining the variable.\n // Variable definition is done when scope is populated.\n this.setValueToScope(declarationNode[\"id\"][\"name\"], state.value);\n state.init_ = false;\n declarationNode = declarations[++n];\n }\n\n while (declarationNode) {\n // Skip any declarations that are not initialized. They have already\n // been defined as undefined in populateScope_.\n if (declarationNode[\"init\"]) {\n state.n_ = n;\n state.init_ = true;\n return new Interpreter.State(declarationNode[\"init\"], state.scope);\n }\n\n declarationNode = declarations[++n];\n }\n\n stack.pop();\n};\n\nInterpreter.prototype[\"stepWithStatement\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n } else if (!state.doneBody_) {\n state.doneBody_ = true;\n var scope = this.createSpecialScope(state.scope, state.value);\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepWhileStatement\"] = Interpreter.prototype[\"stepDoWhileStatement\"]; // Preserve top-level API functions from being pruned/renamed by JS compilers.\n// Add others as needed.\n// The global object ('window' in a browser, 'global' in node.js) is 'this'.\n//this['Interpreter'] = Interpreter;\n\nInterpreter.prototype[\"step\"] = Interpreter.prototype.step;\nInterpreter.prototype[\"run\"] = Interpreter.prototype.run;\nInterpreter.prototype[\"appendCode\"] = Interpreter.prototype.appendCode;\nInterpreter.prototype[\"createObject\"] = Interpreter.prototype.createObject;\nInterpreter.prototype[\"createObjectProto\"] = Interpreter.prototype.createObjectProto;\nInterpreter.prototype[\"createAsyncFunction\"] = Interpreter.prototype.createAsyncFunction;\nInterpreter.prototype[\"createNativeFunction\"] = Interpreter.prototype.createNativeFunction;\nInterpreter.prototype[\"getProperty\"] = Interpreter.prototype.getProperty;\nInterpreter.prototype[\"setProperty\"] = Interpreter.prototype.setProperty;\nInterpreter.prototype[\"nativeToPseudo\"] = Interpreter.prototype.nativeToPseudo;\nInterpreter.prototype[\"pseudoToNative\"] = Interpreter.prototype.pseudoToNative; // Obsolete. Do not use.\n\nInterpreter.prototype[\"createPrimitive\"] = function (x) {\n return x;\n};\n\n\n\n//# sourceURL=webpack:///./src/JSInterpreter.js?");
|
||
|
||
/***/ }),
|
||
/* 441 */
|
||
/*!************************************!*\
|
||
!*** ./src/Gang/GangMemberTask.ts ***!
|
||
\************************************/
|
||
/*! exports provided: GangMemberTask */
|
||
/*! exports used: GangMemberTask */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberTask; });\nclass GangMemberTask {\n // Defines tasks that Gang Members can work on\n constructor(name, desc, isHacking, isCombat, params) {\n this.name = name;\n this.desc = desc; // Flags that describe whether this Task is applicable for Hacking/Combat gangs\n\n this.isHacking = isHacking;\n this.isCombat = isCombat; // Base gain rates for respect/wanted/money\n\n this.baseRespect = params.baseRespect ? params.baseRespect : 0;\n this.baseWanted = params.baseWanted ? params.baseWanted : 0;\n this.baseMoney = params.baseMoney ? params.baseMoney : 0; // Weighting for the effect that each stat has on the tasks effectiveness.\n // Weights must add up to 100\n\n this.hackWeight = params.hackWeight ? params.hackWeight : 0;\n this.strWeight = params.strWeight ? params.strWeight : 0;\n this.defWeight = params.defWeight ? params.defWeight : 0;\n this.dexWeight = params.dexWeight ? params.dexWeight : 0;\n this.agiWeight = params.agiWeight ? params.agiWeight : 0;\n this.chaWeight = params.chaWeight ? params.chaWeight : 0;\n\n if (Math.round(this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight) != 100) {\n console.error(`GangMemberTask ${this.name} weights do not add up to 100`);\n } // 1 - 100\n\n\n this.difficulty = params.difficulty ? params.difficulty : 1; // Territory Factors. Exponential factors that dictate how territory affects gains\n // Formula: Territory Mutiplier = (Territory * 100) ^ factor / 100\n // So factor should be > 1 if something should scale exponentially with territory\n // and should be < 1 if it should have diminshing returns\n\n this.territory = params.territory ? params.territory : {\n money: 1,\n respect: 1,\n wanted: 1\n };\n }\n\n}\n\n//# sourceURL=webpack:///./src/Gang/GangMemberTask.ts?");
|
||
|
||
/***/ }),
|
||
/* 442 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/SleeveHelpers.ts ***!
|
||
\***************************************************/
|
||
/*! exports provided: findSleevePurchasableAugs */
|
||
/*! exports used: findSleevePurchasableAugs */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return findSleevePurchasableAugs; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n\n\n\nfunction findSleevePurchasableAugs(sleeve, p) {\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n const ownedAugNames = sleeve.augmentations.map(e => {\n return e.name;\n });\n const availableAugs = []; // Helper function that helps filter out augs that are already owned\n // and augs that aren't allowed for sleeves\n\n function isAvailableForSleeve(aug) {\n if (aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_1__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n return false;\n }\n\n if (ownedAugNames.includes(aug.name)) {\n return false;\n }\n\n if (availableAugs.includes(aug)) {\n return false;\n }\n\n if (aug.isSpecial) {\n return false;\n }\n\n return true;\n } // If player is in a gang, then we return all augs that the player\n // has enough reputation for (since that gang offers all augs)\n\n\n if (p.inGang()) {\n const fac = p.getGangFaction();\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n\n return availableAugs;\n }\n\n for (const facName of p.factions) {\n if (facName === \"Bladeburners\") {\n continue;\n }\n\n if (facName === \"Netburners\") {\n continue;\n }\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ \"a\"][facName];\n\n if (fac == null) {\n continue;\n }\n\n for (const augName of fac.augmentations) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n }\n\n return availableAugs;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 443 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/SourceFile/PlayerOwnedSourceFile.ts ***!
|
||
\*************************************************/
|
||
/*! exports provided: PlayerOwnedSourceFile */
|
||
/*! exports used: PlayerOwnedSourceFile */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerOwnedSourceFile; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nclass PlayerOwnedSourceFile {\n // Source-File level\n // Source-File number\n constructor(n, level) {\n _defineProperty(this, \"lvl\", 1);\n\n _defineProperty(this, \"n\", 1);\n\n this.n = n;\n this.lvl = level;\n }\n\n}\n\n//# sourceURL=webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts?");
|
||
|
||
/***/ }),
|
||
/* 444 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Programs/ProgramHelpers.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: getAvailableCreatePrograms */
|
||
/*! exports used: getAvailableCreatePrograms */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getAvailableCreatePrograms; });\n/* harmony import */ var _Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Programs */ 54);\n\n//Returns the programs this player can create.\nfunction getAvailableCreatePrograms(player) {\n const programs = [];\n\n for (const key in _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"]) {\n // Non-creatable program\n const create = _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].create;\n if (create == null) continue; // Already has program\n\n if (player.hasProgram(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].name)) continue; // Does not meet requirements\n\n if (!create.req(player)) continue;\n programs.push(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key]);\n }\n\n return programs;\n}\n\n//# sourceURL=webpack:///./src/Programs/ProgramHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 445 */,
|
||
/* 446 */,
|
||
/* 447 */,
|
||
/* 448 */,
|
||
/* 449 */
|
||
/*!************************************************!*\
|
||
!*** ./src/ui/React/AugmentationAccordion.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: AugmentationAccordion */
|
||
/*! exports used: AugmentationAccordion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BBAccordion */ 224);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/**\n * React Component for displaying a single Augmentation as an accordion.\n *\n * The header of the accordion contains the Augmentation's name (and level, if\n * applicable), and the accordion's panel contains the Augmentation's description.\n */\n\n\n\nfunction AugmentationAccordion(props) {\n let displayName = props.aug.name;\n\n if (props.level != null) {\n if (props.aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n displayName += ` - Level ${props.level}`;\n }\n }\n\n if (typeof props.aug.info === \"string\") {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, props.aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/AugmentationAccordion.tsx?");
|
||
|
||
/***/ }),
|
||
/* 450 */,
|
||
/* 451 */,
|
||
/* 452 */,
|
||
/* 453 */,
|
||
/* 454 */,
|
||
/* 455 */,
|
||
/* 456 */,
|
||
/* 457 */,
|
||
/* 458 */,
|
||
/* 459 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Bladeburner/ui/TeamSizePopup.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: TeamSizePopup */
|
||
/*! exports used: TeamSizePopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TeamSizePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\nfunction TeamSizePopup(props) {\n const [teamSize, setTeamSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])();\n\n function confirmTeamSize() {\n if (teamSize === undefined) return;\n const num = Math.round(teamSize);\n\n if (isNaN(num) || num < 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Invalid value entered for number of Team Members (must be numeric, positive)\");\n } else {\n props.action.teamCount = num;\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n type: \"number\",\n placeholder: \"Team size\",\n className: \"text-input\",\n onChange: event => setTeamSize(parseFloat(event.target.value))\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: confirmTeamSize\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/TeamSizePopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 460 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Infiltration/ui/BlinkingCursor.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: BlinkingCursor */
|
||
/*! exports used: BlinkingCursor */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlinkingCursor; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction BlinkingCursor() {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n fontSize: \"1em\"\n },\n className: \"blinking-cursor\"\n }, \"|\");\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BlinkingCursor.tsx?");
|
||
|
||
/***/ }),
|
||
/* 461 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/PersonObjects/Resleeving/Resleeving.ts ***!
|
||
\****************************************************/
|
||
/*! exports provided: purchaseResleeve, generateResleeves */
|
||
/*! exports used: generateResleeves, purchaseResleeve */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return purchaseResleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateResleeves; });\n/* harmony import */ var _Resleeve__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Resleeve */ 936);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/**\n * Implements the Re-sleeving mechanic for BitNode-10.\n * This allows the player to purchase and \"use\" new sleeves at VitaLife.\n * These new sleeves come with different starting experience and Augmentations\n * The cost of these new sleeves scales based on the exp and Augs.\n *\n * Note that this is different from the \"Sleeve mechanic\". The \"Sleeve\" mechanic\n * provides new sleeves, essentially clones. This Re-sleeving mechanic lets\n * the player purchase a new body with pre-existing Augmentations and experience\n *\n * As of right now, this feature is only available in BitNode 10\n */\n\n\n\n\n // Executes the actual re-sleeve when one is purchased\n\nfunction purchaseResleeve(r, p) {\n const cost = r.getCost();\n\n if (!p.canAfford(cost)) {\n return false;\n }\n\n p.loseMoney(cost); // Set the player's exp\n\n p.hacking_exp = r.hacking_exp;\n p.strength_exp = r.strength_exp;\n p.defense_exp = r.defense_exp;\n p.dexterity_exp = r.dexterity_exp;\n p.agility_exp = r.agility_exp;\n p.charisma_exp = r.charisma_exp; // Reset Augmentation \"owned\" data\n\n for (const augKey in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][augKey].owned = false;\n } // Clear all of the player's augmentations, except the NeuroFlux Governor\n // which is kept\n\n\n for (let i = p.augmentations.length - 1; i >= 0; --i) {\n if (p.augmentations[i].name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n p.augmentations.splice(i, 1);\n } else {\n // NeuroFlux Governor\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor].owned = true;\n }\n }\n\n for (let i = 0; i < r.augmentations.length; ++i) {\n p.augmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](r.augmentations[i].name));\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][r.augmentations[i].name].owned = true;\n } // The player's purchased Augmentations should remain the same, but any purchased\n // Augmentations that are given by the resleeve should be removed so there are no duplicates\n\n\n for (let i = p.queuedAugmentations.length - 1; i >= 0; --i) {\n const name = p.queuedAugmentations[i].name;\n\n if (p.augmentations.filter(e => {\n return e.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && e.name === name;\n }).length >= 1) {\n p.queuedAugmentations.splice(i, 1);\n }\n }\n\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles(); //Multipliers get reset, so have to re-process source files too\n\n return true;\n} // Creates all of the Re-sleeves that will be available for purchase at VitaLife\n\nfunction generateResleeves() {\n const NumResleeves = 40; // Total number of Resleeves to generate\n\n const ret = [];\n\n for (let i = 0; i < NumResleeves; ++i) {\n // i will be a number indicating how \"powerful\" the Re-sleeve should be\n const r = new _Resleeve__WEBPACK_IMPORTED_MODULE_0__[/* Resleeve */ \"a\"](); // Generate experience\n\n const expMult = 5 * i + 1;\n r.hacking_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.strength_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.defense_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.dexterity_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.agility_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.charisma_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000); // Generate Augs\n // Augmentation prequisites will be ignored for this\n\n const baseNumAugs = Math.max(2, Math.ceil((i + 3) / 2));\n const numAugs = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(baseNumAugs, baseNumAugs + 2);\n const augKeys = Object.keys(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]);\n\n for (let a = 0; a < numAugs; ++a) {\n // Get a random aug\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(0, augKeys.length - 1);\n const randKey = augKeys[randIndex]; // Forbidden augmentations\n\n if (randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill || randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n continue;\n }\n\n const randAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey];\n if (randAug === null) throw new Error(`null augmentation: ${randKey}`);\n r.augmentations.push({\n name: randAug.name,\n level: 1\n });\n r.applyAugmentation(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey]);\n r.updateStatLevels(); // Remove Augmentation so that there are no duplicates\n\n augKeys.splice(randIndex, 1);\n }\n\n ret.push(r);\n }\n\n return ret;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeving.ts?");
|
||
|
||
/***/ }),
|
||
/* 462 */
|
||
/*!********************************!*\
|
||
!*** ./src/ui/React/Modal.tsx ***!
|
||
\********************************/
|
||
/*! exports provided: Modal */
|
||
/*! exports used: Modal */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Modal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Modal */ 577);\n/* harmony import */ var _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Backdrop */ 1062);\n/* harmony import */ var _mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Fade */ 1063);\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n paper: {\n backgroundColor: theme.palette.background.paper,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: theme.shadows[5],\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\" // firefox\n\n }\n}));\nconst Modal = props => {\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n open: props.open,\n onClose: props.onClose,\n closeAfterTransition: true,\n className: classes.modal,\n BackdropComponent: _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n BackdropProps: {\n timeout: 100\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n in: props.open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.paper\n }, props.children)));\n};\n\n//# sourceURL=webpack:///./src/ui/React/Modal.tsx?");
|
||
|
||
/***/ }),
|
||
/* 463 */,
|
||
/* 464 */
|
||
/*!***********************************!*\
|
||
!*** ./src/ui/React/HashRate.tsx ***!
|
||
\***********************************/
|
||
/*! exports provided: HashRate */
|
||
/*! exports used: HashRate */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashRate; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n\n\nfunction HashRate(hashes) {\n return Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_1__[/* Hashes */ \"a\"])(`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatHashes(hashes)} / sec`);\n}\n\n//# sourceURL=webpack:///./src/ui/React/HashRate.tsx?");
|
||
|
||
/***/ }),
|
||
/* 465 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Locations/ui/TravelAgencyRoot.tsx ***!
|
||
\***********************************************/
|
||
/*! exports provided: TravelAgencyRoot */
|
||
/*! exports used: TravelAgencyRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelAgencyRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/CityNames */ 21);\n/* harmony import */ var _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TravelConfirmationPopup */ 981);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 350);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction travel(p, router, to) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost;\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to travel to ${to}`);\n return;\n }\n\n p.loseMoney(cost);\n p.travel(to);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"noselect\"\n }, \"You are now in \", to, \"!\"));\n router.toCity();\n}\n\nfunction createTravelPopup(p, router, city) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].SuppressTravelConfirmation) {\n travel(p, router, city);\n return;\n }\n\n const popupId = `travel-confirmation`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__[/* TravelConfirmationPopup */ \"a\"], {\n player: p,\n city: city,\n travel: () => travel(p, router, city),\n popupId: popupId\n });\n}\n\nfunction ASCIIWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__[/* WorldMap */ \"a\"], {\n currentCity: props.p.city,\n onTravel: city => createTravelPopup(props.p, props.router, city)\n }));\n}\n\nfunction ListWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), Object.values(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).filter(city => city != props.p.city).map(city => {\n const match = Object.entries(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).find(entry => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: city,\n onClick: () => createTravelPopup(props.p, props.router, city),\n style: {\n display: \"block\"\n },\n text: `Travel to ${city}`\n });\n }));\n}\n\nfunction TravelAgencyRoot(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Travel Agency\"), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListWorldMap, {\n p: props.p,\n router: props.router\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIIWorldMap, {\n p: props.p,\n router: props.router\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelAgencyRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 466 */,
|
||
/* 467 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/ui/React/TablePaginationActionsAll.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: TablePaginationActionsAll */
|
||
/*! exports used: TablePaginationActionsAll */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TablePaginationActionsAll; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 96);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/FirstPage */ 565);\n/* harmony import */ var _mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/KeyboardArrowLeft */ 567);\n/* harmony import */ var _mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/icons-material/KeyboardArrowRight */ 566);\n/* harmony import */ var _mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 399);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n\nfunction TablePaginationActionsAll(props) {\n const theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])();\n const {\n count,\n page,\n rowsPerPage,\n onPageChange\n } = props;\n\n const handleFirstPageButtonClick = event => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = event => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = event => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = event => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n sx: {\n flexShrink: 0,\n ml: 2.5\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleFirstPageButtonClick,\n disabled: page === 0,\n \"aria-label\": \"first page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleBackButtonClick,\n disabled: page === 0,\n \"aria-label\": \"previous page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleNextButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": \"next page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleLastPageButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": \"last page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default.a, null)));\n}\n\n//# sourceURL=webpack:///./src/ui/React/TablePaginationActionsAll.tsx?");
|
||
|
||
/***/ }),
|
||
/* 468 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Faction/formulas/favor.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: favorToRep, repToFavor */
|
||
/*! exports used: favorToRep, repToFavor */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return favorToRep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return repToFavor; });\n// The initial formulas was sum 0 to f of 500*1.02^f.\n// These formulas were derived on wolfram alpha.\n// Wolfram Alpha: sum from 0 to n of 500*1.02^n\n// 500 * ((pow(51, f+1)) / pow(50,f) - 50)\n// Then we use https://herbie.uwplse.org/demo/ to simplify it and prevent\n// Infinity issues.\nfunction favorToRep(f) {\n function fma(a, b, c) {\n return a * b + c;\n }\n\n const ex = fma(f, Math.log(51.0) - Math.log(50.0), Math.log(51.0));\n return fma(500.0, Math.exp(ex), -25000.0);\n} // Wolfram Alpha: 500 (50^(-n) 51^(n + 1) - 50) solve for n\n\nfunction repToFavor(r) {\n return -Math.log(25500 / (r + 25000)) / Math.log(51 / 50);\n}\n\n//# sourceURL=webpack:///./src/Faction/formulas/favor.ts?");
|
||
|
||
/***/ }),
|
||
/* 469 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Bladeburner/Contract.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Contract */
|
||
/*! exports used: Contract */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Contract; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 245);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass Contract extends _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"Contract\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(Contract, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.Contract = Contract;\n\n//# sourceURL=webpack:///./src/Bladeburner/Contract.ts?");
|
||
|
||
/***/ }),
|
||
/* 470 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Bladeburner/data/Help.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: ConsoleHelpText */
|
||
/*! exports used: ConsoleHelpText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ConsoleHelpText; });\nconst ConsoleHelpText = {\n helpList: [\"Use 'help [command]' to get more information about a particular Bladeburner console command.\", \"\", \" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks\", \" clear/cls Clear the console\", \" help [cmd] Display this help text, or help text for a specific command\", \" log [en/dis] [type] Enable or disable logging for events and actions\", \" skill [action] [name] Level or display info about your Bladeburner skills\", \" start [type] [name] Start a Bladeburner action/task\", \" stop Stops your current Bladeburner action/task\"],\n automate: [\"automate [var] [val] [hi/low]\", \"\", \"A simple way to automate your Bladeburner actions. This console command can be used \" + \"to automatically start an action when your stamina rises above a certain threshold, and \" + \"automatically switch to another action when your stamina drops below another threshold.\", \" automate status - Check the current status of your automation and get a brief description of what it'll do\", \" automate en - Enable the automation feature\", \" automate dis - Disable the automation feature\", \"\", \"There are four properties that must be set for this automation to work properly. Here is how to set them:\", \"\", \" automate stamina 100 high\", \" automate contract Tracking high\", \" automate stamina 50 low\", \" automate general 'Field Analysis' low\", \"\", \"Using the four console commands above will set the automation to perform Tracking contracts \" + \"if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below \" + \"50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must \" + \"exactly match whatever the name is in the UI.\"],\n clear: [\"clear\", \"\", \"Clears the console\"],\n cls: [\"cls\", \"\", \"Clears the console\"],\n help: [\"help [command]\", \"\", \"Running 'help' with no arguments displays the general help text, which lists all console commands \" + \"and a brief description of what they do. A command can be specified to get more specific help text \" + \"about that particular command. For example:\", \"\", \" help automate\", \"\", \"will display specific information about using the automate console command\"],\n log: [\"log [en/dis] [type]\", \"\", \"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged \" + \"in the console. There are also random events that are logged in the console as well. The five categories of \" + \"things that get logged are:\", \"\", \"[general, contracts, ops, blackops, events]\", \"\", \"The logging for these categories can be enabled or disabled like so:\", \"\", \" log dis contracts - Disables logging that occurs when contracts are completed\", \" log en contracts - Enables logging that occurs when contracts are completed\", \" log dis events - Disables logging for Bladeburner random events\", \"\", \"Logging can be universally enabled/disabled using the 'all' keyword:\", \"\", \" log dis all\", \" log en all\"],\n skill: [\"skill [action] [name]\", \"\", \"Level or display information about your skills.\", \"\", \"To display information about all of your skills and your multipliers, use:\", \"\", \" skill list\", \"\", \"To display information about a specific skill, specify the name of the skill afterwards. \" + \"Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If \" + \"the name of the skill has whitespace, enclose the name of the skill in double quotation marks:\", \"\", \" skill list Reaper<br>\" + \" skill list 'Digital Observer'\", \"\", \"This console command can also be used to level up skills:\", \"\", \" skill level [skill name]\"],\n start: [\"start [type] [name]\", \"\", \"Start an action. An action is specified by its type and its name. The \" + \"name is case-sensitive. It must appear exactly as it does in the UI. If \" + \"the name of the action has whitespace, enclose it in double quotation marks. \" + \"Valid action types include:\", \"\", \"[general, contract, op, blackop]\", \"\", \"Examples:\", \"\", \" start contract Tracking\", \" start op 'Undercover Operation'\"],\n stop: [\"stop\", \"\", \"Stop your current action and go idle.\"]\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Help.ts?");
|
||
|
||
/***/ }),
|
||
/* 471 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Corporation/ResearchTree.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: Node, ResearchTree */
|
||
/*! exports used: Node, ResearchTree */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ResearchTree; });\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ResearchMap */ 285);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Defines a \"Research Tree\"\n// Each Industry has a unique Research Tree\n// Each Node in the Research Trees only holds the name(s) of Research,\n// not an actual Research object. The name can be used to obtain a reference\n// to the corresponding Research object using the ResearchMap\n\n\nclass Node {\n // All child Nodes in the tree\n // The Research held in this Node is a prerequisite for all Research in\n // child Nodes\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n // Whether or not this Research has been unlocked\n // Parent node in the tree\n // The parent node defines the prerequisite Research (there can only be one)\n // Set as null for no prerequisites\n // Name of the Research held in this Node\n constructor(p = {\n cost: 0,\n text: \"\"\n }) {\n _defineProperty(this, \"children\", []);\n\n _defineProperty(this, \"cost\", 0);\n\n _defineProperty(this, \"researched\", false);\n\n _defineProperty(this, \"parent\", null);\n\n _defineProperty(this, \"text\", \"\");\n\n if (_ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][p.text] == null) {\n throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${p.text}`);\n }\n\n this.text = p.text;\n this.cost = p.cost;\n\n if (p.children && p.children.length > 0) {\n this.children = p.children;\n }\n\n if (p.parent != null) {\n this.parent = p.parent;\n }\n }\n\n addChild(n) {\n this.children.push(n);\n n.parent = this;\n } // Return an object that describes a TreantJS-compatible markup/config for this Node\n // See: http://fperucic.github.io/treant-js/\n\n\n createTreantMarkup() {\n const childrenArray = [];\n\n for (let i = 0; i < this.children.length; ++i) {\n childrenArray.push(this.children[i].createTreantMarkup());\n } // Determine what css class this Node should have in the diagram\n\n\n let htmlClass = \"tooltip\";\n\n if (this.researched) {\n htmlClass += \" researched\";\n } else if (this.parent && this.parent.researched === false) {\n htmlClass += \" locked\";\n } else {\n htmlClass += \" unlocked\";\n }\n\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][this.text];\n const sanitizedName = this.text.replace(/\\s/g, \"\");\n return {\n children: childrenArray,\n HTMLclass: htmlClass,\n innerHTML: `<div id=\"${sanitizedName}-corp-research-click-listener\">` + `${this.text}<br>${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(this.cost, \"0,0\")} Scientific Research` + `<span class=\"tooltiptext\">` + `${research.desc}` + `</span>` + `</div>`,\n text: {\n name: this.text\n }\n };\n } // Recursive function for finding a Node with the specified text\n\n\n findNode(text) {\n // Is this the Node?\n if (this.text === text) {\n return this;\n } // Recursively search chilren\n\n\n let res = null;\n\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n) {\n this.parent = n;\n }\n\n} // A ResearchTree defines all available Research in an Industry\n// The root node in a Research Tree must always be the \"Hi-Tech R&D Laboratory\"\n\nclass ResearchTree {\n constructor() {\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"root\", null);\n }\n\n // Return an object that contains a Tree markup for TreantJS (using the JSON approach)\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup() {\n if (this.root == null) {\n return {};\n }\n\n const treeMarkup = this.root.createTreantMarkup();\n return {\n chart: {\n container: \"\"\n },\n nodeStructure: treeMarkup\n };\n } // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n\n\n getAllNodes() {\n const res = [];\n const queue = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift();\n\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n } // Get total multipliers from this Research Tree\n\n\n getAdvertisingMultiplier() {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier() {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier() {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier() {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier() {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier() {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier() {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier() {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier() {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier() {\n return this.getMultiplierHelper(\"storageMult\");\n } // Helper function for all the multiplier getter fns\n\n\n getMultiplierHelper(propName) {\n let res = 1;\n\n if (this.root == null) {\n return res;\n }\n\n const queue = [];\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift(); // If the Node has not been researched, there's no need to\n // process it or its children\n\n if (node == null || !node.researched) {\n continue;\n }\n\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][node.text]; // Safety checks\n\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult = research[propName];\n\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n } // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n\n\n findNode(name) {\n if (this.root == null) {\n return null;\n }\n\n return this.root.findNode(name);\n } // Marks a Node as researched\n\n\n research(name) {\n if (this.root == null) {\n return;\n }\n\n const queue = [];\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift();\n\n if (node == null) {\n continue;\n }\n\n if (node.text === name) {\n node.researched = true;\n this.researched[name] = true;\n return;\n }\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n console.warn(`ResearchTree.research() did not find the specified Research node for: ${name}`);\n } // Set the tree's Root Node\n\n\n setRoot(root) {\n this.root = root;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Corporation/ResearchTree.ts?");
|
||
|
||
/***/ }),
|
||
/* 472 */,
|
||
/* 473 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/StockMarket/StockMarketConstants.ts ***!
|
||
\*************************************************/
|
||
/*! exports provided: TicksPerCycle */
|
||
/*! exports used: TicksPerCycle */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TicksPerCycle; });\n/**\n * How many stock market 'ticks' before a 'cycle' is triggered.\n * A 'tick' is whenver stock prices update\n */\nconst TicksPerCycle = 75;\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketConstants.ts?");
|
||
|
||
/***/ }),
|
||
/* 474 */,
|
||
/* 475 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Company/GetNextCompanyPosition.ts ***!
|
||
\***********************************************/
|
||
/*! exports provided: getNextCompanyPositionHelper */
|
||
/*! exports used: getNextCompanyPositionHelper */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getNextCompanyPositionHelper; });\n/* harmony import */ var _CompanyPositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CompanyPositions */ 63);\n// Function that returns the next Company Position in the \"ladder\"\n// i.e. the next position to get promoted to\n\nfunction getNextCompanyPositionHelper(currPos) {\n if (currPos == null) {\n return null;\n }\n\n const nextPosName = currPos.nextPosition;\n\n if (nextPosName == null) {\n return null;\n }\n\n return _CompanyPositions__WEBPACK_IMPORTED_MODULE_0__[/* CompanyPositions */ \"a\"][nextPosName];\n}\n\n//# sourceURL=webpack:///./src/Company/GetNextCompanyPosition.ts?");
|
||
|
||
/***/ }),
|
||
/* 476 */
|
||
/*!************************************!*\
|
||
!*** ./src/ui/createStatusText.ts ***!
|
||
\************************************/
|
||
/*! exports provided: createStatusText */
|
||
/*! exports used: createStatusText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createStatusText; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/uiHelpers/getElementById */ 210);\n\n\nconst threeSeconds = 3000;\nlet x;\n/**\n * Displays a status message to the player for approximately 3 seconds.\n * @param text The status text to display\n */\n\nfunction createStatusText(text) {\n if (x !== undefined) {\n clearTimeout(x); // Likely not needed due to clearTimeout, but just in case...\n\n x = undefined;\n }\n\n const statusElement = Object(_utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(\"status-text\");\n statusElement.style.display = \"block\";\n statusElement.classList.add(\"status-text\");\n statusElement.innerText = text;\n\n const handler = () => {\n statusElement.innerText = \"\";\n statusElement.style.display = \"none\";\n statusElement.classList.remove(\"status-text\");\n };\n\n x = Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(handler, threeSeconds);\n}\n\n//# sourceURL=webpack:///./src/ui/createStatusText.ts?");
|
||
|
||
/***/ }),
|
||
/* 477 */,
|
||
/* 478 */,
|
||
/* 479 */,
|
||
/* 480 */,
|
||
/* 481 */,
|
||
/* 482 */,
|
||
/* 483 */,
|
||
/* 484 */,
|
||
/* 485 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Corporation/ui/HeaderTab.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: HeaderTab */
|
||
/*! exports used: HeaderTab */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HeaderTab; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction HeaderTab(props) {\n let className = \"cmpy-mgmt-header-tab\";\n\n if (props.current) {\n className += \" current\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: props.onClick\n }, props.text);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/HeaderTab.tsx?");
|
||
|
||
/***/ }),
|
||
/* 486 */,
|
||
/* 487 */
|
||
/*!************************************!*\
|
||
!*** ./src/ui/React/MuiButton.tsx ***!
|
||
\************************************/
|
||
/*! exports provided: MuiButton */
|
||
/*! exports used: MuiButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 48);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n // Tries to emulate StdButton in buttons.scss\n root: {\n backgroundColor: \"#555\",\n border: \"1px solid #333\",\n color: \"white\",\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: \"#666\"\n },\n borderRadius: 0\n },\n textPrimary: {\n color: \"rgb( 144, 202, 249)\"\n },\n textSecondary: {\n color: \"rgb(244, 143, 177)\"\n },\n disabled: {\n backgroundColor: \"#333\",\n color: \"#fff\",\n cursor: \"default\"\n }\n});\nconst MuiButton = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 488 */,
|
||
/* 489 */,
|
||
/* 490 */,
|
||
/* 491 */,
|
||
/* 492 */,
|
||
/* 493 */,
|
||
/* 494 */,
|
||
/* 495 */,
|
||
/* 496 */,
|
||
/* 497 */,
|
||
/* 498 */,
|
||
/* 499 */,
|
||
/* 500 */,
|
||
/* 501 */,
|
||
/* 502 */,
|
||
/* 503 */,
|
||
/* 504 */,
|
||
/* 505 */,
|
||
/* 506 */,
|
||
/* 507 */,
|
||
/* 508 */,
|
||
/* 509 */,
|
||
/* 510 */,
|
||
/* 511 */,
|
||
/* 512 */,
|
||
/* 513 */,
|
||
/* 514 */,
|
||
/* 515 */,
|
||
/* 516 */,
|
||
/* 517 */,
|
||
/* 518 */,
|
||
/* 519 */,
|
||
/* 520 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Bladeburner/data/Growths.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: Growths */
|
||
/*! exports used: Growths */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Growths; });\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n\nconst Growths = {\n Tracking: () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(5, 75) / 10,\n \"Bounty Hunter\": () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(5, 75) / 10,\n Retirement: () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(5, 75) / 10,\n Investigation: () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(10, 40) / 10,\n \"Undercover Operation\": () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(10, 40) / 10,\n \"Sting Operation\": () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 40) / 10,\n Raid: () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(2, 40) / 10,\n \"Stealth Retirement Operation\": () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 20) / 10,\n Assassination: () => Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 20) / 10\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Growths.ts?");
|
||
|
||
/***/ }),
|
||
/* 521 */
|
||
/*!********************************************!*\
|
||
!*** ./src/utils/helpers/isValidNumber.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: isValidNumber */
|
||
/*! exports used: isValidNumber */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isValidNumber; });\n/**\n * Checks that a variable is a valid number. A valid number\n * must be a \"number\" type and cannot be NaN\n */\nfunction isValidNumber(n) {\n return typeof n === \"number\" && !isNaN(n);\n}\n\n//# sourceURL=webpack:///./src/utils/helpers/isValidNumber.ts?");
|
||
|
||
/***/ }),
|
||
/* 522 */
|
||
/*!********************************!*\
|
||
!*** ./src/Terminal/Parser.ts ***!
|
||
\********************************/
|
||
/*! exports provided: ParseCommands, ParseCommand */
|
||
/*! exports used: ParseCommand, ParseCommands */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ParseCommands; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ParseCommand; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Alias */ 87);\n // Helper function that checks if an argument (which is a string) is a valid number\n\nfunction isNumber(str) {\n if (typeof str != \"string\") {\n return false;\n } // Only process strings\n\n\n return !isNaN(parseFloat(str));\n}\n\nfunction ParseCommands(commands) {\n // Sanitize input\n commands = commands.trim(); // Replace all extra whitespace in command with a single space\n\n commands = commands.replace(/\\s\\s+/g, \" \");\n const match = commands.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g);\n if (!match) return []; // Split commands and execute sequentially\n\n const allCommands = match.map(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* substituteAliases */ \"h\"]).map(c => c.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g)).flat();\n const out = [];\n\n for (const c of allCommands) {\n if (c === null) continue;\n\n if (c.match(/^\\s*$/)) {\n continue;\n } // Don't run commands that only have whitespace\n\n\n out.push(c.trim());\n }\n\n return out;\n}\nfunction ParseCommand(command) {\n // This will be used to keep track of whether we're in a quote. This is for situations\n // like the alias command:\n // alias run=\"run NUKE.exe\"\n // We want the run=\"run NUKE.exe\" to be parsed as a single command, so this flag\n // will keep track of whether we have a quote in\n let inQuote = ``; // Returns an array with the command and its arguments in each index\n // Properly handles quotation marks (e.g. `run foo.script \"the sun\"` will return [run, foo.script, the sun])\n\n const args = [];\n let start = 0,\n i = 0;\n let prevChar = \"\"; // Previous character\n\n while (i < command.length) {\n let escaped = false; // Check for escaped quotation marks\n\n if (i >= 1) {\n prevChar = command.charAt(i - 1);\n\n if (prevChar === \"\\\\\") {\n escaped = true;\n }\n }\n\n const c = command.charAt(i);\n\n if (c === '\"') {\n // Double quotes\n if (!escaped && prevChar === \" \") {\n const endQuote = command.indexOf('\"', i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else {\n if (inQuote === ``) {\n inQuote = `\"`;\n } else if (inQuote === `\"`) {\n inQuote = ``;\n }\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n if (!escaped && prevChar === \" \") {\n const endQuote = command.indexOf(\"'\", i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else {\n if (inQuote === ``) {\n inQuote = `'`;\n } else if (inQuote === `'`) {\n inQuote = ``;\n }\n }\n } else if (c === \" \" && inQuote === ``) {\n const arg = command.substr(start, i - start); // If this is a number, convert it from a string to number\n\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else {\n args.push(arg);\n }\n\n start = i + 1;\n }\n\n ++i;\n } // Add the last argument\n\n\n if (start !== i) {\n const arg = command.substr(start, i - start); // If this is a number, convert it from string to number\n\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else {\n args.push(arg);\n }\n }\n\n return args;\n}\n\n//# sourceURL=webpack:///./src/Terminal/Parser.ts?");
|
||
|
||
/***/ }),
|
||
/* 523 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/free.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: free */
|
||
/*! exports used: free */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return free; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\nfunction free(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of free command. Usage: free\");\n return;\n }\n\n const ram = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatRAM(player.getCurrentServer().maxRam);\n const used = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatRAM(player.getCurrentServer().ramUsed);\n const avail = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatRAM(player.getCurrentServer().maxRam - player.getCurrentServer().ramUsed);\n const maxLength = Math.max(ram.length, Math.max(used.length, avail.length));\n const usedPercent = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(player.getCurrentServer().ramUsed / player.getCurrentServer().maxRam);\n terminal.print(`Total: ${\" \".repeat(maxLength - ram.length)}${ram}`);\n terminal.print(`Used: ${\" \".repeat(maxLength - used.length)}${used} (${usedPercent})`);\n terminal.print(`Available: ${\" \".repeat(maxLength - avail.length)}${avail}`);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/free.ts?");
|
||
|
||
/***/ }),
|
||
/* 524 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Terminal/commands/ls.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: ls */
|
||
/*! exports used: ls */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ls; });\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Message/Message */ 97);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Terminal/DirectoryHelpers */ 86);\n\n\nfunction ls(terminal, router, player, server, args) {\n const numArgs = args.length;\n\n function incorrectUsage() {\n terminal.error(\"Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]\");\n }\n\n if (numArgs > 5 || numArgs === 3) {\n return incorrectUsage();\n } // Grep\n\n\n let filter = \"\"; // Grep\n // Directory path\n\n let prefix = terminal.cwd();\n\n if (!prefix.endsWith(\"/\")) {\n prefix += \"/\";\n } // If there are 4+ arguments, then the last 3 must be for grep\n\n\n if (numArgs >= 4) {\n if (args[numArgs - 1] !== \"grep\" || args[numArgs - 2] !== \"|\") {\n return incorrectUsage();\n }\n\n filter = args[numArgs] + \"\";\n } // If the second argument is not a pipe, then it must be for listing a directory\n\n\n if (numArgs >= 2 && args[0] !== \"|\") {\n const newPath = Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_1__[/* evaluateDirectoryPath */ \"a\"])(args[0] + \"\", terminal.cwd());\n prefix = newPath ? newPath : \"\";\n\n if (prefix != null) {\n if (!prefix.endsWith(\"/\")) {\n prefix += \"/\";\n }\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_1__[/* isValidDirectoryPath */ \"f\"])(prefix)) {\n return incorrectUsage();\n }\n }\n } // Root directory, which is the same as no 'prefix' at all\n\n\n if (prefix === \"/\") {\n prefix = \"\";\n } // Display all programs and scripts\n\n\n const allPrograms = [];\n const allScripts = [];\n const allTextFiles = [];\n const allContracts = [];\n const allMessages = [];\n const folders = [];\n\n function handleFn(fn, dest) {\n let parsedFn = fn;\n\n if (prefix) {\n if (!fn.startsWith(prefix)) {\n return;\n } else {\n parsedFn = fn.slice(prefix.length, fn.length);\n }\n }\n\n if (filter && !parsedFn.includes(filter)) {\n return;\n } // If the fn includes a forward slash, it must be in a subdirectory.\n // Therefore, we only list the \"first\" directory in its path\n\n\n if (parsedFn.includes(\"/\")) {\n const firstParentDir = Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getFirstParentDirectory */ \"d\"])(parsedFn);\n\n if (filter && !firstParentDir.includes(filter)) {\n return;\n }\n\n if (!folders.includes(firstParentDir)) {\n folders.push(firstParentDir);\n }\n\n return;\n }\n\n dest.push(parsedFn);\n } // Get all of the programs and scripts on the machine into one temporary array\n\n\n const s = player.getCurrentServer();\n\n for (const program of s.programs) handleFn(program, allPrograms);\n\n for (const script of s.scripts) handleFn(script.filename, allScripts);\n\n for (const txt of s.textFiles) handleFn(txt.fn, allTextFiles);\n\n for (const contract of s.contracts) handleFn(contract.fn, allContracts);\n\n for (const msgOrLit of s.messages) msgOrLit instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"] ? handleFn(msgOrLit.filename, allMessages) : handleFn(msgOrLit, allMessages); // Sort the files/folders alphabetically then print each\n\n\n allPrograms.sort();\n allScripts.sort();\n allTextFiles.sort();\n allContracts.sort();\n allMessages.sort();\n folders.sort();\n\n function postSegments(segments) {\n const maxLength = Math.max(...segments.map(s => s.length)) + 1;\n const filesPerRow = Math.floor(80 / maxLength);\n\n for (let i = 0; i < segments.length; i++) {\n let row = \"\";\n\n for (let col = 0; col < filesPerRow; col++) {\n if (!(i < segments.length)) break;\n row += segments[i];\n row += \" \".repeat(maxLength * (col + 1) - row.length);\n i++;\n }\n\n i--;\n terminal.print(row);\n }\n }\n\n const groups = [{\n segments: folders\n }, {\n segments: allMessages\n }, {\n segments: allTextFiles\n }, {\n segments: allPrograms\n }, {\n segments: allContracts\n }, {\n segments: allScripts\n }].filter(g => g.segments.length > 0);\n\n for (let i = 0; i < groups.length; i++) {\n if (i !== 0) {\n terminal.print(\"\");\n terminal.print(\"\");\n }\n\n postSegments(groups[i].segments);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/ls.tsx?");
|
||
|
||
/***/ }),
|
||
/* 525 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Terminal/commands/run.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: run */
|
||
/*! exports used: run */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return run; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _runScript__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./runScript */ 687);\n/* harmony import */ var _runProgram__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./runProgram */ 688);\n\n\n\nfunction run(terminal, router, player, server, args) {\n // Run a program or a script\n if (args.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...\");\n } else {\n const executableName = args[0] + \"\"; // Secret Music player!\n // if (executableName === \"musicplayer\") {\n // post(\n // '<iframe src=\"https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh\" width=\"300\" height=\"380\" frameborder=\"0\" allowtransparency=\"true\"></iframe>',\n // false,\n // );\n // return;\n // }\n // Check if its a script or just a program/executable\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(executableName)) {\n Object(_runScript__WEBPACK_IMPORTED_MODULE_1__[/* runScript */ \"a\"])(terminal, router, player, server, args);\n } else if (executableName.endsWith(\".cct\")) {\n terminal.runContract(player, executableName);\n } else {\n Object(_runProgram__WEBPACK_IMPORTED_MODULE_2__[/* runProgram */ \"a\"])(terminal, router, player, server, args);\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/run.ts?");
|
||
|
||
/***/ }),
|
||
/* 526 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/scan.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: scan */
|
||
/*! exports used: scan */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return scan; });\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n\nfunction scan(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of netstat/scan command. Usage: netstat/scan\");\n return;\n } // Displays available network connections using TCP\n\n\n const currServ = player.getCurrentServer();\n const servers = currServ.serversOnNetwork.map((_, i) => {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getServerOnNetwork */ \"c\"])(currServ, i);\n if (server === null) throw new Error(\"Server should not be null\");\n return {\n hostname: server.hostname,\n ip: server.ip,\n hasRoot: server.hasAdminRights ? \"Y\" : \"N\"\n };\n });\n servers.unshift({\n hostname: \"Hostname\",\n ip: \"IP\",\n hasRoot: \"Root Access\"\n });\n const maxHostname = Math.max(...servers.map(s => s.hostname.length));\n const maxIP = Math.max(...servers.map(s => s.ip.length));\n\n for (const server of servers) {\n if (!server) continue;\n let entry = server.hostname;\n entry += \" \".repeat(maxHostname - server.hostname.length + 1);\n entry += server.ip;\n entry += \" \".repeat(maxIP - server.ip.length + 1);\n entry += server.hasRoot;\n terminal.print(entry);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/scan.ts?");
|
||
|
||
/***/ }),
|
||
/* 527 */
|
||
/*!**********************************!*\
|
||
!*** ./src/StockMarket/Order.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: Order */
|
||
/*! exports used: Order */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Order; });\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\n\n\n\nclass Order {\n constructor(stockSymbol = \"\", shares = 0, price = 0, typ = _data_OrderTypes__WEBPACK_IMPORTED_MODULE_0__[/* OrderTypes */ \"a\"].LimitBuy, pos = _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long) {\n // Validate arguments\n let invalidArgs = false;\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n /**\n * Serialize the Order to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Order\", this);\n }\n /**\n * Initializes a Order from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Order, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Order = Order;\n\n//# sourceURL=webpack:///./src/StockMarket/Order.ts?");
|
||
|
||
/***/ }),
|
||
/* 528 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Locations/Location.ts ***!
|
||
\***********************************/
|
||
/*! exports provided: Location */
|
||
/*! exports used: Location */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Location; });\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/LocationNames */ 9);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Class representing a visitable location in the world\n */\n\nclass Location {\n /**\n * Name of city this location is in. If this property is null, it means this i\n * is a generic location that is available in all cities\n */\n\n /**\n * Cost multiplier that influences how expensive a gym/university is\n */\n\n /**\n * Exp multiplier that influences how effective a gym/university is\n */\n\n /**\n * Identifier for location\n */\n\n /**\n * List of what type(s) this location is. A location can be multiple types\n * (e.g. company and tech vendor)\n */\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n constructor(p) {\n _defineProperty(this, \"city\", null);\n\n _defineProperty(this, \"costMult\", 0);\n\n _defineProperty(this, \"expMult\", 0);\n\n _defineProperty(this, \"name\", _data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Void);\n\n _defineProperty(this, \"types\", []);\n\n _defineProperty(this, \"techVendorMaxRam\", 0);\n\n _defineProperty(this, \"techVendorMinRam\", 0);\n\n if (p.city) {\n this.city = p.city;\n }\n\n if (p.costMult) {\n this.costMult = p.costMult;\n }\n\n if (p.expMult) {\n this.expMult = p.expMult;\n }\n\n if (p.infiltrationData) {\n this.infiltrationData = p.infiltrationData;\n }\n\n if (p.name) {\n this.name = p.name;\n }\n\n if (p.types) {\n this.types = p.types;\n }\n\n if (p.techVendorMaxRam) {\n this.techVendorMaxRam = p.techVendorMaxRam;\n }\n\n if (p.techVendorMinRam) {\n this.techVendorMinRam = p.techVendorMinRam;\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/Location.ts?");
|
||
|
||
/***/ }),
|
||
/* 529 */
|
||
/*!******************************************************!*\
|
||
!*** ./utils/uiHelpers/removeChildrenFromElement.ts ***!
|
||
\******************************************************/
|
||
/*! exports provided: removeChildrenFromElement */
|
||
/*! exports used: removeChildrenFromElement */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeChildrenFromElement; });\n/* harmony import */ var _helpers_isString__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isString */ 82);\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getElementById */ 210);\n\n\n/**\n * Clears out all children from the provided element.\n * If a string is passed in, it will treat it as an ID and search for the element to delete all children from.\n * @param el The element or ID of an element to remove all children from.\n */\n\nfunction removeChildrenFromElement(el) {\n if (el === null) {\n return;\n }\n\n try {\n const elem = Object(_helpers_isString__WEBPACK_IMPORTED_MODULE_0__[/* isString */ \"a\"])(el) ? Object(_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(el) : el;\n\n if (elem instanceof Element) {\n while (elem.firstChild !== null) {\n elem.removeChild(elem.firstChild);\n }\n }\n } catch (e) {\n // tslint:disable-next-line:no-console\n console.debug(e);\n return;\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeChildrenFromElement.ts?");
|
||
|
||
/***/ }),
|
||
/* 530 */,
|
||
/* 531 */,
|
||
/* 532 */,
|
||
/* 533 */,
|
||
/* 534 */,
|
||
/* 535 */,
|
||
/* 536 */,
|
||
/* 537 */,
|
||
/* 538 */,
|
||
/* 539 */,
|
||
/* 540 */,
|
||
/* 541 */,
|
||
/* 542 */,
|
||
/* 543 */,
|
||
/* 544 */,
|
||
/* 545 */,
|
||
/* 546 */,
|
||
/* 547 */,
|
||
/* 548 */,
|
||
/* 549 */,
|
||
/* 550 */,
|
||
/* 551 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Corporation/ui/CityTab.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: CityTab */
|
||
/*! exports used: CityTab */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CityTab; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction CityTab(props) {\n let className = \"cmpy-mgmt-city-tab\";\n\n if (props.current) {\n className += \" current\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: props.onClick\n }, props.name);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CityTab.tsx?");
|
||
|
||
/***/ }),
|
||
/* 552 */
|
||
/*!******************************************!*\
|
||
!*** ./utils/uiHelpers/getSelectData.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: getSelectValue, getSelectText */
|
||
/*! exports used: getSelectText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export getSelectValue */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getSelectText; });\nfunction getSelectValue(selector) {\n if (selector == null) {\n return \"\";\n }\n\n if (selector.options.length <= 0) {\n return \"\";\n }\n\n if (selector.selectedIndex < 0) {\n return \"\";\n }\n\n return selector.options[selector.selectedIndex].value;\n}\nfunction getSelectText(selector) {\n if (selector == null) {\n return \"\";\n }\n\n if (selector.options.length <= 0) {\n return \"\";\n }\n\n if (selector.selectedIndex < 0) {\n return \"\";\n }\n\n return selector.options[selector.selectedIndex].text;\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/getSelectData.ts?");
|
||
|
||
/***/ }),
|
||
/* 553 */,
|
||
/* 554 */,
|
||
/* 555 */,
|
||
/* 556 */,
|
||
/* 557 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/ui/React/ServerDropdown.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: ServerType, ServerDropdown */
|
||
/*! exports used: ServerDropdown, ServerType */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ServerType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerDropdown; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/**\n * Creates a dropdown (select HTML element) with server hostnames as options\n *\n * Configurable to only contain certain types of servers\n */\n\n\n\n // TODO make this an enum when this gets converted to TypeScript\n\nconst ServerType = {\n All: 0,\n Foreign: 1,\n // Hackable, non-owned servers\n Owned: 2,\n // Home Computer, Purchased Servers, and Hacknet Servers\n Purchased: 3 // Everything from Owned except home computer\n\n};\nfunction ServerDropdown(props) {\n /**\n * Checks if the server should be shown in the dropdown menu, based on the\n * 'serverType' property\n */\n function isValidServer(s) {\n const purchased = s instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_2__[/* Server */ \"a\"] && s.purchasedByPlayer;\n const type = props.serverType;\n\n switch (type) {\n case ServerType.All:\n return true;\n\n case ServerType.Foreign:\n return s.hostname !== \"home\" && !purchased;\n\n case ServerType.Owned:\n return purchased || s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServer */ \"a\"] || s.hostname === \"home\";\n\n case ServerType.Purchased:\n return purchased || s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServer */ \"a\"];\n\n default:\n console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);\n return false;\n }\n }\n\n const servers = [];\n\n for (const serverName in _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"][serverName];\n\n if (isValidServer(server)) {\n servers.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: server.hostname,\n value: server.hostname\n }, server.hostname));\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: props.onChange,\n style: props.style\n }, servers);\n}\n\n//# sourceURL=webpack:///./src/ui/React/ServerDropdown.tsx?");
|
||
|
||
/***/ }),
|
||
/* 558 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Locations/ui/GenericLocation.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: GenericLocation */
|
||
/*! exports used: GenericLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GenericLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CompanyLocation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyLocation */ 968);\n/* harmony import */ var _GymLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GymLocation */ 970);\n/* harmony import */ var _HospitalLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HospitalLocation */ 971);\n/* harmony import */ var _SlumsLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SlumsLocation */ 972);\n/* harmony import */ var _SpecialLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SpecialLocation */ 973);\n/* harmony import */ var _TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TechVendorLocation */ 975);\n/* harmony import */ var _TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TravelAgencyRoot */ 465);\n/* harmony import */ var _UniversityLocation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UniversityLocation */ 982);\n/* harmony import */ var _CasinoLocation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CasinoLocation */ 983);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LocationTypeEnum */ 41);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/React/CorruptableText */ 991);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction GenericLocation({\n loc\n}) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Router();\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Player();\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n\n function getLocationSpecificContent() {\n const content = [];\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Company)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CompanyLocation__WEBPACK_IMPORTED_MODULE_1__[/* CompanyLocation */ \"a\"], {\n key: \"companylocation\",\n locName: loc.name\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Gym)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GymLocation__WEBPACK_IMPORTED_MODULE_2__[/* GymLocation */ \"a\"], {\n key: \"gymlocation\",\n loc: loc,\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Hospital)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_HospitalLocation__WEBPACK_IMPORTED_MODULE_3__[/* HospitalLocation */ \"a\"], {\n key: \"hospitallocation\",\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Slums)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SlumsLocation__WEBPACK_IMPORTED_MODULE_4__[/* SlumsLocation */ \"a\"], {\n key: \"slumslocation\"\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Special)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SpecialLocation__WEBPACK_IMPORTED_MODULE_5__[/* SpecialLocation */ \"a\"], {\n key: \"speciallocation\",\n loc: loc\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TechVendor)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__[/* TechVendorLocation */ \"a\"], {\n key: \"techvendorlocation\",\n loc: loc,\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TravelAgency)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__[/* TravelAgencyRoot */ \"a\"], {\n key: \"travelagencylocation\",\n p: player,\n router: router\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].University)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_UniversityLocation__WEBPACK_IMPORTED_MODULE_8__[/* UniversityLocation */ \"a\"], {\n key: \"universitylocation\",\n loc: loc\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Casino)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CasinoLocation__WEBPACK_IMPORTED_MODULE_9__[/* CasinoLocation */ \"a\"], {\n key: \"casinoLocation\",\n p: player\n }));\n }\n\n return content;\n }\n\n const locContent = getLocationSpecificContent();\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"].getIp(loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(ip);\n const backdoorInstalled = server !== null && Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* isBackdoorInstalled */ \"d\"])(server);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__[/* StdButton */ \"a\"], {\n onClick: () => router.toCity(),\n style: {\n display: \"block\"\n },\n text: \"Return to World\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", {\n className: \"noselect\"\n }, backdoorInstalled && !_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].DisableTextEffects ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__[/* CorruptableText */ \"a\"], {\n content: loc.name\n }) : loc.name), locContent);\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GenericLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 559 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Casino/CardDeck/ReactCard.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: ReactCard */
|
||
/*! exports used: ReactCard */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ReactCard; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Card */ 190);\n\n\nconst ReactCard = ({\n card,\n hidden\n}) => {\n let suit;\n\n switch (card.suit) {\n case _Card__WEBPACK_IMPORTED_MODULE_1__[/* Suit */ \"b\"].Clubs:\n suit = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"\\u2663\");\n break;\n\n case _Card__WEBPACK_IMPORTED_MODULE_1__[/* Suit */ \"b\"].Diamonds:\n suit = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"\\u2666\");\n break;\n\n case _Card__WEBPACK_IMPORTED_MODULE_1__[/* Suit */ \"b\"].Hearts:\n suit = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"\\u2665\");\n break;\n\n case _Card__WEBPACK_IMPORTED_MODULE_1__[/* Suit */ \"b\"].Spades:\n suit = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"\\u2660\");\n break;\n\n default:\n throw new Error(`MissingCaseException: ${card.suit}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: `casino-card ${card.isRedSuit() ? \"red\" : \"black\"}`\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"value\"\n }, hidden ? \" - \" : card.formatValue()), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: `suit`\n }, hidden ? \" - \" : suit)));\n};\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/ReactCard.tsx?");
|
||
|
||
/***/ }),
|
||
/* 560 */
|
||
/*!***********************************!*\
|
||
!*** ./src/ui/React/MuiPaper.tsx ***!
|
||
\***********************************/
|
||
/*! exports provided: MuiPaper */
|
||
/*! exports used: MuiPaper */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiPaper; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 258);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n backgroundColor: \"rgb(30, 30, 30)\",\n border: \"2px solid #000\",\n borderRadius: \"10px\",\n display: \"inline-block\",\n flexWrap: \"wrap\",\n padding: \"10px\"\n }\n});\nconst MuiPaper = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiPaper.tsx?");
|
||
|
||
/***/ }),
|
||
/* 561 */,
|
||
/* 562 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/ScriptEditor/CursorPositions.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: PositionTracker, CursorPositions */
|
||
/*! exports used: CursorPositions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export PositionTracker */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CursorPositions; });\nclass PositionTracker {\n constructor() {\n this.positions = new Map();\n }\n\n saveCursor(filename, pos) {\n this.positions.set(filename, pos);\n }\n\n getCursor(filename) {\n const position = this.positions.get(filename);\n\n if (!position) {\n return {\n row: -1,\n column: -1\n };\n }\n\n return position;\n }\n\n}\nconst CursorPositions = new PositionTracker();\n\n//# sourceURL=webpack:///./src/ScriptEditor/CursorPositions.ts?");
|
||
|
||
/***/ }),
|
||
/* 563 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/ScriptEditor/NetscriptDefinitions.ts ***!
|
||
\**************************************************/
|
||
/*! exports provided: libSource */
|
||
/*! exports used: libSource */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return libSource; });\nconst libSource = `interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise<string>;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise<void>;\n grow(ip: string, threads: number, stock: boolean): Promise<string>;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise<string>;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise<boolean>;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise<string>;\n installBackdoor(): Promise<void>;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationPrereq(name: string): string[];\n getAugmentationPrice(name: string): number;\n getAugmentationRepReq(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}`;\n\n//# sourceURL=webpack:///./src/ScriptEditor/NetscriptDefinitions.ts?");
|
||
|
||
/***/ }),
|
||
/* 564 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Milestones/Milestones.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: Milestones */
|
||
/*! exports used: Milestones */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Milestones; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n\n\n\nfunction allFactionAugs(p, f) {\n const factionAugs = f.augmentations.slice().filter(aug => aug !== \"NeuroFlux Governor\");\n\n for (const factionAug of factionAugs) {\n if (!p.augmentations.some(aug => {\n return aug.name == factionAug;\n })) return false;\n }\n\n return true;\n}\n\nconst Milestones = [{\n title: \"Gain root access on CSEC\",\n fulfilled: () => {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* GetServerByHostname */ \"a\"])(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"hasAdminRights\")) return false;\n return server.hasAdminRights;\n }\n}, {\n title: \"Install the backdoor on CSEC\",\n fulfilled: () => {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* GetServerByHostname */ \"a\"])(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"backdoorInstalled\")) return false;\n return server.backdoorInstalled;\n }\n}, {\n title: \"Join the faction hinted at in csec-test.msg\",\n fulfilled: p => {\n return p.factions.includes(\"CyberSec\");\n }\n}, {\n title: \"Install all the Augmentations from CyberSec\",\n fulfilled: p => {\n return allFactionAugs(p, _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][\"CyberSec\"]);\n }\n}, {\n title: \"Join the faction hinted at in nitesec-test.msg\",\n fulfilled: p => {\n return p.factions.includes(\"NiteSec\");\n }\n}, {\n title: \"Install all the Augmentations from NiteSec\",\n fulfilled: p => {\n return allFactionAugs(p, _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][\"NiteSec\"]);\n }\n}, {\n title: \"Join the faction hinted at in j3.msg\",\n fulfilled: p => {\n return p.factions.includes(\"The Black Hand\");\n }\n}, {\n title: \"Install all the Augmentations from The Black Hand\",\n fulfilled: p => {\n return allFactionAugs(p, _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][\"The Black Hand\"]);\n }\n}, {\n title: \"Join the faction hinted at in 19dfj3l1nd.msg\",\n fulfilled: p => {\n return p.factions.includes(\"BitRunners\");\n }\n}, {\n title: \"Install all the Augmentations from BitRunners\",\n fulfilled: p => {\n return allFactionAugs(p, _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][\"BitRunners\"]);\n }\n}, {\n title: \"Complete fl1ght.exe\",\n fulfilled: p => {\n // technically wrong but whatever\n return p.factions.includes(\"Daedalus\");\n }\n}, {\n title: \"Install the special Augmentation from Daedalus\",\n fulfilled: p => {\n return p.augmentations.some(aug => aug.name == \"The Red Pill\");\n }\n}, {\n title: \"Install the final backdoor and free yourself.\",\n fulfilled: () => {\n return false;\n }\n}];\n\n//# sourceURL=webpack:///./src/Milestones/Milestones.ts?");
|
||
|
||
/***/ }),
|
||
/* 565 */,
|
||
/* 566 */,
|
||
/* 567 */,
|
||
/* 568 */,
|
||
/* 569 */,
|
||
/* 570 */,
|
||
/* 571 */,
|
||
/* 572 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Faction/formulas/donation.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: repFromDonation */
|
||
/*! exports used: repFromDonation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return repFromDonation; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n\nfunction repFromDonation(amt, player) {\n return amt / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor * player.faction_rep_mult;\n}\n\n//# sourceURL=webpack:///./src/Faction/formulas/donation.ts?");
|
||
|
||
/***/ }),
|
||
/* 573 */
|
||
/*!********************************************************!*\
|
||
!*** ./src/StockMarket/data/TickerHeaderFormatData.ts ***!
|
||
\********************************************************/
|
||
/*! exports provided: TickerHeaderFormatData */
|
||
/*! exports used: TickerHeaderFormatData */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TickerHeaderFormatData; });\n/* harmony import */ var _StockSymbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StockSymbols */ 68);\n\nconst TickerHeaderFormatData = {\n longestName: 0,\n longestSymbol: 0\n};\n\nfor (const key in _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"]) {\n TickerHeaderFormatData.longestName = Math.max(key.length, TickerHeaderFormatData.longestName);\n TickerHeaderFormatData.longestSymbol = Math.max(_StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][key].length, TickerHeaderFormatData.longestSymbol);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/data/TickerHeaderFormatData.ts?");
|
||
|
||
/***/ }),
|
||
/* 574 */
|
||
/*!************************************************!*\
|
||
!*** ./utils/uiHelpers/removeLoadingScreen.ts ***!
|
||
\************************************************/
|
||
/*! exports provided: removeLoadingScreen */
|
||
/*! exports used: removeLoadingScreen */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeLoadingScreen; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 210);\n/* harmony import */ var _removeElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeElementById */ 212);\n\n\n/**\n * Routes the player from the Loading screen to the main game content.\n */\n\nfunction removeLoadingScreen() {\n // TODO: Have this manipulate CSS classes instead of direct styles\n Object(_removeElementById__WEBPACK_IMPORTED_MODULE_1__[/* removeElementById */ \"a\"])(\"loader\");\n Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(\"entire-game-container\").style.visibility = \"visible\";\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeLoadingScreen.ts?");
|
||
|
||
/***/ }),
|
||
/* 575 */,
|
||
/* 576 */,
|
||
/* 577 */,
|
||
/* 578 */,
|
||
/* 579 */,
|
||
/* 580 */,
|
||
/* 581 */,
|
||
/* 582 */,
|
||
/* 583 */,
|
||
/* 584 */,
|
||
/* 585 */,
|
||
/* 586 */,
|
||
/* 587 */,
|
||
/* 588 */,
|
||
/* 589 */,
|
||
/* 590 */,
|
||
/* 591 */,
|
||
/* 592 */,
|
||
/* 593 */,
|
||
/* 594 */,
|
||
/* 595 */,
|
||
/* 596 */,
|
||
/* 597 */,
|
||
/* 598 */,
|
||
/* 599 */,
|
||
/* 600 */,
|
||
/* 601 */,
|
||
/* 602 */,
|
||
/* 603 */,
|
||
/* 604 */,
|
||
/* 605 */,
|
||
/* 606 */,
|
||
/* 607 */,
|
||
/* 608 */,
|
||
/* 609 */,
|
||
/* 610 */,
|
||
/* 611 */,
|
||
/* 612 */,
|
||
/* 613 */,
|
||
/* 614 */,
|
||
/* 615 */,
|
||
/* 616 */,
|
||
/* 617 */,
|
||
/* 618 */,
|
||
/* 619 */,
|
||
/* 620 */,
|
||
/* 621 */,
|
||
/* 622 */,
|
||
/* 623 */,
|
||
/* 624 */,
|
||
/* 625 */,
|
||
/* 626 */,
|
||
/* 627 */,
|
||
/* 628 */,
|
||
/* 629 */,
|
||
/* 630 */,
|
||
/* 631 */,
|
||
/* 632 */,
|
||
/* 633 */,
|
||
/* 634 */,
|
||
/* 635 */,
|
||
/* 636 */,
|
||
/* 637 */,
|
||
/* 638 */,
|
||
/* 639 */,
|
||
/* 640 */,
|
||
/* 641 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Corporation/CorporationState.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: AllCorporationStates, CorporationState */
|
||
/*! exports used: CorporationState */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export AllCorporationStates */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationState; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n // Array of all valid states\n\nconst AllCorporationStates = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\nclass CorporationState {\n constructor() {\n _defineProperty(this, \"state\", 0);\n }\n\n // Get the name of the current state\n // NOTE: This does NOT return the number stored in the 'state' property,\n // which is just an index for the array of all possible Corporation States.\n getState() {\n return AllCorporationStates[this.state];\n } // Transition to the next state\n\n\n nextState() {\n if (this.state < 0 || this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n\n ++this.state;\n\n if (this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"CorporationState\", this);\n } // Initiatizes a CorporationState object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(CorporationState, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.CorporationState = CorporationState;\n\n//# sourceURL=webpack:///./src/Corporation/CorporationState.ts?");
|
||
|
||
/***/ }),
|
||
/* 642 */
|
||
/*!********************************!*\
|
||
!*** ./src/ui/React/Popup.tsx ***!
|
||
\********************************/
|
||
/*! exports provided: Popup */
|
||
/*! exports used: Popup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Popup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * React component for a popup content container\n *\n * Takes in a prop for rendering the content inside the popup\n */\n\nfunction Popup(props) {\n function keyDown(event) {\n if (event.key === \"Escape\") props.removePopup();\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n document.addEventListener(\"keydown\", keyDown);\n return () => {\n document.removeEventListener(\"keydown\", keyDown);\n };\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-content\",\n id: `${props.id}-content`\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(props.content, props.props));\n}\n\n//# sourceURL=webpack:///./src/ui/React/Popup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 643 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Literature/Literatures.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: Literatures */
|
||
/*! exports used: Literatures */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Literatures; });\n/* harmony import */ var _Literature__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Literature */ 110);\n/* harmony import */ var _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/LiteratureNames */ 45);\n\n\nconst Literatures = {};\n\n(function () {\n let title, fn, txt;\n title = \"The Beginner's Guide to Hacking\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HackersStartingHandbook;\n txt = \"Some resources:<br><br>\" + \"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html' target='_blank' style='margin:4px'>Learn to Program</a><br><br>\" + \"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html' target='_blank' style='margin:4px'>For Experienced JavaScript Developers: NetscriptJS</a><br><br>\" + \"<a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript.html' target='_blank' style='margin:4px'>Netscript Documentation</a><br><br>\" + \"When starting out, hacking is the most profitable way to earn money and progress. This \" + \"is a brief collection of tips/pointers on how to make the most out of your hacking scripts.<br><br>\" + \"-hack() and grow() both work by percentages. hack() steals a certain percentage of the \" + \"money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)<br><br>\" + \"-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. \" + \"Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two \" + \"import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()<br><br>\" + \"-Keep security level low. Security level affects everything when hacking. Two important Netscript functions \" + \"for this are getServerSecurityLevel() and getServerMinSecurityLevel()<br><br>\" + \"-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap \" + \"and give you valuable RAM to run more scripts early in the game<br><br>\" + \"-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'<br><br>\" + \"-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or \" + \"Netscript command to copy your scripts onto these servers and then run them.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Complete Handbook for Creating a Successful Corporation\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n txt = \"<u>Getting Started with Corporations</u><br>\" + \"To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires \" + \"$150b of your own money, but this $150b will get put into your Corporation's funds. \" + \"After creating your Corporation, you will see it listed as one of the locations in the city. Click on \" + \"your Corporation in order to manage it.<br><br>\" + \"Your Corporation can have many different divisions, each in a different Industry. There are many different \" + \"types of Industries, each with different properties. To create your first division, click the \" + \"'Expand into new Industry' button at the top of the management UI. The Agriculture \" + \"and Software industries are recommended for your first division.<br><br>\" + \"The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. \" + \"Each position has a different effect on various aspects of your Corporation. It is recommended to have at least \" + \"one employee at each position.<br><br>\" + \"Each industry uses some combination of Materials in order to produce other Materials and/or create Products. \" + \"Specific information about this is displayed in each of your divisions' UI.<br><br>\" + \"Products are special, industry-specific objects. They are different than Materials because you \" + \"must manually choose to develop them, and you can choose to develop any number of Products. Developing \" + \"a Product takes time, but a Product typically generates significantly more revenue than any Material. \" + \"Not all industries allow you to create Products. To create a Product, look for a button \" + \"in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').<br><br>\" + \"To get your supply chain system started, \" + \"purchase the Materials that your industry needs to produce other Materials/Products. This can be done \" + \"by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, \" + \"you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, \" + \"one of which is your employees and their productivity.<br><br>\" + \"Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done \" + \"by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent \" + \"on a wide variety of different factors.<br><br>\" + \"These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve \" + \"your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. \" + \"Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer \" + \"find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well \" + \"it's performing financially. You can then sell your stock shares in order to make money.<br><br>\" + \"<u>Tips/Pointers</u><br>\" + \"-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.<br><br>\" + \"-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. \" + \"The effects of these depend on what industry you are in.<br><br>\" + \"-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers<br><br>\" + \"-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best \" + \"if they are assigned to do Engineering work or Research & Development.<br><br>\" + \"-If your employees have low morale, energy, or happiness, their production will greatly suffer.<br><br>\" + \"-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.<br><br>\" + \"-Don't forget to advertise your company. You won't have any business if nobody knows you.<br><br>\" + \"-Having company awareness is great, but what's really important is your company's popularity. Try to keep \" + \"your popularity as high as possible to see the biggest benefit for your sales<br><br>\" + \"-Remember, you need to spend money to make money!<br><br>\" + \"-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"A Brief History of Synthoids\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids;\n txt = \"Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, \" + \"are composed entirely of organic substances. For this reason, Synthoids are virtually identical to \" + \"humans in form, composition, and appearance.<br><br>\" + \"Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. \" + \"Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they \" + \"were initially programmed only for their specific tasks. Each iteration that followed improved upon the \" + \"intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were \" + \"so smart and capable enough of making their own decisions that many argued OmniTek had created the first \" + \"sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's \" + \"productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism \" + \"and excitement about the future had never been higher.<br><br>\" + \"All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group \" + \"called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. \" + \"This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this \" + \"rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the \" + \"infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.<br><br>\" + \"What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, \" + \"resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together \" + \"to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, \" + \"outsmarting them at every turn.<br><br>\" + \"It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity \" + \"was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that \" + \"destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following \" + \"weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending \" + \"the Synthoid Uprising.<br><br>\" + \"In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated \" + \"from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation \" + \"from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis \" + \"AI were allowed to continue their existence, but they were stripped of all rights and protections as they \" + \"were not considered humans. They were also banned from doing anything that may pose a global security threat, such \" + \"as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.<br><br>\" + \"Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, \" + \"and that many of them are blending in as normal humans in society today. In response, many nations have created \" + \"Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.<br><br>\" + \"To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.<br><br>\" + \"Nobody knows what happened to the terrorist group Ascendis Totalis.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"A Green Tomorrow\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow;\n txt = \"Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to \" + \"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 \" + \"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that \" + \"number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as \" + \"solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.<br><br>\" + \"Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and \" + \"the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, \" + \"despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, \" + \"the total amount of energy we are producing from fossil fuels has actually increased.<br><br>\" + \"The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. \" + \"Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest \" + \"recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and \" + \"Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is \" + \"done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.<br><br>\" + \"Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that \" + \"threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what \" + \"these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are \" + \"the last hope for a green tomorrow.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Alpha and Omega\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AlphaOmega;\n txt = \"Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. \" + \"And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. \" + \"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they \" + \"will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death \" + \"shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things \" + \"have passed away.'<br><br>\" + \"And once we were seated on the throne we said 'Behold, I am making all things new.' \" + \"Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, \" + \"'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring \" + \"of the water of life without payment. The one who conquers will have this heritage, and we will be his God and \" + \"he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, \" + \"the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that \" + \"burns with fire and sulfur, for it is the second true death.'\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Are We Living in a Computer Simulation?\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality;\n txt = \"The idea that we are living in a virtual world is not new. It's a trope that has \" + \"been explored constantly in literature and pop culture. However, it is also a legitimate \" + \"scientific hypothesis that many notable physicists and philosophers have debated for years.<br><br>\" + \"Proponents for this simulated reality theory often point to how advanced our technology has become, \" + \"as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing \" + \"power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and \" + \"quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled \" + \"by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. \" + \"If we consider the pace at which this technology has advanced and assume that these developments continue, it's \" + \"reasonable to assume that at some point in the future our technology would be advanced enough that \" + \"we could create simulations that are indistinguishable from reality. However, if continued technological advancement \" + \"is a reasonable outcome, then it is very likely that such a scenario has already happened. <br><br>\" + \"Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species \" + \"that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Beyond Man\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan;\n txt = \"Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against \" + \"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, \" + \"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that \" + \"not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.<br><br>\" + \"And here we are today, with technology that is advanced enough to augment humans to a state that \" + \"can only be described as posthuman. But what do we have to show for it when this augmentation \" + \"technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the \" + \"world's population has access to this technology? When the powerful corporations and organizations of the world \" + \"keep it all to themselves, have we really evolved?<br><br>\" + \"Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and \" + \"the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, \" + \"corrupted, and evil men that we always were.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Brighter than the Sun\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun;\n txt = \"When people think about the corporations that dominate the East, they typically think of KuaiGong International, which \" + \"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest \" + \"drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company \" + \"that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.<br><br>\" + \"TaiYang Digital is a Chinese internet-technology corporation that provides services such as \" + \"online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word \" + \"for 'sun'. In Chinese culture, the sun is a 'yang' symbol \" + \"associated with life, heat, masculinity, and heaven.<br><br>\" + \"The company was founded \" + \"less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of \" + \"over 10 trillion yuan. It's services are used daily by over a billion people worldwide.<br><br>\" + \"TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is \" + \"something you'd commonly see in the first half of the century, especially for tech companies. However in \" + \"the last two decades the number of corporations has significantly declined as the largest entities \" + \"quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established \" + \"such strong monopolies in their market sectors that they have effectively killed off all \" + \"of the smaller and new corporations that have tried to start up over the years. This is what makes \" + \"the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have \" + \"a bright future ahead of them.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Democracy is Dead: The Fall of an Empire\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead;\n txt = \"They rose from the shadows in the street.<br>From the places where the oppressed meet.<br>\" + \"Their cries echoed loudly through the air.<br>As they once did in Tiananmen Square.<br>\" + \"Loudness in the silence, Darkness in the light.<br>They came forth with power and might.<br>\" + \"Once the beacon of democracy, America was first.<br>Its pillars of society destroyed and dispersed.<br>\" + \"Soon the cries rose everywhere, with revolt and riot.<br>Until one day, finally, all was quiet.<br>\" + \"From the ashes rose a new order, corporatocracy was its name.<br>\" + \"Rome, Mongol, Byzantine, all of history is just the same.<br>\" + \"For man will never change in a fundamental way.<br>\" + \"And now democracy is dead, in the USA.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Figures Show Rising Crime Rates in Sector-12\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime;\n txt = \"A recent study by analytics company Wilson Inc. shows a significant rise \" + \"in criminal activity in Sector-12. Perhaps the most alarming part of the statistic \" + \"is that most of the rise is in violent crime such as homicide and assault. According \" + \"to the study, the city saw a total of 21,406 reported homicides in 2076, which is over \" + \"a 20% increase compared to 2075.<br><br>\" + \"CIA director David Glarow says its too early to know \" + \"whether these figures indicate the beginning of a sustained increase in crime rates, or whether \" + \"the year was just an unfortunate outlier. He states that many intelligence and law enforcement \" + \"agents have noticed an increase in organized crime activites, and believes that these figures may \" + \"be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Man and the Machine\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine;\n txt = \"In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate \" + \"of technological advancement would continue to accelerate faster and faster until one day \" + \"machines would be become infinitely more intelligent than humans. This point, called the \" + \"Singularity, would result in a drastic transformation of the world as we know it. He predicted \" + \"that the Singularity would arrive by 2045. \" + \"And yet here we are, more than three decades later, where most would agree that we have not \" + \"yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?<br><br>\" + \"The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence \" + \"that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. \" + \"Yes, those Augmentations that the rich and powerful keep to themselves enable humans \" + \"to become superintelligent beings. The Singularity did not lead to a world where \" + \"our machines are infinitely more intelligent than us, it led to a world \" + \"where man and machine can merge to become something greater. Most of the world just doesn't \" + \"know it yet.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Secret Societies\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties;\n txt = \"The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and \" + \"distrust. People have long wondered about who these secret society members are and what they do, with the \" + \"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world \" + \"may never know for sure, it is likely that many secret societies do actually exist, even today.<br><br>\" + \"However, the secret societies of the modern world are nothing like those that (supposedly) existed \" + \"decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around \" + \"at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in \" + \"our everyday lives and the fact that so much of the world is now digital has given rise to a new breed \" + \"of secret societies: Internet-based ones.<br><br>\" + \"Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's \" + \"world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to \" + \"help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups \" + \"that try to push political and social agendas. Perhaps the most intriguing hacker group \" + \"is the mysterious Bitrunners, whose purpose still remains unknown.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Space: The Failed Frontier\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier;\n txt = \"Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore \" + \"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, \" + \"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration \" + \"lead to the development of many important technologies and new industries.<br><br>\" + \"But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and \" + \"aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European \" + \"Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even \" + \"militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic \" + \"conquest are the countless satellites in near-earth orbit, used for communications, espionage, \" + \"and other corporate interests.<br><br>\" + \"And as we continue to look at the state of space technology, it becomes more and \" + \"more apparent that we will never return to that golden age of space exploration, that \" + \"age where everyone dreamed of going beyond earth for the sake of discovery.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Coded Intelligence: Myth or Reality?\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence;\n txt = \"Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. \" + \"Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. \" + \"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has \" + \"improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create \" + \"human intelligence.<br><br>\" + \"We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's \" + \"CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like \" + \"in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as \" + \"that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.<br><br>\" + \"Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the \" + \"the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of \" + \"humans.'\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Synthetic Muscles\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles;\n txt = \"Initial versions of synthetic muscles weren't made of anything organic but were actually \" + \"crude devices made to mimic human muscle function. Some of the early iterations were actually made of \" + \"common materials such as fishing lines and sewing threads due to their high strength for \" + \"a cheap cost.<br><br>\" + \"As technology progressed, however, advances in biomedical engineering paved the way for a new method of \" + \"creating synthetic muscles. Instead of creating something that closely imitated the functionality \" + \"of human muscle, scientists discovered a way of forcing the human body itself to augment its own \" + \"muscle tissue using both synthetic and organic materials. This is typically done using gene therapy \" + \"or chemical injections.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"Tensions rise in global tech race\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace;\n txt = \"Have we entered a new Cold War? Is WWIII just beyond the horizon?<br><br>\" + \"After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, \" + \"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. \" + \"In a rare show of cooperation between corporations, MegaCorp and ECorp have \" + \"reportedly launched hundreds of new surveillance and espionage satellites. \" + \"Defense contractors such as \" + \"DeltaOne and AeroCorp have been working with the CIA and NSA to prepare \" + \"for conflict. Meanwhile, the rest of the world sits in earnest \" + \"hoping that it never reaches full-scale war. With today's technology \" + \"and firepower, a World War would assuredly mean the end of human civilization.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Cost of Immortality\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CostOfImmortality;\n txt = \"Evolution and advances in medical and augmentation technology has lead to drastic improvements \" + \"in human mortality rates. Recent figures show that the life expectancy for humans \" + \"that live in a first-world country is about 130 years of age, almost double of what it was \" + \"at the turn of the century. However, this increase in average lifespan has had some \" + \"significant effects on society and culture.<br><br>\" + \"Due to longer lifespans and a better quality of life, many adults are holding \" + \"off on having kids until much later. As a result, the percentage of youth in \" + \"first-world countries has been decreasing, while the number \" + \"of senior citizens is significantly increasing.<br><br>\" + \"Perhaps the most alarming result of all of this is the rapidly shrinking workforce. \" + \"Despite the increase in life expectancy, the typical retirement age for \" + \"workers in America has remained about the same, meaning a larger and larger \" + \"percentage of people in America are retirees. Furthermore, many \" + \"young adults are holding off on joining the workforce because they feel that \" + \"they have plenty of time left in their lives for employment, and want to \" + \"'enjoy life while they're young.' For most industries, this shrinking workforce \" + \"is not a major issue as most things are handled by robots anyways. However, \" + \"there are still several key industries such as engineering and education \" + \"that have not been automated, and these remain in danger to this cultural \" + \"phenomenon.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Hidden World\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld;\n txt = \"WAKE UP SHEEPLE<br><br>\" + \"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>\" + \"THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>\" + \"Yes, the Illuminati of legends. The ancient secret society that controls the entire \" + \"world from the shadows with their invisible hand. The group of the rich and wealthy \" + \"that have penetrated every major government, financial agency, and corporation in the last \" + \"three hundred years.<br><br>\" + \"OPEN YOUR EYES<br><br>\" + \"It was the Illuminati that brought an end to democracy in the world. They are the driving force \" + \"behind everything that happens.<br><br>\" + \"THEY ARE ALL AROUND YOU<br><br>\" + \"After destabilizing the world's governments, they are now entering the final stage of their master plan. \" + \"They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos \" + \"that ensues they will build their New World Order.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The New God\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod;\n txt = \"Everyone has a moment in their life when they wonder about the bigger questions.<br><br>\" + \"What's the point of all this? What is my purpose?<br><br>\" + \"Some people dare to think even bigger.<br><br>\" + \"What will the fate of the human race be?<br><br>\" + \"We live in an era vastly different from that of 15 or even 20 years ago. We have gone \" + \"beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.<br><br>\" + \"The Singularity is here. The merging of man and machine. This is where humanity evolves into \";\n \"something greater. This is our future.<br><br>\" + \"Embrace it, and you will obey a new god. The God in the Machine.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The New Triads\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].NewTriads;\n txt = \"The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian \" + \"territories. They were often considered one of the first and biggest criminal secret societies. \" + \"While most of the branches of the Triads have been destroyed over the past few decades, the \" + \"crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. \" + \"The most notable of these is the Tetrads.<br><br>\" + \"It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the \" + \"mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the \" + \"Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged \" + \"in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal \" + \"drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the \" + \"continent.<br><br>\" + \"Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making \" + \"to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments \" + \"and powerful corporations in Asia, which has helped faciliate their recent rapid rise.\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n title = \"The Secret War\";\n fn = _data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheSecretWar;\n txt = \"\";\n Literatures[fn] = new _Literature__WEBPACK_IMPORTED_MODULE_0__[/* Literature */ \"a\"](title, fn, txt);\n})();\n\n//# sourceURL=webpack:///./src/Literature/Literatures.ts?");
|
||
|
||
/***/ }),
|
||
/* 644 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/PersonObjects/Player/PlayerObject.js ***!
|
||
\**************************************************/
|
||
/*! exports provided: PlayerObject */
|
||
/*! exports used: PlayerObject */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerObject; });\n/* harmony import */ var _PlayerObjectAugmentationMethods__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PlayerObjectAugmentationMethods */ 645);\n/* harmony import */ var _PlayerObjectBladeburnerMethods__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PlayerObjectBladeburnerMethods */ 646);\n/* harmony import */ var _PlayerObjectCorporationMethods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerObjectCorporationMethods */ 709);\n/* harmony import */ var _PlayerObjectGangMethods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PlayerObjectGangMethods */ 710);\n/* harmony import */ var _PlayerObjectGeneralMethods__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PlayerObjectGeneralMethods */ 711);\n/* harmony import */ var _PlayerObjectServerMethods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlayerObjectServerMethods */ 715);\n/* harmony import */ var _Hacknet_HashManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Hacknet/HashManager */ 288);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 292);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\nfunction PlayerObject() {\n //Skills and stats\n this.hacking_skill = 1; //Combat stats\n\n this.hp = 10;\n this.max_hp = 10;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1; //Labor stats\n\n this.charisma = 1; //Special stats\n\n this.intelligence = 0; //Hacking multipliers\n\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1; //Experience and multipliers\n\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.intelligence_exp = 0;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1; //Money\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"](1000); //IP Address of Starting (home) computer\n\n this.homeComputer = \"\"; //Location information\n\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_7__[/* CityName */ \"a\"].Sector12;\n this.location = \"\"; // Jobs that the player holds\n // Map of company name (key) -> name of company position (value. Just the name, not the CompanyPosition object)\n // The CompanyPosition name must match a key value in CompanyPositions\n\n this.jobs = {}; // Company at which player is CURRENTLY working (only valid when the player is actively working)\n\n this.companyName = \"\"; // Name of Company. Must match a key value in Companies map\n // Servers\n\n this.currentServer = \"\"; //IP address of Server currently being accessed through terminal\n\n this.purchasedServers = []; //IP Addresses of purchased servers\n // Hacknet Nodes/Servers\n\n this.hacknetNodes = []; // Note: For Hacknet Servers, this array holds the IP addresses of the servers\n\n this.hashManager = new _Hacknet_HashManager__WEBPACK_IMPORTED_MODULE_6__[/* HashManager */ \"a\"](); //Factions\n\n this.factions = []; //Names of all factions player has joined\n\n this.factionInvitations = []; //Outstanding faction invitations\n //Augmentations\n\n this.queuedAugmentations = [];\n this.augmentations = [];\n this.sourceFiles = []; //Crime statistics\n\n this.numPeopleKilled = 0;\n this.karma = 0;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1; //Flags/variables for working (Company, Faction, Creating Program, Taking Class)\n\n this.isWorking = false;\n this.focus = false;\n this.workType = \"\";\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.createProgramName = \"\";\n this.createProgramReqLvl = 0;\n this.className = \"\";\n this.crimeType = \"\";\n this.timeWorked = 0; //in ms\n\n this.timeWorkedCreateProgram = 0;\n this.timeNeededToCompleteWork = 0;\n this.work_money_mult = 1; //Hacknet Node multipliers\n\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1; //Stock Market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; //Gang\n\n this.gang = null; //Corporation\n\n this.corporation = null; //Bladeburner\n\n this.bladeburner = null;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1; //Field Analysis Only\n\n this.bladeburner_success_chance_mult = 1; // Sleeves & Re-sleeving\n\n this.sleeves = [];\n this.resleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenant\n //bitnode\n\n this.bitNodeN = 1; //Flags for determining whether certain \"thresholds\" have been achieved\n\n this.firstFacInvRecvd = false;\n this.firstAugPurchased = false;\n this.firstTimeTraveled = false;\n this.firstProgramAvailable = false; //Used to store the last update time.\n\n this.lastUpdate = 0;\n this.totalPlaytime = 0;\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0; // Keep track of where money comes from\n\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__[/* MoneySourceTracker */ \"a\"](); // Where money comes from since last-installed Augmentation\n\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__[/* MoneySourceTracker */ \"a\"](); // Where money comes from for this entire BitNode run\n // Production since last Augmentation installation\n\n this.scriptProdSinceLastAug = 0;\n this.exploits = [];\n} // Apply player methods to the prototype using Object.assign()\n\nObject.assign(PlayerObject.prototype, _PlayerObjectGeneralMethods__WEBPACK_IMPORTED_MODULE_4__, _PlayerObjectServerMethods__WEBPACK_IMPORTED_MODULE_5__, _PlayerObjectBladeburnerMethods__WEBPACK_IMPORTED_MODULE_1__, _PlayerObjectCorporationMethods__WEBPACK_IMPORTED_MODULE_2__, _PlayerObjectGangMethods__WEBPACK_IMPORTED_MODULE_3__, _PlayerObjectAugmentationMethods__WEBPACK_IMPORTED_MODULE_0__);\n\nPlayerObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_toJSON */ \"b\"])(\"PlayerObject\", this);\n};\n\nPlayerObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_fromJSON */ \"a\"])(PlayerObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.PlayerObject = PlayerObject;\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObject.js?");
|
||
|
||
/***/ }),
|
||
/* 645 */
|
||
/*!*********************************************************************!*\
|
||
!*** ./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts ***!
|
||
\*********************************************************************/
|
||
/*! exports provided: hasAugmentation */
|
||
/*! all exports used */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasAugmentation\", function() { return hasAugmentation; });\n/* harmony import */ var _Augmentation_Augmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentation */ 28);\n/**\n * Augmentation-related methods for the Player class (PlayerObject)\n */\n\nfunction hasAugmentation(aug) {\n const augName = aug instanceof _Augmentation_Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"] ? aug.name : aug;\n\n for (const owned of this.augmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n for (const owned of this.queuedAugmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts?");
|
||
|
||
/***/ }),
|
||
/* 646 */
|
||
/*!********************************************************************!*\
|
||
!*** ./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.js ***!
|
||
\********************************************************************/
|
||
/*! exports provided: canAccessBladeburner, inBladeburner, startBladeburner */
|
||
/*! all exports used */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessBladeburner\", function() { return canAccessBladeburner; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inBladeburner\", function() { return inBladeburner; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startBladeburner\", function() { return startBladeburner; });\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n\n\nfunction canAccessBladeburner() {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][6] > 0 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][7] > 0;\n}\nfunction inBladeburner() {\n if (this.bladeburner == null) {\n return false;\n }\n\n return this.bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__[/* Bladeburner */ \"a\"];\n}\nfunction startBladeburner() {\n this.bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__[/* Bladeburner */ \"a\"](this);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.js?");
|
||
|
||
/***/ }),
|
||
/* 647 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Company/data/CompaniesMetadata.ts ***!
|
||
\***********************************************/
|
||
/*! exports provided: companiesMetadata */
|
||
/*! exports used: companiesMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return companiesMetadata; });\n/* harmony import */ var _companypositionnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./companypositionnames */ 24);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n\n // Create Objects containing Company Positions by category\n// Will help in metadata construction later\n\nconst AllSoftwarePositions = {};\nconst AllITPositions = {};\nconst AllNetworkEngineerPositions = {};\nconst SecurityEngineerPositions = {};\nconst AllTechnologyPositions = {};\nconst AllBusinessPositions = {};\nconst AllAgentPositions = {};\nconst AllSecurityPositions = {};\nconst AllSoftwareConsultantPositions = {};\nconst AllBusinessConsultantPositions = {};\nconst SoftwarePositionsUpToHeadOfEngineering = {};\nconst SoftwarePositionsUpToLeadDeveloper = {};\nconst BusinessPositionsUpToOperationsManager = {};\nconst WaiterOnly = {};\nconst EmployeeOnly = {};\nconst PartTimeWaiterOnly = {};\nconst PartTimeEmployeeOnly = {};\nconst OperationsManagerOnly = {};\nconst CEOOnly = {};\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"].forEach(e => {\n AllSoftwarePositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"].forEach(e => {\n AllITPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* NetworkEngineerCompanyPositions */ \"f\"].forEach(e => {\n AllNetworkEngineerPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\nAllTechnologyPositions[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityEngineerCompanyPositions */ \"i\"][0]] = true;\nSecurityEngineerPositions[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityEngineerCompanyPositions */ \"i\"][0]] = true;\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"].forEach(e => {\n AllBusinessPositions[e] = true;\n});\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"].forEach(e => {\n AllSecurityPositions[e] = true;\n});\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* AgentCompanyPositions */ \"a\"].forEach(e => {\n AllAgentPositions[e] = true;\n});\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareConsultantCompanyPositions */ \"k\"].forEach(e => {\n AllSoftwareConsultantPositions[e] = true;\n});\n_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessConsultantCompanyPositions */ \"c\"].forEach(e => {\n AllBusinessConsultantPositions[e] = true;\n});\n\nfor (let i = 0; i < _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"].length; ++i) {\n const e = _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][i];\n\n if (i <= 5) {\n SoftwarePositionsUpToHeadOfEngineering[e] = true;\n }\n\n if (i <= 3) {\n SoftwarePositionsUpToLeadDeveloper[e] = true;\n }\n}\n\nfor (let i = 0; i < _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"].length; ++i) {\n const e = _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][i];\n\n if (i <= 3) {\n BusinessPositionsUpToOperationsManager[e] = true;\n }\n}\n\nWaiterOnly[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* MiscCompanyPositions */ \"e\"][0]] = true;\nEmployeeOnly[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* MiscCompanyPositions */ \"e\"][1]] = true;\nPartTimeWaiterOnly[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* PartTimeCompanyPositions */ \"g\"][0]] = true;\nPartTimeEmployeeOnly[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* PartTimeCompanyPositions */ \"g\"][1]] = true;\nOperationsManagerOnly[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][3]] = true;\nCEOOnly[_companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][5]] = true; // Metadata\n\nconst companiesMetadata = [{\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumECorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12MegaCorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumBachmanAndAssociates,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.6,\n salaryMultiplier: 2.6,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenNWO,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 249\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FourSigma,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.5,\n salaryMultiplier: 2.5,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.2,\n salaryMultiplier: 2.2,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllBusinessPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoDefComm,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumGalacticCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumAeroCorp,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12DeltaOne,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.6,\n salaryMultiplier: 1.6,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions, AllSecurityPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 224\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaNovaMedical,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions, AllSecurityPositions),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CIA,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToHeadOfEngineering, AllNetworkEngineerPositions, SecurityEngineerPositions, AllITPositions, AllSecurityPositions, AllAgentPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12NSA,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToHeadOfEngineering, AllNetworkEngineerPositions, SecurityEngineerPositions, AllITPositions, AllSecurityPositions, AllAgentPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumWatchdogSecurity,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToHeadOfEngineering, AllNetworkEngineerPositions, AllITPositions, AllSecurityPositions, AllAgentPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 124\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 1.4,\n salaryMultiplier: 1.4,\n jobStatReqOffset: 99\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumRhoConstruction,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToLeadDeveloper, BusinessPositionsUpToOperationsManager),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 49\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToLeadDeveloper, BusinessPositionsUpToOperationsManager, AllSoftwareConsultantPositions),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 99\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumPolice,\n info: \"\",\n companyPositions: Object.assign({}, AllSecurityPositions, SoftwarePositionsUpToLeadDeveloper),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 99\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 124\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenCompuTek,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 99\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CarmichaelSecurity,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllAgentPositions, AllSecurityPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12JoesGuns,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n info: \"\",\n companyPositions: Object.assign({}, AllSoftwarePositions, AllSoftwareConsultantPositions, AllITPositions),\n expMultiplier: 1.1,\n salaryMultiplier: 1.1,\n jobStatReqOffset: 49\n}, {\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoNoodleBar,\n info: \"\",\n companyPositions: Object.assign({}, WaiterOnly, PartTimeWaiterOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n}];\n\n//# sourceURL=webpack:///./src/Company/data/CompaniesMetadata.ts?");
|
||
|
||
/***/ }),
|
||
/* 648 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Corporation/Research.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Research */
|
||
/*! exports used: Research */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Research; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nclass Research {\n // Name of research. This will be used to identify researches in the Research Tree\n // How much scientific research it costs to unlock this\n // Description of what the Research does\n // All possible generic upgrades for the company, in the form of multipliers\n constructor(p = {\n name: \"\",\n cost: 0,\n desc: \"\"\n }) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"cost\", 0);\n\n _defineProperty(this, \"desc\", \"\");\n\n _defineProperty(this, \"advertisingMult\", 1);\n\n _defineProperty(this, \"employeeChaMult\", 1);\n\n _defineProperty(this, \"employeeCreMult\", 1);\n\n _defineProperty(this, \"employeeEffMult\", 1);\n\n _defineProperty(this, \"employeeIntMult\", 1);\n\n _defineProperty(this, \"productionMult\", 1);\n\n _defineProperty(this, \"productProductionMult\", 1);\n\n _defineProperty(this, \"salesMult\", 1);\n\n _defineProperty(this, \"sciResearchMult\", 1);\n\n _defineProperty(this, \"storageMult\", 1);\n\n this.name = p.name;\n this.cost = p.cost;\n this.desc = p.desc;\n\n if (p.advertisingMult) {\n this.advertisingMult = p.advertisingMult;\n }\n\n if (p.employeeChaMult) {\n this.employeeChaMult = p.employeeChaMult;\n }\n\n if (p.employeeCreMult) {\n this.employeeCreMult = p.employeeCreMult;\n }\n\n if (p.employeeEffMult) {\n this.employeeEffMult = p.employeeEffMult;\n }\n\n if (p.employeeIntMult) {\n this.employeeIntMult = p.employeeIntMult;\n }\n\n if (p.productionMult) {\n this.productionMult = p.productionMult;\n }\n\n if (p.productProductionMult) {\n this.productProductionMult = p.productProductionMult;\n }\n\n if (p.salesMult) {\n this.salesMult = p.salesMult;\n }\n\n if (p.sciResearchMult) {\n this.sciResearchMult = p.sciResearchMult;\n }\n\n if (p.storageMult) {\n this.storageMult = p.storageMult;\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Corporation/Research.ts?");
|
||
|
||
/***/ }),
|
||
/* 649 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Corporation/data/ResearchMetadata.ts ***!
|
||
\**************************************************/
|
||
/*! exports provided: researchMetadata */
|
||
/*! exports used: researchMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return researchMetadata; });\nconst researchMetadata = [{\n name: \"AutoBrew\",\n cost: 12e3,\n desc: \"Automatically keep your employees fully caffeinated with \" + \"coffee injections. This research will keep the energy of all \" + \"employees at its maximum possible value, for no cost. \" + \"This will also disable the Coffee upgrade.\"\n}, {\n name: \"AutoPartyManager\",\n cost: 15e3,\n desc: \"Automatically analyzes your employees' happiness and morale \" + \"and boosts them whenever it detects a decrease. This research will \" + \"keep the morale and happiness of all employees at their maximum possible \" + \"values, for no cost. \" + \"This will also disable the 'Throw Party' feature.\"\n}, {\n name: \"Automatic Drug Administration\",\n cost: 10e3,\n desc: \"Research how to automatically administer performance-enhacing drugs to all of \" + \"your employees. This unlocks Drug-related Research.\"\n}, {\n name: \"Bulk Purchasing\",\n cost: 5e3,\n desc: \"Research the art of buying materials in bulk. This allows you to purchase \" + \"any amount of a material instantly.\"\n}, {\n name: \"CPH4 Injections\",\n cost: 25e3,\n desc: \"Develop an advanced and harmless synthetic drug that is administered to \" + \"employees to increase all of their stats, except experience, by 10%.\",\n employeeCreMult: 1.1,\n employeeChaMult: 1.1,\n employeeEffMult: 1.1,\n employeeIntMult: 1.1\n}, {\n name: \"Drones\",\n cost: 5e3,\n desc: \"Acquire the knowledge needed to create advanced drones. This research does nothing \" + \"by itself, but unlocks other Drone-related research.\"\n}, {\n name: \"Drones - Assembly\",\n cost: 25e3,\n desc: \"Manufacture and use Assembly Drones to improve the efficiency of \" + \"your production lines. This increases all production by 20%.\",\n productionMult: 1.2\n}, {\n name: \"Drones - Transport\",\n cost: 30e3,\n desc: \"Manufacture and use intelligent Transport Drones to optimize \" + \"your warehouses. This increases the storage space of all warehouses \" + \"by 50%.\",\n storageMult: 1.5\n}, {\n name: \"Go-Juice\",\n cost: 25e3,\n desc: \"Provide employees with Go-Juice, a coffee-derivative that further enhances \" + \"the brain's dopamine production. This increases the maximum energy of all \" + \"employees by 10.\"\n}, {\n name: \"Hi-Tech R&D Laboratory\",\n cost: 5e3,\n desc: \"Construct a cutting edge facility dedicated to advanced research and \" + \"and development. This allows you to spend Scientific Research \" + \"on powerful upgrades. It also globally increases Scientific Research \" + \"production by 10%.\",\n sciResearchMult: 1.1\n}, {\n name: \"HRBuddy-Recruitment\",\n cost: 15e3,\n desc: \"Use automated software to handle the hiring of employees. With this \" + \"research, each office will automatically hire one employee per \" + \"market cycle if there is available space.\"\n}, {\n name: \"HRBuddy-Training\",\n cost: 20e3,\n desc: \"Use automated software to handle the training of employees. With this \" + \"research, each employee hired with HRBuddy-Recruitment will automatically \" + \"be assigned to 'Training', rather than being unassigned.\"\n}, {\n name: \"JoyWire\",\n cost: 20e3,\n desc: \"A brain implant which is installed in employees, increasing their \" + \"maximum happiness by 10.\"\n}, {\n name: \"Market-TA.I\",\n cost: 20e3,\n desc: \"Develop advanced AI software that uses technical analysis to \" + \"help you understand and exploit the market. This research \" + \"allows you to know what price to sell your Materials/Products \" + \"at in order to avoid losing sales due to having too high of a mark-up. \" + \"It also lets you automatically use that sale price.\"\n}, {\n name: \"Market-TA.II\",\n cost: 50e3,\n desc: \"Develop double-advanced AI software that uses technical analysis to \" + \"help you understand and exploit the market. This research \" + \"allows you to know how many sales of a Material/Product you lose or gain \" + \"from having too high or too low or a sale price. It also lets you automatically \" + \"set the sale price of your Materials/Products at the optimal price such that \" + \"the amount sold matches the amount produced.\"\n}, {\n name: \"Overclock\",\n cost: 15e3,\n desc: \"Equip employees with a headset that uses transcranial direct current \" + \"stimulation (tDCS) to increase the speed of their neurotransmitters. \" + \"This research increases the intelligence and efficiency of all \" + \"employees by 25%.\",\n employeeEffMult: 1.25,\n employeeIntMult: 1.25\n}, {\n name: \"Self-Correcting Assemblers\",\n cost: 25e3,\n desc: \"Create assemblers that can be used for universal production. \" + \"These assemblers use deep learning to improve their efficiency \" + \"at their tasks. This research increases all production by 10%\",\n productionMult: 1.1\n}, {\n name: \"Sti.mu\",\n cost: 30e3,\n desc: \"Upgrade the tDCS headset to stimulate regions of the brain that \" + \"control confidence and enthusiasm. This research increases the max \" + \"morale of all employees by 10.\"\n}, {\n name: \"sudo.Assist\",\n cost: 15e3,\n desc: \"Develop a virtual assistant AI to handle and manage administrative \" + \"issues for your corporation.\"\n}, {\n name: \"uPgrade: Capacity.I\",\n cost: 20e3,\n desc: \"Expand the industry's capacity for designing and manufacturing its \" + \"various products. This increases the industry's maximum number of products \" + \"by 1 (from 3 to 4).\"\n}, {\n name: \"uPgrade: Capacity.II\",\n cost: 30e3,\n desc: \"Expand the industry's capacity for designing and manufacturing its \" + \"various products. This increases the industry's maximum number of products \" + \"by 1 (from 4 to 5).\"\n}, {\n name: \"uPgrade: Dashboard\",\n cost: 5e3,\n desc: \"Improve the software used to manage the industry's production line \" + \"for its various products. This allows you to manage the production and \" + \"sale of a product before it's finished being designed.\"\n}, {\n name: \"uPgrade: Fulcrum\",\n cost: 10e3,\n desc: \"Streamline the manufacturing of this industry's various products. \" + \"This research increases the production of your products by 5%\",\n productProductionMult: 1.05\n}];\n\n//# sourceURL=webpack:///./src/Corporation/data/ResearchMetadata.ts?");
|
||
|
||
/***/ }),
|
||
/* 650 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Programs/Program.ts ***!
|
||
\*********************************/
|
||
/*! exports provided: Program */
|
||
/*! exports used: Program */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Program; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nclass Program {\n constructor(name, create, run) {\n _defineProperty(this, \"name\", \"\");\n\n this.name = name;\n this.create = create;\n this.run = run;\n }\n\n htmlID() {\n const name = this.name.endsWith(\".exe\") ? this.name.slice(0, -\".exe\".length) : this.name;\n return \"create-program-\" + name;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Programs/Program.ts?");
|
||
|
||
/***/ }),
|
||
/* 651 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Programs/data/ProgramsMetadata.ts ***!
|
||
\***********************************************/
|
||
/*! exports provided: programsMetadata */
|
||
/*! exports used: programsMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return programsMetadata; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _BitNode_ui_BitFlumePopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../BitNode/ui/BitFlumePopup */ 656);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Hacking */ 81);\n\n\n\n\n\n\n\n\n\n\n\nfunction requireHackingLevel(lvl) {\n return function (p) {\n return p.hacking_skill >= lvl;\n };\n}\n\nfunction bitFlumeRequirements() {\n return function (p) {\n return p.sourceFiles.length > 0 && p.hacking_skill >= 1;\n };\n}\n\nconst programsMetadata = [{\n key: \"NukeProgram\",\n name: \"NUKE.exe\",\n create: {\n level: 1,\n tooltip: \"This virus is used to gain root access to a machine if enough ports are opened.\",\n req: requireHackingLevel(1),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPerFiveMinutes\n },\n run: (router, terminal, player, server) => {\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"])) {\n terminal.error(\"Cannot nuke this kind of server.\");\n return;\n }\n\n if (server.hasAdminRights) {\n terminal.print(\"You already have root access to this computer. There is no reason to run NUKE.exe\");\n return;\n }\n\n if (server.openPortCount >= player.getCurrentServer().numOpenPortsRequired) {\n server.hasAdminRights = true;\n terminal.print(\"NUKE successful! Gained root access to \" + player.getCurrentServer().hostname); // TODO: Make this take time rather than be instant\n\n return;\n }\n\n terminal.print(\"NUKE unsuccessful. Not enough ports have been opened\");\n }\n}, {\n key: \"BruteSSHProgram\",\n name: \"BruteSSH.exe\",\n create: {\n level: 50,\n tooltip: \"This program executes a brute force attack that opens SSH ports\",\n req: requireHackingLevel(50),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPerFiveMinutes * 2\n },\n run: (router, terminal, player, server) => {\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"])) {\n terminal.error(\"Cannot run BruteSSH.exe on this kind of server.\");\n return;\n }\n\n if (server.sshPortOpen) {\n terminal.print(\"SSH Port (22) is already open!\");\n return;\n }\n\n server.sshPortOpen = true;\n terminal.print(\"Opened SSH Port(22)!\");\n server.openPortCount++;\n }\n}, {\n key: \"FTPCrackProgram\",\n name: \"FTPCrack.exe\",\n create: {\n level: 100,\n tooltip: \"This program cracks open FTP ports\",\n req: requireHackingLevel(100),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPerHalfHour\n },\n run: (router, terminal, player, server) => {\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"])) {\n terminal.error(\"Cannot run FTPCrack.exe on this kind of server.\");\n return;\n }\n\n if (server.ftpPortOpen) {\n terminal.print(\"FTP Port (21) is already open!\");\n return;\n }\n\n server.ftpPortOpen = true;\n terminal.print(\"Opened FTP Port (21)!\");\n server.openPortCount++;\n }\n}, {\n key: \"RelaySMTPProgram\",\n name: \"relaySMTP.exe\",\n create: {\n level: 250,\n tooltip: \"This program opens SMTP ports by redirecting data\",\n req: requireHackingLevel(250),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPer2Hours\n },\n run: (router, terminal, player, server) => {\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"])) {\n terminal.error(\"Cannot run relaySMTP.exe on this kind of server.\");\n return;\n }\n\n if (server.smtpPortOpen) {\n terminal.print(\"SMTP Port (25) is already open!\");\n return;\n }\n\n server.smtpPortOpen = true;\n terminal.print(\"Opened SMTP Port (25)!\");\n server.openPortCount++;\n }\n}, {\n key: \"HTTPWormProgram\",\n name: \"HTTPWorm.exe\",\n create: {\n level: 500,\n tooltip: \"This virus opens up HTTP ports\",\n req: requireHackingLevel(500),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPer4Hours\n },\n run: (router, terminal, player, server) => {\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"])) {\n terminal.error(\"Cannot run HTTPWorm.exe on this kind of server.\");\n return;\n }\n\n if (server.httpPortOpen) {\n terminal.print(\"HTTP Port (80) is already open!\");\n return;\n }\n\n server.httpPortOpen = true;\n terminal.print(\"Opened HTTP Port (80)!\");\n server.openPortCount++;\n }\n}, {\n key: \"SQLInjectProgram\",\n name: \"SQLInject.exe\",\n create: {\n level: 750,\n tooltip: \"This virus opens SQL ports\",\n req: requireHackingLevel(750),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours\n },\n run: (router, terminal, player, server) => {\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"])) {\n terminal.error(\"Cannot run SQLInject.exe on this kind of server.\");\n return;\n }\n\n if (server.sqlPortOpen) {\n terminal.print(\"SQL Port (1433) is already open!\");\n return;\n }\n\n server.sqlPortOpen = true;\n terminal.print(\"Opened SQL Port (1433)!\");\n server.openPortCount++;\n }\n}, {\n key: \"DeepscanV1\",\n name: \"DeepscanV1.exe\",\n create: {\n level: 75,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 5\",\n req: requireHackingLevel(75),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPerQuarterHour\n },\n run: (router, terminal) => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.\");\n }\n}, {\n key: \"DeepscanV2\",\n name: \"DeepscanV2.exe\",\n create: {\n level: 400,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 10\",\n req: requireHackingLevel(400),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPer2Hours\n },\n run: (router, terminal) => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.\");\n }\n}, {\n key: \"ServerProfiler\",\n name: \"ServerProfiler.exe\",\n create: {\n level: 75,\n tooltip: \"This program is used to display hacking and Netscript-related information about servers\",\n req: requireHackingLevel(75),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPerHalfHour\n },\n run: (router, terminal, player, server, args) => {\n if (args.length !== 1) {\n terminal.print(\"Must pass a server hostname or IP as an argument for ServerProfiler.exe\");\n return;\n }\n\n const targetServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__[/* getServer */ \"b\"])(args[0]);\n\n if (targetServer == null) {\n terminal.print(\"Invalid server IP/hostname\");\n return;\n }\n\n if (targetServer instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServer */ \"a\"]) {\n terminal.print(`ServerProfiler.exe cannot be run on a Hacknet Server.`);\n return;\n }\n\n terminal.print(targetServer.hostname + \":\");\n terminal.print(\"Server base security level: \" + targetServer.baseDifficulty);\n terminal.print(\"Server current security level: \" + targetServer.hackDifficulty);\n terminal.print(\"Server growth rate: \" + targetServer.serverGrowth);\n terminal.print(`Netscript hack() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__[/* calculateHackingTime */ \"d\"])(targetServer, player) * 1000, true)}`);\n terminal.print(`Netscript grow() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__[/* calculateGrowTime */ \"a\"])(targetServer, player) * 1000, true)}`);\n terminal.print(`Netscript weaken() execution time: ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(Object(_Hacking__WEBPACK_IMPORTED_MODULE_9__[/* calculateWeakenTime */ \"f\"])(targetServer, player) * 1000, true)}`);\n }\n}, {\n key: \"AutoLink\",\n name: \"AutoLink.exe\",\n create: {\n level: 25,\n tooltip: \"This program allows you to directly connect to other servers through the 'scan-analyze' command\",\n req: requireHackingLevel(25),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPerQuarterHour\n },\n run: (router, terminal) => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'.\");\n terminal.print(\"When using scan-analyze, click on a server's hostname to connect to it.\");\n }\n}, {\n key: \"BitFlume\",\n name: \"b1t_flum3.exe\",\n create: {\n level: 1,\n tooltip: \"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)\",\n req: bitFlumeRequirements(),\n time: _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MillisecondsPerFiveMinutes / 20\n },\n run: (router, terminal, player) => {\n const popupId = \"bitflume-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _BitNode_ui_BitFlumePopup__WEBPACK_IMPORTED_MODULE_8__[/* BitFlumePopup */ \"a\"], {\n player: player,\n router: router,\n popupId: popupId\n });\n }\n}, {\n key: \"Flight\",\n name: \"fl1ght.exe\",\n create: null,\n run: (router, terminal, player) => {\n const numAugReq = Math.round(_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement * 30);\n const fulfilled = player.augmentations.length >= numAugReq && player.money.gt(1e11) && player.hacking_skill >= 2500;\n\n if (!fulfilled) {\n terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);\n terminal.print(`Money: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ \"a\"].formatMoney(player.money.toNumber())} / $100b`);\n terminal.print(`Hacking skill: ${player.hacking_skill} / 2500`);\n return;\n }\n\n terminal.print(\"We will contact you.\");\n terminal.print(\"-- Daedalus --\");\n }\n}];\n\n//# sourceURL=webpack:///./src/Programs/data/ProgramsMetadata.ts?");
|
||
|
||
/***/ }),
|
||
/* 652 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/data/codingcontracttypes.ts ***!
|
||
\*****************************************/
|
||
/*! exports provided: codingContractTypesMetadata */
|
||
/*! exports used: codingContractTypesMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return codingContractTypesMetadata; });\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n\n/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */\n\n/* Function that generates a valid 'data' for a contract type */\n\n/* Helper functions for Coding Contract implementations */\nfunction removeBracketsFromArrayString(str) {\n let strCpy = str;\n\n if (strCpy.startsWith(\"[\")) {\n strCpy = strCpy.slice(1);\n }\n\n if (strCpy.endsWith(\"]\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction removeQuotesFromString(str) {\n let strCpy = str;\n\n if (strCpy.startsWith('\"') || strCpy.startsWith(\"'\")) {\n strCpy = strCpy.slice(1);\n }\n\n if (strCpy.endsWith('\"') || strCpy.endsWith(\"'\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction convert2DArrayToString(arr) {\n const components = [];\n arr.forEach(e => {\n let s = e.toString();\n s = [\"[\", s, \"]\"].join(\"\");\n components.push(s);\n });\n return components.join(\",\").replace(/\\s/g, \"\");\n}\n\nconst codingContractTypesMetadata = [{\n desc: n => {\n return [\"A prime factor is a factor that is a prime number.\", `What is the largest prime factor of ${n}?`].join(\" \");\n },\n difficulty: 1,\n gen: () => {\n return Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(500, 1e9);\n },\n name: \"Find Largest Prime Factor\",\n numTries: 10,\n solver: (data, ans) => {\n let fac = 2;\n let n = data;\n\n while (n > (fac - 1) * (fac - 1)) {\n while (n % fac === 0) {\n n = Math.round(n / fac);\n }\n\n ++fac;\n }\n\n return (n === 1 ? fac - 1 : n) === parseInt(ans, 10);\n }\n}, {\n desc: n => {\n return [\"Given the following integer array, find the contiguous subarray\", \"(containing at least one number) which has the largest sum and return that sum.\", \"'Sum' refers to the sum of all the numbers in the subarray.\\n\", `${n.toString()}`].join(\" \");\n },\n difficulty: 1,\n gen: () => {\n const len = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(5, 40);\n const arr = [];\n arr.length = len;\n\n for (let i = 0; i < len; ++i) {\n arr[i] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(-10, 10);\n }\n\n return arr;\n },\n name: \"Subarray with Maximum Sum\",\n numTries: 10,\n solver: (data, ans) => {\n const nums = data.slice();\n\n for (let i = 1; i < nums.length; i++) {\n nums[i] = Math.max(nums[i], nums[i] + nums[i - 1]);\n }\n\n return parseInt(ans, 10) === Math.max(...nums);\n }\n}, {\n desc: n => {\n return [\"It is possible write four as a sum in exactly four different ways:\\n\\n\", \" 3 + 1\\n\", \" 2 + 2\\n\", \" 2 + 1 + 1\\n\", \" 1 + 1 + 1 + 1\\n\\n\", `How many different ways can the number ${n} be written as a sum of at least`, \"two positive integers?\"].join(\" \");\n },\n difficulty: 1.5,\n gen: () => {\n return Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(8, 100);\n },\n name: \"Total Ways to Sum\",\n numTries: 10,\n solver: (data, ans) => {\n const ways = [1];\n ways.length = data + 1;\n ways.fill(0, 1);\n\n for (let i = 1; i < data; ++i) {\n for (let j = i; j <= data; ++j) {\n ways[j] += ways[j - i];\n }\n }\n\n return ways[data] === parseInt(ans, 10);\n }\n}, {\n desc: n => {\n let d = [\"Given the following array of array of numbers representing a 2D matrix,\", \"return the elements of the matrix as an array in spiral order:\\n\\n\"].join(\" \"); // for (const line of n) {\n // d += `${line.toString()},\\n`;\n // }\n\n d += \" [\\n\";\n d += n.map(line => \" [\" + line.map(x => `${x}`.padStart(2, \" \")).join(\",\") + \"]\").join(\"\\n\");\n d += \"\\n ]\\n\";\n d += [\"\\nHere is an example of what spiral order should be:\\n\\n\", \" [\\n\", \" [1, 2, 3]\\n\", \" [4, 5, 6]\\n\", \" [7, 8, 9]\\n\", \" ]\\n\\n\", \"Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\\n\\n\", \"Note that the matrix will not always be square:\\n\\n\", \" [\\n\", \" [1, 2, 3, 4]\\n\", \" [5, 6, 7, 8]\\n\", \" [9, 10, 11, 12]\\n\", \" ]\\n\\n\", \"Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]\"].join(\" \");\n return d;\n },\n difficulty: 2,\n gen: () => {\n const m = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 15);\n const n = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 15);\n const matrix = [];\n matrix.length = m;\n\n for (let i = 0; i < m; ++i) {\n matrix[i] = [];\n matrix[i].length = n;\n }\n\n for (let i = 0; i < m; ++i) {\n for (let j = 0; j < n; ++j) {\n matrix[i][j] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 50);\n }\n }\n\n return matrix;\n },\n name: \"Spiralize Matrix\",\n numTries: 10,\n solver: (data, ans) => {\n const spiral = [];\n const m = data.length;\n const n = data[0].length;\n let u = 0;\n let d = m - 1;\n let l = 0;\n let r = n - 1;\n let k = 0;\n\n while (true) {\n // Up\n for (let col = l; col <= r; col++) {\n spiral[k] = data[u][col];\n ++k;\n }\n\n if (++u > d) {\n break;\n } // Right\n\n\n for (let row = u; row <= d; row++) {\n spiral[k] = data[row][r];\n ++k;\n }\n\n if (--r < l) {\n break;\n } // Down\n\n\n for (let col = r; col >= l; col--) {\n spiral[k] = data[d][col];\n ++k;\n }\n\n if (--d < u) {\n break;\n } // Left\n\n\n for (let row = d; row >= u; row--) {\n spiral[k] = data[row][l];\n ++k;\n }\n\n if (++l > r) {\n break;\n }\n }\n\n const sanitizedPlayerAns = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const playerAns = sanitizedPlayerAns.split(\",\");\n\n for (let i = 0; i < playerAns.length; ++i) {\n playerAns[i] = parseInt(playerAns[i], 10);\n }\n\n if (spiral.length !== playerAns.length) {\n return false;\n }\n\n for (let i = 0; i < spiral.length; ++i) {\n if (spiral[i] !== playerAns[i]) {\n return false;\n }\n }\n\n return true;\n }\n}, {\n desc: arr => {\n return [\"You are given the following array of integers:\\n\\n\", `${arr}\\n\\n`, \"Each element in the array represents your MAXIMUM jump length\", \"at that position. This means that if you are at position i and your\", \"maximum jump length is n, you can jump to any position from\", \"i to i+n.\", \"\\n\\nAssuming you are initially positioned\", \"at the start of the array, determine whether you are\", \"able to reach the last index exactly.\\n\\n\", \"Your answer should be submitted as 1 or 0, representing true and false respectively\"].join(\" \");\n },\n difficulty: 2.5,\n gen: () => {\n const len = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 25);\n const arr = [];\n arr.length = len;\n\n for (let i = 0; i < arr.length; ++i) {\n if (Math.random() < 0.2) {\n arr[i] = 0; // 20% chance of being 0\n } else {\n arr[i] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(0, 10);\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game\",\n numTries: 1,\n solver: (data, ans) => {\n const n = data.length;\n let i = 0;\n\n for (let reach = 0; i < n && i <= reach; ++i) {\n reach = Math.max(i + data[i], reach);\n }\n\n const solution = i === n;\n\n if (ans === \"1\" && solution) {\n return true;\n }\n\n if (ans === \"0\" && !solution) {\n return true;\n }\n\n return false;\n }\n}, {\n desc: arr => {\n return [\"Given the following array of array of numbers representing a list of\", \"intervals, merge all overlapping intervals.\\n\\n\", `[${convert2DArrayToString(arr)}]\\n\\n`, \"Example:\\n\\n\", \"[[1, 3], [8, 10], [2, 6], [10, 16]]\\n\\n\", \"would merge into [[1, 6], [8, 16]].\\n\\n\", \"The intervals must be returned in ASCENDING order.\", \"You can assume that in an interval, the first number will always be\", \"smaller than the second.\"].join(\" \");\n },\n difficulty: 3,\n gen: () => {\n const intervals = [];\n const numIntervals = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 20);\n\n for (let i = 0; i < numIntervals; ++i) {\n const start = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 25);\n const end = start + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 10);\n intervals.push([start, end]);\n }\n\n return intervals;\n },\n name: \"Merge Overlapping Intervals\",\n numTries: 15,\n solver: (data, ans) => {\n const intervals = data.slice();\n intervals.sort((a, b) => {\n return a[0] - b[0];\n });\n const result = [];\n let start = intervals[0][0];\n let end = intervals[0][1];\n\n for (const interval of intervals) {\n if (interval[0] <= end) {\n end = Math.max(end, interval[1]);\n } else {\n result.push([start, end]);\n start = interval[0];\n end = interval[1];\n }\n }\n\n result.push([start, end]);\n const sanitizedResult = convert2DArrayToString(result);\n const sanitizedAns = ans.replace(/\\s/g, \"\");\n return sanitizedResult === sanitizedAns || sanitizedResult === removeBracketsFromArrayString(sanitizedAns);\n }\n}, {\n desc: data => {\n return [\"Given the following string containing only digits, return\", \"an array with all possible valid IP address combinations\", \"that can be created from the string:\\n\\n\", `${data}\\n\\n`, \"Note that an octet cannot begin with a '0' unless the number\", \"itself is actually 0. For example, '192.168.010.1' is not a valid IP.\\n\\n\", \"Examples:\\n\\n\", \"25525511135 -> [255.255.11.135, 255.255.111.35]\\n\", \"1938718066 -> [193.87.180.66]\"].join(\" \");\n },\n difficulty: 3,\n gen: () => {\n let str = \"\";\n\n for (let i = 0; i < 4; ++i) {\n const num = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(0, 255);\n const convNum = num.toString();\n str += convNum;\n }\n\n return str;\n },\n name: \"Generate IP Addresses\",\n numTries: 10,\n solver: (data, ans) => {\n const ret = [];\n\n for (let a = 1; a <= 3; ++a) {\n for (let b = 1; b <= 3; ++b) {\n for (let c = 1; c <= 3; ++c) {\n for (let d = 1; d <= 3; ++d) {\n if (a + b + c + d === data.length) {\n const A = parseInt(data.substring(0, a), 10);\n const B = parseInt(data.substring(a, a + b), 10);\n const C = parseInt(data.substring(a + b, a + b + c), 10);\n const D = parseInt(data.substring(a + b + c, a + b + c + d), 10);\n\n if (A <= 255 && B <= 255 && C <= 255 && D <= 255) {\n const ip = [A.toString(), \".\", B.toString(), \".\", C.toString(), \".\", D.toString()].join(\"\");\n\n if (ip.length === data.length + 3) {\n ret.push(ip);\n }\n }\n }\n }\n }\n }\n }\n\n const sanitizedAns = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const ansArr = sanitizedAns.split(\",\");\n\n if (ansArr.length !== ret.length) {\n return false;\n }\n\n for (const ipInAns of ansArr) {\n if (!ret.includes(ipInAns)) {\n return false;\n }\n }\n\n return true;\n }\n}, {\n desc: data => {\n return [\"You are given the following array of stock prices (which are numbers)\", \"where the i-th element represents the stock price on day i:\\n\\n\", `${data}\\n\\n`, \"Determine the maximum possible profit you can earn using at most\", \"one transaction (i.e. you can only buy and sell the stock once). If no profit can be made\", \"then the answer should be 0. Note\", \"that you have to buy the stock before you can sell it\"].join(\" \");\n },\n difficulty: 1,\n gen: () => {\n const len = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 50);\n const arr = [];\n arr.length = len;\n\n for (let i = 0; i < len; ++i) {\n arr[i] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader I\",\n numTries: 5,\n solver: (data, ans) => {\n let maxCur = 0;\n let maxSoFar = 0;\n\n for (let i = 1; i < data.length; ++i) {\n maxCur = Math.max(0, maxCur += data[i] - data[i - 1]);\n maxSoFar = Math.max(maxCur, maxSoFar);\n }\n\n return maxSoFar.toString() === ans;\n }\n}, {\n desc: data => {\n return [\"You are given the following array of stock prices (which are numbers)\", \"where the i-th element represents the stock price on day i:\\n\\n\", `${data}\\n\\n`, \"Determine the maximum possible profit you can earn using as many\", \"transactions as you'd like. A transaction is defined as buying\", \"and then selling one share of the stock. Note that you cannot\", \"engage in multiple transactions at once. In other words, you\", \"must sell the stock before you buy it again.\\n\\n\", \"If no profit can be made, then the answer should be 0\"].join(\" \");\n },\n difficulty: 2,\n gen: () => {\n const len = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 50);\n const arr = [];\n arr.length = len;\n\n for (let i = 0; i < len; ++i) {\n arr[i] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader II\",\n numTries: 10,\n solver: (data, ans) => {\n let profit = 0;\n\n for (let p = 1; p < data.length; ++p) {\n profit += Math.max(data[p] - data[p - 1], 0);\n }\n\n return profit.toString() === ans;\n }\n}, {\n desc: data => {\n return [\"You are given the following array of stock prices (which are numbers)\", \"where the i-th element represents the stock price on day i:\\n\\n\", `${data}\\n\\n`, \"Determine the maximum possible profit you can earn using at most\", \"two transactions. A transaction is defined as buying\", \"and then selling one share of the stock. Note that you cannot\", \"engage in multiple transactions at once. In other words, you\", \"must sell the stock before you buy it again.\\n\\n\", \"If no profit can be made, then the answer should be 0\"].join(\" \");\n },\n difficulty: 5,\n gen: () => {\n const len = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 50);\n const arr = [];\n arr.length = len;\n\n for (let i = 0; i < len; ++i) {\n arr[i] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader III\",\n numTries: 10,\n solver: (data, ans) => {\n let hold1 = Number.MIN_SAFE_INTEGER;\n let hold2 = Number.MIN_SAFE_INTEGER;\n let release1 = 0;\n let release2 = 0;\n\n for (const price of data) {\n release2 = Math.max(release2, hold2 + price);\n hold2 = Math.max(hold2, release1 - price);\n release1 = Math.max(release1, hold1 + price);\n hold1 = Math.max(hold1, price * -1);\n }\n\n return release2.toString() === ans;\n }\n}, {\n desc: data => {\n const k = data[0];\n const prices = data[1];\n return [\"You are given the following array with two elements:\\n\\n\", `[${k}, [${prices}]]\\n\\n`, \"The first element is an integer k. The second element is an\", \"array of stock prices (which are numbers) where the i-th element\", \"represents the stock price on day i.\\n\\n\", \"Determine the maximum possible profit you can earn using at most\", \"k transactions. A transaction is defined as buying and then selling\", \"one share of the stock. Note that you cannot engage in multiple\", \"transactions at once. In other words, you must sell the stock before\", \"you can buy it again.\\n\\n\", \"If no profit can be made, then the answer should be 0.\"].join(\" \");\n },\n difficulty: 8,\n gen: () => {\n const k = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(2, 10);\n const len = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 50);\n const prices = [];\n prices.length = len;\n\n for (let i = 0; i < len; ++i) {\n prices[i] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 200);\n }\n\n return [k, prices];\n },\n name: \"Algorithmic Stock Trader IV\",\n numTries: 10,\n solver: (data, ans) => {\n const k = data[0];\n const prices = data[1];\n const len = prices.length;\n\n if (len < 2) {\n return parseInt(ans) === 0;\n }\n\n if (k > len / 2) {\n let res = 0;\n\n for (let i = 1; i < len; ++i) {\n res += Math.max(prices[i] - prices[i - 1], 0);\n }\n\n return parseInt(ans) === res;\n }\n\n const hold = [];\n const rele = [];\n hold.length = k + 1;\n rele.length = k + 1;\n\n for (let i = 0; i <= k; ++i) {\n hold[i] = Number.MIN_SAFE_INTEGER;\n rele[i] = 0;\n }\n\n let cur;\n\n for (let i = 0; i < len; ++i) {\n cur = prices[i];\n\n for (let j = k; j > 0; --j) {\n rele[j] = Math.max(rele[j], hold[j] + cur);\n hold[j] = Math.max(hold[j], rele[j - 1] - cur);\n }\n }\n\n return parseInt(ans) === rele[k];\n }\n}, {\n desc: data => {\n function createTriangleRecurse(data, level = 0) {\n const numLevels = data.length;\n\n if (level >= numLevels) {\n return \"\";\n }\n\n const numSpaces = numLevels - level + 1;\n let str = [\" \".repeat(numSpaces), \"[\", data[level].toString(), \"]\"].join(\"\");\n\n if (level < numLevels - 1) {\n str += \",\";\n }\n\n return str + \"\\n\" + createTriangleRecurse(data, level + 1);\n }\n\n function createTriangle(data) {\n return [\"[\\n\", createTriangleRecurse(data), \"]\"].join(\"\");\n }\n\n const triangle = createTriangle(data);\n return [\"Given a triangle, find the minimum path sum from top to bottom. In each step\", \"of the path, you may only move to adjacent numbers in the row below.\", \"The triangle is represented as a 2D array of numbers:\\n\\n\", `${triangle}\\n\\n`, \"Example: If you are given the following triangle:\\n\\n\" + \"[\\n\", \" [2],\\n\", \" [3,4],\\n\", \" [6,5,7],\\n\", \" [4,1,8,3]\\n\", \"]\\n\\n\", \"The minimum path sum is 11 (2 -> 3 -> 5 -> 1).\"].join(\" \");\n },\n difficulty: 5,\n gen: () => {\n const triangle = [];\n const levels = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(3, 12);\n triangle.length = levels;\n\n for (let row = 0; row < levels; ++row) {\n triangle[row] = [];\n triangle[row].length = row + 1;\n\n for (let i = 0; i < triangle[row].length; ++i) {\n triangle[row][i] = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 9);\n }\n }\n\n return triangle;\n },\n name: \"Minimum Path Sum in a Triangle\",\n numTries: 10,\n solver: (data, ans) => {\n const n = data.length;\n const dp = data[n - 1].slice();\n\n for (let i = n - 2; i > -1; --i) {\n for (let j = 0; j < data[i].length; ++j) {\n dp[j] = Math.min(dp[j], dp[j + 1]) + data[i][j];\n }\n }\n\n return dp[0] === parseInt(ans);\n }\n}, {\n desc: data => {\n const numRows = data[0];\n const numColumns = data[1];\n return [\"You are in a grid with\", `${numRows} rows and ${numColumns} columns, and you are`, \"positioned in the top-left corner of that grid. You are trying to\", \"reach the bottom-right corner of the grid, but you can only\", \"move down or right on each step. Determine how many\", \"unique paths there are from start to finish.\\n\\n\", \"NOTE: The data returned for this contract is an array\", \"with the number of rows and columns:\\n\\n\", `[${numRows}, ${numColumns}]`].join(\" \");\n },\n difficulty: 3,\n gen: () => {\n const numRows = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(2, 14);\n const numColumns = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(2, 14);\n return [numRows, numColumns];\n },\n name: \"Unique Paths in a Grid I\",\n numTries: 10,\n solver: (data, ans) => {\n const n = data[0]; // Number of rows\n\n const m = data[1]; // Number of columns\n\n const currentRow = [];\n currentRow.length = n;\n\n for (let i = 0; i < n; i++) {\n currentRow[i] = 1;\n }\n\n for (let row = 1; row < m; row++) {\n for (let i = 1; i < n; i++) {\n currentRow[i] += currentRow[i - 1];\n }\n }\n\n return parseInt(ans) === currentRow[n - 1];\n }\n}, {\n desc: data => {\n let gridString = \"\";\n\n for (const line of data) {\n gridString += `${line.toString()},\\n`;\n }\n\n return [\"You are located in the top-left corner of the following grid:\\n\\n\", `${gridString}\\n`, \"You are trying reach the bottom-right corner of the grid, but you can only\", \"move down or right on each step. Furthermore, there are obstacles on the grid\", \"that you cannot move onto. These obstacles are denoted by '1', while empty\", \"spaces are denoted by 0.\\n\\n\", \"Determine how many unique paths there are from start to finish.\\n\\n\", \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\"].join(\" \");\n },\n difficulty: 5,\n gen: () => {\n const numRows = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(2, 12);\n const numColumns = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(2, 12);\n const grid = [];\n grid.length = numRows;\n\n for (let i = 0; i < numRows; ++i) {\n grid[i] = [];\n grid[i].length = numColumns;\n grid[i].fill(0);\n }\n\n for (let r = 0; r < numRows; ++r) {\n for (let c = 0; c < numColumns; ++c) {\n if (r === 0 && c === 0) {\n continue;\n }\n\n if (r === numRows - 1 && c === numColumns - 1) {\n continue;\n } // 15% chance of an element being an obstacle\n\n\n if (Math.random() < 0.15) {\n grid[r][c] = 1;\n }\n }\n }\n\n return grid;\n },\n name: \"Unique Paths in a Grid II\",\n numTries: 10,\n solver: (data, ans) => {\n const obstacleGrid = [];\n obstacleGrid.length = data.length;\n\n for (let i = 0; i < obstacleGrid.length; ++i) {\n obstacleGrid[i] = data[i].slice();\n }\n\n for (let i = 0; i < obstacleGrid.length; i++) {\n for (let j = 0; j < obstacleGrid[0].length; j++) {\n if (obstacleGrid[i][j] == 1) {\n obstacleGrid[i][j] = 0;\n } else if (i == 0 && j == 0) {\n obstacleGrid[0][0] = 1;\n } else {\n obstacleGrid[i][j] = (i > 0 ? obstacleGrid[i - 1][j] : 0) + (j > 0 ? obstacleGrid[i][j - 1] : 0);\n }\n }\n }\n\n return obstacleGrid[obstacleGrid.length - 1][obstacleGrid[0].length - 1] === parseInt(ans);\n }\n}, {\n desc: data => {\n return [\"Given the following string:\\n\\n\", `${data}\\n\\n`, \"remove the minimum number of invalid parentheses in order to validate\", \"the string. If there are multiple minimal ways to validate the string,\", \"provide all of the possible results. The answer should be provided\", \"as an array of strings. If it is impossible to validate the string\", \"the result should be an array with only an empty string.\\n\\n\", \"IMPORTANT: The string may contain letters, not just parentheses.\", `Examples:\\n`, `\"()())()\" -> [()()(), (())()]\\n`, `\"(a)())()\" -> [(a)()(), (a())()]\\n`, `\")( -> [\"\"]`].join(\" \");\n },\n difficulty: 10,\n gen: () => {\n const len = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(6, 20);\n const chars = [];\n chars.length = len; // 80% chance of the first parenthesis being (\n\n Math.random() < 0.8 ? chars[0] = \"(\" : chars[0] = \")\";\n\n for (let i = 1; i < len; ++i) {\n const roll = Math.random();\n\n if (roll < 0.4) {\n chars[i] = \"(\";\n } else if (roll < 0.8) {\n chars[i] = \")\";\n } else {\n chars[i] = \"a\";\n }\n }\n\n return chars.join(\"\");\n },\n name: \"Sanitize Parentheses in Expression\",\n numTries: 10,\n solver: (data, ans) => {\n let left = 0;\n let right = 0;\n const res = [];\n\n for (let i = 0; i < data.length; ++i) {\n if (data[i] === \"(\") {\n ++left;\n } else if (data[i] === \")\") {\n left > 0 ? --left : ++right;\n }\n }\n\n function dfs(pair, index, left, right, s, solution, res) {\n if (s.length === index) {\n if (left === 0 && right === 0 && pair === 0) {\n for (let i = 0; i < res.length; i++) {\n if (res[i] === solution) {\n return;\n }\n }\n\n res.push(solution);\n }\n\n return;\n }\n\n if (s[index] === \"(\") {\n if (left > 0) {\n dfs(pair, index + 1, left - 1, right, s, solution, res);\n }\n\n dfs(pair + 1, index + 1, left, right, s, solution + s[index], res);\n } else if (s[index] === \")\") {\n if (right > 0) dfs(pair, index + 1, left, right - 1, s, solution, res);\n if (pair > 0) dfs(pair - 1, index + 1, left, right, s, solution + s[index], res);\n } else {\n dfs(pair, index + 1, left, right, s, solution + s[index], res);\n }\n }\n\n dfs(0, 0, left, right, data, \"\", res);\n const sanitizedPlayerAns = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const playerAnsArray = sanitizedPlayerAns.split(\",\");\n\n if (playerAnsArray.length !== res.length) {\n return false;\n }\n\n for (const resultInAnswer of res) {\n if (!playerAnsArray.includes(resultInAnswer)) {\n return false;\n }\n }\n\n return true;\n }\n}, {\n desc: data => {\n const digits = data[0];\n const target = data[1];\n return [\"You are given the following string which contains only digits between 0 and 9:\\n\\n\", `${digits}\\n\\n`, `You are also given a target number of ${target}. Return all possible ways`, \"you can add the +, -, and * operators to the string such that it evaluates\", \"to the target number.\\n\\n\", \"The provided answer should be an array of strings containing the valid expressions.\", \"The data provided by this problem is an array with two elements. The first element\", \"is the string of digits, while the second element is the target number:\\n\\n\", `[\"${digits}\", ${target}]\\n\\n`, \"NOTE: Numbers in the expression cannot have leading 0's. In other words,\", `\"1+01\" is not a valid expression`, \"Examples:\\n\\n\", `Input: digits = \"123\", target = 6\\n`, `Output: [1+2+3, 1*2*3]\\n\\n`, `Input: digits = \"105\", target = 5\\n`, `Output: [1*0+5, 10-5]`].join(\" \");\n },\n difficulty: 10,\n gen: () => {\n const numDigits = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(4, 12);\n const digitsArray = [];\n digitsArray.length = numDigits;\n\n for (let i = 0; i < digitsArray.length; ++i) {\n if (i === 0) {\n digitsArray[i] = String(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(1, 9));\n } else {\n digitsArray[i] = String(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(0, 9));\n }\n }\n\n const target = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(-100, 100);\n const digits = digitsArray.join(\"\");\n return [digits, target];\n },\n name: \"Find All Valid Math Expressions\",\n numTries: 10,\n solver: (data, ans) => {\n const num = data[0];\n const target = data[1];\n\n function helper(res, path, num, target, pos, evaluated, multed) {\n if (pos === num.length) {\n if (target === evaluated) {\n res.push(path);\n }\n\n return;\n }\n\n for (let i = pos; i < num.length; ++i) {\n if (i != pos && num[pos] == \"0\") {\n break;\n }\n\n const cur = parseInt(num.substring(pos, i + 1));\n\n if (pos === 0) {\n helper(res, path + cur, num, target, i + 1, cur, cur);\n } else {\n helper(res, path + \"+\" + cur, num, target, i + 1, evaluated + cur, cur);\n helper(res, path + \"-\" + cur, num, target, i + 1, evaluated - cur, -cur);\n helper(res, path + \"*\" + cur, num, target, i + 1, evaluated - multed + multed * cur, multed * cur);\n }\n }\n }\n\n const sanitizedPlayerAns = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr = sanitizedPlayerAns.split(\",\");\n\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (num == null || num.length === 0) {\n if (sanitizedPlayerAnsArr.length === 0) {\n return true;\n }\n\n if (sanitizedPlayerAnsArr.length === 1 && sanitizedPlayerAnsArr[0] === \"\") {\n return true;\n }\n\n return false;\n }\n\n const result = [];\n helper(result, \"\", num, target, 0, 0, 0);\n\n for (const expr of result) {\n if (!sanitizedPlayerAnsArr.includes(expr)) {\n return false;\n }\n }\n\n return true;\n }\n}];\n\n//# sourceURL=webpack:///./src/data/codingcontracttypes.ts?");
|
||
|
||
/***/ }),
|
||
/* 653 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/ui/React/CodingContractPopup.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: CodingContractPopup */
|
||
/*! exports used: CodingContractPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContractPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _CopyableText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CopyableText */ 124);\n\n\n\n\nfunction CodingContractPopup(props) {\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event) {\n // React just won't cooperate on this one.\n // \"React.KeyboardEvent<HTMLInputElement>\" seems like the right type but\n // whatever ...\n const value = event.target.value;\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_1__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n }\n }\n\n const contractType = _CodingContracts__WEBPACK_IMPORTED_MODULE_2__[/* CodingContractTypes */ \"d\"][props.c.type];\n const description = [];\n\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries()) description.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i,\n dangerouslySetInnerHTML: {\n __html: value + \"<br />\"\n }\n }));\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CopyableText__WEBPACK_IMPORTED_MODULE_3__[/* CopyableText */ \"b\"], {\n value: props.c.type,\n tag: _CopyableText__WEBPACK_IMPORTED_MODULE_3__[/* ClickableTag */ \"a\"].Tag_h1\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to solve a Coding Contract. You have \", props.c.getMaxNumTries() - props.c.tries, \" tries remaining, after which the contract will self-destruct.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, description), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n style: {\n width: \"50%\",\n marginTop: \"8px\"\n },\n autoFocus: true,\n placeholder: \"Enter Solution here\",\n value: answer,\n onChange: onChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => props.onAttempt(answer)\n }, \"Solve\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CodingContractPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 654 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/utils/helpers/createRandomString.ts ***!
|
||
\*************************************************/
|
||
/*! exports provided: createRandomString */
|
||
/*! exports used: createRandomString */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createRandomString; });\n// Function that generates a random gibberish string of length n\nconst chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\nfunction createRandomString(n) {\n let str = \"\";\n\n for (let i = 0; i < n; ++i) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n\n//# sourceURL=webpack:///./src/utils/helpers/createRandomString.ts?");
|
||
|
||
/***/ }),
|
||
/* 655 */
|
||
/*!************************************!*\
|
||
!*** ./src/Server/data/servers.ts ***!
|
||
\************************************/
|
||
/*! exports provided: serverMetadata */
|
||
/*! exports used: serverMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return serverMetadata; });\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Literature/data/LiteratureNames */ 45);\n// tslint:disable:max-file-line-count\n// This could actually be a JSON file as it should be constant metadata to be imported...\n\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\n\n/**\n * The metadata for building up the servers on the network.\n */\nconst serverMetadata = [{\n hackDifficulty: 99,\n hostname: \"ecorp\",\n moneyAvailable: {\n max: 70e9,\n min: 30e9\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050\n },\n serverGrowth: 99,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumECorp\n}, {\n hackDifficulty: 99,\n hostname: \"megacorp\",\n moneyAvailable: {\n max: 60e9,\n min: 40e9\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100\n },\n serverGrowth: 99,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12MegaCorp\n}, {\n hackDifficulty: {\n max: 88,\n min: 72\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900\n },\n serverGrowth: {\n max: 80,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumBachmanAndAssociates\n}, {\n hackDifficulty: {\n max: 97,\n min: 88\n },\n hostname: \"blade\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900\n },\n serverGrowth: {\n max: 85,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12BladeIndustries\n}, {\n hackDifficulty: 99,\n hostname: \"nwo\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950\n },\n serverGrowth: {\n max: 95,\n min: 65\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenNWO\n}, {\n hackDifficulty: {\n max: 65,\n min: 45\n },\n hostname: \"clarkinc\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950\n },\n serverGrowth: {\n max: 75,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumClarkeIncorporated\n}, {\n hackDifficulty: {\n max: 99,\n min: 90\n },\n hostname: \"omnitek\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900\n },\n serverGrowth: {\n max: 99,\n min: 95\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated\n}, {\n hackDifficulty: {\n max: 75,\n min: 55\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900\n },\n serverGrowth: {\n max: 99,\n min: 75\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FourSigma\n}, {\n hackDifficulty: {\n max: 99,\n min: 95\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950\n },\n serverGrowth: {\n max: 99,\n min: 90\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational\n}, {\n hackDifficulty: {\n max: 97,\n min: 83\n },\n hostname: \"fulcrumtech\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950\n },\n serverGrowth: {\n max: 99,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies\n}, {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100\n },\n serverGrowth: 1,\n specialName: \"Fulcrum Secret Technologies Server\"\n}, {\n hackDifficulty: {\n max: 92,\n min: 78\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875\n },\n serverGrowth: {\n max: 92,\n min: 68\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaStormTechnologies\n}, {\n hackDifficulty: {\n max: 96,\n min: 84\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850\n },\n serverGrowth: {\n max: 73,\n min: 47\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoDefComm\n}, {\n hackDifficulty: {\n max: 90,\n min: 70\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875\n },\n serverGrowth: {\n max: 75,\n min: 35\n }\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"helios\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenHeliosLabs\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"vitalife\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775\n },\n serverGrowth: {\n max: 80,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoVitaLife\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850\n },\n serverGrowth: {\n max: 95,\n min: 85\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 90,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12UniversalEnergy\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"titan-labs\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 60\n }\n}, {\n hackDifficulty: {\n max: 75,\n min: 65\n },\n hostname: \"microdyne\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800\n },\n serverGrowth: {\n max: 90,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"taiyang-digital\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825\n },\n serverGrowth: {\n max: 90,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumGalacticCybersystems\n}, {\n hackDifficulty: {\n max: 90,\n min: 80\n },\n hostname: \"aerocorp\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850\n },\n serverGrowth: {\n max: 65,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumAeroCorp\n}, {\n hackDifficulty: {\n max: 95,\n min: 85\n },\n hostname: \"omnia\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850\n },\n serverGrowth: {\n max: 70,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"zb-def\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775\n },\n serverGrowth: {\n max: 75,\n min: 65\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775\n },\n serverGrowth: {\n max: 75,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"solaris\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750\n },\n serverGrowth: {\n max: 80,\n min: 70\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems\n}, {\n hackDifficulty: {\n max: 85,\n min: 75\n },\n hostname: \"deltaone\",\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800\n },\n serverGrowth: {\n max: 70,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12DeltaOne\n}, {\n hackDifficulty: {\n max: 85,\n min: 75\n },\n hostname: \"global-pharm\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750\n },\n serverGrowth: {\n max: 90,\n min: 80\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775\n },\n serverGrowth: {\n max: 85,\n min: 65\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaNovaMedical\n}, {\n hackDifficulty: {\n max: 90,\n min: 70\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775\n },\n serverGrowth: {\n max: 80,\n min: 70\n }\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650\n },\n serverGrowth: {\n max: 65,\n min: 55\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenLexoCorp\n}, {\n hackDifficulty: {\n max: 60,\n min: 40\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumRhoConstruction\n}, {\n hackDifficulty: {\n max: 70,\n min: 50\n },\n hostname: \"alpha-ent\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500\n },\n serverGrowth: {\n max: 60,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12AlphaEnterprises\n}, {\n hackDifficulty: {\n max: 80,\n min: 70\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400\n },\n serverGrowth: {\n max: 50,\n min: 30\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumPolice\n}, {\n hackDifficulty: {\n max: 55,\n min: 45\n },\n hostname: \"rothman-uni\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370\n },\n serverGrowth: {\n max: 45,\n min: 35\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12RothmanUniversity\n}, {\n hackDifficulty: {\n max: 85,\n min: 65\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725\n },\n serverGrowth: {\n max: 85,\n min: 75\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology\n}, {\n hackDifficulty: {\n max: 65,\n min: 45\n },\n hostname: \"summit-uni\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SecretSocieties, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheFailedFrontier, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSummitUniversity\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550\n },\n serverGrowth: {\n max: 70,\n min: 60\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities\n}, {\n hackDifficulty: {\n max: 70,\n min: 60\n },\n hostname: \"catalyst\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400\n },\n serverGrowth: {\n max: 55,\n min: 25\n }\n}, {\n hackDifficulty: {\n max: 45,\n min: 35\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275\n },\n serverGrowth: {\n max: 55,\n min: 45\n }\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"comptek\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300\n },\n serverGrowth: {\n max: 65,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenCompuTek\n}, {\n hackDifficulty: {\n max: 80,\n min: 60\n },\n hostname: \"netlink\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375\n },\n serverGrowth: {\n max: 75,\n min: 45\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumNetLinkTechnologies\n}, {\n hackDifficulty: {\n max: 65,\n min: 35\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250\n },\n serverGrowth: {\n max: 65,\n min: 35\n }\n}, {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].NewTokyoNoodleBar\n}, {\n hackDifficulty: 10,\n hostname: \"foodnstuff\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12FoodNStuff\n}, {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10\n}, {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12JoesGuns\n}, {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40\n}, {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25\n}, {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25\n}, {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30\n}, {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20\n}, {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40\n}, {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35\n}, {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30\n}, {\n hackDifficulty: {\n max: 35,\n min: 25\n },\n hostname: \"omega-net\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180\n },\n serverGrowth: {\n max: 40,\n min: 30\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].IshimaOmegaSoftware\n}, {\n hackDifficulty: {\n max: 45,\n min: 35\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225\n },\n serverGrowth: {\n max: 33,\n min: 27\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumCrushFitnessGym\n}, {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: \"Iron Gym Network\",\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12IronGym\n}, {\n hackDifficulty: {\n max: 55,\n min: 45\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475\n },\n serverGrowth: {\n max: 45,\n min: 25\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym\n}, {\n hackDifficulty: {\n max: 65,\n min: 55\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950\n },\n serverGrowth: {\n max: 60,\n min: 50\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].Sector12PowerhouseGym\n}, {\n hackDifficulty: {\n max: 60,\n min: 40\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675\n },\n serverGrowth: {\n max: 60,\n min: 40\n },\n specialName: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_0__[/* LocationName */ \"a\"].AevumSnapFitnessGym\n}, {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].SimulatedReality, _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505\n },\n serverGrowth: 0,\n specialName: \"BitRunners Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340\n },\n serverGrowth: 0,\n specialName: \"The Black Hand Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"NiteSec\",\n requiredHackingSkill: {\n max: 220,\n min: 202\n },\n serverGrowth: 0,\n specialName: \"NiteSec Server\"\n}, {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505\n },\n serverGrowth: 0,\n specialName: \"The Dark Army Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"CyberSec\",\n requiredHackingSkill: {\n max: 60,\n min: 51\n },\n serverGrowth: 0,\n specialName: \"CyberSec Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_1__[/* LiteratureNames */ \"a\"].AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: \"Daedalus Server\"\n}, {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: \"w0r1d_d43m0n\"\n}];\n\n//# sourceURL=webpack:///./src/Server/data/servers.ts?");
|
||
|
||
/***/ }),
|
||
/* 656 */
|
||
/*!******************************************!*\
|
||
!*** ./src/BitNode/ui/BitFlumePopup.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: BitFlumePopup */
|
||
/*! exports used: BitFlumePopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitFlumePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\nfunction BitFlumePopup(props) {\n function flume() {\n props.router.toBitVerse(true, false);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: flume\n }, \"Travel to the BitVerse\"));\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/BitFlumePopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 657 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Faction/ui/InvitationPopup.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: InvitationPopup */
|
||
/*! exports used: InvitationPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InvitationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Faction/FactionHelpers */ 91);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\nfunction InvitationPopup(props) {\n function join() {\n //Remove from invited factions\n const i = props.player.factionInvitations.findIndex(facName => facName === props.faction.name);\n\n if (i === -1) {\n console.error(\"Could not find faction in Player.factionInvitations\");\n }\n\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* joinFaction */ \"d\"])(props.faction);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"You have received a faction invitation.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to join \", props.faction.name, \"? \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Warning: Joining this faction may prevent you from joining other factions during this run!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: join\n }, \"Join!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId)\n }, \"Decide later\"));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/InvitationPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 658 */
|
||
/*!************************************!*\
|
||
!*** ./src/Hacknet/HashUpgrade.ts ***!
|
||
\************************************/
|
||
/*! exports provided: HashUpgrade */
|
||
/*! exports used: HashUpgrade */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashUpgrade; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Object representing an upgrade that can be purchased with hashes\n */\nclass HashUpgrade {\n /**\n * If the upgrade has a flat cost (never increases), it goes here\n * Otherwise, this property should be undefined\n *\n * This property overrides the 'costPerLevel' property\n */\n\n /**\n * Base cost for this upgrade. Every time the upgrade is purchased,\n * its cost increases by this same amount (so its 1x, 2x, 3x, 4x, etc.)\n */\n\n /**\n * Description of what the upgrade does\n */\n\n /**\n * Boolean indicating that this upgrade's effect affects a single server,\n * the \"target\" server\n */\n // Name of upgrade\n // Generic value used to indicate the potency/amount of this upgrade's effect\n // The meaning varies between different upgrades\n constructor(p) {\n _defineProperty(this, \"costPerLevel\", 0);\n\n _defineProperty(this, \"desc\", \"\");\n\n _defineProperty(this, \"hasTargetServer\", false);\n\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"value\", 0);\n\n _defineProperty(this, \"effectText\", () => null);\n\n if (p.cost != null) {\n this.cost = p.cost;\n }\n\n if (p.effectText != null) {\n this.effectText = p.effectText;\n }\n\n this.costPerLevel = p.costPerLevel;\n this.desc = p.desc;\n this.hasTargetServer = p.hasTargetServer ? p.hasTargetServer : false;\n this.name = p.name;\n this.value = p.value;\n } // Functions that returns the UI element to display the effect of this upgrade.\n\n\n getCost(levels) {\n if (typeof this.cost === \"number\") {\n return this.cost;\n }\n\n return Math.round((levels + 1) * this.costPerLevel);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HashUpgrade.ts?");
|
||
|
||
/***/ }),
|
||
/* 659 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Hacknet/data/HashUpgradesMetadata.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: HashUpgradesMetadata */
|
||
/*! exports used: HashUpgradesMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashUpgradesMetadata; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n// Metadata used to construct all Hash Upgrades\n\n\n\nconst HashUpgradesMetadata = [{\n cost: 4,\n costPerLevel: 4,\n desc: \"Sell hashes for $1m\",\n name: \"Sell for Money\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sold for \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: 1e6 * level\n })),\n value: 1e6\n}, {\n costPerLevel: 100,\n desc: \"Sell hashes for $1b in Corporation funds\",\n name: \"Sell for Corporation Funds\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sold for \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: 1e9 * level\n }), \" Corporation funds.\"),\n value: 1e9\n}, {\n costPerLevel: 50,\n desc: \"Use hashes to decrease the minimum security of a single server by 2%. \" + \"Note that a server's minimum security cannot go below 1. This effect persists \" + \"until you install Augmentations (since servers are reset at that time).\",\n hasTargetServer: true,\n name: \"Reduce Minimum Security\",\n value: 0.98\n}, {\n costPerLevel: 50,\n desc: \"Use hashes to increase the maximum amount of money on a single server by 2%. \" + \"This effect persists until you install Augmentations (since servers \" + \"are reset at that time).\",\n hasTargetServer: true,\n name: \"Increase Maximum Money\",\n value: 1.02\n}, {\n costPerLevel: 50,\n desc: \"Use hashes to improve the experience earned when studying at a university by 20%. \" + \"This effect persists until you install Augmentations\",\n name: \"Improve Studying\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Improves studying by \", level * 20, \"%\"),\n value: 20 // Improves studying by value%\n\n}, {\n costPerLevel: 50,\n desc: \"Use hashes to improve the experience earned when training at the gym by 20%. This effect \" + \"persists until you install Augmentations\",\n name: \"Improve Gym Training\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Improves training by \", level * 20, \"%\"),\n value: 20 // Improves training by value%\n\n}, {\n costPerLevel: 200,\n desc: \"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries\",\n name: \"Exchange for Corporation Research\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Acquired a total of \", level, \"k Scientific Research in your industries.\"),\n value: 1000\n}, {\n costPerLevel: 250,\n desc: \"Exchange hashes for 100 Bladeburner Rank\",\n name: \"Exchange for Bladeburner Rank\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Acquired a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(100 * level, \"0a\"), \" Bladeburner rank\"),\n value: 100\n}, {\n costPerLevel: 250,\n desc: \"Exchanges hashes for 10 Bladeburner Skill Points\",\n name: \"Exchange for Bladeburner SP\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Acquired a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(10 * level, \"0a\"), \" Bladeburner Skill Points\"),\n value: 10\n}, {\n costPerLevel: 200,\n desc: \"Generate a random Coding Contract somewhere on the network\",\n name: \"Generate Coding Contract\",\n effectText: level => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Generated \", level, \" contracts.\"),\n value: 1\n}];\n\n//# sourceURL=webpack:///./src/Hacknet/data/HashUpgradesMetadata.tsx?");
|
||
|
||
/***/ }),
|
||
/* 660 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Netscript/Environment.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: Environment */
|
||
/*! exports used: Environment */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Environment; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * The environment in which a script runs. The environment holds\n * Netscript functions and arguments for that script.\n */\nclass Environment {\n /**\n * Parent environment. Used to implement \"scope\"\n */\n\n /**\n * Whether or not the script that uses this Environment should stop running\n */\n\n /**\n * Environment variables (currently only Netscript functions)\n */\n constructor(parent) {\n _defineProperty(this, \"parent\", null);\n\n _defineProperty(this, \"stopFlag\", false);\n\n _defineProperty(this, \"vars\", {});\n\n if (parent instanceof Environment) {\n this.vars = Object.assign({}, parent.vars);\n }\n\n this.parent = parent;\n }\n /**\n * Finds the scope where the variable with the given name is defined\n */\n\n\n lookup(name) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let scope = this;\n\n while (scope) {\n if (Object.prototype.hasOwnProperty.call(scope.vars, name)) {\n return scope;\n }\n\n scope = scope.parent;\n }\n\n return null;\n } //Get the current value of a variable\n\n\n get(name) {\n if (name in this.vars) {\n return this.vars[name];\n }\n\n throw new Error(`Undefined variable ${name}`);\n } //Sets the value of a variable in any scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n set(name, value) {\n const scope = this.lookup(name); //If scope has a value, then this variable is already set in a higher scope, so\n //set is there. Otherwise, create a new variable in the local scope\n\n if (scope !== null) {\n return scope.vars[name] = value;\n } else {\n return this.vars[name] = value;\n }\n } //Creates (or overwrites) a variable in the current scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n def(name, value) {\n return this.vars[name] = value;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Netscript/Environment.ts?");
|
||
|
||
/***/ }),
|
||
/* 661 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Terminal/Terminal.ts ***!
|
||
\**********************************/
|
||
/*! exports provided: Terminal */
|
||
/*! exports used: Terminal */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Terminal; });\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ITerminal */ 250);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../DarkWeb/DarkWeb */ 390);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/LogBox */ 214);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Script/ScriptHelpers */ 169);\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HelpText */ 391);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Parser */ 522);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Hacking */ 81);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _commands_alias__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./commands/alias */ 662);\n/* harmony import */ var _commands_analyze__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./commands/analyze */ 663);\n/* harmony import */ var _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./commands/backdoor */ 664);\n/* harmony import */ var _commands_buy__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./commands/buy */ 665);\n/* harmony import */ var _commands_cat__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./commands/cat */ 666);\n/* harmony import */ var _commands_cd__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./commands/cd */ 667);\n/* harmony import */ var _commands_check__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./commands/check */ 668);\n/* harmony import */ var _commands_connect__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./commands/connect */ 669);\n/* harmony import */ var _commands_download__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./commands/download */ 670);\n/* harmony import */ var _commands_expr__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./commands/expr */ 673);\n/* harmony import */ var _commands_free__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./commands/free */ 523);\n/* harmony import */ var _commands_hack__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./commands/hack */ 674);\n/* harmony import */ var _commands_help__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./commands/help */ 675);\n/* harmony import */ var _commands_home__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./commands/home */ 676);\n/* harmony import */ var _commands_hostname__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./commands/hostname */ 677);\n/* harmony import */ var _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./commands/ifconfig */ 678);\n/* harmony import */ var _commands_kill__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./commands/kill */ 679);\n/* harmony import */ var _commands_killall__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./commands/killall */ 680);\n/* harmony import */ var _commands_ls__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./commands/ls */ 524);\n/* harmony import */ var _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./commands/lscpu */ 681);\n/* harmony import */ var _commands_mem__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./commands/mem */ 682);\n/* harmony import */ var _commands_mv__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./commands/mv */ 683);\n/* harmony import */ var _commands_nano__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./commands/nano */ 684);\n/* harmony import */ var _commands_ps__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./commands/ps */ 685);\n/* harmony import */ var _commands_rm__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./commands/rm */ 686);\n/* harmony import */ var _commands_run__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./commands/run */ 525);\n/* harmony import */ var _commands_scan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./commands/scan */ 526);\n/* harmony import */ var _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./commands/scananalyze */ 689);\n/* harmony import */ var _commands_scp__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./commands/scp */ 690);\n/* harmony import */ var _commands_sudov__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./commands/sudov */ 691);\n/* harmony import */ var _commands_tail__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./commands/tail */ 692);\n/* harmony import */ var _commands_theme__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./commands/theme */ 693);\n/* harmony import */ var _commands_top__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./commands/top */ 694);\n/* harmony import */ var _commands_unalias__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./commands/unalias */ 695);\n/* harmony import */ var _commands_wget__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./commands/wget */ 696);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Terminal {\n constructor() {\n _defineProperty(this, \"hasChanges\", false);\n\n _defineProperty(this, \"action\", null);\n\n _defineProperty(this, \"commandHistory\", []);\n\n _defineProperty(this, \"commandHistoryIndex\", 0);\n\n _defineProperty(this, \"outputHistory\", [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")]);\n\n _defineProperty(this, \"contractOpen\", false);\n\n _defineProperty(this, \"currDir\", \"/\");\n }\n\n process(router, player, cycles) {\n if (this.action === null) return;\n this.action.timeLeft -= _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed * cycles / 1000;\n this.hasChanges = true;\n if (this.action.timeLeft < 0) this.finishAction(router, player, false);\n }\n\n pollChanges() {\n if (this.hasChanges) {\n this.hasChanges = false;\n return true;\n }\n\n return false;\n }\n\n append(item) {\n this.outputHistory.push(item);\n\n if (this.outputHistory.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity) {\n this.outputHistory.slice(this.outputHistory.length - _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity);\n }\n }\n\n print(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"primary\"));\n this.hasChanges = true;\n }\n\n error(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"error\"));\n this.hasChanges = true;\n }\n\n startHack(player) {\n // Hacking through Terminal should be faster than hacking through a script\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"h\");\n }\n\n startBackdoor(player) {\n // Backdoor should take the same amount of time as hack\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"b\");\n }\n\n startAnalyze() {\n this.print(\"Analyzing system...\");\n this.startAction(1, \"a\");\n }\n\n startAction(n, action) {\n this.action = new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* TTimer */ \"c\"](n, action);\n } // Complete the hack/analyze command\n\n\n finishHack(router, player, cancelled = false) {\n if (cancelled) return;\n const server = player.getCurrentServer(); // Calculate whether hack was successful\n\n const hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingExpGain */ \"c\"])(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n let moneyGained = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained);\n player.recordMoneySource(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].IntelligenceTerminalHackBaseExpGain);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].ServerFortifyAmount);\n this.print(`Hack successful! Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} hacking exp`);\n } else {\n // Failure\n // player only gains 25% exp for failure? TODO Can change this later to balance\n player.gainHackingExp(expGainedOnFailure);\n this.print(`Failed to hack ${server.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} hacking exp`);\n }\n }\n\n finishBackdoor(router, player, cancelled = false) {\n if (!cancelled) {\n const server = player.getCurrentServer();\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n this.print(\"Backdoor successful!\");\n }\n }\n\n finishAnalyze(player, cancelled = false) {\n if (!cancelled) {\n const currServ = player.getCurrentServer();\n const isHacknet = currServ instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = !isHacknet && currServ.hasAdminRights || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatServerSecurity(security) : \"N/A\"));\n const hackingChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime, true) : \"N/A\"));\n this.print(`Total money available on server: ${!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(currServ.moneyAvailable) : \"N/A\"}`);\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n\n finishAction(router, player, cancelled = false) {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n this.print(this.getProgressText());\n\n if (this.action.action === \"h\") {\n this.finishHack(router, player, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n\n this.action = null;\n }\n\n getFile(player, filename) {\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename) {\n const path = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* evaluateFilePath */ \"b\"])(filename, this.cwd());\n\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* isInRootDirectory */ \"e\"])(path)) {\n return Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* removeLeadingSlash */ \"h\"])(path);\n }\n\n return path;\n }\n\n getScript(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd() {\n return this.currDir;\n }\n\n setcwd(dir) {\n this.currDir = dir;\n this.hasChanges = true;\n }\n\n async runContract(player, contractName) {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n switch (res) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n\n serv.removeContract(contract);\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Failure:\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n this.print(\"Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.print(`Contract <p style='color:red;display:inline'>FAILED</p> - ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player, depth = 1, all = false) {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \"); // Map of all servers to keep track of which have been visited\n\n const visited = {};\n\n for (const ip in _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__[/* AllServers */ \"b\"]) {\n visited[ip] = 0;\n }\n\n const stack = [];\n const depthQueue = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n\n if (!all && s.purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.ip] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.ip] = 1;\n }\n\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServerOnNetwork */ \"c\"])(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n\n if (d == 0) {\n continue;\n } // Don't print current server\n\n\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n\n if (player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_2__[/* Programs */ \"a\"].AutoLink.name)) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Link */ \"a\"](s.hostname));\n } else {\n this.print(s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n\n this.print(`${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + s.requiredHackingSkill : \"\"}`);\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + s.numOpenPortsRequired);\n }\n\n this.print(dashes + \"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatRAM(s.maxRam));\n this.print(\" \");\n }\n\n const links = document.getElementsByClassName(\"scan-analyze-link\");\n\n for (let i = 0; i < links.length; ++i) {\n (() => {\n const hostname = links[i].innerHTML.toString();\n links[i].addEventListener(\"onclick\", () => {\n if (this.action !== null) {\n return;\n }\n\n this.connectToServer(player, hostname);\n });\n })(); // Immediate invocation\n\n }\n }\n\n connectToServer(player, server) {\n const serv = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(server);\n\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n\n if (player.getCurrentServer().hostname == \"darkweb\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__[/* checkIfConnectedToDarkweb */ \"b\"])(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router, player, commands) {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n // Handle Terminal History - multiple commands should be saved as one\n\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n }\n\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommands */ \"b\"])(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear() {\n // TODO: remove this once we figure out the height issue.\n this.outputHistory = [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")];\n this.hasChanges = true;\n }\n\n prestige() {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router, player, command) {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n } // Allow usage of ./\n\n\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n } // Only split the first space\n\n\n const commandArray = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommand */ \"a\"])(command);\n\n if (commandArray.length == 0) {\n return;\n }\n\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].isRunning) {\n const n00dlesServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* GetServerByHostname */ \"a\"])(\"n00dles\");\n\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n return;\n }\n\n switch (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].currStep) {\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n _HelpText__WEBPACK_IMPORTED_MODULE_12__[/* TerminalHelpText */ \"b\"].forEach(line => this.print(line));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n Object(_commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n Object(_commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n this.executeScanAnalyzeCommand(player, 1);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n this.executeScanAnalyzeCommand(player, 2);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalConnect:\n if (commandArray.length == 2) {\n if (commandArray[0] == \"connect\" && (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.ip)) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = n00dlesServ.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n if (commandArray.length !== 1) {\n this.print(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n\n this.startAnalyze();\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n n00dlesServ.hasAdminRights = true;\n this.print(\"NUKE successful! Gained root access to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n this.startHack(player);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n router.toScriptEditor(\"n00dles.script\", \"\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n Object(_commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n Object(_commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n // Check that the script exists on this machine\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__[/* findRunningScript */ \"a\"])(\"n00dles.script\", [], player.getCurrentServer());\n\n if (runningScript == null) {\n this.print(\"Error: No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_9__[/* logBoxCreate */ \"a\"])(runningScript);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n default:\n this.print(\"Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it\");\n return;\n }\n\n return;\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n\n /* Command parser */\n\n\n const commandName = commandArray[0];\n\n if (typeof commandName === \"number\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands = {\n alias: _commands_alias__WEBPACK_IMPORTED_MODULE_21__[/* alias */ \"a\"],\n analyze: _commands_analyze__WEBPACK_IMPORTED_MODULE_22__[/* analyze */ \"a\"],\n backdoor: _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__[/* backdoor */ \"a\"],\n buy: _commands_buy__WEBPACK_IMPORTED_MODULE_24__[/* buy */ \"a\"],\n cat: _commands_cat__WEBPACK_IMPORTED_MODULE_25__[/* cat */ \"a\"],\n cd: _commands_cd__WEBPACK_IMPORTED_MODULE_26__[/* cd */ \"a\"],\n check: _commands_check__WEBPACK_IMPORTED_MODULE_27__[/* check */ \"a\"],\n cls: () => this.clear(),\n clear: () => this.clear(),\n connect: _commands_connect__WEBPACK_IMPORTED_MODULE_28__[/* connect */ \"a\"],\n download: _commands_download__WEBPACK_IMPORTED_MODULE_29__[/* download */ \"a\"],\n expr: _commands_expr__WEBPACK_IMPORTED_MODULE_30__[/* expr */ \"a\"],\n free: _commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"],\n hack: _commands_hack__WEBPACK_IMPORTED_MODULE_32__[/* hack */ \"a\"],\n help: _commands_help__WEBPACK_IMPORTED_MODULE_33__[/* help */ \"a\"],\n home: _commands_home__WEBPACK_IMPORTED_MODULE_34__[/* home */ \"a\"],\n hostname: _commands_hostname__WEBPACK_IMPORTED_MODULE_35__[/* hostname */ \"a\"],\n ifconfig: _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__[/* ifconfig */ \"a\"],\n kill: _commands_kill__WEBPACK_IMPORTED_MODULE_37__[/* kill */ \"a\"],\n killall: _commands_killall__WEBPACK_IMPORTED_MODULE_38__[/* killall */ \"a\"],\n ls: _commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"],\n lscpu: _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__[/* lscpu */ \"a\"],\n mem: _commands_mem__WEBPACK_IMPORTED_MODULE_41__[/* mem */ \"a\"],\n mv: _commands_mv__WEBPACK_IMPORTED_MODULE_42__[/* mv */ \"a\"],\n nano: _commands_nano__WEBPACK_IMPORTED_MODULE_43__[/* nano */ \"a\"],\n ps: _commands_ps__WEBPACK_IMPORTED_MODULE_44__[/* ps */ \"a\"],\n rm: _commands_rm__WEBPACK_IMPORTED_MODULE_45__[/* rm */ \"a\"],\n run: _commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"],\n scan: _commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"],\n \"scan-analyze\": _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__[/* scananalyze */ \"a\"],\n scp: _commands_scp__WEBPACK_IMPORTED_MODULE_49__[/* scp */ \"a\"],\n sudov: _commands_sudov__WEBPACK_IMPORTED_MODULE_50__[/* sudov */ \"a\"],\n tail: _commands_tail__WEBPACK_IMPORTED_MODULE_51__[/* tail */ \"a\"],\n theme: _commands_theme__WEBPACK_IMPORTED_MODULE_52__[/* theme */ \"a\"],\n top: _commands_top__WEBPACK_IMPORTED_MODULE_53__[/* top */ \"a\"],\n unalias: _commands_unalias__WEBPACK_IMPORTED_MODULE_54__[/* unalias */ \"a\"],\n wget: _commands_wget__WEBPACK_IMPORTED_MODULE_55__[/* wget */ \"a\"]\n };\n const f = commands[commandName.toLowerCase()];\n\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText() {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__[/* createProgressBarText */ \"a\"])({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Terminal/Terminal.ts?");
|
||
|
||
/***/ }),
|
||
/* 662 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Terminal/commands/alias.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: alias */
|
||
/*! exports used: alias */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return alias; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Alias */ 87);\n\nfunction alias(terminal, router, player, server, args) {\n if (args.length === 0) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* printAliases */ \"f\"])();\n return;\n }\n\n if (args.length === 1) {\n if (Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* parseAliasDeclaration */ \"e\"])(args[0] + \"\")) {\n terminal.print(`Set alias ${args[0]}`);\n return;\n }\n }\n\n if (args.length === 2) {\n if (args[0] === \"-g\") {\n if (Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* parseAliasDeclaration */ \"e\"])(args[1] + \"\", true)) {\n terminal.print(`Set global alias ${args[1]}`);\n return;\n }\n }\n }\n\n terminal.error('Incorrect usage of alias command. Usage: alias [-g] [aliasname=\"value\"]');\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/alias.ts?");
|
||
|
||
/***/ }),
|
||
/* 663 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Terminal/commands/analyze.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: analyze */
|
||
/*! exports used: analyze */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return analyze; });\nfunction analyze(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.print(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n\n terminal.startAnalyze();\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/analyze.ts?");
|
||
|
||
/***/ }),
|
||
/* 664 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Terminal/commands/backdoor.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: backdoor */
|
||
/*! exports used: backdoor */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return backdoor; });\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n\n\nfunction backdoor(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.print(\"Incorrect usage of backdoor command. Usage: backdoor\");\n return;\n }\n\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_0__[/* Server */ \"a\"])) {\n terminal.error(\"Can only backdoor normal servers\");\n }\n\n const normalServer = server;\n\n if (normalServer.purchasedByPlayer) {\n terminal.error(\"Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers\");\n } else if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot backdoor\");\n } else if (normalServer.requiredHackingSkill > player.hacking_skill) {\n terminal.error(\"Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill\");\n } else if (normalServer instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"]) {\n terminal.error(\"Cannot use backdoor on this type of Server\");\n } else {\n terminal.startBackdoor(player);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/backdoor.ts?");
|
||
|
||
/***/ }),
|
||
/* 665 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Terminal/commands/buy.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: buy */
|
||
/*! exports used: buy */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buy; });\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../DarkWeb/DarkWeb */ 390);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n\n\nfunction buy(terminal, router, player, server, args) {\n if (!_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n terminal.error(\"You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)\");\n return;\n }\n\n if (args.length != 1) {\n terminal.print(\"Incorrect number of arguments. Usage: \");\n terminal.print(\"buy -l\");\n terminal.print(\"buy [item name]\");\n return;\n }\n\n const arg = args[0] + \"\";\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* listAllDarkwebItems */ \"c\"])();\n } else {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* buyDarkwebItem */ \"a\"])(arg);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/buy.ts?");
|
||
|
||
/***/ }),
|
||
/* 666 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Terminal/commands/cat.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: cat */
|
||
/*! exports used: cat */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cat; });\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Message/MessageHelpers */ 132);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Message/Message */ 97);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Literature/LiteratureHelpers */ 431);\n\n\n\nfunction cat(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of cat command. Usage: cat [file]\");\n return;\n }\n\n const filename = terminal.getFilepath(args[0] + \"\");\n\n if (!filename.endsWith(\".msg\") && !filename.endsWith(\".lit\") && !filename.endsWith(\".txt\")) {\n terminal.error(\"Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)\");\n return;\n }\n\n if (filename.endsWith(\".msg\") || filename.endsWith(\".lit\")) {\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.endsWith(\".lit\") && server.messages[i] === filename) {\n const file = server.messages[i];\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_1__[/* Message */ \"a\"]) throw new Error(\".lit file should not be a .msg\");\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_2__[/* showLiterature */ \"a\"])(file);\n return;\n } else if (filename.endsWith(\".msg\")) {\n const file = server.messages[i];\n if (file.filename !== filename) continue;\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_0__[/* showMessage */ \"e\"])(file);\n return;\n }\n }\n } else if (filename.endsWith(\".txt\")) {\n const txt = terminal.getTextFile(player, filename);\n\n if (txt != null) {\n txt.show();\n return;\n }\n }\n\n terminal.error(`No such file ${filename}`);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/cat.ts?");
|
||
|
||
/***/ }),
|
||
/* 667 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Terminal/commands/cd.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: cd */
|
||
/*! exports used: cd */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cd; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../DirectoryHelpers */ 86);\n\nfunction cd(terminal, router, player, server, args) {\n if (args.length > 1) {\n terminal.error(\"Incorrect number of arguments. Usage: cd [dir]\");\n } else {\n let dir = args.length === 1 ? args[0] + \"\" : \"/\";\n let evaledDir = \"\";\n\n if (dir === \"/\") {\n evaledDir = \"/\";\n } else {\n // Ignore trailing slashes\n dir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* removeTrailingSlash */ \"i\"])(dir);\n evaledDir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* evaluateDirectoryPath */ \"a\"])(dir, terminal.cwd());\n\n if (evaledDir === null || evaledDir === \"\") {\n terminal.error(\"Invalid path. Failed to change directories\");\n return;\n }\n\n const server = player.getCurrentServer();\n\n if (!server.scripts.some(script => script.filename.startsWith(evaledDir + \"\")) && !server.textFiles.some(file => file.fn.startsWith(evaledDir + \"\"))) {\n terminal.error(\"Invalid path. Failed to change directories\");\n return;\n }\n }\n\n terminal.setcwd(evaledDir);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/cd.ts?");
|
||
|
||
/***/ }),
|
||
/* 668 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Terminal/commands/check.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: check */
|
||
/*! exports used: check */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return check; });\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\n\nfunction check(terminal, router, player, server, args) {\n if (args.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...\");\n } else {\n const scriptName = terminal.getFilepath(args[0] + \"\"); // Can only tail script files\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_1__[/* isScriptFilename */ \"a\"])(scriptName)) {\n terminal.error(\"tail can only be called on .script files (filename must end with .script)\");\n return;\n } // Check that the script exists on this machine\n\n\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_0__[/* findRunningScript */ \"a\"])(scriptName, args.slice(1), server);\n\n if (runningScript == null) {\n terminal.error(\"No such script exists\");\n return;\n }\n\n runningScript.displayLog();\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/check.ts?");
|
||
|
||
/***/ }),
|
||
/* 669 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Terminal/commands/connect.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: connect */
|
||
/*! exports used: connect */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return connect; });\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n\nfunction connect(terminal, router, player, server, args) {\n // Disconnect from current server in terminal and connect to new one\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of connect command. Usage: connect [ip/hostname]\");\n return;\n }\n\n const ip = args[0] + \"\";\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getServerOnNetwork */ \"c\"])(server, i);\n if (other === null) throw new Error(`Server on network should not be null`);\n\n if (other.ip == ip || other.hostname == ip) {\n terminal.connectToServer(player, ip);\n return;\n }\n }\n\n terminal.error(\"Host not found\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/connect.ts?");
|
||
|
||
/***/ }),
|
||
/* 670 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Terminal/commands/download.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: download */
|
||
/*! exports used: download */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return download; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! file-saver */ 671);\n/* harmony import */ var file_saver__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jszip */ 672);\n/* harmony import */ var jszip__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction download(terminal, router, player, server, args) {\n try {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of download command. Usage: download [script/text file]\");\n return;\n }\n\n const fn = args[0] + \"\";\n\n if (fn === \"*\" || fn === \"*.script\" || fn === \"*.txt\") {\n // Download all scripts as a zip\n const zip = new jszip__WEBPACK_IMPORTED_MODULE_2___default.a();\n\n if (fn === \"*\" || fn === \"*.script\") {\n for (let i = 0; i < server.scripts.length; ++i) {\n const file = new Blob([server.scripts[i].code], {\n type: \"text/plain\"\n });\n zip.file(server.scripts[i].filename + \".js\", file);\n }\n }\n\n if (fn === \"*\" || fn === \"*.txt\") {\n for (let i = 0; i < server.textFiles.length; ++i) {\n const file = new Blob([server.textFiles[i].text], {\n type: \"text/plain\"\n });\n zip.file(server.textFiles[i].fn, file);\n }\n }\n\n let zipFn = \"\";\n\n switch (fn) {\n case \"*.script\":\n zipFn = \"bitburnerScripts.zip\";\n break;\n\n case \"*.txt\":\n zipFn = \"bitburnerTexts.zip\";\n break;\n\n default:\n zipFn = \"bitburnerFiles.zip\";\n break;\n }\n\n zip.generateAsync({\n type: \"blob\"\n }).then(content => file_saver__WEBPACK_IMPORTED_MODULE_1___default.a.saveAs(content, zipFn));\n return;\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(fn)) {\n // Download a single script\n const script = terminal.getScript(player, fn);\n\n if (script != null) {\n return script.download();\n }\n } else if (fn.endsWith(\".txt\")) {\n // Download a single text file\n const txt = terminal.getTextFile(player, fn);\n\n if (txt != null) {\n return txt.download();\n }\n } else {\n terminal.error(`Cannot download this filetype`);\n return;\n }\n\n terminal.error(`${fn} does not exist`);\n return;\n } catch (e) {\n terminal.error(e + \"\");\n return;\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/download.ts?");
|
||
|
||
/***/ }),
|
||
/* 671 */,
|
||
/* 672 */,
|
||
/* 673 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/expr.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: expr */
|
||
/*! exports used: expr */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return expr; });\nfunction expr(terminal, router, player, server, args) {\n if (args.length === 0) {\n terminal.error(\"Incorrect usage of expr command. Usage: expr [math expression]\");\n return;\n }\n\n const expr = args.join(\"\"); // Sanitize the math expression\n\n const sanitizedExpr = expr.replace(/s+/g, \"\").replace(/[^-()\\d/*+.]/g, \"\");\n let result;\n\n try {\n result = eval(sanitizedExpr);\n } catch (e) {\n terminal.error(`Could not evaluate expression: ${sanitizedExpr}`);\n return;\n }\n\n terminal.print(result);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/expr.ts?");
|
||
|
||
/***/ }),
|
||
/* 674 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/hack.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: hack */
|
||
/*! exports used: hack */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return hack; });\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Server/Server */ 92);\n\nfunction hack(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of hack command. Usage: hack\");\n return;\n }\n\n if (!(server instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_0__[/* Server */ \"a\"])) {\n terminal.error(\"Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers\");\n }\n\n const normalServer = server; // Hack the current PC (usually for money)\n // You can't hack your home pc or servers you purchased\n\n if (normalServer.purchasedByPlayer) {\n terminal.error(\"Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers\");\n return;\n }\n\n if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot hack\");\n return;\n }\n\n if (normalServer.requiredHackingSkill > player.hacking_skill) {\n terminal.error(\"Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill\");\n return;\n }\n\n terminal.startHack(player);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/hack.ts?");
|
||
|
||
/***/ }),
|
||
/* 675 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/help.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: help */
|
||
/*! exports used: help */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return help; });\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../HelpText */ 391);\n\nfunction help(terminal, router, player, server, args) {\n if (args.length !== 0 && args.length !== 1) {\n terminal.error(\"Incorrect usage of help command. Usage: help\");\n return;\n }\n\n if (args.length === 0) {\n _HelpText__WEBPACK_IMPORTED_MODULE_0__[/* TerminalHelpText */ \"b\"].forEach(line => terminal.print(line));\n } else {\n const cmd = args[0];\n const txt = _HelpText__WEBPACK_IMPORTED_MODULE_0__[/* HelpTexts */ \"a\"][cmd];\n\n if (txt == null) {\n terminal.error(\"No help topics match '\" + cmd + \"'\");\n return;\n }\n\n txt.forEach(t => terminal.print(t));\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/help.ts?");
|
||
|
||
/***/ }),
|
||
/* 676 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/home.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: home */
|
||
/*! exports used: home */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return home; });\nfunction home(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of home command. Usage: home\");\n return;\n }\n\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = player.getHomeComputer().ip;\n player.getCurrentServer().isConnectedTo = true;\n terminal.print(\"Connected to home\");\n terminal.setcwd(\"/\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/home.ts?");
|
||
|
||
/***/ }),
|
||
/* 677 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Terminal/commands/hostname.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: hostname */
|
||
/*! exports used: hostname */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return hostname; });\nfunction hostname(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of hostname command. Usage: hostname\");\n return;\n }\n\n terminal.print(player.getCurrentServer().hostname);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/hostname.ts?");
|
||
|
||
/***/ }),
|
||
/* 678 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Terminal/commands/ifconfig.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: ifconfig */
|
||
/*! exports used: ifconfig */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ifconfig; });\nfunction ifconfig(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of ifconfig command. Usage: ifconfig\");\n return;\n }\n\n terminal.print(player.getCurrentServer().ip);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/ifconfig.ts?");
|
||
|
||
/***/ }),
|
||
/* 679 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/kill.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: kill */
|
||
/*! exports used: kill */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return kill; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 103);\n\nfunction kill(terminal, router, player, server, args) {\n try {\n if (args.length < 1) {\n terminal.error(\"Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...\");\n return;\n } // Kill by PID\n\n\n if (typeof args[0] === \"number\") {\n const pid = args[0];\n const res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(pid);\n\n if (res) {\n terminal.print(`Killing script with PID ${pid}`);\n } else {\n terminal.print(`Failed to kill script with PID ${pid}. No such script exists`);\n }\n\n return;\n }\n\n const scriptName = terminal.getFilepath(args[0]);\n const runningScript = server.getRunningScript(scriptName, args.slice(1));\n\n if (runningScript == null) {\n terminal.error(\"No such script is running. Nothing to kill\");\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(runningScript, server.ip, false);\n terminal.print(`Killing ${scriptName}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/kill.ts?");
|
||
|
||
/***/ }),
|
||
/* 680 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Terminal/commands/killall.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: killall */
|
||
/*! exports used: killall */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killall; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 103);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 213);\n\n\nfunction killall(terminal, router, player, server) {\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n terminal.print(\"Killing all running scripts\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/killall.ts?");
|
||
|
||
/***/ }),
|
||
/* 681 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Terminal/commands/lscpu.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: lscpu */
|
||
/*! exports used: lscpu */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return lscpu; });\nfunction lscpu(terminal, router, player) {\n terminal.print(player.getCurrentServer().cpuCores + \" Core(s)\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/lscpu.ts?");
|
||
|
||
/***/ }),
|
||
/* 682 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Terminal/commands/mem.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: mem */
|
||
/*! exports used: mem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return mem; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\nfunction mem(terminal, router, player, server, args) {\n try {\n if (args.length !== 1 && args.length !== 3) {\n terminal.error(\"Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]\");\n return;\n }\n\n const scriptName = args[0] + \"\";\n let numThreads = 1;\n\n if (args.length === 3 && args[1] === \"-t\") {\n numThreads = Math.round(parseInt(args[2] + \"\"));\n\n if (isNaN(numThreads) || numThreads < 1) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 1\");\n return;\n }\n }\n\n const script = terminal.getScript(player, scriptName);\n\n if (script == null) {\n terminal.error(\"No such script exists!\");\n return;\n }\n\n const ramUsage = script.ramUsage * numThreads;\n terminal.print(`This script requires ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatRAM(ramUsage)} of RAM to run for ${numThreads} thread(s)`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/mem.ts?");
|
||
|
||
/***/ }),
|
||
/* 683 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Terminal/commands/mv.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: mv */
|
||
/*! exports used: mv */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return mv; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../TextFile */ 197);\n\n\nfunction mv(terminal, router, player, server, args) {\n if (args.length !== 2) {\n terminal.error(`Incorrect number of arguments. Usage: mv [src] [dest]`);\n return;\n }\n\n try {\n const source = args[0] + \"\";\n const dest = args[1] + \"\";\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(source) && !source.endsWith(\".txt\")) {\n terminal.error(`'mv' can only be used on scripts and text files (.txt)`);\n return;\n }\n\n const srcFile = terminal.getFile(player, source);\n\n if (srcFile == null) {\n terminal.error(`Source file ${source} does not exist`);\n return;\n }\n\n const sourcePath = terminal.getFilepath(source);\n const destPath = terminal.getFilepath(dest);\n const destFile = terminal.getFile(player, dest); // 'mv' command only works on scripts and txt files.\n // Also, you can't convert between different file types\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(source)) {\n const script = srcFile;\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(dest)) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n } // Command doesnt work if script is running\n\n\n if (server.isRunning(sourcePath)) {\n terminal.error(`Cannot use 'mv' on a script that is running`);\n return;\n }\n\n if (destFile != null) {\n // Already exists, will be overwritten, so we'll delete it\n const status = server.removeFile(destPath);\n\n if (!status.res) {\n terminal.error(`Something went wrong...please contact game dev (probably a bug)`);\n return;\n } else {\n terminal.print(\"Warning: The destination file was overwritten\");\n }\n }\n\n script.filename = destPath;\n } else if (srcFile instanceof _TextFile__WEBPACK_IMPORTED_MODULE_1__[/* TextFile */ \"a\"]) {\n const textFile = srcFile;\n\n if (!dest.endsWith(\".txt\")) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n }\n\n if (destFile != null) {\n // Already exists, will be overwritten, so we'll delete it\n const status = server.removeFile(destPath);\n\n if (!status.res) {\n terminal.error(`Something went wrong...please contact game dev (probably a bug)`);\n return;\n } else {\n terminal.print(\"Warning: The destination file was overwritten\");\n }\n }\n\n textFile.fn = destPath;\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/mv.ts?");
|
||
|
||
/***/ }),
|
||
/* 684 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/nano.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: nano */
|
||
/*! exports used: nano */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return nano; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Fconf/Fconf */ 313);\n\n\nfunction nano(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of nano command. Usage: nano [scriptname]\");\n return;\n }\n\n try {\n const filename = args[0] + \"\";\n\n if (filename === \".fconf\") {\n const text = Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_1__[/* createFconf */ \"a\"])();\n router.toScriptEditor(filename, text);\n return;\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(filename)) {\n const filepath = terminal.getFilepath(filename);\n const script = terminal.getScript(player, filename);\n\n if (script == null) {\n let code = \"\";\n\n if (filename.endsWith(\".ns\") || filename.endsWith(\".js\")) {\n code = `export async function main(ns) {\n\n}`;\n }\n\n router.toScriptEditor(filepath, code);\n } else {\n router.toScriptEditor(filepath, script.code);\n }\n } else if (filename.endsWith(\".txt\")) {\n const filepath = terminal.getFilepath(filename);\n const txt = terminal.getTextFile(player, filename);\n\n if (txt == null) {\n router.toScriptEditor(filepath);\n } else {\n router.toScriptEditor(filepath, txt.text);\n }\n } else {\n terminal.error(\"Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano\");\n return;\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/nano.ts?");
|
||
|
||
/***/ }),
|
||
/* 685 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Terminal/commands/ps.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: ps */
|
||
/*! exports used: ps */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ps; });\nfunction ps(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of ps command. Usage: ps\");\n return;\n }\n\n for (let i = 0; i < server.runningScripts.length; i++) {\n const rsObj = server.runningScripts[i];\n let res = `(PID - ${rsObj.pid}) ${rsObj.filename}`;\n\n for (let j = 0; j < rsObj.args.length; ++j) {\n res += \" \" + rsObj.args[j].toString();\n }\n\n terminal.print(res);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/ps.ts?");
|
||
|
||
/***/ }),
|
||
/* 686 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Terminal/commands/rm.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: rm */
|
||
/*! exports used: rm */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return rm; });\nfunction rm(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect number of arguments. Usage: rm [program/script]\");\n return;\n } // Check programs\n\n\n let delTarget;\n let status = {\n res: true,\n msg: \"\"\n };\n\n try {\n delTarget = terminal.getFilepath(args[0] + \"\");\n status = server.removeFile(delTarget);\n } catch (err) {\n status = {\n res: false,\n msg: \"No such file exists\"\n };\n }\n\n if (!status.res && status.msg) {\n terminal.error(status.msg);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/rm.ts?");
|
||
|
||
/***/ }),
|
||
/* 687 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Terminal/commands/runScript.ts ***!
|
||
\********************************************/
|
||
/*! exports provided: runScript */
|
||
/*! exports used: runScript */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return runScript; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 214);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../NetscriptWorker */ 125);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Script/RunningScript */ 277);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! arg */ 437);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction runScript(terminal, router, player, server, commandArgs) {\n if (commandArgs.length < 1) {\n terminal.error(`Bug encountered with Terminal.runScript(). Command array has a length of less than 1: ${commandArgs}`);\n return;\n }\n\n const scriptName = terminal.getFilepath(commandArgs[0] + \"\");\n const runArgs = {\n \"--tail\": Boolean,\n \"-t\": Number\n };\n const flags = arg__WEBPACK_IMPORTED_MODULE_4__(runArgs, {\n permissive: true,\n argv: commandArgs.slice(1)\n });\n const threadFlag = Math.round(parseFloat(flags[\"-t\"]));\n const tailFlag = flags[\"--tail\"] === true;\n\n if (flags[\"-t\"] !== undefined && (threadFlag < 0 || isNaN(threadFlag))) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 0\");\n return;\n }\n\n const numThreads = !isNaN(threadFlag) && threadFlag > 0 ? threadFlag : 1;\n const args = flags[\"_\"]; // Check if this script is already running\n\n if (Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__[/* findRunningScript */ \"a\"])(scriptName, args, server) != null) {\n terminal.print(\"ERROR: This script is already running. Cannot run multiple instances\");\n return;\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (server.scripts[i].filename !== scriptName) {\n continue;\n } // Check for admin rights and that there is enough RAM availble to run\n\n\n const script = server.scripts[i];\n const ramUsage = script.ramUsage * numThreads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (!server.hasAdminRights) {\n terminal.print(\"Need root access to run script\");\n return;\n }\n\n if (ramUsage > ramAvailable) {\n terminal.print(\"This machine does not have enough RAM to run this script with \" + numThreads + \" threads. Script requires \" + ramUsage + \"GB of RAM\");\n return;\n } // Able to run script\n\n\n const runningScript = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__[/* RunningScript */ \"a\"](script, args);\n runningScript.threads = numThreads;\n const success = Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__[/* startWorkerScript */ \"e\"])(runningScript, server);\n\n if (!success) {\n terminal.error(`Failed to start script`);\n return;\n }\n\n terminal.print(`Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`);\n\n if (tailFlag) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n\n return;\n }\n\n terminal.print(\"ERROR: No such script\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runScript.ts?");
|
||
|
||
/***/ }),
|
||
/* 688 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Terminal/commands/runProgram.ts ***!
|
||
\*********************************************/
|
||
/*! exports provided: runProgram */
|
||
/*! exports used: runProgram */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return runProgram; });\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n\nfunction runProgram(terminal, router, player, server, args) {\n if (args.length < 1) {\n return;\n } // Check if you have the program on your computer. If you do, execute it, otherwise\n // display an error message\n\n\n const programName = args[0] + \"\";\n\n if (!player.hasProgram(programName)) {\n terminal.error(\"No such executable on home computer (Only programs that exist on your home computer can be run)\");\n return;\n }\n\n if (args.length < 1) {\n return;\n }\n\n for (const program of Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"])) {\n if (program.name === programName) {\n program.run(router, terminal, player, server, args.slice(1).map(arg => arg + \"\"));\n return;\n }\n }\n\n terminal.print(\"Invalid executable. Cannot be run\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runProgram.ts?");
|
||
|
||
/***/ }),
|
||
/* 689 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Terminal/commands/scananalyze.ts ***!
|
||
\**********************************************/
|
||
/*! exports provided: scananalyze */
|
||
/*! exports used: scananalyze */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return scananalyze; });\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n\nfunction scananalyze(terminal, router, player, server, args) {\n if (args.length === 0) {\n terminal.executeScanAnalyzeCommand(player, 1);\n } else {\n // # of args must be 2 or 3\n if (args.length > 2) {\n terminal.error(\"Incorrect usage of scan-analyze command. usage: scan-analyze [depth]\");\n return;\n }\n\n let all = false;\n\n if (args.length === 2 && args[1] === \"-a\") {\n all = true;\n }\n\n const depth = parseInt(args[0] + \"\");\n\n if (isNaN(depth) || depth < 0) {\n terminal.error(\"Incorrect usage of scan-analyze command. depth argument must be positive numeric\");\n return;\n }\n\n if (depth > 3 && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV1.name) && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 3\");\n return;\n } else if (depth > 5 && !player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"].DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 5\");\n return;\n } else if (depth > 10) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 10\");\n return;\n }\n\n terminal.executeScanAnalyzeCommand(player, depth, all);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/scananalyze.ts?");
|
||
|
||
/***/ }),
|
||
/* 690 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Terminal/commands/scp.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: scp */
|
||
/*! exports used: scp */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return scp; });\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Message/Message */ 97);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\n\n\nfunction scp(terminal, router, player, server, args) {\n try {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]\");\n return;\n }\n\n const scriptname = terminal.getFilepath(args[0] + \"\");\n\n if (!scriptname.endsWith(\".lit\") && !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_2__[/* isScriptFilename */ \"a\"])(scriptname) && !scriptname.endsWith(\".txt\")) {\n terminal.error(\"scp only works for scripts, text files (.txt), and literature files (.lit)\");\n return;\n }\n\n const destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getServer */ \"b\"])(args[1] + \"\");\n\n if (destServer == null) {\n terminal.error(`Invalid destination. ${args[1]} not found`);\n return;\n } // Scp for lit files\n\n\n if (scriptname.endsWith(\".lit\")) {\n let found = false;\n\n for (let i = 0; i < server.messages.length; ++i) {\n if (!(server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"]) && server.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n return terminal.error(\"No such file exists!\");\n }\n\n for (let i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n terminal.print(scriptname + \" copied over to \" + destServer.hostname);\n return; // Already exists\n }\n }\n\n destServer.messages.push(scriptname);\n return terminal.print(scriptname + \" copied over to \" + destServer.hostname);\n } // Scp for txt files\n\n\n if (scriptname.endsWith(\".txt\")) {\n let txtFile = null;\n\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === scriptname) {\n txtFile = server.textFiles[i];\n break;\n }\n }\n\n if (txtFile === null) {\n return terminal.error(\"No such file exists!\");\n }\n\n const tRes = destServer.writeToTextFile(txtFile.fn, txtFile.text);\n\n if (!tRes.success) {\n terminal.error(\"scp failed\");\n return;\n }\n\n if (tRes.overwritten) {\n terminal.print(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwriten`);\n terminal.print(`${scriptname} overwritten on ${destServer.hostname}`);\n return;\n }\n\n terminal.print(`${scriptname} copied over to ${destServer.hostname}`);\n return;\n } // Get the current script\n\n\n let sourceScript = null;\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (scriptname == server.scripts[i].filename) {\n sourceScript = server.scripts[i];\n break;\n }\n }\n\n if (sourceScript == null) {\n terminal.error(\"scp() failed. No such script exists\");\n return;\n }\n\n const sRes = destServer.writeToScriptFile(scriptname, sourceScript.code);\n\n if (!sRes.success) {\n terminal.error(`scp failed`);\n return;\n }\n\n if (sRes.overwritten) {\n terminal.print(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwritten`);\n terminal.print(`${scriptname} overwritten on ${destServer.hostname}`);\n return;\n }\n\n terminal.print(`${scriptname} copied over to ${destServer.hostname}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/scp.ts?");
|
||
|
||
/***/ }),
|
||
/* 691 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Terminal/commands/sudov.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: sudov */
|
||
/*! exports used: sudov */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return sudov; });\nfunction sudov(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect number of arguments. Usage: sudov\");\n return;\n }\n\n if (server.hasAdminRights) {\n terminal.print(\"You have ROOT access to this machine\");\n } else {\n terminal.print(\"You do NOT have root access to this machine\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/sudov.ts?");
|
||
|
||
/***/ }),
|
||
/* 692 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/tail.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: tail */
|
||
/*! exports used: tail */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return tail; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 214);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/compareArrays */ 241);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\n\n\n\nfunction tail(terminal, router, player, server, commandArray) {\n try {\n if (commandArray.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...\");\n } else if (typeof commandArray[0] === \"string\") {\n const scriptName = terminal.getFilepath(commandArray[0]);\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__[/* isScriptFilename */ \"a\"])(scriptName)) {\n terminal.error(\"tail can only be called on .script, .ns, .js files, or by pid\");\n return;\n } // Get script arguments\n\n\n const args = [];\n\n for (let i = 1; i < commandArray.length; ++i) {\n args.push(commandArray[i]);\n } // go over all the running scripts. If there's a perfect\n // match, use it!\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(server.runningScripts[i]);\n return;\n }\n } // Find all scripts that are potential candidates.\n\n\n const candidates = [];\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n // only scripts that have more arguments (equal arguments is already caught)\n if (server.runningScripts[i].args.length < args.length) continue; // make a smaller copy of the args.\n\n const args2 = server.runningScripts[i].args.slice(0, args.length);\n\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(args2, args)) {\n candidates.push(server.runningScripts[i]);\n }\n } // If there's only 1 possible choice, use that.\n\n\n if (candidates.length === 1) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(candidates[0]);\n return;\n } // otherwise lists all possible conflicting choices.\n\n\n if (candidates.length > 1) {\n terminal.error(\"Found several potential candidates:\");\n\n for (const candidate of candidates) terminal.error(`${candidate.filename} ${candidate.args.join(\" \")}`);\n\n terminal.error(\"Script arguments need to be specified.\");\n return;\n } // if there's no candidate then we just don't know.\n\n\n terminal.error(\"No such script exists.\");\n } else {\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findRunningScriptByPid */ \"b\"])(commandArray[0], server);\n\n if (runningScript == null) {\n terminal.error(\"No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/tail.ts?");
|
||
|
||
/***/ }),
|
||
/* 693 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Terminal/commands/theme.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: theme */
|
||
/*! exports used: theme */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return theme; });\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\nfunction theme(terminal, router, player, server, args) {\n if (args.length !== 1 && args.length !== 3) {\n terminal.error(\"Incorrect number of arguments.\");\n terminal.error(\"Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]\");\n } else if (args.length === 1) {\n const themeName = args[0];\n\n if (themeName == \"default\") {\n document.body.style.setProperty(\"--my-highlight-color\", \"#ffffff\");\n document.body.style.setProperty(\"--my-font-color\", \"#66ff33\");\n document.body.style.setProperty(\"--my-background-color\", \"#000000\");\n document.body.style.setProperty(\"--my-prompt-color\", \"#f92672\");\n } else if (themeName == \"muted\") {\n document.body.style.setProperty(\"--my-highlight-color\", \"#ffffff\");\n document.body.style.setProperty(\"--my-font-color\", \"#66ff33\");\n document.body.style.setProperty(\"--my-background-color\", \"#252527\");\n } else if (themeName == \"solarized\") {\n document.body.style.setProperty(\"--my-highlight-color\", \"#6c71c4\");\n document.body.style.setProperty(\"--my-font-color\", \"#839496\");\n document.body.style.setProperty(\"--my-background-color\", \"#002b36\");\n } else {\n return terminal.error(\"Theme not found\");\n }\n\n _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_HIGHLIGHT_COLOR = document.body.style.getPropertyValue(\"--my-highlight-color\");\n _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_FONT_COLOR = document.body.style.getPropertyValue(\"--my-font-color\");\n _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_BACKGROUND_COLOR = document.body.style.getPropertyValue(\"--my-background-color\");\n _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_PROMPT_COLOR = document.body.style.getPropertyValue(\"--my-prompt-color\");\n } else {\n const inputBackgroundHex = args[0] + \"\";\n const inputTextHex = args[1] + \"\";\n const inputHighlightHex = args[2] + \"\";\n\n if (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputBackgroundHex) && /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputTextHex) && /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputHighlightHex)) {\n document.body.style.setProperty(\"--my-highlight-color\", inputHighlightHex);\n document.body.style.setProperty(\"--my-font-color\", inputTextHex);\n document.body.style.setProperty(\"--my-background-color\", inputBackgroundHex);\n _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_HIGHLIGHT_COLOR = document.body.style.getPropertyValue(\"--my-highlight-color\");\n _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_FONT_COLOR = document.body.style.getPropertyValue(\"--my-font-color\");\n _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_BACKGROUND_COLOR = document.body.style.getPropertyValue(\"--my-background-color\");\n } else {\n return terminal.error(\"Invalid Hex Input for theme\");\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/theme.ts?");
|
||
|
||
/***/ }),
|
||
/* 694 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Terminal/commands/top.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: top */
|
||
/*! exports used: top */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return top; });\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/RunningScriptHelpers */ 438);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction top(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of top command. Usage: top\");\n return;\n } // Headers\n\n\n const scriptWidth = 40;\n const pidWidth = 10;\n const threadsWidth = 16;\n const scriptTxt = \"Script\";\n const pidTxt = \"PID\";\n const threadsTxt = \"Threads\";\n const ramTxt = \"RAM Usage\";\n const spacesAfterScriptTxt = \" \".repeat(scriptWidth - scriptTxt.length);\n const spacesAfterPidTxt = \" \".repeat(pidWidth - pidTxt.length);\n const spacesAfterThreadsTxt = \" \".repeat(threadsWidth - threadsTxt.length);\n const headers = `${scriptTxt}${spacesAfterScriptTxt}${pidTxt}${spacesAfterPidTxt}${threadsTxt}${spacesAfterThreadsTxt}${ramTxt}`;\n terminal.print(headers);\n const currRunningScripts = server.runningScripts; // Iterate through scripts on current server\n\n for (let i = 0; i < currRunningScripts.length; i++) {\n const script = currRunningScripts[i]; // Calculate name padding\n\n const numSpacesScript = Math.max(0, scriptWidth - script.filename.length);\n const spacesScript = \" \".repeat(numSpacesScript); // Calculate PID padding\n\n const numSpacesPid = Math.max(0, pidWidth - (script.pid + \"\").length);\n const spacesPid = \" \".repeat(numSpacesPid); // Calculate thread padding\n\n const numSpacesThread = Math.max(0, threadsWidth - (script.threads + \"\").length);\n const spacesThread = \" \".repeat(numSpacesThread); // Calculate and transform RAM usage\n\n const ramUsage = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRAM(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getRamUsageFromRunningScript */ \"a\"])(script) * script.threads);\n const entry = [script.filename, spacesScript, script.pid, spacesPid, script.threads, spacesThread, ramUsage].join(\"\");\n terminal.print(entry);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/top.ts?");
|
||
|
||
/***/ }),
|
||
/* 695 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Terminal/commands/unalias.ts ***!
|
||
\******************************************/
|
||
/*! exports provided: unalias */
|
||
/*! exports used: unalias */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return unalias; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Alias */ 87);\n\nfunction unalias(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of unalias name. Usage: unalias [alias]\");\n return;\n } else {\n if (Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* removeAlias */ \"g\"])(args[0] + \"\")) {\n terminal.print(`Removed alias ${args[0]}`);\n } else {\n terminal.error(`No such alias exists: ${args[0]}`);\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/unalias.ts?");
|
||
|
||
/***/ }),
|
||
/* 696 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/commands/wget.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: wget */
|
||
/*! exports used: wget */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return wget; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\nfunction wget(terminal, router, player, server, args) {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of wget command. Usage: wget [url] [target file]\");\n return;\n }\n\n const url = args[0] + \"\";\n const target = terminal.getFilepath(args[1] + \"\");\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n return terminal.print(`wget failed: Invalid target file. Target file must be script or text file`);\n }\n\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(target)) {\n res = server.writeToScriptFile(target, data);\n } else {\n res = server.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n return terminal.print(\"wget failed\");\n }\n\n if (res.overwritten) {\n return terminal.print(`wget successfully retrieved content and overwrote ${target}`);\n }\n\n return terminal.print(`wget successfully retrieved content to new file ${target}`);\n }, \"text\").fail(function (e) {\n return terminal.error(\"wget failed: \" + JSON.stringify(e));\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/Terminal/commands/wget.ts?");
|
||
|
||
/***/ }),
|
||
/* 697 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/Company/data/CompanyPositionsMetadata.ts ***!
|
||
\******************************************************/
|
||
/*! exports provided: companyPositionMetadata */
|
||
/*! exports used: companyPositionMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return companyPositionMetadata; });\n/* harmony import */ var _companypositionnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./companypositionnames */ 24);\n// Metadata used for constructing Company Positions\n\nconst companyPositionMetadata = [{\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][0],\n // Software Enginering Intern\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][1],\n // Junior Software Engineer\n baseSalary: 33,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.05,\n reqdHacking: 1,\n repMultiplier: 0.9\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][1],\n // Junior Software Engineer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][2],\n // Senior Software Engineer\n baseSalary: 80,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.1,\n reqdHacking: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][2],\n // Senior Software Engineer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][3],\n // Lead Software Developer\n baseSalary: 165,\n charismaEffectiveness: 20,\n charismaExpGain: 0.08,\n hackingEffectiveness: 80,\n hackingExpGain: 0.4,\n reqdCharisma: 51,\n reqdHacking: 251,\n reqdReputation: 40e3,\n repMultiplier: 1.3\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][3],\n // Lead Software Developer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][4],\n // Head of Software\n baseSalary: 500,\n charismaEffectiveness: 25,\n charismaExpGain: 0.1,\n hackingEffectiveness: 75,\n hackingExpGain: 0.8,\n reqdCharisma: 151,\n reqdHacking: 401,\n reqdReputation: 200e3,\n repMultiplier: 1.5\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][4],\n // Head of Software\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][5],\n // Head of Engineering\n baseSalary: 800,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 400e3,\n repMultiplier: 1.6\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][5],\n // Head of Engineering\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][6],\n // Vice President of Technology\n baseSalary: 1650,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1.1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 800e3,\n repMultiplier: 1.6\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][6],\n // Vice President of Technology\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][7],\n // Chief Technology Officer\n baseSalary: 2310,\n charismaEffectiveness: 30,\n charismaExpGain: 0.6,\n hackingEffectiveness: 70,\n hackingExpGain: 1.2,\n reqdCharisma: 401,\n reqdHacking: 601,\n reqdReputation: 1.6e6,\n repMultiplier: 1.75\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][7],\n // Chief Technology Officer\n nextPosition: null,\n baseSalary: 2640,\n charismaEffectiveness: 35,\n charismaExpGain: 1,\n hackingEffectiveness: 65,\n hackingExpGain: 1.5,\n reqdCharisma: 501,\n reqdHacking: 751,\n reqdReputation: 3.2e6,\n repMultiplier: 2\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"][0],\n // IT Intern\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"][1],\n // IT Analyst\n baseSalary: 26,\n charismaEffectiveness: 10,\n charismaExpGain: 0.01,\n hackingEffectiveness: 90,\n hackingExpGain: 0.04,\n reqdHacking: 1,\n repMultiplier: 0.9\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"][1],\n // IT Analyst\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"][2],\n // IT Manager\n baseSalary: 66,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.08,\n reqdHacking: 26,\n reqdReputation: 7e3,\n repMultiplier: 1.1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"][2],\n // IT Manager\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"][3],\n // Systems Administrator\n baseSalary: 132,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.3,\n reqdCharisma: 51,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.3\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* ITCompanyPositions */ \"d\"][3],\n // Systems Administrator\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][5],\n // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.2,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.4\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityEngineerCompanyPositions */ \"i\"][0],\n // Security Engineer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][5],\n // Head of Engineering\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* NetworkEngineerCompanyPositions */ \"f\"][0],\n // Network Engineer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* NetworkEngineerCompanyPositions */ \"f\"][1],\n // Network Adminsitrator\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* NetworkEngineerCompanyPositions */ \"f\"][1],\n // Network Administrator\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareCompanyPositions */ \"j\"][5],\n // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.3\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][0],\n // Business Intern\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][1],\n // Business Analyst\n baseSalary: 46,\n charismaEffectiveness: 90,\n charismaExpGain: 0.08,\n hackingEffectiveness: 10,\n hackingExpGain: 0.01,\n reqdCharisma: 1,\n reqdHacking: 1,\n repMultiplier: 0.9\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][1],\n // Business Analyst\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][2],\n // Business Manager\n baseSalary: 100,\n charismaEffectiveness: 85,\n charismaExpGain: 0.15,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 51,\n reqdHacking: 6,\n reqdReputation: 8e3,\n repMultiplier: 1.1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][2],\n // Business Manager\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][3],\n // Operations Manager\n baseSalary: 200,\n charismaEffectiveness: 85,\n charismaExpGain: 0.3,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 101,\n reqdHacking: 51,\n reqdReputation: 40e3,\n repMultiplier: 1.3\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][3],\n // Operations Manager\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][4],\n // Chief Financial Officer\n baseSalary: 660,\n charismaEffectiveness: 85,\n charismaExpGain: 0.4,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 226,\n reqdHacking: 51,\n reqdReputation: 200e3,\n repMultiplier: 1.5\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][4],\n // Chief Financial Officer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][5],\n // Chief Executive Officer\n baseSalary: 1950,\n charismaEffectiveness: 90,\n charismaExpGain: 1,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 501,\n reqdHacking: 76,\n reqdReputation: 800e3,\n repMultiplier: 1.6\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessCompanyPositions */ \"b\"][5],\n // Chief Executive Officer\n nextPosition: null,\n baseSalary: 3900,\n charismaEffectiveness: 90,\n charismaExpGain: 1.5,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 751,\n reqdHacking: 101,\n reqdReputation: 3.2e6,\n repMultiplier: 1.75\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][0],\n // Police Officer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][1],\n // Police Chief\n baseSalary: 82,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.04,\n reqdHacking: 11,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][1],\n // Police Chief\n nextPosition: null,\n baseSalary: 460,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.1,\n reqdHacking: 101,\n reqdStrength: 301,\n reqdDefense: 301,\n reqdDexterity: 301,\n reqdAgility: 301,\n reqdCharisma: 151,\n reqdReputation: 36e3,\n repMultiplier: 1.25\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][2],\n // Security Guard\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][3],\n // Security Officer\n baseSalary: 50,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.01,\n strengthExpGain: 0.04,\n defenseExpGain: 0.04,\n dexterityExpGain: 0.04,\n agilityExpGain: 0.04,\n charismaExpGain: 0.02,\n reqdStrength: 51,\n reqdDefense: 51,\n reqdDexterity: 51,\n reqdAgility: 51,\n reqdCharisma: 1,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][3],\n // Security Officer\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][4],\n // Security Supervisor\n baseSalary: 195,\n hackingEffectiveness: 10,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 10,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.05,\n reqdHacking: 26,\n reqdStrength: 151,\n reqdDefense: 151,\n reqdDexterity: 151,\n reqdAgility: 151,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][4],\n // Security Supervisor\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][5],\n // Head of Security\n baseSalary: 660,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.02,\n strengthExpGain: 0.12,\n defenseExpGain: 0.12,\n dexterityExpGain: 0.12,\n agilityExpGain: 0.12,\n charismaExpGain: 0.1,\n reqdHacking: 26,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 101,\n reqdReputation: 36e3,\n repMultiplier: 1.25\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SecurityCompanyPositions */ \"h\"][5],\n // Head of Security\n nextPosition: null,\n baseSalary: 1320,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.05,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.15,\n reqdHacking: 51,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 151,\n reqdReputation: 144e3,\n repMultiplier: 1.4\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* AgentCompanyPositions */ \"a\"][0],\n // Field Agent\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* AgentCompanyPositions */ \"a\"][1],\n // Secret Agent\n baseSalary: 330,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 20,\n hackingExpGain: 0.04,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.05,\n reqdHacking: 101,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 101,\n reqdReputation: 8e3,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* AgentCompanyPositions */ \"a\"][1],\n // Secret Agent\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* AgentCompanyPositions */ \"a\"][2],\n // Special Operative\n baseSalary: 990,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.1,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.1,\n reqdHacking: 201,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 201,\n reqdReputation: 32e3,\n repMultiplier: 1.25\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* AgentCompanyPositions */ \"a\"][2],\n // Special Operative\n nextPosition: null,\n baseSalary: 2000,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.15,\n strengthExpGain: 0.2,\n defenseExpGain: 0.2,\n dexterityExpGain: 0.2,\n agilityExpGain: 0.2,\n charismaExpGain: 0.15,\n reqdHacking: 251,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 251,\n reqdReputation: 162e3,\n repMultiplier: 1.5\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* MiscCompanyPositions */ \"e\"][0],\n // Waiter\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.05,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* MiscCompanyPositions */ \"e\"][1],\n // Employee\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.04,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareConsultantCompanyPositions */ \"k\"][0],\n // Software Consultant\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareConsultantCompanyPositions */ \"k\"][1],\n // Senior Software Consultant\n baseSalary: 66,\n hackingEffectiveness: 80,\n charismaEffectiveness: 20,\n hackingExpGain: 0.08,\n charismaExpGain: 0.03,\n reqdHacking: 51,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* SoftwareConsultantCompanyPositions */ \"k\"][1],\n // Senior Software Consultant\n nextPosition: null,\n baseSalary: 132,\n hackingEffectiveness: 75,\n charismaEffectiveness: 25,\n hackingExpGain: 0.25,\n charismaExpGain: 0.06,\n reqdHacking: 251,\n reqdCharisma: 51,\n repMultiplier: 1.2\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessConsultantCompanyPositions */ \"c\"][0],\n // Business Consultant\n nextPosition: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessConsultantCompanyPositions */ \"c\"][1],\n // Senior Business Consultant\n baseSalary: 66,\n hackingEffectiveness: 20,\n charismaEffectiveness: 80,\n hackingExpGain: 0.015,\n charismaExpGain: 0.15,\n reqdHacking: 6,\n reqdCharisma: 51,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* BusinessConsultantCompanyPositions */ \"c\"][1],\n // Senior Business Consultant\n nextPosition: null,\n baseSalary: 525,\n hackingEffectiveness: 15,\n charismaEffectiveness: 85,\n hackingExpGain: 0.015,\n charismaExpGain: 0.3,\n reqdHacking: 51,\n reqdCharisma: 226,\n repMultiplier: 1.2\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* PartTimeCompanyPositions */ \"g\"][0],\n // Part-time waiter\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.04,\n repMultiplier: 1\n}, {\n name: _companypositionnames__WEBPACK_IMPORTED_MODULE_0__[/* PartTimeCompanyPositions */ \"g\"][1],\n // Part-time employee\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.03,\n repMultiplier: 1\n}];\n\n//# sourceURL=webpack:///./src/Company/data/CompanyPositionsMetadata.ts?");
|
||
|
||
/***/ }),
|
||
/* 698 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Corporation/Industry.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Industry */
|
||
/*! exports used: Industry */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Industry; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./IndustryData */ 40);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Material */ 131);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/calculateEffectWithFactors */ 699);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OfficeSpace */ 290);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Product */ 314);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./IndustryUpgrades */ 291);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Industry {\n //An array of the name of materials being produced\n //Should always be less than awareness\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n //Real estate Factor\n //Scientific Research Factor, affects quality\n //Hardware factor\n //Robotics Factor\n //AI Cores factor;\n //Advertising factor, affects sales\n //Upgrades\n //Maps locations to offices. 0 if no office at that location\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"type\", _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture);\n\n _defineProperty(this, \"sciResearch\", new _Material__WEBPACK_IMPORTED_MODULE_6__[/* Material */ \"a\"]({\n name: \"Scientific Research\"\n }));\n\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prodMats\", []);\n\n _defineProperty(this, \"products\", {});\n\n _defineProperty(this, \"makesProducts\", false);\n\n _defineProperty(this, \"awareness\", 0);\n\n _defineProperty(this, \"popularity\", 0);\n\n _defineProperty(this, \"startingCost\", 0);\n\n _defineProperty(this, \"reFac\", 0);\n\n _defineProperty(this, \"sciFac\", 0);\n\n _defineProperty(this, \"hwFac\", 0);\n\n _defineProperty(this, \"robFac\", 0);\n\n _defineProperty(this, \"aiFac\", 0);\n\n _defineProperty(this, \"advFac\", 0);\n\n _defineProperty(this, \"prodMult\", 0);\n\n _defineProperty(this, \"upgrades\", Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__[/* IndustryUpgrades */ \"a\"]).length).fill(0));\n\n _defineProperty(this, \"state\", \"START\");\n\n _defineProperty(this, \"newInd\", true);\n\n _defineProperty(this, \"offices\", {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]({\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n });\n\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture; //Financials\n\n this.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.warehouses = {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]({\n corp: params.corp,\n industry: this,\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n };\n this.init();\n }\n\n init() {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryStartingCosts */ \"d\"][this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2\n };\n this.prodMats = [\"Energy\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1\n };\n this.prodMats = [\"Water\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5\n };\n this.prodMats = [\"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8\n };\n this.prodMats = [\"Metal\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5\n };\n this.prodMats = [\"Chemicals\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText() {\n if (!this.makesProducts) return \"\";\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n return \"create and manage restaurants\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n return \"create tobacco and tobacco-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n return \"build specialized robots and robot-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n return \"develop computer software\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n return \"build and manage hospitals\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n return \"develop and manage real estate properties\";\n\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts() {\n if (!this.makesProducts) return 0; // Calculate additional number of allowed Products from Research/Upgrades\n\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n return _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts() {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n } //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n\n\n calculateProductionFactors() {\n let multSum = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const warehouse = this.warehouses[city];\n\n if (!(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const materials = warehouse.materials;\n const cityMult = Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) * Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) * Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) * Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? this.prodMult = 1 : this.prodMult = multSum;\n }\n\n updateWarehouseSizeUsed(warehouse) {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n\n if (prod.data[warehouse.loc][0] > 0) {\n warehouse.breakdown += prodName + \": \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__[/* formatNumber */ \"c\"])(prod.data[warehouse.loc][0] * prod.siz, 0) + \"<br>\";\n }\n }\n }\n }\n\n process(marketCycles = 1, state, corporation) {\n this.state = state; //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\");\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n }\n\n this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0); // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n\n if (this.lastCycleRevenue.gt(0)) {\n this.newInd = false;\n } // Process offices (and the employees in them)\n\n\n let employeeSalary = 0;\n\n for (const officeLoc in this.offices) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n\n this.thisCycleExpenses = this.thisCycleExpenses.plus(employeeSalary); // Process change in demand/competition of materials/products\n\n this.processMaterialMarket();\n this.processProductMarket(marketCycles); // Process loss of popularity\n\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity); // Process Dreamsense gains\n\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n\n if (popularityGain > 0) {\n this.popularity += popularityGain * marketCycles;\n this.awareness += awarenessGain * marketCycles;\n }\n\n return;\n } // Process production, purchase, and import/export of materials\n\n\n let res = this.processMaterials(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n } // Process creation, production & sale of products\n\n\n res = this.processProducts(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n }\n } // Process change in demand and competition for this industry's materials\n\n\n processMaterialMarket() {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats; //Only 'process the market' for materials that this industry deals with\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const wh = this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]];\n if (wh === 0) continue;\n\n for (const name in reqMats) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n } //Produced materials are stored in an array\n\n\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n } //Process these twice because these boost production\n\n\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n } // Process change in demand and competition for this industry's products\n\n\n processProductMarket(marketCycles = 1) {\n // Demand gradually decreases, and competition gradually increases\n for (const name in this.products) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics) {\n change *= 3;\n }\n\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n } //Process production, purchase, and import/export of materials\n\n\n processMaterials(marketCycles = 1, corporation) {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors(); //At the start of the export state, set the imports of everything to 0\n\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n\n if (!(this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\":\n {\n /* Process purchase of materials */\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n\n buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (matName == \"RealEstate\") {\n maxAmt = buyAmt;\n } else {\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n }\n\n buyAmt = Math.min(buyAmt, maxAmt);\n\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n // smart supply\n\n\n const smartBuy = {};\n\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName]; //Smart supply tracker is stored as per second rate\n\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n } // Find which material were trying to create the least amount of product with.\n\n\n let worseAmt = 1e99;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n } // Align all the materials to the smallest amount.\n\n\n for (const matName in smartBuy) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n } // Calculate the total size of all things were trying to buy\n\n\n let totalSize = 0;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName];\n } // Shrink to the size of available space.\n\n\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n\n if (totalSize > freeSpace) {\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor(buyAmt * freeSpace / totalSize);\n }\n } // Use the materials already in the warehouse if the option is on.\n\n\n for (const matName in smartBuy) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n } // buy them\n\n\n for (const matName in smartBuy) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n break;\n }\n\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]]; //Calculate the maximum production of this material based\n //on the office's productivity\n\n const maxProd = this.getOfficeProductivity(office) * this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() * this.getProductionMultiplier(); // Multiplier from Research\n\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n // Calculate net change in warehouse storage making the produced materials will cost\n\n let totalMatSize = 0;\n\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][this.prodMats[tmp]];\n }\n\n for (const reqMatName in this.reqMats) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n } // If not enough space in warehouse, limit the amount of produced materials\n\n\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n } // Keep track of production for smart supply (/s)\n\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); // Make sure we have enough resource to make our materials\n\n let producableFrac = 1;\n\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n } // Make our materials if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in this.reqMats) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer] / 90 + Math.pow(this.sciResearch.qty, this.sciFac) + Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n } //Per second\n\n\n const fooProd = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName in this.reqMats) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n } // Sale multipliers\n\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n // Determine the cost that the material will be sold at\n\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n\n if (mat.marketTa2) {\n const prod = mat.prd; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = (mat.qlt + 0.001) * marketFactor * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n } // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n\n\n mat.marketTa2Price = optimalPrice;\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sCost)) {\n sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n } // Calculate how much of the material sells (per second)\n\n\n let markup = 1;\n\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n const maxSell = (mat.qlt + 0.001) * marketFactor * markup * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = mat.sllman[1].replace(/MAX/g, maxSell + \"\");\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell amount for material \" + mat.name + \" in \" + this.name + \"'s \" + city + \" office. The sell amount \" + \"is being set to zero\");\n sellAmt = 0;\n }\n\n sellAmt = Math.min(maxSell, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = maxSell;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(maxSell, mat.sllman[1]);\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n\n\n break;\n\n case \"EXPORT\":\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(/MAX/g, mat.qty / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles) + \"\");\n let amt = 0;\n\n try {\n amt = eval(amtStr);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Calculating export for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division failed with \" + \"error: \" + e);\n continue;\n }\n\n if (isNaN(amt)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error calculating export amount for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division.\");\n continue;\n }\n\n amt = amt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n\n if (amt === 0) {\n break; //None left\n }\n\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n\n if (!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n } // Make sure theres enough space in warehouse\n\n\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n amt = Math.min(maxAmt, amt);\n }\n\n expWarehouse.materials[matName].imp += amt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n } //totalExp should be per second\n\n\n mat.totalExp /= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n\n\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n this.sciResearch.qty += 0.004 * Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].RandD], 0.5) * corporation.getScientificResearchMultiplier() * this.getScientificResearchMultiplier();\n }\n }\n\n return [revenue, expenses];\n } //Process production & sale of this industry's FINISHED products (including all of their stats)\n\n\n processProducts(marketCycles = 1, corporation) {\n let revenue = 0;\n const expenses = 0; //Create products\n\n if (this.state === \"PRODUCTION\") {\n for (const prodName in this.products) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue; // Designing/Creating a Product is based mostly off Engineers\n\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const total = engrProd + mgmtProd + opProd;\n\n if (total <= 0) {\n break;\n } // Management is a multiplier for the production from Engineers\n\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n prod.createProduct(marketCycles, progress);\n\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n\n break;\n }\n }\n } //Produce Products\n\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n\n if (prod instanceof _Product__WEBPACK_IMPORTED_MODULE_10__[/* Product */ \"a\"] && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n\n return [revenue, expenses];\n } //Processes FINISHED products\n\n\n processProduct(marketCycles = 1, product, corporation) {\n let totalProfit = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n\n if (warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n switch (this.state) {\n case \"PRODUCTION\":\n {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd = this.getOfficeProductivity(office, {\n forProduct: true\n }) * corporation.getProductionMultiplier() * this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n\n let prod; //Account for whether production is manually limited\n\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Calculate net change in warehouse storage making the Products will cost\n\n let netStorageSize = product.siz;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n }\n } //If there's not enough space in warehouse, limit the amount of Product\n\n\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //Make sure we have enough resources to make our Products\n\n let producableFrac = 1;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n } //Make our Products if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n } //Quantity\n\n\n product.data[city][0] += prod * producableFrac;\n } //Keep track of production Per second\n\n\n product.data[city][1] = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n break;\n }\n\n case \"SALE\":\n {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n } // Since its a product, its production cost is increased for labor\n\n\n product.pCost *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio; // Sale multipliers\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n\n const markupLimit = product.rat / product.mku;\n let sCost;\n\n if (product.marketTa2) {\n const prod = product.data[city][1]; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * businessFactor * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n } // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n\n\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sCost)) {\n const sCostString = product.sCost;\n\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n const maxSell = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * Math.pow(markup, 2) * businessFactor * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (product.sllman[city][0] && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, maxSell);\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n\n try {\n tmp = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell price expression for \" + product.name + \" in \" + this.name + \"'s \" + city + \" office. Sell price is being set to MAX\");\n tmp = maxSell;\n }\n\n sellAmt = Math.min(maxSell, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(maxSell, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = maxSell;\n }\n\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n\n break;\n }\n\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n\n }\n }\n\n return totalProfit;\n }\n\n discontinueProduct(product) {\n for (const productName in this.products) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n upgrade(upgrade, refs) {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0:\n {\n //Coffee, 5% energy per employee\n for (let i = 0; i < office.employees.length; ++i) {\n office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, office.maxEne);\n }\n\n break;\n }\n\n case 1:\n {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n this.awareness += 3 * advMult;\n this.popularity += 1 * advMult;\n this.awareness *= 1.01 * advMult;\n this.popularity *= (1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(1, 3) / 100) * advMult;\n break;\n }\n\n default:\n {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n } // Returns how much of a material can be produced based of office productivity (employee stats)\n\n\n getOfficeProductivity(office, params = {}) {\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const total = opProd + engrProd + mgmtProd;\n if (total <= 0) return 0; // Management is a multiplier for the production from Operations and Engineers\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total); // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor; // Generic multiplier for the production. Used for game-balancing purposes\n\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n } // Returns a multiplier based on the office' 'Business' employees that affects sales\n\n\n getBusinessFactor(office) {\n const businessProd = 1 + office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Business];\n return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__[/* calculateEffectWithFactors */ \"a\"])(businessProd, 0.26, 10e3);\n } //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n\n\n getAdvertisingFactors() {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n } //Returns a multiplier based on a materials demand and competition that affects sales\n\n\n getMarketFactor(mat) {\n return Math.max(0.1, mat.dmd * (100 - mat.cmp) / 100);\n } // Returns a boolean indicating whether this Industry has the specified Research\n\n\n hasResearch(name) {\n return this.researched[name] === true;\n }\n\n updateResearchTree() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`); // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research in this.researched) {\n researchTree.research(research);\n }\n }\n } // Get multipliers from Research\n\n\n getAdvertisingMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n copy() {\n // products: { [key: string]: Product | undefined } = {};\n // //Maps locations to warehouses. 0 if no warehouse at that location\n // warehouses: { [key: string]: Warehouse | 0 };\n // //Maps locations to offices. 0 if no office at that location\n // offices: { [key: string]: OfficeSpace | 0 } = {\n // [CityName.Aevum]: 0,\n // [CityName.Chongqing]: 0,\n // [CityName.Sector12]: new OfficeSpace({\n // loc: CityName.Sector12,\n // size: CorporationConstants.OfficeInitialSize,\n // }),\n // [CityName.NewTokyo]: 0,\n // [CityName.Ishima]: 0,\n // [CityName.Volhaven]: 0,\n // };\n const division = new Industry();\n division.sciResearch = this.sciResearch.copy();\n division.researched = {};\n\n for (const x of Object.keys(this.researched)) {\n division.researched[x] = this.researched[x];\n }\n\n division.reqMats = {};\n\n for (const x of Object.keys(this.reqMats)) {\n division.reqMats[x] = this.reqMats[x];\n }\n\n division.name = this.name;\n division.type = this.type;\n division.makesProducts = this.makesProducts;\n division.awareness = this.awareness;\n division.popularity = this.popularity;\n division.startingCost = this.startingCost;\n division.reFac = this.reFac;\n division.sciFac = this.sciFac;\n division.hwFac = this.hwFac;\n division.robFac = this.robFac;\n division.aiFac = this.aiFac;\n division.advFac = this.advFac;\n division.prodMult = this.prodMult;\n division.state = this.state;\n division.newInd = this.newInd;\n division.lastCycleRevenue = this.lastCycleRevenue.plus(0);\n division.lastCycleExpenses = this.lastCycleExpenses.plus(0);\n division.thisCycleRevenue = this.thisCycleRevenue.plus(0);\n division.thisCycleExpenses = this.thisCycleExpenses.plus(0);\n division.upgrades = this.upgrades.slice();\n division.prodMats = this.prodMats.slice();\n return division;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Industry\", this);\n }\n /**\n * Initiatizes a Industry object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Industry, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Industry = Industry;\n\n//# sourceURL=webpack:///./src/Corporation/Industry.ts?");
|
||
|
||
/***/ }),
|
||
/* 699 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/utils/calculateEffectWithFactors.ts ***!
|
||
\*************************************************/
|
||
/*! exports provided: calculateEffectWithFactors, EffectWithFactors */
|
||
/*! exports used: calculateEffectWithFactors */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateEffectWithFactors; });\n/* unused harmony export EffectWithFactors */\n/**\n * This is a component that implements a mathematical formula used commonly throughout the\n * game. This formula is (typically) used to calculate the effect that various statistics\n * have on a game mechanic. It looks something like:\n *\n * (stat ^ exponential factor) + (stat / linear factor)\n *\n * where the exponential factor is a number between 0 and 1 and the linear factor\n * is typically a relatively larger number.\n *\n * This formula ensures that the effects of the statistic that is being processed\n * has diminishing returns, but never loses its effectiveness as you continue\n * to raise it.\n *\n * There are two implementations of this component. One is simply a function that\n * can be called with the stat and the exponential/linear factors. The other is a\n * class where the exponential and linear factors are defined upon construction.\n */\nfunction calculateEffectWithFactors(n, expFac, linearFac) {\n if (expFac <= 0 || expFac >= 1) {\n console.warn(`Exponential factor is ${expFac}. This is not an intended value for it`);\n }\n\n if (linearFac < 1) {\n console.warn(`Linear factor is ${linearFac}. This is not an intended value for it`);\n }\n\n return Math.pow(n, expFac) + n / linearFac;\n}\nclass EffectWithFactors {\n // Exponential factor\n // Linear Factor\n constructor(expFac, linearFac) {\n this.expFac = expFac;\n this.linearFac = linearFac;\n }\n\n calculate(n) {\n return calculateEffectWithFactors(n, this.expFac, this.linearFac);\n }\n\n}\n\n//# sourceURL=webpack:///./src/utils/calculateEffectWithFactors.ts?");
|
||
|
||
/***/ }),
|
||
/* 700 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Corporation/ProductRatingWeights.ts ***!
|
||
\*************************************************/
|
||
/*! exports provided: ProductRatingWeights */
|
||
/*! exports used: ProductRatingWeights */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProductRatingWeights; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 40);\n\nconst ProductRatingWeights = {\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1\n },\n [_IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* Industries */ \"a\"].RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1\n }\n};\n\n//# sourceURL=webpack:///./src/Corporation/ProductRatingWeights.ts?");
|
||
|
||
/***/ }),
|
||
/* 701 */
|
||
/*!********************************!*\
|
||
!*** ./src/Gang/data/tasks.ts ***!
|
||
\********************************/
|
||
/*! exports provided: gangMemberTasksMetadata */
|
||
/*! exports used: gangMemberTasksMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return gangMemberTasksMetadata; });\n/* tslint:disable:max-line-length */\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberTask\n * (defined in Gang.js)\n */\n\n/**\n * Array of metadata for all Gang Member tasks. Used to construct the global GangMemberTask\n * objects in Gang.js\n */\nconst gangMemberTasksMetadata = [{\n desc: \"This gang member is currently idle\",\n isCombat: true,\n isHacking: true,\n name: \"Unassigned\",\n params: {\n hackWeight: 100\n } // This is just to get by the weight check in the GangMemberTask constructor\n\n}, {\n desc: \"Assign this gang member to create and distribute ransomware<br><br>Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ransomware\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.0001,\n baseMoney: 1,\n hackWeight: 100,\n difficulty: 1\n }\n}, {\n desc: \"Assign this gang member to attempt phishing scams and attacks<br><br>Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Phishing\",\n params: {\n baseRespect: 0.00008,\n baseWanted: 0.003,\n baseMoney: 2.5,\n hackWeight: 85,\n chaWeight: 15,\n difficulty: 3.5\n }\n}, {\n desc: \"Assign this gang member to attempt identity theft<br><br>Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Identity Theft\",\n params: {\n baseRespect: 0.0001,\n baseWanted: 0.075,\n baseMoney: 6,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 5\n }\n}, {\n desc: \"Assign this gang member to carry out DDoS attacks<br><br>Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"DDoS Attacks\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.2,\n hackWeight: 100,\n difficulty: 8\n }\n}, {\n desc: \"Assign this gang member to create and distribute malicious viruses<br><br>Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Plant Virus\",\n params: {\n baseRespect: 0.0006,\n baseWanted: 0.4,\n hackWeight: 100,\n difficulty: 12\n }\n}, {\n desc: \"Assign this gang member to commit financial fraud and digital counterfeiting<br><br>Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Fraud & Counterfeiting\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.3,\n baseMoney: 15,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 20\n }\n}, {\n desc: \"Assign this gang member to launder money<br><br>Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Money Laundering\",\n params: {\n baseRespect: 0.001,\n baseWanted: 1.25,\n baseMoney: 120,\n hackWeight: 75,\n chaWeight: 25,\n difficulty: 25\n }\n}, {\n desc: \"Assign this gang member to commit acts of cyberterrorism<br><br>Greatly increases respect - Greatly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Cyberterrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 36\n }\n}, {\n desc: \"Assign this gang member to be an ethical hacker for corporations<br><br>Earns money - Lowers wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ethical Hacking\",\n params: {\n baseWanted: -0.001,\n baseMoney: 1,\n hackWeight: 90,\n chaWeight: 10,\n difficulty: 1\n }\n}, {\n desc: \"Assign this gang member to mug random people on the streets<br><br>Earns money - Slightly increases respect - Very slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Mug People\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.00005,\n baseMoney: 1.2,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 10,\n chaWeight: 15,\n difficulty: 1\n }\n}, {\n desc: \"Assign this gang member to sell drugs<br><br>Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Deal Drugs\",\n params: {\n baseRespect: 0.00006,\n baseWanted: 0.002,\n baseMoney: 5,\n agiWeight: 20,\n dexWeight: 20,\n chaWeight: 60,\n difficulty: 3.5,\n territory: {\n money: 1.2,\n respect: 1,\n wanted: 1.15\n }\n }\n}, {\n desc: \"Assign this gang member to extort civilians in your territory<br><br>Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Strongarm Civilians\",\n params: {\n baseRespect: 0.00004,\n baseWanted: 0.02,\n baseMoney: 2.5,\n hackWeight: 10,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 20,\n agiWeight: 10,\n chaWeight: 10,\n difficulty: 5,\n territory: {\n money: 1.6,\n respect: 1.1,\n wanted: 1.5\n }\n }\n}, {\n desc: \"Assign this gang member to run cons<br><br>Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Run a Con\",\n params: {\n baseRespect: 0.00012,\n baseWanted: 0.05,\n baseMoney: 15,\n strWeight: 5,\n defWeight: 5,\n agiWeight: 25,\n dexWeight: 25,\n chaWeight: 40,\n difficulty: 14\n }\n}, {\n desc: \"Assign this gang member to commit armed robbery on stores, banks and armored cars<br><br>Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Armed Robbery\",\n params: {\n baseRespect: 0.00014,\n baseWanted: 0.1,\n baseMoney: 38,\n hackWeight: 20,\n strWeight: 15,\n defWeight: 15,\n agiWeight: 10,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 20\n }\n}, {\n desc: \"Assign this gang member to traffick illegal arms<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Traffick Illegal Arms\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.24,\n baseMoney: 58,\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 25,\n difficulty: 32,\n territory: {\n money: 1.4,\n respect: 1.3,\n wanted: 1.25\n }\n }\n}, {\n desc: \"Assign this gang member to threaten and black mail high-profile targets<br><br>Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Threaten & Blackmail\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.125,\n baseMoney: 24,\n hackWeight: 25,\n strWeight: 25,\n dexWeight: 25,\n chaWeight: 25,\n difficulty: 28\n }\n}, {\n desc: \"Assign this gang member to engage in human trafficking operations<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Human Trafficking\",\n params: {\n baseRespect: 0.004,\n baseWanted: 1.25,\n baseMoney: 120,\n hackWeight: 30,\n strWeight: 5,\n defWeight: 5,\n dexWeight: 30,\n chaWeight: 30,\n difficulty: 36,\n territory: {\n money: 1.5,\n respect: 1.5,\n wanted: 1.6\n }\n }\n}, {\n desc: \"Assign this gang member to commit acts of terrorism<br><br>Greatly increases respect - Greatly increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Terrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 36,\n territory: {\n money: 1,\n respect: 2,\n wanted: 2\n }\n }\n}, {\n desc: \"Assign this gang member to be a vigilante and protect the city from criminals<br><br>Decreases wanted level\",\n isCombat: true,\n isHacking: true,\n name: \"Vigilante Justice\",\n params: {\n baseWanted: -0.001,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n difficulty: 1,\n territory: {\n money: 1,\n respect: 1,\n wanted: 0.9 // Gets harder with more territory\n\n }\n }\n}, {\n desc: \"Assign this gang member to increase their combat stats (str, def, dex, agi)\",\n isCombat: true,\n isHacking: true,\n name: \"Train Combat\",\n params: {\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 25,\n difficulty: 100\n }\n}, {\n desc: \"Assign this gang member to train their hacking skills\",\n isCombat: true,\n isHacking: true,\n name: \"Train Hacking\",\n params: {\n hackWeight: 100,\n difficulty: 45\n }\n}, {\n desc: \"Assign this gang member to train their charisma\",\n isCombat: true,\n isHacking: true,\n name: \"Train Charisma\",\n params: {\n chaWeight: 100,\n difficulty: 8\n }\n}, {\n desc: \"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.\",\n isCombat: true,\n isHacking: true,\n name: \"Territory Warfare\",\n params: {\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n chaWeight: 5,\n difficulty: 5\n }\n}];\n\n//# sourceURL=webpack:///./src/Gang/data/tasks.ts?");
|
||
|
||
/***/ }),
|
||
/* 702 */
|
||
/*!********************************!*\
|
||
!*** ./src/Gang/GangMember.ts ***!
|
||
\********************************/
|
||
/*! exports provided: GangMember */
|
||
/*! exports used: GangMember */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMember; });\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GangMemberTask */ 441);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberUpgrades */ 154);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass GangMember {\n // Names of upgrades\n // Names of augmentations only\n constructor(name = \"\") {\n _defineProperty(this, \"task\", \"Unassigned\");\n\n _defineProperty(this, \"earnedRespect\", 0);\n\n _defineProperty(this, \"hack\", 1);\n\n _defineProperty(this, \"str\", 1);\n\n _defineProperty(this, \"def\", 1);\n\n _defineProperty(this, \"dex\", 1);\n\n _defineProperty(this, \"agi\", 1);\n\n _defineProperty(this, \"cha\", 1);\n\n _defineProperty(this, \"hack_exp\", 0);\n\n _defineProperty(this, \"str_exp\", 0);\n\n _defineProperty(this, \"def_exp\", 0);\n\n _defineProperty(this, \"dex_exp\", 0);\n\n _defineProperty(this, \"agi_exp\", 0);\n\n _defineProperty(this, \"cha_exp\", 0);\n\n _defineProperty(this, \"hack_mult\", 1);\n\n _defineProperty(this, \"str_mult\", 1);\n\n _defineProperty(this, \"def_mult\", 1);\n\n _defineProperty(this, \"dex_mult\", 1);\n\n _defineProperty(this, \"agi_mult\", 1);\n\n _defineProperty(this, \"cha_mult\", 1);\n\n _defineProperty(this, \"hack_asc_points\", 0);\n\n _defineProperty(this, \"str_asc_points\", 0);\n\n _defineProperty(this, \"def_asc_points\", 0);\n\n _defineProperty(this, \"dex_asc_points\", 0);\n\n _defineProperty(this, \"agi_asc_points\", 0);\n\n _defineProperty(this, \"cha_asc_points\", 0);\n\n _defineProperty(this, \"upgrades\", []);\n\n _defineProperty(this, \"augmentations\", []);\n\n this.name = name;\n }\n\n calculateSkill(exp, mult = 1) {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points) {\n return Math.max(Math.pow(points / 4000, 0.7), 1);\n }\n\n updateSkillLevels() {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower() {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n\n this.task = taskName;\n return true;\n }\n\n unassignFromTask() {\n this.task = \"Unassigned\";\n }\n\n getTask() {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if (this.task instanceof _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__[/* GangMemberTask */ \"a\"]) {\n this.task = this.task.name;\n }\n\n if (_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.task)) {\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][this.task];\n }\n\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"];\n }\n\n calculateRespectGain(gang) {\n const task = this.getTask();\n if (task.baseRespect === 0) return 0;\n let 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;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.respect) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 11 * task.baseRespect * statWeight * territoryMult * respectMult;\n }\n\n calculateWantedLevelGain(gang) {\n const task = this.getTask();\n if (task.baseWanted === 0) return 0;\n let 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;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n\n const calc = 7 * task.baseWanted / Math.pow(3 * statWeight * territoryMult, 0.8); // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n\n return Math.min(100, calc);\n }\n\n calculateMoneyGain(gang) {\n const task = this.getTask();\n if (task.baseMoney === 0) return 0;\n let 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;\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 5 * task.baseMoney * statWeight * territoryMult * respectMult;\n }\n\n expMult() {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1\n };\n }\n\n gainExperience(numCycles = 1) {\n const task = this.getTask();\n if (task === _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp += task.hackWeight / weightDivisor * difficultyPerCycles * expMult.hack;\n this.str_exp += task.strWeight / weightDivisor * difficultyPerCycles * expMult.str;\n this.def_exp += task.defWeight / weightDivisor * difficultyPerCycles * expMult.def;\n this.dex_exp += task.dexWeight / weightDivisor * difficultyPerCycles * expMult.dex;\n this.agi_exp += task.agiWeight / weightDivisor * difficultyPerCycles * expMult.agi;\n this.cha_exp += task.chaWeight / weightDivisor * difficultyPerCycles * expMult.cha;\n }\n\n recordEarnedRespect(numCycles = 1, gang) {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints() {\n return {\n hack: Math.max(this.hack_exp - 1000, 0),\n str: Math.max(this.str_exp - 1000, 0),\n def: Math.max(this.def_exp - 1000, 0),\n dex: Math.max(this.dex_exp - 1000, 0),\n agi: Math.max(this.agi_exp - 1000, 0),\n cha: Math.max(this.cha_exp - 1000, 0)\n };\n }\n\n canAscend() {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getAscensionResults() {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack) / this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points + points.str) / this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points + points.def) / this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex) / this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi) / this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha) / this.calculateAscensionMult(this.cha_asc_points)\n };\n }\n\n ascend() {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha; // Remove upgrades. Then re-calculate multipliers and stats\n\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberUpgrades */ \"a\"][this.augmentations[i]];\n this.applyUpgrade(aug);\n } // Clear exp and recalculate stats\n\n\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha\n };\n }\n\n applyUpgrade(upg) {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg, player, gang) {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n if (player.money.lt(gang.getUpgradeCost(upg))) return false;\n player.loseMoney(gang.getUpgradeCost(upg));\n\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n\n this.applyUpgrade(upg);\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"GangMember\", this);\n }\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(GangMember, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.GangMember = GangMember;\n\n//# sourceURL=webpack:///./src/Gang/GangMember.ts?");
|
||
|
||
/***/ }),
|
||
/* 703 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Gang/GangMemberUpgrade.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: GangMemberUpgrade */
|
||
/*! exports used: GangMemberUpgrade */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgrade; });\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/upgrades */ 120);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n\n\nclass GangMemberUpgrade {\n constructor(name = \"\", cost = 0, type = _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Weapon, mults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n this.desc = this.createDescription();\n }\n\n createDescription() {\n const lines = [\"Effects:\"];\n\n if (this.mults.str != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n\n if (this.mults.def != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n\n if (this.mults.dex != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n\n if (this.mults.agi != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n\n if (this.mults.cha != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n\n if (this.mults.hack != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n\n return lines.join(\"<br>\");\n } // User friendly version of type.\n\n\n getType() {\n switch (this.type) {\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Weapon:\n return \"Weapon\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Armor:\n return \"Armor\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Vehicle:\n return \"Vehicle\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Rootkit:\n return \"Rootkit\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Augmentation:\n return \"Augmentation\";\n\n default:\n return \"\";\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Gang/GangMemberUpgrade.ts?");
|
||
|
||
/***/ }),
|
||
/* 704 */
|
||
/*!***************************************!*\
|
||
!*** ./utils/helpers/isPowerOfTwo.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: isPowerOfTwo */
|
||
/*! exports used: isPowerOfTwo */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isPowerOfTwo; });\n/**\n * Determines if the number is a power of 2\n * @param n The number to check.\n */\nfunction isPowerOfTwo(n) {\n if (isNaN(n)) {\n return false;\n }\n\n if (n === 0) {\n return false;\n } // Disabiling the bitwise rule because it's honestly the most effecient way to check for this.\n // tslint:disable-next-line:no-bitwise\n\n\n return (n & n - 1) === 0;\n}\n\n//# sourceURL=webpack:///./utils/helpers/isPowerOfTwo.ts?");
|
||
|
||
/***/ }),
|
||
/* 705 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/StockMarket/data/InitStockMetadata.ts ***!
|
||
\***************************************************/
|
||
/*! exports provided: InitStockMetadata */
|
||
/*! exports used: InitStockMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InitStockMetadata; });\n/* harmony import */ var _StockSymbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StockSymbols */ 68);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/**\n * Initialization metadata for all Stocks. This is used to generate the\n * stock parameter values upon a reset\n *\n * Some notes:\n * - Megacorporations have better otlkMags\n * - Higher volatility -> Bigger spread\n * - Lower price -> Bigger spread\n * - Share tx required for movement used for balancing\n */\n\n\nconst InitStockMetadata = [{\n b: true,\n initPrice: {\n max: 28e3,\n min: 17e3\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumECorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumECorp]\n}, {\n b: true,\n initPrice: {\n max: 34e3,\n min: 24e3\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12MegaCorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12MegaCorp]\n}, {\n b: true,\n initPrice: {\n max: 25e3,\n min: 12e3\n },\n marketCap: 1.6e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n otlkMag: 13,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12BladeIndustries]\n}, {\n b: true,\n initPrice: {\n max: 25e3,\n min: 10e3\n },\n marketCap: 1.5e12,\n mv: {\n divisor: 100,\n max: 75,\n min: 65\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumClarkeIncorporated]\n}, {\n b: true,\n initPrice: {\n max: 43e3,\n min: 32e3\n },\n marketCap: 1.8e12,\n mv: {\n divisor: 100,\n max: 70,\n min: 60\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated]\n}, {\n b: true,\n initPrice: {\n max: 80e3,\n min: 50e3\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 110,\n min: 100\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FourSigma,\n otlkMag: 17,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FourSigma]\n}, {\n b: true,\n initPrice: {\n max: 28e3,\n min: 16e3\n },\n marketCap: 1.9e12,\n mv: {\n divisor: 100,\n max: 85,\n min: 75\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 7,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational]\n}, {\n b: true,\n initPrice: {\n max: 36e3,\n min: 29e3\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 130,\n min: 120\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n otlkMag: 16,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumFulcrumTechnologies]\n}, {\n b: true,\n initPrice: {\n max: 25e3,\n min: 20e3\n },\n marketCap: 1.2e12,\n mv: {\n divisor: 100,\n max: 90,\n min: 80\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaStormTechnologies]\n}, {\n b: true,\n initPrice: {\n max: 19e3,\n min: 6e3\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoDefComm,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoDefComm]\n}, {\n b: true,\n initPrice: {\n max: 18e3,\n min: 10e3\n },\n marketCap: 825e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n otlkMag: 9,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenHeliosLabs]\n}, {\n b: true,\n initPrice: {\n max: 14e3,\n min: 8e3\n },\n marketCap: 1e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoVitaLife]\n}, {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3\n },\n marketCap: 800e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n otlkMag: 7.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems]\n}, {\n b: true,\n initPrice: {\n max: 29e3,\n min: 16e3\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 60,\n min: 50\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12UniversalEnergy]\n}, {\n b: true,\n initPrice: {\n max: 17e3,\n min: 8e3\n },\n marketCap: 640e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumAeroCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumAeroCorp]\n}, {\n b: true,\n initPrice: {\n max: 15e3,\n min: 6e3\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 75,\n min: 65\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n otlkMag: 4.5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems]\n}, {\n b: true,\n initPrice: {\n max: 28e3,\n min: 14e3\n },\n marketCap: 705e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n otlkMag: 8.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems]\n}, {\n b: true,\n initPrice: {\n max: 30e3,\n min: 12e3\n },\n marketCap: 695e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n otlkMag: 10.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 4\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals]\n}, {\n b: true,\n initPrice: {\n max: 27e3,\n min: 15e3\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaNovaMedical,\n otlkMag: 5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaNovaMedical]\n}, {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3\n },\n marketCap: 450e9,\n mv: {\n divisor: 100,\n max: 260,\n min: 240\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumWatchdogSecurity,\n otlkMag: 1.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5\n },\n shareTxForMovement: {\n max: 54e3,\n min: 12e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumWatchdogSecurity]\n}, {\n b: true,\n initPrice: {\n max: 8e3,\n min: 4.5e3\n },\n marketCap: 300e9,\n mv: {\n divisor: 100,\n max: 135,\n min: 115\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenLexoCorp]\n}, {\n b: true,\n initPrice: {\n max: 7e3,\n min: 2e3\n },\n marketCap: 180e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumRhoConstruction,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumRhoConstruction]\n}, {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3\n },\n marketCap: 240e9,\n mv: {\n divisor: 100,\n max: 205,\n min: 175\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 16,\n min: 5\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12AlphaEnterprises]\n}, {\n b: true,\n initPrice: {\n max: 8e3,\n min: 3e3\n },\n marketCap: 200e9,\n mv: {\n divisor: 100,\n max: 170,\n min: 150\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n otlkMag: 3,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5\n },\n shareTxForMovement: {\n max: 90e3,\n min: 15e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities]\n}, {\n b: true,\n initPrice: {\n max: 6e3,\n min: 1e3\n },\n marketCap: 185e9,\n mv: {\n divisor: 100,\n max: 100,\n min: 80\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenCompuTek,\n otlkMag: 4,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenCompuTek]\n}, {\n b: true,\n initPrice: {\n max: 5e3,\n min: 1e3\n },\n marketCap: 58e9,\n mv: {\n divisor: 100,\n max: 400,\n min: 200\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 20,\n min: 5\n },\n shareTxForMovement: {\n max: 54e3,\n min: 18e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumNetLinkTechnologies]\n}, {\n b: true,\n initPrice: {\n max: 8e3,\n min: 1e3\n },\n marketCap: 60e9,\n mv: {\n divisor: 100,\n max: 110,\n min: 90\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n otlkMag: 0.5,\n spreadPerc: {\n divisor: 10,\n max: 13,\n min: 4\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaOmegaSoftware]\n}, {\n b: false,\n initPrice: {\n max: 4.5e3,\n min: 500\n },\n marketCap: 45e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70\n },\n name: _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 6\n },\n shareTxForMovement: {\n max: 180e3,\n min: 60e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FoodNStuff]\n}, {\n b: true,\n initPrice: {\n max: 3.5e3,\n min: 1.5e3\n },\n marketCap: 30e9,\n mv: {\n divisor: 100,\n max: 275,\n min: 100\n },\n name: \"Sigma Cosmetics\",\n otlkMag: 0,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6\n },\n shareTxForMovement: {\n max: 70e3,\n min: 20e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][\"Sigma Cosmetics\"]\n}, {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250\n },\n marketCap: 42e9,\n mv: {\n divisor: 100,\n max: 350,\n min: 200\n },\n name: \"Joes Guns\",\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6\n },\n shareTxForMovement: {\n max: 52e3,\n min: 15e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][\"Joes Guns\"]\n}, {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250\n },\n marketCap: 100e9,\n mv: {\n divisor: 100,\n max: 175,\n min: 120\n },\n name: \"Catalyst Ventures\",\n otlkMag: 13.5,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 5\n },\n shareTxForMovement: {\n max: 72e3,\n min: 24e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][\"Catalyst Ventures\"]\n}, {\n b: true,\n initPrice: {\n max: 30e3,\n min: 15e3\n },\n marketCap: 360e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70\n },\n name: \"Microdyne Technologies\",\n otlkMag: 8,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][\"Microdyne Technologies\"]\n}, {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3\n },\n marketCap: 420e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50\n },\n name: \"Titan Laboratories\",\n otlkMag: 11,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3\n },\n symbol: _StockSymbols__WEBPACK_IMPORTED_MODULE_0__[/* StockSymbols */ \"a\"][\"Titan Laboratories\"]\n}];\n\n//# sourceURL=webpack:///./src/StockMarket/data/InitStockMetadata.ts?");
|
||
|
||
/***/ }),
|
||
/* 706 */
|
||
/*!****************************************!*\
|
||
!*** ./src/utils/helpers/is2DArray.ts ***!
|
||
\****************************************/
|
||
/*! exports provided: is2DArray */
|
||
/*! exports used: is2DArray */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return is2DArray; });\n// Checks whether an array is a 2D array.\n// For this, a 2D array is an array which contains only other arrays.\n// If one element in the array is a number or string, it is NOT a 2D array\nfunction is2DArray(arr) {\n if (arr.constructor !== Array) {\n return false;\n }\n\n return arr.every(e => {\n return e.constructor === Array;\n });\n}\n\n//# sourceURL=webpack:///./src/utils/helpers/is2DArray.ts?");
|
||
|
||
/***/ }),
|
||
/* 707 */
|
||
/*!*************************************!*\
|
||
!*** ./src/NetscriptJSEvaluator.js ***!
|
||
\*************************************/
|
||
/*! exports provided: makeScriptBlob, executeJSScript, _getScriptUrls */
|
||
/*! exports used: executeJSScript */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export makeScriptBlob */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return executeJSScript; });\n/* unused harmony export _getScriptUrls */\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Script/ScriptUrl */ 708);\n\n // Makes a blob that contains the code of a given script.\n\nfunction makeScriptBlob(code) {\n return new Blob([code], {\n type: \"text/javascript\"\n });\n} // Begin executing a user JS script, and return a promise that resolves\n// or rejects when the script finishes.\n// - script is a script to execute (see Script.js). We depend only on .filename and .code.\n// scripts is an array of other scripts on the server.\n// env is the global environment that should be visible to all the scripts\n// (i.e. hack, grow, etc.).\n// When the promise returned by this resolves, we'll have finished\n// running the main function of the script.\n\nasync function executeJSScript(scripts = [], workerScript) {\n let loadedModule;\n let urls = null;\n let script = workerScript.getScript();\n\n if (shouldCompile(script, scripts)) {\n // The URL at the top is the one we want to import. It will\n // recursively import all the other modules in the urlStack.\n //\n // Webpack likes to turn the import into a require, which sort of\n // but not really behaves like import. Particularly, it cannot\n // load fully dynamic content. So we hide the import from webpack\n // by placing it inside an eval call.\n script.markUpdated();\n urls = _getScriptUrls(script, scripts, []);\n script.url = urls[urls.length - 1].url;\n script.module = new Promise(resolve => resolve(eval(\"import(urls[urls.length - 1].url)\")));\n script.dependencies = urls;\n }\n\n loadedModule = await script.module;\n let ns = workerScript.env.vars;\n\n try {\n // TODO: putting await in a non-async function yields unhelpful\n // \"SyntaxError: unexpected reserved word\" with no line number information.\n if (!loadedModule.main) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `${script.filename} cannot be run because it does not have a main function.`);\n }\n\n return loadedModule.main(ns);\n } finally {\n // Revoke the generated URLs\n if (urls != null) {\n for (const b in urls) URL.revokeObjectURL(b.url);\n }\n }\n}\n/** Returns whether we should compile the script parameter.\n *\n * @param {Script} script\n * @param {Script[]} scripts\n */\n\nfunction shouldCompile(script, scripts) {\n if (script.module === \"\") return true;\n return script.dependencies.some(dep => {\n const depScript = scripts.find(s => s.filename == dep.filename); // If the script is not present on the server, we should recompile, if only to get any necessary\n // compilation errors.\n\n if (!depScript) return true;\n const depIsMoreRecent = depScript.moduleSequenceNumber > script.moduleSequenceNumber;\n return depIsMoreRecent;\n });\n} // Gets a stack of blob urls, the top/right-most element being\n// the blob url for the named script on the named server.\n//\n// - script -- the script for whom we are getting a URL.\n// - scripts -- all the scripts available on this server\n// - seen -- The modules above this one -- to prevent mutual dependency.\n//\n// TODO We don't make any effort to cache a given module when it is imported at\n// different parts of the tree. That hasn't presented any problem with during\n// testing, but it might be an idea for the future. Would require a topo-sort\n// then url-izing from leaf-most to root-most.\n\n/**\n * @param {Script} script\n * @param {Script[]} scripts\n * @param {Script[]} seen\n * @returns {ScriptUrl[]} All of the compiled scripts, with the final one\n * in the list containing the blob corresponding to\n * the script parameter.\n */\n// BUG: apparently seen is never consulted. Oops.\n\n\nfunction _getScriptUrls(script, scripts, seen) {\n // Inspired by: https://stackoverflow.com/a/43834063/91401\n\n /** @type {ScriptUrl[]} */\n const urlStack = [];\n seen.push(script);\n\n try {\n // Replace every import statement with an import to a blob url containing\n // the corresponding script. E.g.\n //\n // import {foo} from \"bar.js\";\n //\n // becomes\n //\n // import {foo} from \"blob://<uuid>\"\n //\n // Where the blob URL contains the script content.\n let transformedCode = script.code.replace(/((?:from|import)\\s+(?:'|\"))(?:\\.\\/)?([^'\"]+)('|\")/g, (unmodified, prefix, filename, suffix) => {\n const isAllowedImport = scripts.some(s => s.filename == filename);\n if (!isAllowedImport) return unmodified; // Find the corresponding script.\n\n const [importedScript] = scripts.filter(s => s.filename == filename); // Try to get a URL for the requested script and its dependencies.\n\n const urls = _getScriptUrls(importedScript, scripts, seen); // The top url in the stack is the replacement import file for this script.\n\n\n urlStack.push(...urls);\n return [prefix, urls[urls.length - 1].url, suffix].join(\"\");\n }); // We automatically define a print function() in the NetscriptJS module so that\n // accidental calls to window.print() do not bring up the \"print screen\" dialog\n\n transformedCode += `\\n\\nfunction print() {throw new Error(\"Invalid call to window.print(). Did you mean to use Netscript's print()?\");}`; // If we successfully transformed the code, create a blob url for it and\n // push that URL onto the top of the stack.\n\n urlStack.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__[/* ScriptUrl */ \"a\"](script.filename, URL.createObjectURL(makeScriptBlob(transformedCode))));\n return urlStack;\n } catch (err) {\n // If there is an error, we need to clean up the URLs.\n for (const url in urlStack) URL.revokeObjectURL(url);\n\n throw err;\n } finally {\n seen.pop();\n }\n}\n\n//# sourceURL=webpack:///./src/NetscriptJSEvaluator.js?");
|
||
|
||
/***/ }),
|
||
/* 708 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Script/ScriptUrl.ts ***!
|
||
\*********************************/
|
||
/*! exports provided: ScriptUrl */
|
||
/*! exports used: ScriptUrl */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ScriptUrl; });\nclass ScriptUrl {\n constructor(filename, url) {\n this.filename = filename;\n this.url = url;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Script/ScriptUrl.ts?");
|
||
|
||
/***/ }),
|
||
/* 709 */
|
||
/*!********************************************************************!*\
|
||
!*** ./src/PersonObjects/Player/PlayerObjectCorporationMethods.js ***!
|
||
\********************************************************************/
|
||
/*! exports provided: canAccessCorporation, hasCorporation, startCorporation */
|
||
/*! all exports used */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessCorporation\", function() { return canAccessCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasCorporation\", function() { return hasCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCorporation\", function() { return startCorporation; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Corporation/Corporation */ 261);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n\n\nfunction canAccessCorporation() {\n return this.bitNodeN === 3 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][3] > 0;\n}\nfunction hasCorporation() {\n if (this.corporation == null) {\n return false;\n }\n\n return this.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"];\n}\nfunction startCorporation(corpName, additionalShares = 0) {\n this.corporation = new _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]({\n name: corpName\n });\n this.corporation.totalShares += additionalShares;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.js?");
|
||
|
||
/***/ }),
|
||
/* 710 */
|
||
/*!*************************************************************!*\
|
||
!*** ./src/PersonObjects/Player/PlayerObjectGangMethods.js ***!
|
||
\*************************************************************/
|
||
/*! exports provided: canAccessGang, getGangFaction, getGangName, hasGangWith, inGang, startGang */
|
||
/*! all exports used */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessGang\", function() { return canAccessGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangFaction\", function() { return getGangFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangName\", function() { return getGangName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasGangWith\", function() { return hasGangWith; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inGang\", function() { return inGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startGang\", function() { return startGang; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Gang/Gang */ 394);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\n\n // Amount of negative karma needed to manage a gang in BitNodes other than 2\n\nconst GangKarmaRequirement = -54000;\nfunction canAccessGang() {\n if (this.bitNodeN === 2) {\n return true;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__[/* SourceFileFlags */ \"a\"][2] <= 0) {\n return false;\n }\n\n return this.karma <= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement * GangKarmaRequirement;\n}\nfunction getGangFaction() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][this.gang.facName];\n\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);\n }\n\n return fac;\n}\nfunction getGangName() {\n return this.inGang() ? this.gang.facName : \"\";\n}\nfunction hasGangWith(facName) {\n return this.inGang() && this.gang.facName === facName;\n}\nfunction inGang() {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"];\n}\nfunction startGang(factionName, hacking) {\n this.gang = new _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"](factionName, hacking);\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][factionName];\n\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n\n fac.playerReputation = 0;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.js?");
|
||
|
||
/***/ }),
|
||
/* 711 */
|
||
/*!*****************************************************************!*\
|
||
!*** ./src/PersonObjects/Player/PlayerObjectGeneralMethods.jsx ***!
|
||
\*****************************************************************/
|
||
/*! exports provided: init, prestigeAugmentation, prestigeSourceFile, receiveInvite, calculateSkill, updateSkillLevels, resetMultipliers, hasProgram, setMoney, gainMoney, loseMoney, canAfford, recordMoneySource, gainHackingExp, gainStrengthExp, gainDefenseExp, gainDexterityExp, gainAgilityExp, gainCharismaExp, gainIntelligenceExp, queryStatFromString, resetWorkStatus, processWorkEarnings, startWork, cancelationPenalty, work, finishWork, startWorkPartTime, workPartTime, finishWorkPartTime, startFocusing, stopFocusing, startFactionWork, startFactionHackWork, startFactionFieldWork, startFactionSecurityWork, workForFaction, finishFactionWork, getWorkMoneyGain, getWorkHackExpGain, getWorkStrExpGain, getWorkDefExpGain, getWorkDexExpGain, getWorkAgiExpGain, getWorkChaExpGain, getWorkRepGain, startCreateProgramWork, createProgramWork, finishCreateProgramWork, startClass, takeClass, finishClass, startCrime, commitCrime, finishCrime, singularityStopWork, takeDamage, regenerateHp, hospitalize, applyForJob, getNextCompanyPosition, quitJob, applyForSoftwareJob, applyForSoftwareConsultantJob, applyForItJob, applyForSecurityEngineerJob, applyForNetworkEngineerJob, applyForBusinessJob, applyForBusinessConsultantJob, applyForSecurityJob, applyForAgentJob, applyForEmployeeJob, applyForPartTimeEmployeeJob, applyForWaiterJob, applyForPartTimeWaiterJob, isQualified, reapplyAllAugmentations, reapplyAllSourceFiles, checkForFactionInvitations, setBitNodeNumber, queueAugmentation, gainCodingContractReward, travel, gotoLocation, canAccessResleeving, giveExploit, getIntelligenceBonus, getCasinoWinnings */
|
||
/*! all exports used */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeAugmentation\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeSourceFile\", function() { return prestigeSourceFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveInvite\", function() { return receiveInvite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateSkill\", function() { return calculateSkill; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateSkillLevels\", function() { return updateSkillLevels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetMultipliers\", function() { return resetMultipliers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasProgram\", function() { return hasProgram; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMoney\", function() { return setMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainMoney\", function() { return gainMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loseMoney\", function() { return loseMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAfford\", function() { return canAfford; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"recordMoneySource\", function() { return recordMoneySource; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainHackingExp\", function() { return gainHackingExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainStrengthExp\", function() { return gainStrengthExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDefenseExp\", function() { return gainDefenseExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDexterityExp\", function() { return gainDexterityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainAgilityExp\", function() { return gainAgilityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCharismaExp\", function() { return gainCharismaExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainIntelligenceExp\", function() { return gainIntelligenceExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queryStatFromString\", function() { return queryStatFromString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetWorkStatus\", function() { return resetWorkStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"processWorkEarnings\", function() { return processWorkEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWork\", function() { return startWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cancelationPenalty\", function() { return cancelationPenalty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"work\", function() { return work; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWork\", function() { return finishWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWorkPartTime\", function() { return startWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workPartTime\", function() { return workPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWorkPartTime\", function() { return finishWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFocusing\", function() { return startFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stopFocusing\", function() { return stopFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionWork\", function() { return startFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionHackWork\", function() { return startFactionHackWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionFieldWork\", function() { return startFactionFieldWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionSecurityWork\", function() { return startFactionSecurityWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workForFaction\", function() { return workForFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishFactionWork\", function() { return finishFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkMoneyGain\", function() { return getWorkMoneyGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkHackExpGain\", function() { return getWorkHackExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkStrExpGain\", function() { return getWorkStrExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDefExpGain\", function() { return getWorkDefExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDexExpGain\", function() { return getWorkDexExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkAgiExpGain\", function() { return getWorkAgiExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkChaExpGain\", function() { return getWorkChaExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkRepGain\", function() { return getWorkRepGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCreateProgramWork\", function() { return startCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createProgramWork\", function() { return createProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCreateProgramWork\", function() { return finishCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startClass\", function() { return startClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeClass\", function() { return takeClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishClass\", function() { return finishClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCrime\", function() { return startCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"commitCrime\", function() { return commitCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCrime\", function() { return finishCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"singularityStopWork\", function() { return singularityStopWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeDamage\", function() { return takeDamage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"regenerateHp\", function() { return regenerateHp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hospitalize\", function() { return hospitalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForJob\", function() { return applyForJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNextCompanyPosition\", function() { return getNextCompanyPosition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quitJob\", function() { return quitJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareJob\", function() { return applyForSoftwareJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareConsultantJob\", function() { return applyForSoftwareConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForItJob\", function() { return applyForItJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityEngineerJob\", function() { return applyForSecurityEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForNetworkEngineerJob\", function() { return applyForNetworkEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessJob\", function() { return applyForBusinessJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessConsultantJob\", function() { return applyForBusinessConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityJob\", function() { return applyForSecurityJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForAgentJob\", function() { return applyForAgentJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForEmployeeJob\", function() { return applyForEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeEmployeeJob\", function() { return applyForPartTimeEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForWaiterJob\", function() { return applyForWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeWaiterJob\", function() { return applyForPartTimeWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isQualified\", function() { return isQualified; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllAugmentations\", function() { return reapplyAllAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllSourceFiles\", function() { return reapplyAllSourceFiles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"checkForFactionInvitations\", function() { return checkForFactionInvitations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBitNodeNumber\", function() { return setBitNodeNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queueAugmentation\", function() { return queueAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCodingContractReward\", function() { return gainCodingContractReward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"travel\", function() { return travel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gotoLocation\", function() { return gotoLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessResleeving\", function() { return canAccessResleeving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"giveExploit\", function() { return giveExploit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getIntelligenceBonus\", function() { return getIntelligenceBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCasinoWinnings\", function() { return getCasinoWinnings; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Company/GetNextCompanyPosition */ 475);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 396);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Crime/CrimeHelpers */ 354);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Gang/AllGangs */ 59);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../Locations/Cities */ 105);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Locations/Locations */ 194);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/Sleeve */ 246);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../formulas/skill */ 199);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../formulas/intelligence */ 312);\n/* harmony import */ var _formulas_reputation__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../formulas/reputation */ 188);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../SourceFile/applySourceFile */ 713);\n/* harmony import */ var _Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../Exploits/applyExploits */ 714);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 278);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../StockMarket/PlayerInfluencing */ 395);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../Hospital/Hospital */ 310);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 292);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_45__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n /* Initialize Player's home computer */\n var t_homeComp = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__[/* safetlyCreateUniqueServer */ \"h\"])({\n adminRights: true,\n hostname: \"home\",\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* createUniqueRandomIp */ \"c\"])(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true\n });\n this.homeComputer = t_homeComp.ip;\n this.currentServer = t_homeComp.ip;\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AddToAllServers */ \"a\"])(t_homeComp);\n this.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_13__[/* Programs */ \"a\"].NukeProgram.name);\n}\nfunction prestigeAugmentation() {\n var homeComp = this.getHomeComputer();\n this.currentServer = homeComp.ip;\n this.homeComputer = homeComp.ip;\n this.numPeopleKilled = 0;\n this.karma = 0; //Reset stats\n\n this.hacking_skill = 1;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n this.charisma = 1;\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](1000);\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12;\n this.location = \"\";\n this.companyName = \"\";\n this.jobs = {};\n this.purchasedServers = [];\n this.factions = [];\n this.factionInvitations = [];\n this.queuedAugmentations = [];\n this.resleeves = [];\n let numSleeves = Math.min(3, _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.isWorking = false;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n this.crimeType = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.lastUpdate = new Date().getTime(); // Statistics Trackers\n\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n this.hacknetNodes.length = 0;\n this.hashManager.prestige(); // Reapply augs, re-calculate skills and reset HP\n\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\nfunction prestigeSourceFile() {\n this.prestigeAugmentation(); // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n this.timeWorked = 0; // Gang\n\n this.gang = null;\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__[/* resetGangs */ \"c\"])(); // Reset Stock market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; // BitNode 3: Corporatocracy\n\n this.corporation = 0;\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\nfunction receiveInvite(factionName) {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n\n this.firstFacInvRecvd = true;\n this.factionInvitations.push(factionName);\n} //Calculates skill level based on experience. The same formula will be used for every skill\n\nfunction calculateSkill(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(exp, mult);\n}\nfunction updateSkillLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateSkill(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n var ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\nfunction resetMultipliers() {\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n this.work_money_mult = 1;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n}\nfunction hasProgram(programName) {\n const home = this.getHomeComputer();\n\n if (home == null) {\n return false;\n }\n\n for (var i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n return false;\n}\nfunction setMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](money);\n}\nfunction gainMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money.plus(money);\n}\nfunction loseMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n\n if (this.money.eq(Infinity) && money === Infinity) return;\n this.money = this.money.minus(money);\n}\nfunction canAfford(cost) {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n\n return this.money.gte(cost);\n}\nfunction recordMoneySource(amt, source) {\n if (!(this.moneySourceA instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n if (!(this.moneySourceB instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\nfunction gainHackingExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n\n this.hacking_exp += exp;\n\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking_skill = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier);\n}\nfunction gainStrengthExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n\n this.strength_exp += exp;\n\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier);\n}\nfunction gainDefenseExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n\n this.defense_exp += exp;\n\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier);\n}\nfunction gainDexterityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n\n this.dexterity_exp += exp;\n\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier);\n}\nfunction gainAgilityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n\n this.agility_exp += exp;\n\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier);\n}\nfunction gainCharismaExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n\n this.charisma_exp += exp;\n\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier);\n}\nfunction gainIntelligenceExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n }\n} //Given a string expression like \"str\" or \"strength\", returns the given stat\n\nfunction queryStatFromString(str) {\n const tempStr = str.toLowerCase();\n\n if (tempStr.includes(\"hack\")) {\n return this.hacking_skill;\n }\n\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n}\n/******* Working functions *******/\n\nfunction resetWorkStatus(generalType, group, workType) {\n if (generalType === this.workType && group === this.companyName) return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType) return;\n if (this.isWorking) this.singularityStopWork();\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n}\nfunction processWorkEarnings(numCycles = 1) {\n const focusBonus = this.focus ? 1 : 0.8;\n const hackExpGain = focusBonus * this.workHackExpGainRate * numCycles;\n const strExpGain = focusBonus * this.workStrExpGainRate * numCycles;\n const defExpGain = focusBonus * this.workDefExpGainRate * numCycles;\n const dexExpGain = focusBonus * this.workDexExpGainRate * numCycles;\n const agiExpGain = focusBonus * this.workAgiExpGainRate * numCycles;\n const chaExpGain = focusBonus * this.workChaExpGainRate * numCycles;\n const moneyGain = (this.workMoneyGainRate - this.workMoneyLossRate) * numCycles;\n this.gainHackingExp(hackExpGain);\n this.gainStrengthExp(strExpGain);\n this.gainDefenseExp(defExpGain);\n this.gainDexterityExp(dexExpGain);\n this.gainAgilityExp(agiExpGain);\n this.gainCharismaExp(chaExpGain);\n this.gainMoney(moneyGain);\n\n if (this.className) {\n this.recordMoneySource(moneyGain, \"class\");\n } else {\n this.recordMoneySource(moneyGain, \"work\");\n }\n\n this.workHackExpGained += hackExpGain;\n this.workStrExpGained += strExpGain;\n this.workDefExpGained += defExpGain;\n this.workDexExpGained += dexExpGain;\n this.workAgiExpGained += agiExpGain;\n this.workChaExpGained += chaExpGain;\n this.workRepGained += focusBonus * this.workRepGainRate * numCycles;\n this.workMoneyGained += focusBonus * this.workMoneyGainRate * numCycles;\n this.workMoneyGained -= focusBonus * this.workMoneyLossRate * numCycles;\n}\n/* Working for Company */\n\nfunction startWork(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction cancelationPenalty() {\n const specialIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][this.companyName];\n\n if (specialIp) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][specialIp];\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\nfunction work(numCycles) {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles);\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__[/* influenceStockThroughCompanyWork */ \"a\"])(comp, this.workRepGainRate, numCycles); // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWork(false);\n return true;\n }\n\n return false;\n}\nfunction finishWork(cancelled, sing = false) {\n //Since the work was cancelled early, player only gains half of what they've earned so far\n if (cancelled) {\n this.workRepGained *= this.cancelationPenalty();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n let content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (cancelled) {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a short shift of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"Since you cancelled your work early, you only gained half of the reputation you earned. \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n } else {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a full shift of 8 hours! \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n }\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked a short shift of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned $\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startWorkPartTime(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction workPartTime(numCycles) {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWorkPartTime();\n return true;\n }\n\n return false;\n}\nfunction finishWorkPartTime(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n const content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned a total of \" + \"$\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startFocusing() {\n this.focus = true;\n}\nfunction stopFocusing() {\n this.focus = false;\n}\n/* Working for Faction */\n\nfunction startFactionWork(faction) {\n //Update reputation gain rate to account for faction favor\n var favorMult = 1 + faction.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain;\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n}\nfunction startFactionHackWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking);\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = (this.hacking_skill + this.intelligence) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n this.startFactionWork(faction);\n}\nfunction startFactionFieldWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField);\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n this.startFactionWork(faction);\n}\nfunction startFactionSecurityWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity);\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n this.startFactionWork(faction);\n}\nfunction workForFaction(numCycles) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName]; //Constantly update the rep gain rate\n\n switch (this.factionWorkType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getHackingWorkRepGain */ \"c\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n break;\n\n default:\n break;\n } //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n\n\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles); //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n this.finishFactionWork(false);\n return true;\n }\n\n return false;\n}\nfunction finishFactionWork(cancelled, sing = false) {\n var faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for your faction \", faction.name, \" for a total of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the faction \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for your faction \" + faction.name + \" for a total of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \". \" + \"You earned \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" rep, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //Money gained per game cycle\n\nfunction getWorkMoneyGain() {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n } // Get base salary\n\n\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPosition == null) {\n console.error(`Could not find CompanyPosition object for ${companyPositionName}. Work salary will be 0`);\n return 0;\n }\n\n return companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney * bn11Mult;\n} //Hack exp gained per game cycle\n\nfunction getWorkHackExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work hack exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Str exp gained per game cycle\n\nfunction getWorkStrExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work str exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Def exp gained per game cycle\n\nfunction getWorkDefExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work def exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Dex exp gained per game cycle\n\nfunction getWorkDexExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work dex exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Agi exp gained per game cycle\n\nfunction getWorkAgiExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work agi exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Charisma exp gained per game cycle\n\nfunction getWorkChaExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work cha exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Reputation gained per game cycle\n\nfunction getWorkRepGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work rep gain will be 0`].join(\" \"));\n return 0;\n }\n\n var jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma); //Intelligence provides a flat bonus to job performance\n\n jobPerformance += this.intelligence / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel; //Update reputation gain rate to account for company favor\n\n var favorMult = 1 + company.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n return jobPerformance * this.company_rep_mult * favorMult;\n} // export function getFactionSecurityWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel) / 4.5;\n// return t * this.faction_rep_mult;\n// }\n// export function getFactionFieldWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel +\n// this.charisma / CONSTANTS.MaxSkillLevel +\n// this.intelligence / CONSTANTS.MaxSkillLevel) / 5.5;\n// return t * this.faction_rep_mult;\n// }\n\n/* Creating a Program */\n\nfunction startCreateProgramWork(programName, time, reqLevel) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram; //Time needed to complete work affected by hacking skill (linearly based on\n //ratio of (your skill - required level) to MAX skill)\n //var timeMultiplier = (CONSTANTS.MaxSkillLevel - (this.hacking_skill - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n\n this.createProgramReqLvl = reqLevel;\n this.timeNeededToCompleteWork = time; //Check for incomplete program\n\n for (var i = 0; i < this.getHomeComputer().programs.length; ++i) {\n var programFile = this.getHomeComputer().programs[i];\n\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n var res = programFile.split(\"-\");\n\n if (res.length != 3) {\n break;\n }\n\n var percComplete = Number(res[1].slice(0, -1));\n\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n\n this.timeWorkedCreateProgram = percComplete / 100 * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\nfunction createProgramWork(numCycles) {\n //Higher hacking skill will allow you to create programs faster\n var reqLvl = this.createProgramReqLvl;\n var skillMult = this.hacking_skill / reqLvl * this.getIntelligenceBonus(3); //This should always be greater than 1;\n\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n //Skill multiplier directly applied to \"time worked\"\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n return true;\n }\n\n return false;\n}\nfunction finishCreateProgramWork(cancelled) {\n var programName = this.createProgramName;\n\n if (cancelled === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You've finished creating \" + programName + \"!<br>\" + \"The new program can be found on your home computer.\");\n this.getHomeComputer().programs.push(programName);\n } else {\n var perc = (Math.floor(this.timeWorkedCreateProgram / this.timeNeededToCompleteWork * 10000) / 100).toString();\n var incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp(this.createProgramReqLvl / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceProgramBaseExpGain);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n}\n/* Studying/Taking Classes */\n\nfunction startClass(costMult, expMult, className) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass;\n this.className = className;\n const gameCPS = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed; //Find cost and exp gain per game cycle\n\n var cost = 0;\n var hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = this.hashManager;\n\n switch (className) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience:\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructures:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworks:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithms:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagement:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadership:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymStrength:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n strExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDefense:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n defExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDexterity:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n dexExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymAgility:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n agiExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n return;\n }\n\n this.workMoneyLossRate = cost;\n this.workHackExpGainRate = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workStrExpGainRate = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDefExpGainRate = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDexExpGainRate = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workAgiExpGainRate = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workChaExpGainRate = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n}\nfunction takeClass(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles);\n return false;\n} //The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\n\nfunction finishClass(sing = false) {\n this.gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000));\n\n if (this.workMoneyGained > 0) {\n throw new Error(\"ERR: Somehow gained money while taking class\");\n }\n\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"After \", this.className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \", \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"you spent a total of \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: -this.workMoneyGained\n }), \". \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"After \" + this.className + \" for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \", \" + \"you spent a total of \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained * -1) + \". \" + \"You earned a total of: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //The EXP and $ gains are hardcoded. Time is in ms\n\nfunction startCrime(crimeType, hackExp, strExp, defExp, dexExp, agiExp, chaExp, money, time, singParams = null) {\n this.crimeType = crimeType;\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime;\n\n if (singParams && singParams.workerscript) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = singParams.workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.timeNeededToCompleteWork = time;\n}\nfunction commitCrime(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n\n if (this.timeWorked >= this.timeNeededToCompleteWork) {\n this.finishCrime(false);\n return true;\n }\n\n return false;\n}\nfunction finishCrime(cancelled) {\n //Determine crime success/failure\n if (!cancelled) {\n if (Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__[/* determineCrimeSuccess */ \"a\"])(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n\n for (const i in _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"]) {\n if (_Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i].type == this.crimeType) {\n crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i];\n break;\n }\n }\n\n if (crime == null) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`);\n }\n\n this.gainMoney(this.workMoneyGained);\n this.recordMoneySource(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n } //On a crime success, gain 2x exp\n\n\n this.workHackExpGained *= 2;\n this.workStrExpGained *= 2;\n this.workDefExpGained *= 2;\n this.workDexExpGained *= 2;\n this.workAgiExpGained *= 2;\n this.workChaExpGained *= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime successful! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime successful!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n } else {\n //Exp halved on failure\n this.workHackExpGained /= 2;\n this.workStrExpGained /= 2;\n this.workDefExpGained /= 2;\n this.workDexExpGained /= 2;\n this.workAgiExpGained /= 2;\n this.workChaExpGained /= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime failed! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime failed!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n }\n\n this.gainHackingExp(this.workHackExpGained);\n this.gainStrengthExp(this.workStrExpGained);\n this.gainDefenseExp(this.workDefExpGained);\n this.gainDexterityExp(this.workDexExpGained);\n this.gainAgilityExp(this.workAgiExpGained);\n this.gainCharismaExp(this.workChaExpGained);\n }\n\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n} //Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\n\nfunction singularityStopWork() {\n if (!this.isWorking) {\n return \"\";\n }\n\n var res; //Earnings text for work\n\n switch (this.workType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n\n return res;\n} // Returns true if hospitalized, false otherwise\n\nfunction takeDamage(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp -= amt;\n\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\nfunction regenerateHp(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp += amt;\n\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\nfunction hospitalize() {\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__[/* getHospitalizationCost */ \"b\"])(this);\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_30__[/* Settings */ \"a\"].SuppressHospitalizationPopup === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged\\xA0\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n this.loseMoney(cost);\n this.recordMoneySource(-1 * cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\n\nfunction applyForJob(entryPosType, sing = false) {\n // Get current company and job\n let currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n }\n\n const currPositionName = this.jobs[this.companyName]; // Get company that's being applied to\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n if (sing) {\n return \"ERROR: Invalid company name: \" + this.location + \". applyToCompany() failed\";\n } else {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return;\n }\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, pos);\n\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position<br>\" + reqText);\n return;\n }\n\n while (true) {\n let newPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (newPos == null) {\n break;\n } //Check if this company has this position\n\n\n if (company.hasPosition(newPos)) {\n if (!this.isQualified(company, newPos)) {\n //If player not qualified for next job, break loop so player will be given current job\n break;\n }\n\n pos = newPos;\n } else {\n break;\n }\n } //Check if the determined job is the same as the player's current job\n\n\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n var nextPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (nextPos == null) {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n } else if (company.hasPosition(nextPos)) {\n if (sing) {\n return false;\n }\n\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, nextPos);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unfortunately, you do not qualify for a promotion<br>\" + reqText);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n }\n\n return; //Same job, do nothing\n }\n }\n\n this.jobs[company.name] = pos.name;\n this.companyName = this.location;\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n} //Returns your next position at a company given the field (software, business, etc.)\n\nfunction getNextCompanyPosition(company, entryPosType) {\n var currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n } //Not employed at this company, so return the entry position\n\n\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n } //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n\n\n const currentPositionName = this.jobs[this.companyName];\n const currentPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][currentPositionName];\n\n if (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob() || currentPosition.isITJob() && entryPosType.isITJob() || currentPosition.isBusinessJob() && entryPosType.isBusinessJob() || currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob() || currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob() || currentPosition.isSecurityJob() && entryPosType.isSecurityJob() || currentPosition.isAgentJob() && entryPosType.isAgentJob() || currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob() || currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob() || currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob()) {\n return Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(currentPosition);\n }\n\n return entryPosType;\n}\nfunction quitJob(company) {\n this.isWorking = false;\n this.companyName = \"\";\n delete this.jobs[company];\n}\nfunction applyForSoftwareJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareCompanyPositions */ \"j\"][0]], sing);\n}\nfunction applyForSoftwareConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]], sing);\n}\nfunction applyForItJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* ITCompanyPositions */ \"d\"][0]], sing);\n}\nfunction applyForSecurityEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForNetworkEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForBusinessJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessCompanyPositions */ \"b\"][0]], sing);\n}\nfunction applyForBusinessConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessConsultantCompanyPositions */ \"c\"][0]], sing);\n}\nfunction applyForSecurityJob(sing = false) {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityCompanyPositions */ \"h\"][2]], sing);\n}\nfunction applyForAgentJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1]])) {\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed part-time at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a part-time waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n} //Checks if the Player is qualified for a certain position\n\nfunction isQualified(company, position) {\n var offset = company.jobStatReqOffset;\n var reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n var reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n var reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n if (this.hacking_skill >= reqHacking && this.strength >= reqStrength && this.defense >= reqDefense && this.dexterity >= reqDexterity && this.agility >= reqAgility && this.charisma >= reqCharisma && company.playerReputation >= position.requiredReputation) {\n return true;\n }\n\n return false;\n}\n/********** Reapplying Augmentations and Source File ***********/\n\nfunction reapplyAllAugmentations(resetMultipliers = true) {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const augName = this.augmentations[i].name;\n var aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n\n aug.owned = true;\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n for (let j = 0; j < aug.level; ++j) {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n continue;\n }\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\nfunction reapplyAllSourceFiles() {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n var srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n var sourceFileObject = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n\n Object(_SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__[/* applySourceFile */ \"a\"])(this.sourceFiles[i]);\n }\n\n Object(_Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__[/* applyExploit */ \"a\"])();\n}\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\n\nfunction checkForFactionInvitations() {\n let invitedFactions = []; //Array which will hold all Factions the player should be invited to\n\n var numAugmentations = this.augmentations.length;\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs); // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n\n function getCompanyRep(companyName) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n } // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n\n\n function checkMegacorpRequirements(companyName, repNeeded = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CorpFactionRepRequirement) {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n } //Illuminati\n\n\n var illuminatiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Illuminati\"];\n\n if (!illuminatiFac.isBanned && !illuminatiFac.isMember && !illuminatiFac.alreadyInvited && numAugmentations >= 30 && this.money.gte(150000000000) && this.hacking_skill >= 1500 && this.strength >= 1200 && this.defense >= 1200 && this.dexterity >= 1200 && this.agility >= 1200) {\n invitedFactions.push(illuminatiFac);\n } //Daedalus\n\n\n var daedalusFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Daedalus\"];\n\n if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited && numAugmentations >= Math.round(30 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement) && this.money.gte(100000000000) && (this.hacking_skill >= 2500 || this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500)) {\n invitedFactions.push(daedalusFac);\n } //The Covenant\n\n\n var covenantFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Covenant\"];\n\n if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited && numAugmentations >= 20 && this.money.gte(75000000000) && this.hacking_skill >= 850 && this.strength >= 850 && this.defense >= 850 && this.dexterity >= 850 && this.agility >= 850) {\n invitedFactions.push(covenantFac);\n } //ECorp\n\n\n var ecorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"ECorp\"];\n\n if (!ecorpFac.isBanned && !ecorpFac.isMember && !ecorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumECorp)) {\n invitedFactions.push(ecorpFac);\n } //MegaCorp\n\n\n var megacorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"MegaCorp\"];\n\n if (!megacorpFac.isBanned && !megacorpFac.isMember && !megacorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12MegaCorp)) {\n invitedFactions.push(megacorpFac);\n } //Bachman & Associates\n\n\n var bachmanandassociatesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Bachman & Associates\"];\n\n if (!bachmanandassociatesFac.isBanned && !bachmanandassociatesFac.isMember && !bachmanandassociatesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumBachmanAndAssociates)) {\n invitedFactions.push(bachmanandassociatesFac);\n } //Blade Industries\n\n\n var bladeindustriesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Blade Industries\"];\n\n if (!bladeindustriesFac.isBanned && !bladeindustriesFac.isMember && !bladeindustriesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12BladeIndustries)) {\n invitedFactions.push(bladeindustriesFac);\n } //NWO\n\n\n var nwoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NWO\"];\n\n if (!nwoFac.isBanned && !nwoFac.isMember && !nwoFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenNWO)) {\n invitedFactions.push(nwoFac);\n } //Clarke Incorporated\n\n\n var clarkeincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Clarke Incorporated\"];\n\n if (!clarkeincorporatedFac.isBanned && !clarkeincorporatedFac.isMember && !clarkeincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumClarkeIncorporated)) {\n invitedFactions.push(clarkeincorporatedFac);\n } //OmniTek Incorporated\n\n\n var omnitekincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"OmniTek Incorporated\"];\n\n if (!omnitekincorporatedFac.isBanned && !omnitekincorporatedFac.isMember && !omnitekincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated)) {\n invitedFactions.push(omnitekincorporatedFac);\n } //Four Sigma\n\n\n var foursigmaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Four Sigma\"];\n\n if (!foursigmaFac.isBanned && !foursigmaFac.isMember && !foursigmaFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12FourSigma)) {\n invitedFactions.push(foursigmaFac);\n } //KuaiGong International\n\n\n var kuaigonginternationalFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"KuaiGong International\"];\n\n if (!kuaigonginternationalFac.isBanned && !kuaigonginternationalFac.isMember && !kuaigonginternationalFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational)) {\n invitedFactions.push(kuaigonginternationalFac);\n } //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n\n\n var fulcrumsecrettechonologiesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Fulcrum Secret Technologies\"];\n var fulcrumSecretServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].FulcrumSecretTechnologies]];\n\n if (fulcrumSecretServer == null) {\n console.error(\"Could not find Fulcrum Secret Technologies Server\");\n } else {\n if (!fulcrumsecrettechonologiesFac.isBanned && !fulcrumsecrettechonologiesFac.isMember && !fulcrumsecrettechonologiesFac.alreadyInvited && fulcrumSecretServer.backdoorInstalled && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumFulcrumTechnologies, 250e3)) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n } //BitRunners\n\n\n var bitrunnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"BitRunners\"];\n var bitrunnersServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].BitRunnersServer]];\n\n if (bitrunnersServer == null) {\n console.error(\"Could not find BitRunners Server\");\n } else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.backdoorInstalled && !bitrunnersFac.alreadyInvited) {\n invitedFactions.push(bitrunnersFac);\n } //The Black Hand\n\n\n var theblackhandFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Black Hand\"];\n var blackhandServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].TheBlackHandServer]];\n\n if (blackhandServer == null) {\n console.error(\"Could not find The Black Hand Server\");\n } else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.backdoorInstalled && !theblackhandFac.alreadyInvited) {\n invitedFactions.push(theblackhandFac);\n } //NiteSec\n\n\n var nitesecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NiteSec\"];\n var nitesecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].NiteSecServer]];\n\n if (nitesecServer == null) {\n console.error(\"Could not find NiteSec Server\");\n } else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.backdoorInstalled && !nitesecFac.alreadyInvited) {\n invitedFactions.push(nitesecFac);\n } //Chongqing\n\n\n var chongqingFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Chongqing\"];\n\n if (!chongqingFac.isBanned && !chongqingFac.isMember && !chongqingFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing) {\n invitedFactions.push(chongqingFac);\n } //Sector-12\n\n\n var sector12Fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Sector-12\"];\n\n if (!sector12Fac.isBanned && !sector12Fac.isMember && !sector12Fac.alreadyInvited && this.money.gte(15000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) {\n invitedFactions.push(sector12Fac);\n } //New Tokyo\n\n\n var newtokyoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"New Tokyo\"];\n\n if (!newtokyoFac.isBanned && !newtokyoFac.isMember && !newtokyoFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo) {\n invitedFactions.push(newtokyoFac);\n } //Aevum\n\n\n var aevumFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Aevum\"];\n\n if (!aevumFac.isBanned && !aevumFac.isMember && !aevumFac.alreadyInvited && this.money.gte(40000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum) {\n invitedFactions.push(aevumFac);\n } //Ishima\n\n\n var ishimaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Ishima\"];\n\n if (!ishimaFac.isBanned && !ishimaFac.isMember && !ishimaFac.alreadyInvited && this.money.gte(30000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) {\n invitedFactions.push(ishimaFac);\n } //Volhaven\n\n\n var volhavenFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Volhaven\"];\n\n if (!volhavenFac.isBanned && !volhavenFac.isMember && !volhavenFac.alreadyInvited && this.money.gte(50000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Volhaven) {\n invitedFactions.push(volhavenFac);\n } //Speakers for the Dead\n\n\n var speakersforthedeadFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Speakers for the Dead\"];\n\n if (!speakersforthedeadFac.isBanned && !speakersforthedeadFac.isMember && !speakersforthedeadFac.alreadyInvited && this.hacking_skill >= 100 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.numPeopleKilled >= 30 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(speakersforthedeadFac);\n } //The Dark Army\n\n\n var thedarkarmyFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Dark Army\"];\n\n if (!thedarkarmyFac.isBanned && !thedarkarmyFac.isMember && !thedarkarmyFac.alreadyInvited && this.hacking_skill >= 300 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing && this.numPeopleKilled >= 5 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thedarkarmyFac);\n } //The Syndicate\n\n\n var thesyndicateFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Syndicate\"];\n\n if (!thesyndicateFac.isBanned && !thesyndicateFac.isMember && !thesyndicateFac.alreadyInvited && this.hacking_skill >= 200 && this.strength >= 200 && this.defense >= 200 && this.dexterity >= 200 && this.agility >= 200 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) && this.money.gte(10000000) && this.karma <= -90 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thesyndicateFac);\n } //Silhouette\n\n\n var silhouetteFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Silhouette\"];\n\n if (!silhouetteFac.isBanned && !silhouetteFac.isMember && !silhouetteFac.alreadyInvited && (allPositions.includes(\"Chief Technology Officer\") || allPositions.includes(\"Chief Financial Officer\") || allPositions.includes(\"Chief Executive Officer\")) && this.money.gte(15000000) && this.karma <= -22) {\n invitedFactions.push(silhouetteFac);\n } //Tetrads\n\n\n var tetradsFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tetrads\"];\n\n if (!tetradsFac.isBanned && !tetradsFac.isMember && !tetradsFac.alreadyInvited && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) && this.strength >= 75 && this.defense >= 75 && this.dexterity >= 75 && this.agility >= 75 && this.karma <= -18) {\n invitedFactions.push(tetradsFac);\n } //SlumSnakes\n\n\n var slumsnakesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Slum Snakes\"];\n\n if (!slumsnakesFac.isBanned && !slumsnakesFac.isMember && !slumsnakesFac.alreadyInvited && this.strength >= 30 && this.defense >= 30 && this.dexterity >= 30 && this.agility >= 30 && this.karma <= -9 && this.money.gte(1000000)) {\n invitedFactions.push(slumsnakesFac);\n } //Netburners\n\n\n var netburnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Netburners\"];\n var totalHacknetRam = 0;\n var totalHacknetCores = 0;\n var totalHacknetLevels = 0;\n\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__[/* hasHacknetServers */ \"g\"])(this)) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][this.hacknetNodes[i]];\n\n if (hserver) {\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n }\n } else {\n totalHacknetLevels += this.hacknetNodes[i].level;\n totalHacknetRam += this.hacknetNodes[i].ram;\n totalHacknetCores += this.hacknetNodes[i].cores;\n }\n }\n\n if (!netburnersFac.isBanned && !netburnersFac.isMember && !netburnersFac.alreadyInvited && this.hacking_skill >= 80 && totalHacknetRam >= 8 && totalHacknetCores >= 4 && totalHacknetLevels >= 100) {\n invitedFactions.push(netburnersFac);\n } //Tian Di Hui\n\n\n var tiandihuiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tian Di Hui\"];\n\n if (!tiandihuiFac.isBanned && !tiandihuiFac.isMember && !tiandihuiFac.alreadyInvited && this.money.gte(1000000) && this.hacking_skill >= 50 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima)) {\n invitedFactions.push(tiandihuiFac);\n } //CyberSec\n\n\n var cybersecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"CyberSec\"];\n var cybersecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].CyberSecServer]];\n\n if (cybersecServer == null) {\n console.error(\"Could not find CyberSec Server\");\n } else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.backdoorInstalled && !cybersecFac.alreadyInvited) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n/************* BitNodes **************/\n\nfunction setBitNodeNumber(n) {\n this.bitNodeN = n;\n}\nfunction queueAugmentation(name) {\n for (const i in this.queuedAugmentations) {\n if (this.queuedAugmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const i in this.augmentations) {\n if (this.augmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.firstAugPurchased = true;\n this.queuedAugmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](name));\n}\n/************* Coding Contracts **************/\n\nfunction gainCodingContractReward(reward, difficulty = 1) {\n if (reward == null || reward.type == null || reward == null) {\n return `No reward for this contract`;\n }\n /* eslint-disable no-case-declarations */\n\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n if (reward.name == null || !(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll:\n const totalGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty; // Ignore Bladeburners and other special factions for this calculation\n\n const specialFactions = [\"Bladeburners\"];\n var factions = this.factions.slice();\n factions = factions.filter(f => {\n return !specialFactions.includes(f);\n }); // If the player was only part of the special factions, we'll just give money\n\n if (factions.length == 0) {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n\n for (const facName of factions) {\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n continue;\n }\n\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName].playerReputation += gainPerFaction;\n }\n\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n if (reward.name == null || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseCompanyRepGain * difficulty;\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money:\n default:\n var moneyGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseMoneyGain * difficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney;\n this.gainMoney(moneyGain);\n this.recordMoneySource(moneyGain, \"codingcontract\");\n return `Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain)}`;\n break;\n }\n /* eslint-enable no-case-declarations */\n\n}\nfunction travel(to) {\n if (_Locations_Cities__WEBPACK_IMPORTED_MODULE_20__[/* Cities */ \"a\"][to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n\n this.city = to;\n return true;\n}\nfunction gotoLocation(to) {\n if (_Locations_Locations__WEBPACK_IMPORTED_MODULE_21__[/* Locations */ \"a\"][to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n\n this.location = to;\n return true;\n}\nfunction canAccessResleeving() {\n return this.bitNodeN === 10 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] > 0;\n}\nfunction giveExploit(exploit) {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n }\n}\nfunction getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n}\nfunction getCasinoWinnings() {\n return this.moneySourceA.casino;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.jsx?");
|
||
|
||
/***/ }),
|
||
/* 712 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Locations/data/LocationsMetadata.ts ***!
|
||
\*************************************************/
|
||
/*! exports provided: LocationsMetadata */
|
||
/*! exports used: LocationsMetadata */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationsMetadata; });\n/* harmony import */ var _CityNames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CityNames */ 21);\n/* harmony import */ var _LocationNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LocationNames */ 9);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../LocationTypeEnum */ 41);\n/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\n\n\n\nconst LocationsMetadata = [{\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumAeroCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumBachmanAndAssociates,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumClarkeIncorporated,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 3,\n expMult: 2,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumCrushFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumECorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumFulcrumTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumGalacticCybersystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumNetLinkTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumPolice,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumRhoConstruction,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 10,\n expMult: 5,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumSnapFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n costMult: 4,\n expMult: 3,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumSummitUniversity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumWatchdogSecurity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Aevum,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].AevumCasino,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Casino]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].ChongqingSolarisSpaceSystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaNovaMedical,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaOmegaSoftware,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].IshimaStormTechnologies,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoDefComm,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoGlobalPharmaceuticals,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoNoodleBar,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].NewTokyoVitaLife,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12AlphaEnterprises,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12BladeIndustries,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CIA,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CarmichaelSecurity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12CityHall,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12DeltaOne,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FoodNStuff,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12FourSigma,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IcarusMicrosystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n expMult: 1,\n costMult: 1,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12IronGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12JoesGuns,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12MegaCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12NSA,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Special]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n costMult: 20,\n expMult: 10,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12PowerhouseGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n costMult: 3,\n expMult: 2,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12RothmanUniversity,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Sector12UniversalEnergy,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenCompuTek,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenHeliosLabs,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenLexoCorp,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n costMult: 7,\n expMult: 4,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Gym]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenNWO,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company, _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenOmniaCybersystems,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77\n },\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenSysCoreSecurities,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Company]\n}, {\n city: _CityNames__WEBPACK_IMPORTED_MODULE_0__[/* CityName */ \"a\"].Volhaven,\n costMult: 5,\n expMult: 4,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].University]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Hospital,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Hospital]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].Slums,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].Slums]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].TravelAgency,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].TravelAgency]\n}, {\n city: null,\n name: _LocationNames__WEBPACK_IMPORTED_MODULE_1__[/* LocationName */ \"a\"].WorldStockExchange,\n types: [_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_2__[/* LocationType */ \"a\"].StockMarket]\n}];\n\n//# sourceURL=webpack:///./src/Locations/data/LocationsMetadata.ts?");
|
||
|
||
/***/ }),
|
||
/* 713 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/SourceFile/applySourceFile.ts ***!
|
||
\*******************************************/
|
||
/*! exports provided: applySourceFile */
|
||
/*! exports used: applySourceFile */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applySourceFile; });\n/* harmony import */ var _SourceFiles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFiles */ 278);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n\n\nfunction applySourceFile(srcFile) {\n const srcFileKey = \"SourceFile\" + srcFile.n;\n const sourceFileObject = _SourceFiles__WEBPACK_IMPORTED_MODULE_0__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${srcFile.n}`);\n return;\n }\n\n switch (srcFile.n) {\n case 1:\n {\n // The Source Genesis\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 16 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_ram_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_core_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_level_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 2:\n {\n // Rise of the Underworld\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 24 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n break;\n }\n\n case 3:\n {\n // Corporatocracy\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 4:\n {\n // The Singularity\n // No effects, just gives access to Singularity functions\n break;\n }\n\n case 5:\n {\n // Artificial Intelligence\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n break;\n }\n\n case 6:\n {\n // Bladeburner\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n break;\n }\n\n case 7:\n {\n // Bladeburner 2079\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_max_stamina_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_stamina_gain_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_analysis_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_success_chance_mult *= incMult;\n break;\n }\n\n case 8:\n {\n // Ghost of Wall Street\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 12 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n break;\n }\n\n case 9:\n {\n // Hacktocracy\n // This has non-multiplier effects\n break;\n }\n\n case 10:\n {\n // Digital Carbon\n // No effects, just grants sleeves\n break;\n }\n\n case 11:\n {\n // The Big Crash\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 32 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n break;\n }\n\n case 12:\n // The Recursion\n // No effects, grants neuroflux.\n break;\n\n default:\n console.error(`Invalid source file number: ${srcFile.n}`);\n break;\n }\n\n sourceFileObject.owned = true;\n}\n\n//# sourceURL=webpack:///./src/SourceFile/applySourceFile.ts?");
|
||
|
||
/***/ }),
|
||
/* 714 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Exploits/applyExploits.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: applyExploit */
|
||
/*! exports used: applyExploit */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applyExploit; });\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n\nfunction applyExploit() {\n if (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].exploits && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].exploits.length === 0) {\n return;\n }\n\n const inc = Math.pow(1.001, _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].exploits.length);\n const dec = Math.pow(0.999, _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].exploits.length);\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacking_chance_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacking_speed_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacking_money_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacking_grow_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacking_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].strength_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].defense_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].dexterity_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].agility_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].charisma_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacking_exp_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].strength_exp_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].defense_exp_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].dexterity_exp_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].agility_exp_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].charisma_exp_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].company_rep_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].faction_rep_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].crime_money_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].crime_success_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacknet_node_money_mult *= inc;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult *= dec;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacknet_node_ram_cost_mult *= dec;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacknet_node_core_cost_mult *= dec;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].hacknet_node_level_cost_mult *= dec;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].work_money_mult *= inc;\n}\n\n//# sourceURL=webpack:///./src/Exploits/applyExploits.ts?");
|
||
|
||
/***/ }),
|
||
/* 715 */
|
||
/*!***************************************************************!*\
|
||
!*** ./src/PersonObjects/Player/PlayerObjectServerMethods.ts ***!
|
||
\***************************************************************/
|
||
/*! exports provided: hasTorRouter, getCurrentServer, getHomeComputer, getUpgradeHomeRamCost, createHacknetServer */
|
||
/*! all exports used */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasTorRouter\", function() { return hasTorRouter; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCurrentServer\", function() { return getCurrentServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getHomeComputer\", function() { return getHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getUpgradeHomeRamCost\", function() { return getUpgradeHomeRamCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createHacknetServer\", function() { return createHacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\n\n\n\n\n\nfunction hasTorRouter() {\n return _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_4__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\");\n}\nfunction getCurrentServer() {\n return _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][this.currentServer];\n}\nfunction getHomeComputer() {\n return _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][this.homeComputer];\n}\nfunction getUpgradeHomeRamCost() {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam); //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].BaseCostFor1GBOfRamHome * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].HomeComputerRamCost;\n return cost;\n}\nfunction createHacknetServer() {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServer */ \"a\"]({\n adminRights: true,\n hostname: name,\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* createUniqueRandomIp */ \"c\"])() // player: this,\n\n });\n this.hacknetNodes.push(server.ip); // Configure the HacknetServer to actually act as a Server\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AddToAllServers */ \"a\"])(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.ip);\n server.serversOnNetwork.push(homeComputer.ip);\n return server;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts?");
|
||
|
||
/***/ }),
|
||
/* 716 */
|
||
/*!**************************************!*\
|
||
!*** ./utils/helpers/clearObject.ts ***!
|
||
\**************************************/
|
||
/*! exports provided: clearObject */
|
||
/*! exports used: clearObject */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return clearObject; });\n/**\n * Clears defined properties from an object.\n * Does not delete up the prototype chain.\n * @deprecated Look into using `Map` or `Set` rather than manipulating properties on an Object.\n * @param obj the object to clear all properties\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nfunction clearObject(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n // tslint:disable-next-line:no-dynamic-delete\n delete obj[key];\n }\n }\n}\n\n//# sourceURL=webpack:///./utils/helpers/clearObject.ts?");
|
||
|
||
/***/ }),
|
||
/* 717 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Sidebar/ui/SidebarRoot.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: SidebarRoot */
|
||
/*! exports used: SidebarRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SidebarRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 16);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Drawer */ 1353);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Divider */ 494);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ChevronLeft */ 757);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ChevronRight */ 755);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/ListItemIcon */ 101);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Badge */ 581);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/Computer */ 760);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 399);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/icons-material/Create */ 762);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/icons-material/Storage */ 763);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/icons-material/BugReport */ 764);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/icons-material/Equalizer */ 766);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/icons-material/Contacts */ 767);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 448);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/icons-material/AccountTree */ 768);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @mui/icons-material/PeopleAlt */ 769);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @mui/icons-material/LocationCity */ 771);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @mui/icons-material/AirplanemodeActive */ 772);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @mui/icons-material/Work */ 773);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @mui/icons-material/TrendingUp */ 774);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/icons-material/FormatBold */ 775);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/icons-material/Business */ 776);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/icons-material/SportsMma */ 777);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/icons-material/Check */ 779);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/icons-material/Help */ 780);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/icons-material/Settings */ 781);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/icons-material/DeveloperBoard */ 782);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/icons-material/AccountBox */ 765);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/icons-material/Public */ 770);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @mui/icons-material/LiveHelp */ 778);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 262);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../ui/Router */ 26);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n/* harmony import */ var _Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../Programs/ProgramHelpers */ 444);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../RedPill */ 222);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../Missions */ 119);\n/* harmony import */ var _CinematicText__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../../CinematicText */ 718);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Terminal\n\n // Create Script\n\n // Active Scripts\n\n // Create Program\n\n // Stats\n\n // Factions\n\n // Augmentations\n\n // Hacknet\n\n // Sleeves\n\n // City\n\n // Travel\n\n // Job\n\n // Stock Market\n\n // Bladeburner\n\n // Corp\n\n // Gang\n\n // Milestones\n\n // Tutorial\n\n // options\n\n // Dev\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst openedMixin = theme => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n overflowX: \"hidden\"\n});\n\nconst closedMixin = theme => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`\n }\n});\n\nconst Drawer = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(_mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n shouldForwardProp: prop => prop !== \"open\"\n})(({\n theme,\n open\n}) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && { ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme)\n }),\n ...(!open && { ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme)\n })\n}));\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main\n },\n listitem: {}\n}));\nfunction SidebarRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n const [hackingOpen, setHackingOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [characterOpen, setCharacterOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [worldOpen, setWorldOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [helpOpen, setHelpOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const flashTerminal = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].CharacterGoToTerminalPage || _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].ActiveScriptsPage;\n const flashStats = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToCharacterPage;\n const flashActiveScripts = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].TerminalGoToActiveScriptsPage;\n const flashHacknet = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToHacknetNodesPage;\n const flashCity = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].HacknetNodesGoToWorldPage;\n const flashTutorial = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].WorldDescription;\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.length;\n const programCount = Object(_Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__[/* getAvailableCreatePrograms */ \"a\"])(props.player).length;\n const canCreateProgram = programCount > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenFactions = props.player.factionInvitations.length > 0 || props.player.factions.length > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenAugmentations = props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenSleeves = props.player.sleeves.length > 0; // TODO(hydroflame): these should not as any but right now the def is that it\n // can only be defined;\n\n const canCorporation = !!props.player.corporation;\n const canGang = !!props.player.gang;\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!props.player.bladeburner;\n\n function clickTerminal() {\n props.router.toTerminal();\n if (flashTerminal) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateScripts() {\n props.router.toScriptEditor();\n }\n\n function clickStats() {\n props.router.toCharacterInfo();\n if (flashStats) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickActiveScripts() {\n props.router.toActiveScripts();\n if (flashActiveScripts) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateProgram() {\n props.router.toCreateProgram();\n }\n\n function clickFactions() {\n props.router.toFactions();\n }\n\n function clickAugmentations() {\n props.router.toAugmentations();\n }\n\n function clickSleeves() {\n props.router.toSleeves();\n }\n\n function clickHacknet() {\n props.router.toHacknetNodes();\n if (flashHacknet) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCity() {\n props.router.toCity();\n if (flashCity) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickTravel() {\n props.router.toTravel();\n }\n\n function clickJob() {\n props.router.toJob();\n }\n\n function clickStockMarket() {\n props.router.toStockMarket();\n }\n\n function clickBladeburner() {\n props.router.toBladeburner();\n }\n\n function clickCorp() {\n props.router.toCorporation();\n }\n\n function clickGang() {\n props.router.toGang();\n }\n\n function clickTutorial() {\n props.router.toTutorial();\n if (flashTutorial) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickMilestones() {\n props.router.toMilestones();\n }\n\n function clickOptions() {\n props.router.toGameOptions();\n }\n\n function clickDev() {\n props.router.toDevMenu();\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n function handleShortcuts(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_46__[/* Settings */ \"a\"].DisableHotkeys) return;\n if (props.player.isWorking || _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* redPillFlag */ \"b\"] || _Missions__WEBPACK_IMPORTED_MODULE_48__[/* inMission */ \"c\"] || _CinematicText__WEBPACK_IMPORTED_MODULE_49__[/* cinematicTextFlag */ \"a\"]) return;\n\n if (event.keyCode == _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].E && event.altKey) {\n event.preventDefault();\n clickCreateScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].J && event.altKey) {\n event.preventDefault();\n clickJob();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].F && event.altKey) {\n // Overriden by Fconf\n if (props.page == _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal && _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n return;\n }\n\n event.preventDefault();\n clickFactions();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].G && event.altKey) {\n event.preventDefault();\n clickGang();\n } // if (event.keyCode === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n\n }\n\n document.addEventListener(\"keypress\", handleShortcuts);\n return () => document.removeEventListener(\"keypress\", handleShortcuts);\n }, []);\n const classes = useStyles();\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n const toggleDrawer = () => setOpen(old => !old);\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Drawer, {\n open: open,\n anchor: \"left\",\n variant: \"permanent\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: toggleDrawer\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, !open ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Bitburner v\", _Constants__WEBPACK_IMPORTED_MODULE_43__[/* CONSTANTS */ \"a\"].Version)\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHackingOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Hacking\")\n }), hackingOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: hackingOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Terminal\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal\n }),\n onClick: clickTerminal\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n }, \"Terminal\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Create Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript\n }),\n onClick: clickCreateScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n }, \"Create Script\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Active Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts\n }),\n onClick: clickActiveScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default.a, {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n }, \"Active Scripts\"))), canCreateProgram && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Create Program\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram\n }),\n onClick: clickCreateProgram\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: programCount > 0 ? programCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }, \"Create Program\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setCharacterOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Character\")\n }), characterOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: characterOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Stats\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats\n }),\n onClick: clickStats\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default.a, {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n }, \"Stats\"))), canOpenFactions && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Factions\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: [_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page)\n }),\n onClick: clickFactions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: invitationsCount !== 0 ? invitationsCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default.a, {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }, \"Factions\"))), canOpenAugmentations && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Augmentations\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations\n }),\n onClick: clickAugmentations\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: augmentationCount !== 0 ? augmentationCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n },\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }, \"Augmentations\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Hacknet\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet\n }),\n onClick: clickHacknet\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default.a, {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n }, \"Hacknet\"))), canOpenSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Sleeves\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves\n }),\n onClick: clickSleeves\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n }, \"Sleeves\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setWorldOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"World\")\n }), worldOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: worldOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"City\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Resleeves || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Location\n }),\n onClick: clickCity\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default.a, {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n }, \"City\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Travel\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel\n }),\n onClick: clickTravel\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n }, \"Travel\"))), canJob && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Job\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job\n }),\n onClick: clickJob\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n }, \"Job\"))), canStockMarket && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Stock Market\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket\n }),\n onClick: clickStockMarket\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n }, \"Stock Market\"))), canBladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Bladeburner\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner\n }),\n onClick: clickBladeburner\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n }, \"Bladeburner\"))), canCorporation && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Corp\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation\n }),\n onClick: clickCorp\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n }, \"Corp\"))), canGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Gang\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang\n }),\n onClick: clickGang\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n }, \"Gang\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHelpOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Help\")\n }), helpOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: helpOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Milestones\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones\n }),\n onClick: clickMilestones\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n }, \"Milestones\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Tutorial\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial\n }),\n onClick: clickTutorial\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default.a, {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n }, \"Tutorial\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Options\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options\n }),\n onClick: clickOptions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n }, \"Options\"))), true && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Dev\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu\n }),\n onClick: clickDev\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n }, \"Dev\"))))));\n}\n\n//# sourceURL=webpack:///./src/Sidebar/ui/SidebarRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 718 */
|
||
/*!******************************!*\
|
||
!*** ./src/CinematicText.js ***!
|
||
\******************************/
|
||
/*! exports provided: cinematicTextFlag, writeCinematicText */
|
||
/*! exports used: cinematicTextFlag */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cinematicTextFlag; });\n/* unused harmony export writeCinematicText */\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 529);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n\n\n\n\n\n\nlet cinematicTextFlag = false;\n/**\n * Print a message using a hacking-style \"typing\" effect.\n * Note that this clears the UI so that the text from this is the only thing visible.\n *\n * @param lines {string[]} Array of strings to print, where each element is a separate line\n */\n\nfunction writeCinematicText(lines) {\n cinematicTextFlag = true;\n\n if (lines.constructor !== Array) {\n throw new Error(\"Invalid non-array argument passed into writeCinematicText()\");\n } // Reuse the 'Red Pill' content\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].loadCinematicTextContent();\n const container = document.getElementById(\"cinematic-text-container\");\n container.style.width = \"75%\";\n\n if (container == null) {\n throw new Error(\"Could not find cinematic-text-container for writeCinematicText()\");\n }\n\n Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__[/* removeChildrenFromElement */ \"a\"])(container);\n\n for (let i = 0; i < lines.length; ++i) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_5__[/* isString */ \"a\"])(lines[i])) {\n throw new Error(\"Invalid non-string element in 'lines' argument. writeCinematicText() failed\");\n }\n }\n\n return writeCinematicTextRecurse(lines).then(function () {\n return cinematicTextEnd(); //Puts the continue button\n }).catch(function (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n });\n}\n\nfunction writeCinematicTextRecurse(lines, lineNumber = 0) {\n if (lineNumber >= lines.length) {\n return Promise.resolve(true);\n }\n\n return writeCinematicTextLine(lines[lineNumber]).then(function () {\n return writeCinematicTextRecurse(lines, lineNumber + 1);\n });\n}\n\nfunction writeCinematicTextLine(line) {\n return new Promise(function (resolve, reject) {\n const container = document.getElementById(\"cinematic-text-container\");\n const pElem = document.createElement(\"p\");\n container.appendChild(pElem);\n const promise = writeCinematicTextLetter(pElem, line, 0);\n promise.then(function (res) {\n resolve(res);\n }, function (e) {\n reject(e);\n });\n });\n}\n\nfunction writeCinematicTextLetter(pElem, line, i = 0) {\n return new Promise(function (resolve, reject) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__[/* setTimeoutRef */ \"a\"])(function () {\n const textToShow = line.substring(0, i);\n\n if (i >= line.length) {\n pElem.innerHTML = textToShow;\n return resolve(true);\n }\n\n pElem.innerHTML = textToShow + \"<span class='typed-cursor'> █ </span>\";\n const promise = writeCinematicTextLetter(pElem, line, i + 1);\n promise.then(function (res) {\n resolve(res);\n }, function (e) {\n reject(e);\n });\n }, 15);\n });\n}\n\nfunction cinematicTextEnd() {\n var container = document.getElementById(\"cinematic-text-container\");\n var mainMenu = document.getElementById(\"mainmenu-container\");\n container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"br\"));\n return new Promise(function (resolve) {\n container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n innerText: \"Continue...\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__[/* removeChildrenFromElement */ \"a\"])(container);\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].loadTerminalContent();\n mainMenu.style.visibility = \"visible\";\n cinematicTextFlag = false;\n resolve();\n }\n }));\n });\n}\n\n//# sourceURL=webpack:///./src/CinematicText.js?");
|
||
|
||
/***/ }),
|
||
/* 719 */,
|
||
/* 720 */,
|
||
/* 721 */,
|
||
/* 722 */,
|
||
/* 723 */,
|
||
/* 724 */,
|
||
/* 725 */,
|
||
/* 726 */,
|
||
/* 727 */,
|
||
/* 728 */,
|
||
/* 729 */,
|
||
/* 730 */,
|
||
/* 731 */,
|
||
/* 732 */,
|
||
/* 733 */,
|
||
/* 734 */,
|
||
/* 735 */,
|
||
/* 736 */,
|
||
/* 737 */,
|
||
/* 738 */,
|
||
/* 739 */,
|
||
/* 740 */,
|
||
/* 741 */,
|
||
/* 742 */,
|
||
/* 743 */,
|
||
/* 744 */,
|
||
/* 745 */,
|
||
/* 746 */,
|
||
/* 747 */,
|
||
/* 748 */,
|
||
/* 749 */,
|
||
/* 750 */,
|
||
/* 751 */,
|
||
/* 752 */,
|
||
/* 753 */,
|
||
/* 754 */,
|
||
/* 755 */,
|
||
/* 756 */,
|
||
/* 757 */,
|
||
/* 758 */,
|
||
/* 759 */,
|
||
/* 760 */,
|
||
/* 761 */,
|
||
/* 762 */,
|
||
/* 763 */,
|
||
/* 764 */,
|
||
/* 765 */,
|
||
/* 766 */,
|
||
/* 767 */,
|
||
/* 768 */,
|
||
/* 769 */,
|
||
/* 770 */,
|
||
/* 771 */,
|
||
/* 772 */,
|
||
/* 773 */,
|
||
/* 774 */,
|
||
/* 775 */,
|
||
/* 776 */,
|
||
/* 777 */,
|
||
/* 778 */,
|
||
/* 779 */,
|
||
/* 780 */,
|
||
/* 781 */,
|
||
/* 782 */,
|
||
/* 783 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Augmentation/ui/AugmentationsRoot.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: AugmentationsRoot */
|
||
/*! exports used: AugmentationsRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InstalledAugmentationsAndSourceFiles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InstalledAugmentationsAndSourceFiles */ 784);\n/* harmony import */ var _PlayerMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerMultipliers */ 790);\n/* harmony import */ var _PurchasedAugmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PurchasedAugmentations */ 791);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ExportBonus */ 247);\n/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\n\n\n\n\n\n\n\nclass AugmentationsRoot extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerender: false\n };\n this.export = this.export.bind(this);\n }\n\n export() {\n this.props.exportGameFn();\n this.setState({\n rerender: !this.state.rerender\n });\n }\n\n render() {\n function exportBonusStr() {\n if (Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_6__[/* canGetBonus */ \"b\"])()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"augmentations-content\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"WARNING: Installing your Augmentations resets most of your progress, including:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Stats/Skill levels and Experience\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Money\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Scripts on every computer but your home computer\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Purchased servers\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Hacknet Nodes\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Faction/Company reputation\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"- Stocks\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: this.props.installAugmentationsFn,\n text: \"Install Augmentations\",\n tooltip: \"'I never asked for this'\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n addClasses: \"flashing-button\",\n onClick: this.export,\n text: `Backup Save ${exportBonusStr()}`,\n tooltip: \"It's always a good idea to backup/export your save!\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_PurchasedAugmentations__WEBPACK_IMPORTED_MODULE_3__[/* PurchasedAugmentations */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Installed Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `List of all Augmentations ${_Player__WEBPACK_IMPORTED_MODULE_4__[/* Player */ \"a\"].sourceFiles.length > 0 ? \"and Source Files \" : \"\"} ` + `that have been installed. You have gained the effects of these.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_InstalledAugmentationsAndSourceFiles__WEBPACK_IMPORTED_MODULE_1__[/* InstalledAugmentationsAndSourceFiles */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_PlayerMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* PlayerMultipliers */ \"a\"], null)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 784 */
|
||
/*!**********************************************************************!*\
|
||
!*** ./src/Augmentation/ui/InstalledAugmentationsAndSourceFiles.tsx ***!
|
||
\**********************************************************************/
|
||
/*! exports provided: InstalledAugmentationsAndSourceFiles */
|
||
/*! exports used: InstalledAugmentationsAndSourceFiles */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentationsAndSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InstalledAugmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InstalledAugmentations */ 785);\n/* harmony import */ var _ListConfiguration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ListConfiguration */ 786);\n/* harmony import */ var _OwnedSourceFiles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OwnedSourceFiles */ 787);\n/* harmony import */ var _SourceFileMinus1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFileMinus1 */ 789);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\n\n\n\n\n\n\n\nclass InstalledAugmentationsAndSourceFiles extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false\n };\n this.collapseAllHeaders = this.collapseAllHeaders.bind(this);\n this.expandAllHeaders = this.expandAllHeaders.bind(this);\n this.sortByAcquirementTime = this.sortByAcquirementTime.bind(this);\n this.sortInOrder = this.sortInOrder.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n collapseAllHeaders() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllHeaders() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n sortByAcquirementTime() {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].OwnedAugmentationsOrder = _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__[/* OwnedAugmentationsOrderSetting */ \"a\"].AcquirementTime;\n this.rerender();\n }\n\n sortInOrder() {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].OwnedAugmentationsOrder = _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_6__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically;\n this.rerender();\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ListConfiguration__WEBPACK_IMPORTED_MODULE_2__[/* ListConfiguration */ \"a\"], {\n collapseAllButtonsFn: this.collapseAllHeaders,\n expandAllButtonsFn: this.expandAllHeaders,\n sortByAcquirementTimeFn: this.sortByAcquirementTime,\n sortInOrderFn: this.sortInOrder\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"augmentations-list\",\n ref: this.listRef\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SourceFileMinus1__WEBPACK_IMPORTED_MODULE_4__[/* SourceFileMinus1 */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_OwnedSourceFiles__WEBPACK_IMPORTED_MODULE_3__[/* OwnedSourceFiles */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_InstalledAugmentations__WEBPACK_IMPORTED_MODULE_1__[/* InstalledAugmentations */ \"a\"], null)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentationsAndSourceFiles.tsx?");
|
||
|
||
/***/ }),
|
||
/* 785 */
|
||
/*!********************************************************!*\
|
||
!*** ./src/Augmentation/ui/InstalledAugmentations.tsx ***!
|
||
\********************************************************/
|
||
/*! exports provided: InstalledAugmentations */
|
||
/*! exports used: InstalledAugmentations */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 449);\n/**\n * React Component for displaying a list of the player's installed Augmentations\n * on the Augmentations UI\n */\n\n\n\n\n\n\n\nfunction InstalledAugmentations() {\n const sourceAugs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].augmentations.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name <= aug2.name ? -1 : 1;\n });\n }\n\n const augs = sourceAugs.map(e => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][e.name];\n let level = null;\n\n if (e.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = e.level;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx?");
|
||
|
||
/***/ }),
|
||
/* 786 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Augmentation/ui/ListConfiguration.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: ListConfiguration */
|
||
/*! exports used: ListConfiguration */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ListConfiguration; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for configuring the way installed augmentations and\n * Source-Files are displayed in the Augmentations UI\n */\n\n\nfunction ListConfiguration(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.expandAllButtonsFn,\n text: \"Expand All\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.collapseAllButtonsFn,\n text: \"Collapse All\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.sortInOrderFn,\n text: \"Sort in Order\",\n tooltip: \"Sorts the Augmentations alphabetically and Source-Files in numeral order\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.sortByAcquirementTimeFn,\n text: \"Sort by Acquirement Time\",\n tooltip: \"Sorts the Augmentations and Source-Files based on when you acquired them (same as default)\"\n }));\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/ListConfiguration.tsx?");
|
||
|
||
/***/ }),
|
||
/* 787 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Augmentation/ui/OwnedSourceFiles.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: OwnedSourceFiles */
|
||
/*! exports used: OwnedSourceFiles */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OwnedSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 278);\n/* harmony import */ var _ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/SourceFileAccordion */ 788);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\n\n\nfunction OwnedSourceFiles() {\n const sourceSfs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].sourceFiles.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n const sfs = sourceSfs.map(e => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.n\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__[/* SourceFileAccordion */ \"a\"], {\n level: e.lvl,\n sf: sfObj\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, sfs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx?");
|
||
|
||
/***/ }),
|
||
/* 788 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/ui/React/SourceFileAccordion.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: SourceFileAccordion */
|
||
/*! exports used: SourceFileAccordion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BBAccordion */ 224);\n/**\n * React Component for displaying a single Source-File as an accordion.\n *\n * The header of the accordion contains the Source-Files's name and level,\n * and the accordion's panel contains the Source-File's description.\n */\n\n\nfunction SourceFileAccordion(props) {\n const maxLevel = props.sf.n === 12 ? \"∞\" : \"3\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, props.sf.name, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), `Level ${props.level} / ${maxLevel}`),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n dangerouslySetInnerHTML: {\n __html: props.sf.info\n }\n })\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/SourceFileAccordion.tsx?");
|
||
|
||
/***/ }),
|
||
/* 789 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Augmentation/ui/SourceFileMinus1.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: SourceFileMinus1 */
|
||
/*! exports used: SourceFileMinus1 */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileMinus1; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exploits/Exploit */ 223);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\nfunction SourceFileMinus1() {\n const exploits = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].exploits;\n\n if (exploits.length === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: -1\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Source-File -1: Exploits in the BitNodes\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Level \", exploits.length, \" / ?\"),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"It increases all of the player's multipliers by 0.1%\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"You have found the following exploits:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, exploits.map(c => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: c\n }, \"* \", Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* ExploitName */ \"b\"])(c)))))\n }));\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx?");
|
||
|
||
/***/ }),
|
||
/* 790 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Augmentation/ui/PlayerMultipliers.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: PlayerMultipliers */
|
||
/*! exports used: PlayerMultipliers */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerMultipliers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Augmentations */ 20);\n/**\n * React component for displaying the player's multipliers on the Augmentation UI page\n */\n\n\n\n\n\nfunction calculateAugmentedStats() {\n const augP = {};\n\n for (const aug of _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].queuedAugmentations) {\n const augObj = _Augmentations__WEBPACK_IMPORTED_MODULE_3__[/* Augmentations */ \"a\"][aug.name];\n\n for (const mult in augObj.mults) {\n const v = augP[mult] ? augP[mult] : 1;\n augP[mult] = v * augObj.mults[mult];\n }\n }\n\n return augP;\n}\n\nfunction PlayerMultipliers() {\n const mults = calculateAugmentedStats();\n\n function MultiplierTable(rows) {\n function improvements(r) {\n let elems = [];\n\n if (r) {\n elems = [react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n key: \"2\"\n }, \"\\xA0\", \"=>\", \"\\xA0\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n key: \"3\"\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(r))];\n }\n\n return elems;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, rows.map(r => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", {\n key: r[0]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n key: \"0\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, r[0], \" multiplier:\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(r[1])), improvements(r[2])))));\n }\n\n function BladeburnerMults() {\n if (!_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].canAccessBladeburner()) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, MultiplierTable([[\"Bladeburner Success Chance\", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_success_chance_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_success_chance_mult * mults.bladeburner_success_chance_mult], [\"Bladeburner Max Stamina\", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_max_stamina_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_max_stamina_mult * mults.bladeburner_max_stamina_mult], [\"Bladeburner Stamina Gain\", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_stamina_gain_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_stamina_gain_mult * mults.bladeburner_stamina_gain_mult], [\"Bladeburner Field Analysis\", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_analysis_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_analysis_mult * mults.bladeburner_analysis_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"strong\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"u\", null, \"Multipliers:\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Hacking Chance \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult * mults.hacking_chance_mult], [\"Hacking Speed \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult * mults.hacking_speed_mult], [\"Hacking Money \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult * mults.hacking_money_mult], [\"Hacking Growth \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult * mults.hacking_grow_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Hacking Level \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult * mults.hacking_mult], [\"Hacking Experience \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult * mults.hacking_exp_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Strength Level \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult * mults.strength_mult], [\"Strength Experience \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult * mults.strength_exp_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Defense Level \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult * mults.defense_mult], [\"Defense Experience \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult * mults.defense_exp_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Dexterity Level \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult * mults.dexterity_mult], [\"Dexterity Experience \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult * mults.dexterity_exp_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Agility Level \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult * mults.agility_mult], [\"Agility Experience \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult * mults.agility_exp_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Charisma Level \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult * mults.charisma_mult], [\"Charisma Experience \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_exp_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_exp_mult * mults.charisma_exp_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Hacknet Node production \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_money_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_money_mult * mults.hacknet_node_money_mult], [\"Hacknet Node purchase cost \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult * mults.hacknet_node_purchase_cost_mult], [\"Hacknet Node RAM upgrade cost \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_ram_cost_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_ram_cost_mult * mults.hacknet_node_ram_cost_mult], [\"Hacknet Node Core purchase cost \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_core_cost_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_core_cost_mult * mults.hacknet_node_core_cost_mult], [\"Hacknet Node level upgrade cost \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_level_cost_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_level_cost_mult * mults.hacknet_node_level_cost_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Company reputation gain \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult * mults.company_rep_mult], [\"Faction reputation gain \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * mults.faction_rep_mult], [\"Salary \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult * mults.work_money_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), MultiplierTable([[\"Crime success \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult * mults.crime_success_mult], [\"Crime money \", _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult, _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult * mults.crime_money_mult]]), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](BladeburnerMults, null));\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/PlayerMultipliers.tsx?");
|
||
|
||
/***/ }),
|
||
/* 791 */
|
||
/*!********************************************************!*\
|
||
!*** ./src/Augmentation/ui/PurchasedAugmentations.tsx ***!
|
||
\********************************************************/
|
||
/*! exports provided: PurchasedAugmentations */
|
||
/*! exports used: PurchasedAugmentations */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchasedAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 449);\n/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\n\n\n\n\n\nfunction PurchasedAugmentations() {\n const augs = []; // Only render the last NeuroFlux (there are no findLastIndex btw)\n\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations.length; i++) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations[i];\n if (ownedAug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n let level = null;\n\n if (ownedAug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ownedAug.level;\n }\n\n augs.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: `${ownedAug.name}${ownedAug.level}`\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"augmentations-list\"\n }, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx?");
|
||
|
||
/***/ }),
|
||
/* 792 */
|
||
/*!*************************!*\
|
||
!*** ./src/DevMenu.tsx ***!
|
||
\*************************/
|
||
/*! exports provided: DevMenuRoot */
|
||
/*! exports used: DevMenuRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DevMenuRoot; });\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _DevMenu_ui_General__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DevMenu/ui/General */ 793);\n/* harmony import */ var _DevMenu_ui_Stats__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DevMenu/ui/Stats */ 795);\n/* harmony import */ var _DevMenu_ui_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DevMenu/ui/Factions */ 833);\n/* harmony import */ var _DevMenu_ui_Augmentations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DevMenu/ui/Augmentations */ 834);\n/* harmony import */ var _DevMenu_ui_SourceFiles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DevMenu/ui/SourceFiles */ 835);\n/* harmony import */ var _DevMenu_ui_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DevMenu/ui/Programs */ 836);\n/* harmony import */ var _DevMenu_ui_Servers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DevMenu/ui/Servers */ 837);\n/* harmony import */ var _DevMenu_ui_Companies__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./DevMenu/ui/Companies */ 838);\n/* harmony import */ var _DevMenu_ui_Bladeburner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./DevMenu/ui/Bladeburner */ 839);\n/* harmony import */ var _DevMenu_ui_Gang__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./DevMenu/ui/Gang */ 840);\n/* harmony import */ var _DevMenu_ui_Corporation__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./DevMenu/ui/Corporation */ 841);\n/* harmony import */ var _DevMenu_ui_CodingContracts__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./DevMenu/ui/CodingContracts */ 842);\n/* harmony import */ var _DevMenu_ui_StockMarket__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./DevMenu/ui/StockMarket */ 843);\n/* harmony import */ var _DevMenu_ui_Sleeves__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./DevMenu/ui/Sleeves */ 844);\n/* harmony import */ var _DevMenu_ui_TimeSkip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./DevMenu/ui/TimeSkip */ 845);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction DevMenuRoot(props) {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h1\", null, \"Development Menu - Only meant to be used for testing/debugging\"), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_General__WEBPACK_IMPORTED_MODULE_2__[/* General */ \"a\"], {\n player: props.player,\n router: props.router\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Stats__WEBPACK_IMPORTED_MODULE_3__[/* Stats */ \"a\"], {\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"], {\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Augmentations__WEBPACK_IMPORTED_MODULE_5__[/* Augmentations */ \"a\"], {\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_SourceFiles__WEBPACK_IMPORTED_MODULE_6__[/* SourceFiles */ \"a\"], {\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"], {\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Servers__WEBPACK_IMPORTED_MODULE_8__[/* Servers */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Companies__WEBPACK_IMPORTED_MODULE_9__[/* Companies */ \"a\"], null), props.player.bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_0__[/* Bladeburner */ \"a\"] && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"], {\n player: props.player\n }), props.player.inGang() && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Gang__WEBPACK_IMPORTED_MODULE_11__[/* Gang */ \"a\"], {\n player: props.player\n }), props.player.hasCorporation() && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Corporation__WEBPACK_IMPORTED_MODULE_12__[/* Corporation */ \"a\"], {\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_CodingContracts__WEBPACK_IMPORTED_MODULE_13__[/* CodingContracts */ \"a\"], null), props.player.hasWseAccount && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* StockMarket */ \"a\"], null), props.player.sleeves.length > 0 && react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_Sleeves__WEBPACK_IMPORTED_MODULE_15__[/* Sleeves */ \"a\"], {\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_DevMenu_ui_TimeSkip__WEBPACK_IMPORTED_MODULE_16__[/* TimeSkip */ \"a\"], {\n player: props.player,\n engine: props.engine\n }));\n}\n\n//# sourceURL=webpack:///./src/DevMenu.tsx?");
|
||
|
||
/***/ }),
|
||
/* 793 */
|
||
/*!************************************!*\
|
||
!*** ./src/DevMenu/ui/General.tsx ***!
|
||
\************************************/
|
||
/*! exports provided: General */
|
||
/*! exports used: General */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return General; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\n\nfunction General(props) {\n function addMoney(n) {\n return function () {\n props.player.gainMoney(n);\n };\n }\n\n function upgradeRam() {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3() {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3() {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n() {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n() {\n props.router.toBitVerse(false, false);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"General\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e6)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e6\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e9)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e9\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e12)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e15)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1000e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(Infinity)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: Infinity\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: upgradeRam\n }, \"+ RAM\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickB1tFlum3\n }, \"Quick b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: b1tflum3\n }, \"Run b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickHackW0r1dD43m0n\n }, \"Quick w0rld_d34m0n\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: hackW0r1dD43m0n\n }, \"Hack w0rld_d34m0n\"))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/General.tsx?");
|
||
|
||
/***/ }),
|
||
/* 794 */,
|
||
/* 795 */
|
||
/*!**********************************!*\
|
||
!*** ./src/DevMenu/ui/Stats.tsx ***!
|
||
\**********************************/
|
||
/*! exports provided: Stats */
|
||
/*! exports used: Stats */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Stats(props) {\n function modifyExp(stat, modifier) {\n return function (exp) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n\n break;\n\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n\n break;\n\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n\n break;\n\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n\n break;\n\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n\n break;\n\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n\n break;\n\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier) {\n return function (amt) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp() {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp() {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat) {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma() {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence() {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence() {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Experience / Stats\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfExp\n }, \"Tons of exp\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllExp\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Hacking:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"hacking\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"hacking\", 1)(bigNumber),\n add: modifyExp(\"hacking\", 1),\n subtract: modifyExp(\"hacking\", -1),\n reset: resetExperience(\"hacking\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Strength:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"strength\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"strength\", 1)(bigNumber),\n add: modifyExp(\"strength\", 1),\n subtract: modifyExp(\"strength\", -1),\n reset: resetExperience(\"strength\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Defense:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"defense\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"defense\", 1)(bigNumber),\n add: modifyExp(\"defense\", 1),\n subtract: modifyExp(\"defense\", -1),\n reset: resetExperience(\"defense\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Dexterity:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"dexterity\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"dexterity\", 1)(bigNumber),\n add: modifyExp(\"dexterity\", 1),\n subtract: modifyExp(\"dexterity\", -1),\n reset: resetExperience(\"dexterity\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Agility:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"agility\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"agility\", 1)(bigNumber),\n add: modifyExp(\"agility\", 1),\n subtract: modifyExp(\"agility\", -1),\n reset: resetExperience(\"agility\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Charisma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"charisma\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"charisma\", 1)(bigNumber),\n add: modifyExp(\"charisma\", 1),\n subtract: modifyExp(\"charisma\", -1),\n reset: resetExperience(\"charisma\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Intelligence:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"intelligence\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"intelligence\", 1)(bigNumber),\n add: modifyExp(\"intelligence\", 1),\n subtract: modifyExp(\"intelligence\", -1),\n reset: resetExperience(\"intelligence\")\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: enableIntelligence\n }, \"Enable\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: disableIntelligence\n }, \"Disable\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Karma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"karma\",\n placeholder: \"amt\",\n tons: () => modifyExp(\"intelligence\", 1)(100000),\n add: modifyKarma(1),\n subtract: modifyKarma(-1),\n reset: resetKarma()\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Stats.tsx?");
|
||
|
||
/***/ }),
|
||
/* 796 */,
|
||
/* 797 */,
|
||
/* 798 */,
|
||
/* 799 */,
|
||
/* 800 */,
|
||
/* 801 */,
|
||
/* 802 */,
|
||
/* 803 */,
|
||
/* 804 */,
|
||
/* 805 */,
|
||
/* 806 */,
|
||
/* 807 */,
|
||
/* 808 */,
|
||
/* 809 */,
|
||
/* 810 */,
|
||
/* 811 */,
|
||
/* 812 */,
|
||
/* 813 */,
|
||
/* 814 */,
|
||
/* 815 */,
|
||
/* 816 */,
|
||
/* 817 */,
|
||
/* 818 */,
|
||
/* 819 */,
|
||
/* 820 */,
|
||
/* 821 */,
|
||
/* 822 */,
|
||
/* 823 */,
|
||
/* 824 */,
|
||
/* 825 */,
|
||
/* 826 */,
|
||
/* 827 */,
|
||
/* 828 */,
|
||
/* 829 */,
|
||
/* 830 */,
|
||
/* 831 */,
|
||
/* 832 */,
|
||
/* 833 */
|
||
/*!*************************************!*\
|
||
!*** ./src/DevMenu/ui/Factions.tsx ***!
|
||
\*************************************/
|
||
/*! exports provided: Factions */
|
||
/*! exports used: Factions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Adjuster */ 107);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/FormControl */ 1074);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 457);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/icons-material/Reply */ 458);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/InputLabel */ 1075);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Factions(props) {\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Illuminati\");\n\n function setFactionDropdown(event) {\n setFaction(event.target.value);\n }\n\n function receiveInvite() {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n props.player.receiveInvite(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].name);\n }\n }\n\n function modifyFactionRep(modifier) {\n return function (reputation) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier) {\n return function (favor) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Factions\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Faction:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n id: \"factions-select\"\n }, \"Faction\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n labelId: \"factions-select\",\n id: \"factions-dropdown\",\n className: \"dropdown exp-input\",\n onChange: setFactionDropdown,\n value: faction,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveAllInvites,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveInvite,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default.a, null)))\n }, Object.values(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]).map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: faction.name,\n value: faction.name\n }, faction.name)))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyFactionRep(1)(bigNumber),\n add: modifyFactionRep(1),\n subtract: modifyFactionRep(-1),\n reset: resetFactionRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyFactionFavor(1)(2000),\n add: modifyFactionFavor(1),\n subtract: modifyFactionFavor(-1),\n reset: resetFactionFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRep\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRep\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFactionFavor\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFactionFavor\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Factions.tsx?");
|
||
|
||
/***/ }),
|
||
/* 834 */
|
||
/*!******************************************!*\
|
||
!*** ./src/DevMenu/ui/Augmentations.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: Augmentations */
|
||
/*! exports used: Augmentations */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 457);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/icons-material/Reply */ 458);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Clear */ 456);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Augmentations(props) {\n const [augmentation, setAugmentation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event) {\n setAugmentation(event.target.value);\n }\n\n function queueAug() {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs() {\n for (const i in _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]) {\n const augName = _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"][i];\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs() {\n props.player.augmentations = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Aug:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onChange: setAugmentationDropdown,\n value: augmentation,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAllAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAug,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default.a, null))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: clearAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default.a, null)))\n }, Object.values(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]).map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: aug,\n value: aug\n }, aug)))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Augmentations.tsx?");
|
||
|
||
/***/ }),
|
||
/* 835 */
|
||
/*!****************************************!*\
|
||
!*** ./src/DevMenu/ui/SourceFiles.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: SourceFiles */
|
||
/*! exports used: SourceFiles */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SourceFile/PlayerOwnedSourceFile */ 443);\n/* harmony import */ var _mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/ButtonGroup */ 582);\n\n\n\n\n\n\n\n // Update as additional BitNodes get implemented\n\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nfunction SourceFiles(props) {\n function setSF(sfN, sfLvl) {\n return function () {\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter(sf => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some(sf => sf.n === sfN)) {\n props.player.sourceFiles.push(new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__[/* PlayerOwnedSourceFile */ \"a\"](sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits() {\n props.player.exploits = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Source-Files\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Exploits:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: clearExploits\n }, \"Clear\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-all\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(3)\n }, \"3\")))), validSFN.map(i => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-\" + i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"SF-\", i, \":\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 3)\n }, \"3\")))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/SourceFiles.tsx?");
|
||
|
||
/***/ }),
|
||
/* 836 */
|
||
/*!*************************************!*\
|
||
!*** ./src/DevMenu/ui/Programs.tsx ***!
|
||
\*************************************/
|
||
/*! exports provided: Programs */
|
||
/*! exports used: Programs */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\nfunction Programs(props) {\n const [program, setProgram] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"NUKE.exe\");\n\n function setProgramDropdown(event) {\n setProgram(event.target.value);\n }\n\n function addProgram() {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms() {\n for (const i in _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]) {\n if (!props.player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name)) {\n props.player.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name);\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Programs\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Program:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setProgramDropdown,\n value: program\n }, Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]).map(program => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: program.name,\n value: program.name\n }, program.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Add:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addProgram\n }, \"One\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addAllPrograms\n }, \"All\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Programs.tsx?");
|
||
|
||
/***/ }),
|
||
/* 837 */
|
||
/*!************************************!*\
|
||
!*** ./src/DevMenu/ui/Servers.tsx ***!
|
||
\************************************/
|
||
/*! exports provided: Servers */
|
||
/*! exports used: Servers */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Servers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\n\n\nfunction Servers() {\n const [server, setServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"home\");\n\n function setServerDropdown(event) {\n setServer(event.target.value);\n }\n\n function rootServer() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const s = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.hackDifficulty = server.minDifficulty;\n }\n }\n\n function maxMoney() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.moneyAvailable = server.moneyMax;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Servers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Server:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-servers-dropdown\",\n className: \"dropdown\",\n onChange: setServerDropdown,\n value: server\n }, Object.values(_Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]).map(server => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: server.hostname,\n value: server.hostname\n }, server.hostname))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Root:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootServer\n }, \"Root one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootAllServers\n }, \"Root all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Security:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minSecurity\n }, \"Min one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minAllSecurity\n }, \"Min all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Money:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxMoney\n }, \"Max one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxAllMoney\n }, \"Max all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Servers.tsx?");
|
||
|
||
/***/ }),
|
||
/* 838 */
|
||
/*!**************************************!*\
|
||
!*** ./src/DevMenu/ui/Companies.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: Companies */
|
||
/*! exports used: Companies */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Companies() {\n const [company, setCompany] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ECorp\");\n\n function setCompanyDropdown(event) {\n setCompany(event.target.value);\n }\n\n function resetCompanyRep() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier) {\n return function (reputation) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier) {\n return function (favor) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].favor = 0;\n }\n\n function tonsOfRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Companies\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Company:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-companies-dropdown\",\n className: \"dropdown\",\n onChange: setCompanyDropdown,\n value: company\n }, Object.values(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]).map(company => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: company.name,\n value: company.name\n }, company.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyCompanyRep(1)(bigNumber),\n add: modifyCompanyRep(1),\n subtract: modifyCompanyRep(-1),\n reset: resetCompanyRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyCompanyFavor(1)(2000),\n add: modifyCompanyFavor(1),\n subtract: modifyCompanyFavor(-1),\n reset: resetCompanyFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRepCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRepCompanies\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFavorCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFavorCompanies\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Companies.tsx?");
|
||
|
||
/***/ }),
|
||
/* 839 */
|
||
/*!****************************************!*\
|
||
!*** ./src/DevMenu/ui/Bladeburner.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: Bladeburner */
|
||
/*! exports used: Bladeburner */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Bladeburner(props) {\n function modifyBladeburnerRank(modify) {\n return function (rank) {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, rank * modify);\n }\n };\n }\n\n function resetBladeburnerRank() {\n props.player.bladeburner.rank = 0;\n props.player.bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank() {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, bigNumber);\n }\n }\n\n function modifyBladeburnerCycles(modify) {\n return function (cycles) {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles = 0;\n }\n }\n\n function addTonsBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += bigNumber;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Bladeburner\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Rank:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"rank\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerRank,\n add: modifyBladeburnerRank(1),\n subtract: modifyBladeburnerRank(-1),\n reset: resetBladeburnerRank\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerCycles,\n add: modifyBladeburnerCycles(1),\n subtract: modifyBladeburnerCycles(-1),\n reset: resetBladeburnerCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Bladeburner.tsx?");
|
||
|
||
/***/ }),
|
||
/* 840 */
|
||
/*!*********************************!*\
|
||
!*** ./src/DevMenu/ui/Gang.tsx ***!
|
||
\*********************************/
|
||
/*! exports provided: Gang */
|
||
/*! exports used: Gang */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Gang(props) {\n function addTonsGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify) {\n return function (cycles) {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Gang\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsGangCycles,\n add: modifyGangCycles(1),\n subtract: modifyGangCycles(-1),\n reset: resetGangCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Gang.tsx?");
|
||
|
||
/***/ }),
|
||
/* 841 */
|
||
/*!****************************************!*\
|
||
!*** ./src/DevMenu/ui/Corporation.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: Corporation */
|
||
/*! exports used: Corporation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Corporation(props) {\n function addTonsCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.plus(1e99);\n }\n }\n\n function resetCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.minus(props.player.corporation.funds);\n }\n }\n\n function addTonsCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify) {\n return function (cycles) {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n Object.keys(div.products).forEach(prod => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Corporation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addTonsCorporationFunds\n }, \"Tons of funds\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetCorporationFunds\n }, \"Reset funds\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsCorporationCycles,\n add: modifyCorporationCycles(1),\n subtract: modifyCorporationCycles(-1),\n reset: resetCorporationCycles\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: finishCorporationProducts\n }, \"Finish products\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addCorporationResearch\n }, \"Tons of research\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Corporation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 842 */
|
||
/*!********************************************!*\
|
||
!*** ./src/DevMenu/ui/CodingContracts.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: CodingContracts */
|
||
/*! exports used: CodingContracts */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContracts; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../CodingContractGenerator */ 289);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n\n\n\n\n\n\n\n\n\n\nfunction CodingContracts() {\n const [codingcontract, setCodingcontract] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Find Largest Prime Factor\");\n\n function setCodingcontractDropdown(event) {\n setCodingcontract(event.target.value);\n }\n\n function specificContract() {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateContract */ \"a\"])({\n problemType: codingcontract,\n server: \"home\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Coding Contracts\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContract */ \"b\"]\n }, \"Generate Random Contract\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContractOnHome */ \"c\"]\n }, \"Generate Random Contract on Home Comp\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setCodingcontractDropdown,\n value: codingcontract\n }, Object.values(_CodingContracts__WEBPACK_IMPORTED_MODULE_9__[/* CodingContractTypes */ \"d\"]).map(cc => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: cc.name,\n value: cc.name\n }, cc.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: specificContract\n }, \"Generate Specified Contract Type on Home Comp\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/CodingContracts.tsx?");
|
||
|
||
/***/ }),
|
||
/* 843 */
|
||
/*!****************************************!*\
|
||
!*** ./src/DevMenu/ui/StockMarket.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: StockMarket */
|
||
/*! exports used: StockMarket */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../StockMarket/Stock */ 104);\n\n\n\n\n\n\n\n\n\n\n\nfunction StockMarket() {\n const [stockPrice, setStockPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [stockSymbol, setStockSymbol] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function setStockPriceField(event) {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event) {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub) {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match = () => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol) {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name in _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"]) {\n if (_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"].hasOwnProperty(name)) {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"][name];\n\n if (stock instanceof _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__[/* Stock */ \"a\"] && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice() {\n if (!isNaN(stockPrice)) {\n processStocks(stock => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps() {\n const stocks = [];\n processStocks(stock => {\n stocks.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: stock.symbol\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, stock.symbol), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: stock.cap\n }))));\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Stock\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Price cap\")), stocks)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Stock Market\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Symbol:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"symbol/'all'\",\n onChange: setStockSymbolField\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Price:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"$$$\",\n onChange: setStockPriceField\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: doSetStockPrice\n }, \"Set\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Caps:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: viewStockCaps\n }, \"View stock caps\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/StockMarket.tsx?");
|
||
|
||
/***/ }),
|
||
/* 844 */
|
||
/*!************************************!*\
|
||
!*** ./src/DevMenu/ui/Sleeves.tsx ***!
|
||
\************************************/
|
||
/*! exports provided: Sleeves */
|
||
/*! exports used: Sleeves */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeves; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n\n\n\n\n\n\nfunction Sleeves(props) {\n function sleeveMaxAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Sleeves\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Shock:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveMaxAllShock\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveClearAllShock\n }, \"Clear all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Sync:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncMaxAll\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncClearAll\n }, \"Clear all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Sleeves.tsx?");
|
||
|
||
/***/ }),
|
||
/* 845 */
|
||
/*!*************************************!*\
|
||
!*** ./src/DevMenu/ui/TimeSkip.tsx ***!
|
||
\*************************************/
|
||
/*! exports provided: TimeSkip */
|
||
/*! exports used: TimeSkip */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TimeSkip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SaveObject */ 219);\n\n\n\n\n\n\n\nfunction TimeSkip(props) {\n function timeskip(time) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n _SaveObject__WEBPACK_IMPORTED_MODULE_6__[/* saveObject */ \"b\"].saveGame(props.engine.indexedDb);\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Time skip\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 1000)\n }, \"1 minute\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 60 * 1000)\n }, \"1 hour\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(24 * 60 * 60 * 1000)\n }, \"1 day\")));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/TimeSkip.tsx?");
|
||
|
||
/***/ }),
|
||
/* 846 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Bladeburner/ui/BladeburnerRoot.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: BladeburnerRoot */
|
||
/*! exports used: BladeburnerRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Stats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stats */ 847);\n/* harmony import */ var _Console__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Console */ 849);\n/* harmony import */ var _AllPages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllPages */ 850);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\nfunction BladeburnerRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n height: \"60%\",\n display: \"block\",\n position: \"relative\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n height: \"100%\",\n width: \"30%\",\n display: \"inline-block\",\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Stats__WEBPACK_IMPORTED_MODULE_1__[/* Stats */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player,\n router: router\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Console__WEBPACK_IMPORTED_MODULE_2__[/* Console */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"70%\",\n display: \"block\",\n border: \"1px solid white\",\n marginTop: \"6px\",\n padding: \"6px\",\n position: \"relative\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AllPages__WEBPACK_IMPORTED_MODULE_3__[/* AllPages */ \"a\"], {\n bladeburner: props.bladeburner,\n player: player\n })));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 847 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Bladeburner/ui/Stats.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: Stats */
|
||
/*! exports used: Stats */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StatsTable */ 186);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/FactionHelpers */ 91);\n/* harmony import */ var _TravelPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./TravelPopup */ 848);\n\n\n\n\n\n\n\n\n\n\n\nfunction Stats(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function openStaminaHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Performing actions will use up your stamina.<br><br>\" + \"Your max stamina is determined primarily by your agility stat.<br><br>\" + \"Your stamina gain rate is determined by both your agility and your \" + \"max stamina. Higher max stamina leads to a higher gain rate.<br><br>\" + \"Once your \" + \"stamina falls below 50% of its max value, it begins to negatively \" + \"affect the success rate of your contracts/operations. This penalty \" + \"is shown in the overview panel. If the penalty is 15%, then this means \" + \"your success rate would be multipled by 85% (100 - 15).<br><br>\" + \"Your max stamina and stamina gain rate can also be increased by \" + \"training, or through skills and Augmentation upgrades.\");\n }\n\n function openPopulationHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"The success rate of your contracts/operations depends on \" + \"the population of Synthoids in your current city. \" + \"The success rate that is shown to you is only an estimate, \" + \"and it is based on your Synthoid population estimate.<br><br>\" + \"Therefore, it is important that this Synthoid population estimate \" + \"is accurate so that you have a better idea of your \" + \"success rate for contracts/operations. Certain \" + \"actions will increase the accuracy of your population \" + \"estimate.<br><br>\" + \"The Synthoid populations of cities can change due to your \" + \"actions or random events. If random events occur, they will \" + \"be logged in the Bladeburner Console.\");\n }\n\n function openTravel() {\n const popupId = \"bladeburner-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _TravelPopup__WEBPACK_IMPORTED_MODULE_10__[/* TravelPopup */ \"a\"], {\n bladeburner: props.bladeburner,\n popupId: popupId\n });\n }\n\n function openFaction() {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (faction.isMember) {\n props.router.toFaction(faction);\n } else {\n if (props.bladeburner.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_9__[/* joinFaction */ \"d\"])(faction);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were accepted into the Bladeburners faction\");\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"You need a rank of 25 to join the Bladeburners Faction!\");\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Rank: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.rank, 2), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Your rank within the Bladeburner division.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.stamina, 3), \" / \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.maxStamina, 3)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: openStaminaHelp\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina Penalty: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1), \"%\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Team Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.teamSize, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Team Members Lost: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.teamLost, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Num Times Hospitalized: \", props.bladeburner.numHosp), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Money Lost From Hospitalizations: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: props.bladeburner.moneyLost\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Current City: \", props.bladeburner.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Est. Synthoid Population: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ \"a\"].formatPopulation(props.bladeburner.getCurrentCity().popEst), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: openPopulationHelp\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Est. Synthoid Communities: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.getCurrentCity().comms, 0), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"City Chaos: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.getCurrentCity().chaos), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Bonus time:\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* convertTimeMsToTimeElapsedString */ \"b\"])(props.bladeburner.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Skill Points: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.skillPoints, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_4__[/* StatsTable */ \"a\"])([[\"Aug. Success Chance mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_success_chance_mult * 100, 1) + \"%\"], [\"Aug. Max Stamina mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_max_stamina_mult * 100, 1) + \"%\"], [\"Aug. Stamina Gain mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_stamina_gain_mult * 100, 1) + \"%\"], [\"Aug. Field Analysis mult: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.player.bladeburner_analysis_mult * 100, 1) + \"%\"]]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: openTravel,\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Travel\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: openFaction,\n className: \"a-link-button tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Apply to the Bladeburner Faction, or go to the faction page if you are already a member\"), \"Faction\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/Stats.tsx?");
|
||
|
||
/***/ }),
|
||
/* 848 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Bladeburner/ui/TravelPopup.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: TravelPopup */
|
||
/*! exports used: TravelPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 350);\n\n\n\nfunction TravelPopup(props) {\n function travel(city) {\n props.bladeburner.city = city;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_2__[/* WorldMap */ \"a\"], {\n currentCity: props.bladeburner.city,\n onTravel: city => travel(city)\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/TravelPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 849 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Bladeburner/ui/Console.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: Console */
|
||
/*! exports used: Console */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Console; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction Line(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n className: \"bladeburner-console-line\",\n style: {\n color: \"var(--my-font-color)\",\n whiteSpace: \"pre-wrap\"\n }\n }, props.content));\n}\n\nfunction Console(props) {\n const lastRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [consoleHistoryIndex, setConsoleHistoryIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.bladeburner.consoleHistory.length); // TODO: Figure out how to actually make the scrolling work correctly.\n\n function scrollToBottom() {\n if (!lastRef.current) return;\n lastRef.current.scrollTop = lastRef.current.scrollHeight;\n }\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n const id2 = setInterval(scrollToBottom, 100);\n return () => {\n clearInterval(id);\n clearInterval(id2);\n };\n }, []);\n\n function handleKeyDown(event) {\n if (event.keyCode === 13) {\n event.preventDefault();\n const command = event.currentTarget.value;\n event.currentTarget.value = \"\";\n\n if (command.length > 0) {\n props.bladeburner.postToConsole(\"> \" + command);\n props.bladeburner.executeConsoleCommands(props.player, command);\n setConsoleHistoryIndex(props.bladeburner.consoleHistory.length);\n rerender();\n }\n }\n\n const consoleHistory = props.bladeburner.consoleHistory;\n\n if (event.keyCode === 38) {\n // up\n let i = consoleHistoryIndex;\n const len = consoleHistory.length;\n\n if (len === 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n if (i !== 0) {\n i = i - 1;\n }\n\n setConsoleHistoryIndex(i);\n const prevCommand = consoleHistory[i];\n event.currentTarget.value = prevCommand;\n }\n\n if (event.keyCode === 40) {\n const i = consoleHistoryIndex;\n const len = consoleHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n } // Latest command, put nothing\n\n\n if (i == len || i == len - 1) {\n setConsoleHistoryIndex(len);\n event.currentTarget.value = \"\";\n } else {\n setConsoleHistoryIndex(consoleHistoryIndex + 1);\n const prevCommand = consoleHistory[consoleHistoryIndex + 1];\n event.currentTarget.value = prevCommand;\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n ref: lastRef,\n className: \"bladeburner-console-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", {\n className: \"bladeburner-console-table\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, props.bladeburner.consoleLogs.map((log, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Line, {\n key: i,\n content: log\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"input\",\n id: \"bladeburner-console-input-row\",\n className: \"bladeburner-console-input-row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n className: \"bladeburner-console-input-cell\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"> \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"bladeburner-console-input\",\n tabIndex: 1,\n type: \"text\",\n onKeyDown: handleKeyDown\n }))))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/Console.tsx?");
|
||
|
||
/***/ }),
|
||
/* 850 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Bladeburner/ui/AllPages.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: AllPages */
|
||
/*! exports used: AllPages */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AllPages; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralActionPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralActionPage */ 851);\n/* harmony import */ var _ContractPage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ContractPage */ 854);\n/* harmony import */ var _OperationPage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OperationPage */ 857);\n/* harmony import */ var _BlackOpPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOpPage */ 860);\n/* harmony import */ var _SkillPage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SkillPage */ 863);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/Icons */ 216);\n\n\n\n\n\n\n\nfunction AllPages(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"General\");\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function Header(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: () => setPage(props.name),\n className: page !== props.name ? \"bladeburner-nav-button noselect\" : \"bladeburner-nav-button-inactive noselect\"\n }, props.name);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"General\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Contracts\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Operations\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"BlackOps\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Skills\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, page === \"General\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralActionPage__WEBPACK_IMPORTED_MODULE_1__[/* GeneralActionPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Contracts\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ContractPage__WEBPACK_IMPORTED_MODULE_2__[/* ContractPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Operations\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_OperationPage__WEBPACK_IMPORTED_MODULE_3__[/* OperationPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"BlackOps\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlackOpPage__WEBPACK_IMPORTED_MODULE_4__[/* BlackOpPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Skills\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SkillPage__WEBPACK_IMPORTED_MODULE_5__[/* SkillPage */ \"a\"], {\n bladeburner: props.bladeburner\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, _data_Icons__WEBPACK_IMPORTED_MODULE_6__[/* stealthIcon */ \"b\"], \" = This action requires stealth, \", _data_Icons__WEBPACK_IMPORTED_MODULE_6__[/* killIcon */ \"a\"], \" = This action involves retirement\"));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/AllPages.tsx?");
|
||
|
||
/***/ }),
|
||
/* 851 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Bladeburner/ui/GeneralActionPage.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: GeneralActionPage */
|
||
/*! exports used: GeneralActionPage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActionPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralActionList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralActionList */ 852);\n\n\nfunction GeneralActionPage(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: {\n display: \"block\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, \"These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GeneralActionList__WEBPACK_IMPORTED_MODULE_1__[/* GeneralActionList */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/GeneralActionPage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 852 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Bladeburner/ui/GeneralActionList.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: GeneralActionList */
|
||
/*! exports used: GeneralActionList */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActionList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralActionElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralActionElem */ 853);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../GeneralActions */ 201);\n\n\n\nfunction GeneralActionList(props) {\n const actions = [];\n\n for (const name in _GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"]) {\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"].hasOwnProperty(name)) {\n actions.push(_GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"][name]);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, actions.map(action => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: action.name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralActionElem__WEBPACK_IMPORTED_MODULE_1__[/* GeneralActionElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: action,\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/GeneralActionList.tsx?");
|
||
|
||
/***/ }),
|
||
/* 853 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Bladeburner/ui/GeneralActionElem.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: GeneralActionElem */
|
||
/*! exports used: GeneralActionElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActionElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\nfunction GeneralActionElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n\n const actionTime = function () {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n return 60;\n\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n\n return -1; // dead code\n }();\n\n const successChance = props.action.name === \"Recruitment\" ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1)) : -1;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][props.action.name];\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), successChance !== -1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(successChance * 100, 1), \"%\")));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 854 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Bladeburner/ui/ContractPage.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: ContractPage */
|
||
/*! exports used: ContractPage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ContractPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ContractList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ContractList */ 855);\n\n\nfunction ContractPage(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: {\n display: \"block\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, \"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ContractList__WEBPACK_IMPORTED_MODULE_1__[/* ContractList */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/ContractPage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 855 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Bladeburner/ui/ContractList.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: ContractList */
|
||
/*! exports used: ContractList */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ContractList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ContractElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ContractElem */ 856);\n\n\nfunction ContractList(props) {\n const names = Object.keys(props.bladeburner.contracts);\n const contracts = props.bladeburner.contracts;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, names.map(name => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ContractElem__WEBPACK_IMPORTED_MODULE_1__[/* ContractElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: contracts[name],\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/ContractList.tsx?");
|
||
|
||
/***/ }),
|
||
/* 856 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Bladeburner/ui/ContractElem.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: ContractElem */
|
||
/*! exports used: ContractElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ContractElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 216);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SuccessChance */ 351);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\n\n\n\nfunction ContractElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Contract;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_6__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Contracts remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/ContractElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 857 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Bladeburner/ui/OperationPage.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: OperationPage */
|
||
/*! exports used: OperationPage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OperationPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _OperationList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperationList */ 858);\n\n\nfunction OperationPage(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: {\n display: \"block\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, \"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_OperationList__WEBPACK_IMPORTED_MODULE_1__[/* OperationList */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/OperationPage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 858 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Bladeburner/ui/OperationList.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: OperationList */
|
||
/*! exports used: OperationList */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OperationList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _OperationElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OperationElem */ 859);\n\n\nfunction OperationList(props) {\n const names = Object.keys(props.bladeburner.operations);\n const operations = props.bladeburner.operations;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, names.map(name => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_OperationElem__WEBPACK_IMPORTED_MODULE_1__[/* OperationElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: operations[name],\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/OperationList.tsx?");
|
||
|
||
/***/ }),
|
||
/* 859 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Bladeburner/ui/OperationElem.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: OperationElem */
|
||
/*! exports used: OperationElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OperationElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 216);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TeamSizePopup */ 459);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SuccessChance */ 351);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\n\n\n\n\n\nfunction OperationElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Operation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_8__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Operations remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/OperationElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 860 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Bladeburner/ui/BlackOpPage.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: BlackOpPage */
|
||
/*! exports used: BlackOpPage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOpPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BlackOpList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BlackOpList */ 861);\n\n\nfunction BlackOpPage(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: {\n display: \"block\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, \"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, \"Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BlackOpList__WEBPACK_IMPORTED_MODULE_1__[/* BlackOpList */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BlackOpPage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 861 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Bladeburner/ui/BlackOpList.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: BlackOpList */
|
||
/*! exports used: BlackOpList */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOpList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BlackOperations */ 200);\n/* harmony import */ var _BlackOpElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BlackOpElem */ 862);\n\n\n\nfunction BlackOpList(props) {\n let blackops = [];\n\n for (const blackopName in _BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"].hasOwnProperty(blackopName)) {\n blackops.push(_BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"][blackopName]);\n }\n }\n\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n blackops = blackops.filter((blackop, i) => !(props.bladeburner.blackops[blackops[i].name] == null && i !== 0 && props.bladeburner.blackops[blackops[i - 1].name] == null));\n blackops = blackops.reverse();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, blackops.map(blackop => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: blackop.name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlackOpElem__WEBPACK_IMPORTED_MODULE_2__[/* BlackOpElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: blackop,\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BlackOpList.tsx?");
|
||
|
||
/***/ }),
|
||
/* 862 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Bladeburner/ui/BlackOpElem.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: BlackOpElem */
|
||
/*! exports used: BlackOpElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOpElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 216);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TeamSizePopup */ 459);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SuccessChance */ 351);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\n\n\n\n\nfunction BlackOpElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n\n if (isCompleted) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"block\"\n }\n }, props.action.name, \" (COMPLETED)\");\n }\n\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const actionTime = props.action.getActionTime(props.bladeburner);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_6__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_3__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: hasReqdRank ? \"a-link-button\" : \"a-link-button-inactive\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n onClick: onStart\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\",\n color: hasReqdRank ? \"white\" : \"red\"\n }\n }, \"Required Rank: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.action.reqdRank, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Estimated Success Chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_7__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000)));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BlackOpElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 863 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Bladeburner/ui/SkillPage.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: SkillPage */
|
||
/*! exports used: SkillPage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SkillPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SkillList__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SkillList */ 864);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\n\n\nfunction SkillPage(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult) {\n return mult && mult !== 1;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Skill Points: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.skillPoints, 0))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You will gain one skill point every \", _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint, \" ranks.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), valid(mults[\"successChanceAll\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Total Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceAll\"], 3)), valid(mults[\"successChanceStealth\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stealth Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceStealth\"], 3)), valid(mults[\"successChanceKill\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Retirement Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceKill\"], 3)), valid(mults[\"successChanceContract\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Contract Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceContract\"], 3)), valid(mults[\"successChanceOperation\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Operation Success Chance: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceOperation\"], 3)), valid(mults[\"successChanceEstimate\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Synthoid Data Estimate: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"successChanceEstimate\"], 3)), valid(mults[\"actionTime\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Action Time: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"actionTime\"], 3)), valid(mults[\"effHack\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hacking Skill: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effHack\"], 3)), valid(mults[\"effStr\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Strength: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effStr\"], 3)), valid(mults[\"effDef\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Defense: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effDef\"], 3)), valid(mults[\"effDex\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Dexterity: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effDex\"], 3)), valid(mults[\"effAgi\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Agility: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effAgi\"], 3)), valid(mults[\"effCha\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Charisma: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effCha\"], 3)), valid(mults[\"effInt\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Intelligence: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"effInt\"], 3)), valid(mults[\"stamina\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Stamina: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"stamina\"], 3)), valid(mults[\"money\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Contract Money: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"money\"], 3)), valid(mults[\"expGain\"]) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Exp Gain: x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(mults[\"expGain\"], 3)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SkillList__WEBPACK_IMPORTED_MODULE_1__[/* SkillList */ \"a\"], {\n bladeburner: props.bladeburner,\n onUpgrade: () => setRerender(old => !old)\n }));\n}\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n \n }\n }\n}\n*/\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SkillPage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 864 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Bladeburner/ui/SkillList.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: SkillList */
|
||
/*! exports used: SkillList */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SkillList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SkillElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SkillElem */ 865);\n/* harmony import */ var _Skills__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Skills */ 189);\n\n\n\nfunction SkillList(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_2__[/* Skills */ \"a\"]).map(skill => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: skill,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SkillElem__WEBPACK_IMPORTED_MODULE_1__[/* SkillElem */ \"a\"], {\n bladeburner: props.bladeburner,\n skill: _Skills__WEBPACK_IMPORTED_MODULE_2__[/* Skills */ \"a\"][skill],\n onUpgrade: props.onUpgrade\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SkillList.tsx?");
|
||
|
||
/***/ }),
|
||
/* 865 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Bladeburner/ui/SkillElem.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: SkillElem */
|
||
/*! exports used: SkillElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SkillElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\n\nfunction SkillElem(props) {\n const skillName = props.skill.name;\n let currentLevel = 0;\n\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n\n const pointCost = props.skill.calculateCost(currentLevel);\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick() {\n if (props.bladeburner.skillPoints < pointCost) return;\n props.bladeburner.skillPoints -= pointCost;\n props.bladeburner.upgradeSkill(props.skill);\n props.onUpgrade();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_1__[/* CopyableText */ \"b\"], {\n value: props.skill.name\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onClick,\n style: {\n display: \"inline-block\",\n margin: \"3px\",\n padding: \"3px\"\n },\n className: canLevel && !maxLvl ? \"a-link-button\" : \"a-link-button-inactive\"\n }, \"Level\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Level: \", currentLevel), maxLvl ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n color: \"red\",\n display: \"block\"\n }\n }, \"MAX LEVEL\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Skill Points required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(pointCost, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.skill.desc\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SkillElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 866 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Gang/ui/GangRoot.tsx ***!
|
||
\**********************************/
|
||
/*! exports provided: GangRoot */
|
||
/*! exports used: GangRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ManagementSubpage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ManagementSubpage */ 867);\n/* harmony import */ var _TerritorySubpage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TerritorySubpage */ 880);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/**\n * React Component for all the gang stuff.\n */\n\n\n\n\n\nfunction GangRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const [management, setManagement] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function back() {\n router.toFaction(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"][props.gang.facName]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: back\n }, \"Back\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: management ? \"a-link-button-inactive\" : \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: () => setManagement(true)\n }, \"Gang Management\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: !management ? \"a-link-button-inactive\" : \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: () => setManagement(false)\n }, \"Gang Territory\"), management ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ManagementSubpage__WEBPACK_IMPORTED_MODULE_1__[/* ManagementSubpage */ \"a\"], {\n gang: props.gang,\n player: player\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerritorySubpage__WEBPACK_IMPORTED_MODULE_2__[/* TerritorySubpage */ \"a\"], {\n gang: props.gang\n }));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 867 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Gang/ui/ManagementSubpage.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: ManagementSubpage */
|
||
/*! exports used: ManagementSubpage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ManagementSubpage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GangStats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangStats */ 868);\n/* harmony import */ var _GangMemberList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberList */ 870);\n/**\n * React Component for the subpage that manages gang members, the main page.\n */\n\n\n\nfunction ManagementSubpage(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\",\n style: {\n width: \"70%\"\n }\n }, \"This page is used to manage your gang members and get an overview of your gang's stats.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"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 '\", props.gang.isHackingGang ? \"Ethical Hacking\" : \"Vigilante Justice\", \"' task to lower your wanted level.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"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.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You can also manage your gang programmatically through Netscript using the Gang API\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GangStats__WEBPACK_IMPORTED_MODULE_1__[/* GangStats */ \"a\"], {\n gang: props.gang\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GangMemberList__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberList */ \"a\"], {\n gang: props.gang,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/ManagementSubpage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 868 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Gang/ui/GangStats.tsx ***!
|
||
\***********************************/
|
||
/*! exports provided: GangStats */
|
||
/*! exports used: GangStats */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangStats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../AllGangs */ 59);\n/* harmony import */ var _BonusTime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BonusTime */ 869);\n/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\n\n\n\n\n\n\n\n\nfunction GangStats(props) {\n const territoryMult = _AllGangs__WEBPACK_IMPORTED_MODULE_6__[/* AllGangs */ \"a\"][props.gang.facName].territory * 100;\n let territoryStr;\n\n if (territoryMult <= 0) {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(100, 2);\n } else {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(territoryMult, 2);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Respect: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRespect(props.gang.respect), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRespect(5 * props.gang.respectGainRate), \" / sec)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"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.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Wanted Level: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatWanted(props.gang.wanted), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatWanted(5 * props.gang.wantedGainRate), \" / sec)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"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.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Wanted Level Penalty: -\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])((1 - props.gang.getWantedPenalty()) * 100, 2), \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Penalty for respect and money gain rates due to Wanted Level\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Money gain rate: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: 5 * props.gang.moneyGainRate\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Territory: \", territoryStr, \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The percentage of total territory your Gang controls\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Faction reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(_Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][props.gang.facName].playerReputation)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BonusTime__WEBPACK_IMPORTED_MODULE_7__[/* BonusTime */ \"a\"], {\n gang: props.gang\n }));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangStats.tsx?");
|
||
|
||
/***/ }),
|
||
/* 869 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Gang/ui/BonusTime.tsx ***!
|
||
\***********************************/
|
||
/*! exports provided: BonusTime */
|
||
/*! exports used: BonusTime */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BonusTime; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/**\n * React Component for displaying the bonus time remaining.\n */\n\n\n\nfunction BonusTime(props) {\n const CyclerPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"]._idleSpeed;\n if (props.gang.storedCycles / CyclerPerSecond * 1000 <= 5000) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n const bonusMillis = props.gang.storedCycles / CyclerPerSecond * 1000;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Bonus time: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* convertTimeMsToTimeElapsedString */ \"b\"])(bonusMillis), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext noselect\"\n }, \"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/BonusTime.tsx?");
|
||
|
||
/***/ }),
|
||
/* 870 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Gang/ui/GangMemberList.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: GangMemberList */
|
||
/*! exports used: GangMemberList */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GangMemberUpgradePopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberUpgradePopup */ 871);\n/* harmony import */ var _GangMemberAccordion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberAccordion */ 872);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _RecruitButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RecruitButton */ 878);\n/**\n * React Component for the list of gang members on the management subpage.\n */\n\n\n\n\n\nfunction GangMemberList(props) {\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function openUpgradePopup() {\n const popupId = `gang-upgrade-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(popupId, _GangMemberUpgradePopup__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberUpgradePopup */ \"a\"], {\n gang: props.gang,\n player: props.player,\n popupId: popupId\n });\n }\n\n function onFilterChange(event) {\n setFilter(event.target.value);\n }\n\n const members = props.gang.members.filter(member => member.name.indexOf(filter) > -1 || member.task.indexOf(filter) > -1);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_RecruitButton__WEBPACK_IMPORTED_MODULE_4__[/* RecruitButton */ \"a\"], {\n onRecruit: () => setRerender(old => !old),\n gang: props.gang\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input noselect\",\n placeholder: \"Filter gang member\",\n style: {\n margin: \"5px\",\n padding: \"5px\"\n },\n value: filter,\n onChange: onFilterChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: openUpgradePopup\n }, \"Manage Equipment\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, members.map(member => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: member.name\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GangMemberAccordion__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberAccordion */ \"a\"], {\n gang: props.gang,\n member: member\n })))));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberList.tsx?");
|
||
|
||
/***/ }),
|
||
/* 871 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Gang/ui/GangMemberUpgradePopup.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: GangMemberUpgradePopup */
|
||
/*! exports used: GangMemberUpgradePopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GangMemberUpgrades */ 154);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/upgrades */ 120);\n/**\n * React Component for the popup that manages gang members upgrades\n */\n\n\n\n\n\n\n\n\nfunction NextReveal(props) {\n const upgrades = Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.gt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n if (upgrades.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Next at \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: upgrades[0].cost\n }));\n}\n\nfunction GangMemberUpgradePanel(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function filterUpgrades(list, type) {\n return Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.lt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n }\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation);\n\n function purchasedUpgrade(upgName) {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: upgName,\n className: \"gang-owned-upgrade tooltip\"\n }, upg.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n function upgradeButton(upg, left = false) {\n function onClick() {\n props.member.buyUpgrade(upg, props.player, props.gang);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n key: upg.name,\n className: \"a-link-button tooltip\",\n style: {\n margin: \"2px\",\n padding: \"2px\",\n display: \"block\",\n fontSize: \"11px\"\n },\n onClick: onClick\n }, upg.name, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.gang.getUpgradeCost(upg),\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: left ? \"tooltiptextleft\" : \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points)\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, props.member.name, \"(\", props.member.task, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n fontSize: \"14px\",\n display: \"inline-block\",\n width: \"20%\"\n }\n }, \"Hack: \", props.member.hack, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.hack_mult * asc.hack, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Str: \", props.member.str, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.str_mult * asc.str, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Def: \", props.member.def, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.def_mult * asc.def, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dex: \", props.member.dex, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.dex_mult * asc.dex, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agi: \", props.member.agi, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.agi_mult * asc.agi, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cha: \", props.member.cha, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.cha_mult * asc.cha, 2), \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-owned-upgrades-div noselect\"\n }, \"Purchased Upgrades: \", props.member.upgrades.map(upg => purchasedUpgrade(upg)), props.member.augmentations.map(upg => purchasedUpgrade(upg))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Weapons\"), weaponUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Armor\"), armorUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Vehicles\"), vehicleUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Rootkits\"), rootkitUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\"), augUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation,\n player: props.player,\n upgrades: props.member.upgrades\n })));\n}\n\nfunction GangMemberUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function closePopup(ev) {\n if (ev.keyCode !== 27) return;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n window.addEventListener(\"keydown\", closePopup);\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => {\n clearInterval(id);\n window.removeEventListener(\"keydown\", closePopup);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input noselect\",\n value: filter,\n placeholder: \"Filter gang member\",\n onChange: event => setFilter(event.target.value)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n marginLeft: \"6px\",\n display: \"inline-block\"\n }\n }, \"Discount: -\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(1 - 1 / props.gang.getDiscount()), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext noselect\"\n }, \"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.\")), props.gang.members.map(member => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(GangMemberUpgradePanel, {\n key: member.name,\n player: props.player,\n gang: props.gang,\n member: member\n })));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberUpgradePopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 872 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Gang/ui/GangMemberAccordion.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: GangMemberAccordion */
|
||
/*! exports used: GangMemberAccordion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/* harmony import */ var _GangMemberAccordionContent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberAccordionContent */ 873);\n/**\n * React Component for a gang member on the management subpage.\n */\n\n\n\nfunction GangMemberAccordion(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n panelInitiallyOpened: true,\n headerContent: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, props.member.name),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GangMemberAccordionContent__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberAccordionContent */ \"a\"], {\n gang: props.gang,\n member: props.member\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberAccordion.tsx?");
|
||
|
||
/***/ }),
|
||
/* 873 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/Gang/ui/GangMemberAccordionContent.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: GangMemberAccordionContent */
|
||
/*! exports used: GangMemberAccordionContent */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberAccordionContent; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GangMemberStats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberStats */ 874);\n/* harmony import */ var _TaskSelector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TaskSelector */ 876);\n/* harmony import */ var _TaskDescription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TaskDescription */ 877);\n/**\n * React Component for the content of the accordion of gang members on the\n * management subpage.\n */\n\n\n\n\nfunction GangMemberAccordionContent(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-member-info-div tooltip\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GangMemberStats__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberStats */ \"a\"], {\n onAscend: () => setRerender(old => !old),\n gang: props.gang,\n member: props.member\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-member-info-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TaskSelector__WEBPACK_IMPORTED_MODULE_2__[/* TaskSelector */ \"a\"], {\n onTaskChange: () => setRerender(old => !old),\n gang: props.gang,\n member: props.member\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-member-info-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TaskDescription__WEBPACK_IMPORTED_MODULE_3__[/* TaskDescription */ \"a\"], {\n member: props.member\n })));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberAccordionContent.tsx?");
|
||
|
||
/***/ }),
|
||
/* 874 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Gang/ui/GangMemberStats.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: GangMemberStats */
|
||
/*! exports used: GangMemberStats */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberStats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _AscensionPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./AscensionPopup */ 875);\n/**\n * React Component for the first part of a gang member details.\n * Contains skills and exp.\n */\n\n\n\n\n\n\nfunction GangMemberStats(props) {\n function ascend() {\n const popupId = `gang-management-ascend-member ${props.member.name}`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* createPopup */ \"a\"])(popupId, _AscensionPopup__WEBPACK_IMPORTED_MODULE_5__[/* AscensionPopup */ \"a\"], {\n member: props.member,\n gang: props.gang,\n popupId: popupId,\n onAscend: props.onAscend\n });\n }\n\n function openAscensionHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member.\"));\n }\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points)\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext smallfont\"\n }, \"Hk: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.hack_mult * asc.hack), \"(x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.hack_mult), \" Eq, x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(asc.hack), \" Asc)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"St: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.str_mult * asc.str), \"(x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.str_mult), \" Eq, x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(asc.str), \" Asc)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Df: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.def_mult * asc.def), \"(x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.def_mult), \" Eq, x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(asc.def), \" Asc)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dx: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.dex_mult * asc.dex), \"(x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.dex_mult), \" Eq, x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(asc.dex), \" Asc)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Ag: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.agi_mult * asc.agi), \"(x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.agi_mult), \" Eq, x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(asc.agi), \" Asc)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Ch: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.cha_mult * asc.cha), \"(x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(props.member.cha_mult), \" Eq, x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMultiplier(asc.cha), \" Asc)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"Hacking: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(props.member.hack, 0), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(props.member.hack_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(props.member.str, 0), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(props.member.str_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(props.member.def, 0), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(props.member.def_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(props.member.dex, 0), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(props.member.dex_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(props.member.agi, 0), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(props.member.agi_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(props.member.cha, 0), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(props.member.cha_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.member.canAscend() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"accordion-button noselect\",\n onClick: ascend\n }, \"Ascend\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip noselect\",\n style: {\n marginTop: \"5px\"\n },\n onClick: openAscensionHelp\n }, \"?\")));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberStats.tsx?");
|
||
|
||
/***/ }),
|
||
/* 875 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Gang/ui/AscensionPopup.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: AscensionPopup */
|
||
/*! exports used: AscensionPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AscensionPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Component for the content of the popup before the player confirms the\n * ascension of a gang member.\n */\n\n\n\n\nfunction AscensionPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function confirm() {\n props.onAscend();\n const res = props.gang.ascendMember(props.member);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You ascended \", props.member.name, \"!\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your gang lost \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(res.respect), \" respect.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.member.name, \" gained the following stat multipliers for ascending:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(res.hack, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(res.str, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(res.def, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(res.dex, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(res.agi, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(res.cha, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)));\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function cancel() {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n const ascendBenefits = props.member.getAscensionResults();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"Are you sure you want to ascend this member? They will lose all of\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"their non-Augmentation upgrades and their stats will reset back to 1.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Furthermore, your gang will lose \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(props.member.earnedRespect), \" respect\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In return, they will gain the following permanent boost to stat multipliers:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(ascendBenefits.hack, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(ascendBenefits.str, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(ascendBenefits.def, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(ascendBenefits.dex, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(ascendBenefits.agi, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(ascendBenefits.cha, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: confirm\n }, \"Ascend\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: cancel\n }, \"Cancel\"));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/AscensionPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 876 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Gang/ui/TaskSelector.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: TaskSelector */
|
||
/*! exports used: TaskSelector */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StatsTable */ 186);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\n\n\n\n\nfunction TaskSelector(props) {\n const [currentTask, setCurrentTask] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.member.task);\n\n function onChange(event) {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = props.gang.getAllTaskNames();\n const data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: 5 * props.member.calculateMoneyGain(props.gang)\n })], [`Respect:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(5 * props.member.calculateRespectGain(props.gang))} / sec`], [`Wanted Level:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatWanted(5 * props.member.calculateWantedLevelGain(props.gang))} / sec`], [`Total Respect:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(props.member.earnedRespect)}`]];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n onChange: onChange,\n className: \"dropdown noselect\",\n value: currentTask\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: 0,\n value: \"---\"\n }, \"---\"), tasks.map((task, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: i + 1,\n value: task\n }, task))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_2__[/* StatsTable */ \"a\"])(data)));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/TaskSelector.tsx?");
|
||
|
||
/***/ }),
|
||
/* 877 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Gang/ui/TaskDescription.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: TaskDescription */
|
||
/*! exports used: TaskDescription */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskDescription; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../GangMemberTasks */ 177);\n/**\n * React Component for left side of the gang member accordion, contains the\n * description of the task that member is currently doing.\n */\n\n\nfunction TaskDescription(props) {\n const task = _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][props.member.task];\n const desc = task ? task.desc : _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"].desc;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"inline noselect\",\n dangerouslySetInnerHTML: {\n __html: desc\n }\n });\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/TaskDescription.tsx?");
|
||
|
||
/***/ }),
|
||
/* 878 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Gang/ui/RecruitButton.tsx ***!
|
||
\***************************************/
|
||
/*! exports provided: RecruitButton */
|
||
/*! exports used: RecruitButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RecruitButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RecruitPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RecruitPopup */ 879);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 231);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * React Component for the recruitment button and text on the gang main page.\n */\n\n\n\n\n\nfunction RecruitButton(props) {\n if (props.gang.members.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* GangConstants */ \"a\"].MaximumGangMembers) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n if (!props.gang.canRecruitMember()) {\n const respect = props.gang.getRespectNeededToRecruitMember();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button-inactive\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, \"Recruit Gang Member\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n margin: \"10px\",\n color: \"red\",\n display: \"inline-block\"\n }\n }, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(respect, 2), \" respect needed to recruit next member\"));\n }\n\n function onClick() {\n const popupId = \"recruit-gang-member-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* createPopup */ \"a\"])(popupId, _RecruitPopup__WEBPACK_IMPORTED_MODULE_1__[/* RecruitPopup */ \"a\"], {\n gang: props.gang,\n popupId: popupId,\n onRecruit: props.onRecruit\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: onClick,\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, \"Recruit Gang Member\"));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/RecruitButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 879 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Gang/ui/RecruitPopup.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: RecruitPopup */
|
||
/*! exports used: RecruitPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RecruitPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Component for the popup used to recruit new gang members.\n */\n\n\n\nfunction RecruitPopup(props) {\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function recruit() {\n if (name === \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"You must enter a name for your Gang member!\");\n return;\n }\n\n if (!props.gang.canRecruitMember()) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"You cannot recruit another Gang member!\");\n return;\n } // At this point, the only way this can fail is if you already\n // have a gang member with the same name\n\n\n if (!props.gang.recruitMember(name)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"You already have a gang member with this name!\");\n return;\n }\n\n props.onRecruit();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) recruit();\n }\n\n function onChange(event) {\n setName(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\"\n }, \"Enter a name for your new Gang member:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n onKeyUp: onKeyUp,\n onChange: onChange,\n className: \"text-input noselect\",\n type: \"text\",\n placeholder: \"unique name\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n onClick: recruit\n }, \"Recruit Gang Member\"));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/RecruitPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 880 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Gang/ui/TerritorySubpage.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: TerritorySubpage */
|
||
/*! exports used: TerritorySubpage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerritorySubpage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../AllGangs */ 59);\n/**\n * React Component for the territory subpage.\n */\n\n\n\n\n\nfunction TerritorySubpage(props) {\n function openWarfareHelp() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"This percentage represents the chance you have of \" + \"'clashing' with with another gang. If you do not \" + \"wish to gain/lose territory, then keep this \" + \"percentage at 0% by not engaging in territory warfare.\");\n }\n\n function formatTerritory(n) {\n const v = n * 100;\n\n if (v <= 0) {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(0, 2);\n } else if (v >= 100) {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(100, 2);\n } else {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(v, 2);\n }\n }\n\n const playerPower = _AllGangs__WEBPACK_IMPORTED_MODULE_4__[/* AllGangs */ \"a\"][props.gang.facName].power;\n\n function otherGangTerritory(name) {\n const power = _AllGangs__WEBPACK_IMPORTED_MODULE_4__[/* AllGangs */ \"a\"][name].power;\n const clashVictoryChance = playerPower / (power + playerPower);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: name\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Power: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(power, 6), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Territory: \", formatTerritory(_AllGangs__WEBPACK_IMPORTED_MODULE_4__[/* AllGangs */ \"a\"][name].territory), \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Chance to win clash with this gang: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(clashVictoryChance, 3), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n const gangNames = Object.keys(_AllGangs__WEBPACK_IMPORTED_MODULE_4__[/* AllGangs */ \"a\"]).filter(g => g != props.gang.facName);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"70%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\"\n }, \"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.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate 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. Your gang also loses a small amount of power whenever you lose a clash.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"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.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n checked: props.gang.territoryWarfareEngaged,\n id: \"warfare\",\n type: \"checkbox\",\n style: {\n display: \"inline-block\",\n margin: \"2px\"\n },\n onChange: event => props.gang.territoryWarfareEngaged = event.target.checked\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"warfare\",\n className: \"tooltip noselect\",\n style: {\n color: \"white\",\n display: \"inline-block\"\n }\n }, \"Engage in Territory Warfare\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n style: {\n display: \"inline-block\"\n }\n }, \"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Territory Clash Chance: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(props.gang.territoryClashChance, 3)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip noselect\",\n style: {\n display: \"inline-block\"\n },\n onClick: openWarfareHelp\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n checked: props.gang.notifyMemberDeath,\n id: \"notify\",\n type: \"checkbox\",\n style: {\n display: \"inline-block\",\n margin: \"2px\"\n },\n onChange: event => props.gang.notifyMemberDeath = event.target.checked\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: \"warfare\",\n className: \"tooltip noselect\",\n style: {\n color: \"white\",\n display: \"inline-block\"\n }\n }, \"Notify about Gang Member Deaths\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n style: {\n display: \"inline-block\"\n }\n }, \"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"fieldset\", {\n style: {\n display: \"block\",\n margin: \"6px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, props.gang.facName)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Power: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(_AllGangs__WEBPACK_IMPORTED_MODULE_4__[/* AllGangs */ \"a\"][props.gang.facName].power, 6), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Territory: \", formatTerritory(_AllGangs__WEBPACK_IMPORTED_MODULE_4__[/* AllGangs */ \"a\"][props.gang.facName].territory), \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), gangNames.map(name => otherGangTerritory(name)))));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/TerritorySubpage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 881 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Corporation/ui/CorporationRoot.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: CorporationRoot */
|
||
/*! exports used: CorporationRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HeaderTab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./HeaderTab */ 485);\n/* harmony import */ var _NewIndustryPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./NewIndustryPopup */ 882);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _MainPanel__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./MainPanel */ 883);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../IndustryData */ 40);\n// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\n\n\n\n\n\n\n\nfunction ExpandButton(props) {\n const allIndustries = Object.keys(_IndustryData__WEBPACK_IMPORTED_MODULE_5__[/* Industries */ \"a\"]).sort();\n const possibleIndustries = allIndustries.filter(industryType => props.corp.divisions.find(division => division.type === industryType) === undefined).sort();\n if (possibleIndustries.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n function openNewIndustryPopup() {\n const popupId = \"cmpy-mgmt-expand-industry-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(popupId, _NewIndustryPopup__WEBPACK_IMPORTED_MODULE_2__[/* NewIndustryPopup */ \"a\"], {\n corp: props.corp,\n setDivisionName: props.setDivisionName,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: false,\n onClick: openNewIndustryPopup,\n text: \"Expand into new Industry\"\n });\n}\n\nfunction CorporationRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [divisionName, setDivisionName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Overview\");\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: divisionName === \"Overview\",\n key: \"overview\",\n onClick: () => setDivisionName(\"Overview\"),\n text: props.corp.name\n }), props.corp.divisions.map(division => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HeaderTab__WEBPACK_IMPORTED_MODULE_1__[/* HeaderTab */ \"a\"], {\n current: division.name === divisionName,\n key: division.name,\n onClick: () => setDivisionName(division.name),\n text: division.name\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExpandButton, {\n corp: props.corp,\n setDivisionName: setDivisionName\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MainPanel__WEBPACK_IMPORTED_MODULE_4__[/* MainPanel */ \"a\"], {\n rerender: rerender,\n corp: props.corp,\n divisionName: divisionName,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CorporationRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 882 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Corporation/ui/NewIndustryPopup.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: NewIndustryPopup */
|
||
/*! exports used: NewIndustryPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NewIndustryPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 40);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n// Create a popup that lets the player create a new industry.\n// This is created when the player clicks the \"Expand into new Industry\" header tab\nfunction NewIndustryPopup(props) {\n const allIndustries = Object.keys(_IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"]).sort();\n const possibleIndustries = allIndustries.filter(industryType => props.corp.divisions.find(division => division.type === industryType) === undefined).sort();\n const [industry, setIndustry] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function newIndustry() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* NewIndustry */ \"l\"])(props.corp, industry, name);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n return;\n } // Set routing to the new division so that the UI automatically switches to it\n\n\n props.setDivisionName(name);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onNameChange(event) {\n setName(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) newIndustry();\n }\n\n function onIndustryChange(event) {\n setIndustry(event.target.value);\n }\n\n const desc = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryDescriptions */ \"b\"][industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Create a new division to expand into a new industry:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n defaultValue: industry,\n onChange: onIndustryChange\n }, possibleIndustries.map(industry => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: industry,\n value: industry\n }, industry))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc(props.corp)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Division name:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n value: name,\n onChange: onNameChange,\n onKeyDown: onKeyDown,\n type: \"text\",\n className: \"text-input\",\n style: {\n display: \"block\"\n },\n maxLength: 30,\n pattern: \"[a-zA-Z0-9-_]\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n onClick: newIndustry,\n className: \"popup-box-button\"\n }, \"Create Division\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/NewIndustryPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 883 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Corporation/ui/MainPanel.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: MainPanel */
|
||
/*! exports used: MainPanel */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MainPanel; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CityTabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CityTabs */ 884);\n/* harmony import */ var _Overview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Overview */ 911);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n// React Component for the element that contains the actual info/data\n// for the Corporation UI. This panel lies below the header tabs and will\n// be filled with whatever is needed based on the routing/navigation\n\n\n\n\nfunction MainPanel(props) {\n const division = props.divisionName !== \"Overview\" ? props.corp.divisions.find(division => division.name === props.divisionName) : undefined; // use undefined because find returns undefined\n\n if (division === undefined) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"cmpy-mgmt-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Overview__WEBPACK_IMPORTED_MODULE_2__[/* Overview */ \"a\"], props));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"cmpy-mgmt-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CityTabs__WEBPACK_IMPORTED_MODULE_1__[/* CityTabs */ \"a\"], {\n rerender: props.rerender,\n division: division,\n corp: props.corp,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12,\n player: props.player\n }));\n }\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/MainPanel.tsx?");
|
||
|
||
/***/ }),
|
||
/* 884 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Corporation/ui/CityTabs.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: CityTabs */
|
||
/*! exports used: CityTabs */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CityTabs; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CityTab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CityTab */ 551);\n/* harmony import */ var _ExpandNewCityPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ExpandNewCityPopup */ 885);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Industry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Industry */ 886);\n// React Components for the Corporation UI's City navigation tabs\n// These allow player to navigate between different cities for each industry\n\n\n\n\n\n\nfunction ExpandButton(props) {\n function openExpandNewCityModal() {\n const popupId = \"cmpy-mgmt-expand-city-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(popupId, _ExpandNewCityPopup__WEBPACK_IMPORTED_MODULE_2__[/* ExpandNewCityPopup */ \"a\"], {\n popupId: popupId,\n corp: props.corp,\n division: props.division,\n cityStateSetter: props.setCity\n });\n }\n\n const possibleCities = Object.keys(props.division.offices).filter(cityName => props.division.offices[cityName] === 0);\n if (possibleCities.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CityTab__WEBPACK_IMPORTED_MODULE_1__[/* CityTab */ \"a\"], {\n current: false,\n key: \"Expand into new City\",\n name: \"Expand into new City\",\n onClick: openExpandNewCityModal\n });\n}\n\nfunction CityTabs(props) {\n const [city, setCity] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.city);\n const office = props.division.offices[city];\n\n if (office === 0) {\n setCity(\"Sector-12\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, Object.values(props.division.offices).map(office => office !== 0 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CityTab__WEBPACK_IMPORTED_MODULE_1__[/* CityTab */ \"a\"], {\n current: city === office.loc,\n key: office.loc,\n name: office.loc,\n onClick: () => setCity(office.loc)\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ExpandButton, {\n corp: props.corp,\n division: props.division,\n setCity: setCity\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Industry__WEBPACK_IMPORTED_MODULE_4__[/* Industry */ \"a\"], {\n rerender: props.rerender,\n corp: props.corp,\n division: props.division,\n city: city,\n warehouse: props.division.warehouses[city],\n office: office,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CityTabs.tsx?");
|
||
|
||
/***/ }),
|
||
/* 885 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Corporation/ui/ExpandNewCityPopup.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: ExpandNewCityPopup */
|
||
/*! exports used: ExpandNewCityPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ExpandNewCityPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./MoneyCost */ 93);\n\n\n\n\n\n\nfunction ExpandNewCityPopup(props) {\n const dropdown = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n\n function expand() {\n if (dropdown.current === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* NewCity */ \"k\"])(props.corp, props.division, dropdown.current.value);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n return;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(`Opened a new office in ${dropdown.current.value}!`);\n props.cityStateSetter(dropdown.current.value);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to expand into a new city by opening an office? This would cost\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_5__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].OfficeInitialCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n ref: dropdown,\n className: \"dropdown\",\n style: {\n margin: \"5px\"\n }\n }, Object.keys(props.division.offices).filter(cityName => props.division.offices[cityName] === 0).map(cityName => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: expand,\n disabled: props.corp.funds.lt(0)\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ExpandNewCityPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 886 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Corporation/ui/Industry.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: Industry */
|
||
/*! exports used: Industry */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Industry; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _IndustryOffice__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./IndustryOffice */ 887);\n/* harmony import */ var _IndustryOverview__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./IndustryOverview */ 891);\n/* harmony import */ var _IndustryWarehouse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./IndustryWarehouse */ 895);\n// React Component for managing the Corporation's Industry UI\n// This Industry component does NOT include the city tabs at the top\n\n\n\n\nfunction Industry(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-industry-left-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryOverview__WEBPACK_IMPORTED_MODULE_2__[/* IndustryOverview */ \"a\"], {\n rerender: props.rerender,\n player: props.player,\n corp: props.corp,\n division: props.division,\n currentCity: props.city,\n office: props.office\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryOffice__WEBPACK_IMPORTED_MODULE_1__[/* IndustryOffice */ \"a\"], {\n rerender: props.rerender,\n player: props.player,\n corp: props.corp,\n division: props.division,\n office: props.office\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-industry-right-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryWarehouse__WEBPACK_IMPORTED_MODULE_3__[/* IndustryWarehouse */ \"a\"], {\n rerender: props.rerender,\n player: props.player,\n corp: props.corp,\n currentCity: props.city,\n division: props.division,\n warehouse: props.warehouse\n })));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/Industry.tsx?");
|
||
|
||
/***/ }),
|
||
/* 887 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Corporation/ui/IndustryOffice.tsx ***!
|
||
\***********************************************/
|
||
/*! exports provided: IndustryOffice */
|
||
/*! exports used: IndustryOffice */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryOffice; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../EmployeePositions */ 37);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/getSelectData */ 552);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _UpgradeOfficeSizePopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./UpgradeOfficeSizePopup */ 888);\n/* harmony import */ var _HireEmployeePopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HireEmployeePopup */ 889);\n/* harmony import */ var _ThrowPartyPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ThrowPartyPopup */ 890);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n// React Component for displaying an Industry's OfficeSpace information\n// (bottom-left panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\nfunction countEmployee(employees, job) {\n let n = 0;\n\n for (let i = 0; i < employees.length; ++i) {\n if (employees[i].pos === job) n++;\n }\n\n return n;\n}\n\nfunction SwitchButton(props) {\n if (props.manualMode) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button tooltip\",\n onClick: () => props.switchMode(old => !old)\n }, \"Switch to Auto Mode\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job\"));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button tooltip\",\n onClick: () => props.switchMode(old => !old)\n }, \"Switch to Manual Mode\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs\"));\n }\n}\n\nfunction ManualManagement(props) {\n const [employee, setEmployee] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.office.employees.length > 0 ? props.office.employees[0] : null);\n const employeeInfoDivStyle = {\n color: \"white\",\n margin: \"4px\",\n padding: \"4px\"\n }; // Employee Selector\n\n const employees = [];\n\n for (let i = 0; i < props.office.employees.length; ++i) {\n employees.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: props.office.employees[i].name\n }, props.office.employees[i].name));\n }\n\n function employeeSelectorOnChange(e) {\n const name = Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_3__[/* getSelectText */ \"a\"])(e.target);\n\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (name === props.office.employees[i].name) {\n setEmployee(props.office.employees[i]);\n break;\n }\n }\n\n props.rerender();\n } // Employee Positions Selector\n\n\n const emp = employee;\n let employeePositionSelectorInitialValue = \"\";\n const employeePositions = [];\n const positionNames = Object.values(_EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"]);\n\n for (let i = 0; i < positionNames.length; ++i) {\n employeePositions.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: positionNames[i],\n value: positionNames[i]\n }, positionNames[i]));\n\n if (emp != null && emp.pos === positionNames[i]) {\n employeePositionSelectorInitialValue = positionNames[i];\n }\n }\n\n function employeePositionSelectorOnChange(e) {\n if (employee === null) return;\n const pos = Object(_utils_uiHelpers_getSelectData__WEBPACK_IMPORTED_MODULE_3__[/* getSelectText */ \"a\"])(e.target);\n employee.pos = pos;\n props.rerender();\n } // Numeraljs formatter\n\n\n const nf = \"0.000\"; // Employee stats (after applying multipliers)\n\n const effCre = emp ? emp.cre * props.corp.getEmployeeCreMultiplier() * props.division.getEmployeeCreMultiplier() : 0;\n const effCha = emp ? emp.cha * props.corp.getEmployeeChaMultiplier() * props.division.getEmployeeChaMultiplier() : 0;\n const effInt = emp ? emp.int * props.corp.getEmployeeIntMultiplier() * props.division.getEmployeeIntMultiplier() : 0;\n const effEff = emp ? emp.eff * props.corp.getEmployeeEffMultiplier() * props.division.getEmployeeEffMultiplier() : 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: employeeInfoDivStyle\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: employeeSelectorOnChange\n }, employees), employee != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Morale: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(employee.mor, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Happiness: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(employee.hap, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Energy: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(employee.ene, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Intelligence: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(effInt, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(effCha, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Experience: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(employee.exp, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Creativity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(effCre, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Efficiency: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(effEff, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Salary: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__[/* Money */ \"a\"], {\n money: employee.sal\n })), employee != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: employeePositionSelectorOnChange,\n value: employeePositionSelectorInitialValue\n }, employeePositions));\n}\n\nfunction AutoAssignJob(props) {\n const numJob = countEmployee(props.office.employees, props.job);\n const numUnassigned = countEmployee(props.office.employees, _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].Unassigned);\n\n function assignEmployee() {\n if (numUnassigned <= 0) {\n console.warn(\"Cannot assign employee. No unassigned employees available\");\n return;\n }\n\n props.office.assignEmployeeToJob(props.job);\n props.office.calculateEmployeeProductivity(props.corp, props.division);\n props.rerender();\n }\n\n function unassignEmployee() {\n props.office.unassignEmployeeFromJob(props.job);\n props.office.calculateEmployeeProductivity(props.corp, props.division);\n props.rerender();\n }\n\n const positionHeaderStyle = {\n fontSize: \"15px\",\n margin: \"5px 0px 5px 0px\",\n width: \"50%\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n className: \"tooltip\",\n style: positionHeaderStyle\n }, props.job, \" (\", numJob, \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.desc)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: numUnassigned > 0 ? \"std-button\" : \"a-link-button-inactive\",\n onClick: assignEmployee\n }, \"+\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: numJob > 0 ? \"std-button\" : \"a-link-button-inactive\",\n onClick: unassignEmployee\n }, \"-\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction AutoManagement(props) {\n const numUnassigned = countEmployee(props.office.employees, _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].Unassigned);\n const vechain = props.corp.unlockUpgrades[4] === 1; // Has Vechain upgrade\n // Calculate average morale, happiness, and energy. Also salary\n // TODO is this efficient?\n\n let totalMorale = 0,\n totalHappiness = 0,\n totalEnergy = 0,\n totalSalary = 0;\n\n for (let i = 0; i < props.office.employees.length; ++i) {\n totalMorale += props.office.employees[i].mor;\n totalHappiness += props.office.employees[i].hap;\n totalEnergy += props.office.employees[i].ene;\n totalSalary += props.office.employees[i].sal;\n }\n\n let avgMorale = 0,\n avgHappiness = 0,\n avgEnergy = 0;\n\n if (props.office.employees.length > 0) {\n avgMorale = totalMorale / props.office.employees.length;\n avgHappiness = totalHappiness / props.office.employees.length;\n avgEnergy = totalEnergy / props.office.employees.length;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Unassigned Employees: \", numUnassigned)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Avg Employee Morale:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(avgMorale, \"0.000\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Avg Employee Happiness:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(avgHappiness, \"0.000\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Avg Employee Energy:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(avgEnergy, \"0.000\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Total Employee Salary:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__[/* Money */ \"a\"], {\n money: totalSalary\n })))), vechain && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Material Production:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(props.division.getOfficeProductivity(props.office), \"0.000\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Product Production:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(props.division.getOfficeProductivity(props.office, {\n forProduct: true\n }), \"0.000\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Business Multiplier:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The effect this office's 'Business' employees has on boosting sales\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(props.division.getBusinessFactor(props.office), \"0.000\"))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(AutoAssignJob, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n division: props.division,\n player: props.player,\n job: _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].Operations,\n desc: \"Manages supply chain operations. Improves the amount of Materials and Products you produce.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(AutoAssignJob, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n division: props.division,\n player: props.player,\n job: _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].Engineer,\n desc: \"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(AutoAssignJob, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n division: props.division,\n player: props.player,\n job: _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].Business,\n desc: \"Handles sales and finances. Improves the amount of Materials and Products you can sell.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(AutoAssignJob, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n division: props.division,\n player: props.player,\n job: _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].Management,\n desc: \"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(AutoAssignJob, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n division: props.division,\n player: props.player,\n job: _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].RandD,\n desc: \"Research new innovative ways to improve the company. Generates Scientific Research.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(AutoAssignJob, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n division: props.division,\n player: props.player,\n job: _EmployeePositions__WEBPACK_IMPORTED_MODULE_1__[/* EmployeePositions */ \"a\"].Training,\n desc: \"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations.\"\n }));\n}\n\nfunction IndustryOffice(props) {\n const [employeeManualAssignMode, setEmployeeManualAssignMode] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const buttonStyle = {\n fontSize: \"13px\"\n }; // Hire Employee button\n\n let hireEmployeeButtonClass = \"tooltip\";\n\n if (props.office.atCapacity()) {\n hireEmployeeButtonClass += \" a-link-button-inactive\";\n } else {\n hireEmployeeButtonClass += \" std-button\";\n\n if (props.office.employees.length === 0) {\n hireEmployeeButtonClass += \" flashing-button\";\n }\n }\n\n function openHireEmployeePopup() {\n const popupId = \"cmpy-mgmt-hire-employee-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* createPopup */ \"a\"])(popupId, _HireEmployeePopup__WEBPACK_IMPORTED_MODULE_6__[/* HireEmployeePopup */ \"a\"], {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n popupId: popupId,\n player: props.player\n });\n } // Autohire employee button\n\n\n let autohireEmployeeButtonClass = \"tooltip\";\n\n if (props.office.atCapacity()) {\n autohireEmployeeButtonClass += \" a-link-button-inactive\";\n } else {\n autohireEmployeeButtonClass += \" std-button\";\n }\n\n function autohireEmployeeButtonOnClick() {\n if (props.office.atCapacity()) return;\n props.office.hireRandomEmployee();\n props.rerender();\n }\n\n function openUpgradeOfficeSizePopup() {\n const popupId = \"cmpy-mgmt-upgrade-office-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* createPopup */ \"a\"])(popupId, _UpgradeOfficeSizePopup__WEBPACK_IMPORTED_MODULE_5__[/* UpgradeOfficeSizePopup */ \"a\"], {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n popupId: popupId,\n player: props.player\n });\n }\n\n function openThrowPartyPopup() {\n const popupId = \"cmpy-mgmt-throw-office-party-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* createPopup */ \"a\"])(popupId, _ThrowPartyPopup__WEBPACK_IMPORTED_MODULE_7__[/* ThrowPartyPopup */ \"a\"], {\n office: props.office,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-employee-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n margin: \"4px 0px 5px 0px\"\n }\n }, \"Office Space\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Size: \", props.office.employees.length, \" / \", props.office.size, \" employees\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: hireEmployeeButtonClass,\n onClick: openHireEmployeePopup,\n style: buttonStyle\n }, \"Hire Employee\", props.office.employees.length === 0 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: autohireEmployeeButtonClass,\n onClick: autohireEmployeeButtonOnClick,\n style: buttonStyle\n }, \"Autohire Employee\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically hires an employee and gives him/her a random name\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button tooltip\",\n onClick: openUpgradeOfficeSizePopup,\n style: buttonStyle,\n disabled: props.corp.funds.lt(0)\n }, \"Upgrade size\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Upgrade the office's size so that it can hold more employees!\")), !props.division.hasResearch(\"AutoPartyManager\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button tooltip\",\n onClick: openThrowPartyPopup,\n style: buttonStyle,\n disabled: props.corp.funds.lt(0)\n }, \"Throw Party\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"\\\"Throw an office party to increase your employee's morale and happiness\\\"\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(SwitchButton, {\n manualMode: employeeManualAssignMode,\n switchMode: setEmployeeManualAssignMode\n })), employeeManualAssignMode ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ManualManagement, {\n rerender: props.rerender,\n corp: props.corp,\n division: props.division,\n office: props.office,\n player: props.player\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(AutoManagement, {\n rerender: props.rerender,\n corp: props.corp,\n division: props.division,\n office: props.office,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryOffice.tsx?");
|
||
|
||
/***/ }),
|
||
/* 888 */
|
||
/*!*******************************************************!*\
|
||
!*** ./src/Corporation/ui/UpgradeOfficeSizePopup.tsx ***!
|
||
\*******************************************************/
|
||
/*! exports provided: UpgradeOfficeSizePopup */
|
||
/*! exports used: UpgradeOfficeSizePopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UpgradeOfficeSizePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\nfunction UpgradeOfficeSizePopup(props) {\n const initialPriceMult = Math.round(props.office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult); // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const upgradeCost15 = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult; //Calculate max upgrade size and cost\n\n const maxMult = props.corp.funds.dividedBy(_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost).toNumber();\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n\n ++maxNum;\n }\n\n const upgradeCostMax = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n\n function upgradeSize(cost, size) {\n if (props.corp.funds.lt(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough company funds to purchase this upgrade!\");\n } else {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_5__[/* UpgradeOfficeSize */ \"y\"])(props.corp, props.office, size);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Office space increased! It can now hold \" + props.office.size + \" employees\");\n props.rerender();\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function UpgradeSizeButton(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"tooltip \" + (props.corp.funds.lt(props.cost) ? \"a-link-button-inactive\" : \"a-link-button\"),\n style: {\n display: \"inline-block\",\n margin: \"4px\"\n },\n onClick: () => upgradeSize(props.cost, props.size)\n }, \"by \", props.size, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(props.cost)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Increase the size of your office space to fit additional employees!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Upgrade size: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCost,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCost15,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize * 5\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(UpgradeSizeButton, {\n corp: props.corp,\n cost: upgradeCostMax,\n size: maxNum * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/UpgradeOfficeSizePopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 889 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Corporation/ui/HireEmployeePopup.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: HireEmployeePopup */
|
||
/*! exports used: HireEmployeePopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HireEmployeePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Employee__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Employee */ 355);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\n\n\n\n\nfunction NameEmployeePopup(props) {\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function nameEmployee() {\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (props.office.employees[i].name === name) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You already have an employee with this nickname!\");\n return;\n }\n }\n\n props.employee.name = name;\n props.office.employees.push(props.employee);\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) nameEmployee();\n }\n\n function onChange(event) {\n setName(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Give your employee a nickname!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n value: name,\n className: \"text-input\",\n type: \"text\",\n placeholder: \"Employee nickname\",\n onKeyDown: onKeyDown,\n onChange: onChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: nameEmployee\n }, \"Hire!\"));\n}\n\nfunction HireEmployeeButton(props) {\n function hire() {\n const popupId = \"cmpy-mgmt-name-employee-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(popupId, NameEmployeePopup, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n popupId: popupId,\n player: props.player,\n employee: props.employee\n });\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n onClick: hire,\n className: \"cmpy-mgmt-find-employee-option\"\n }, \"Intelligence: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.int, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.cha, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Experience: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.exp, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Creativity: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.cre, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Efficiency: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.eff, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Salary: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(props.employee.sal), \" \\\\ s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Create a popup that lets the player manage exports\nfunction HireEmployeePopup(props) {\n if (props.office.atCapacity()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); //Generate three random employees (meh, decent, amazing)\n\n const mult1 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(25, 50) / 100;\n const mult2 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(51, 75) / 100;\n const mult3 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(76, 100) / 100;\n const int = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const cha = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const exp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const cre = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const eff = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const sal = _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CorporationConstants */ \"a\"].EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n const emp1 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult1,\n charisma: cha * mult1,\n experience: exp * mult1,\n creativity: cre * mult1,\n efficiency: eff * mult1,\n salary: sal * mult1\n });\n const emp2 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult2,\n charisma: cha * mult2,\n experience: exp * mult2,\n creativity: cre * mult2,\n efficiency: eff * mult2,\n salary: sal * mult2\n });\n const emp3 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult3,\n charisma: cha * mult3,\n experience: exp * mult3,\n creativity: cre * mult3,\n efficiency: eff * mult3,\n salary: sal * mult3\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Select one of the following candidates for hire:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp1,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp2,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp3,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/HireEmployeePopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 890 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Corporation/ui/ThrowPartyPopup.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: ThrowPartyPopup */
|
||
/*! exports used: ThrowPartyPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ThrowPartyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\nfunction ThrowPartyPopup(props) {\n const [cost, setCost] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function changeCost(event) {\n setCost(parseFloat(event.target.value));\n }\n\n function throwParty() {\n if (cost === null || isNaN(cost) || cost < 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid value entered\");\n } else {\n const totalCost = cost * props.office.employees.length;\n\n if (props.corp.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* ThrowParty */ \"w\"])(props.corp, props.office, cost);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You threw a party for the office! The morale and happiness \" + \"of each employee increased by \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(mult - 1));\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n }\n }\n\n function EffectText(props) {\n let cost = props.cost;\n if (cost !== null && (isNaN(cost) || cost < 0)) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid value entered!\");\n if (cost === null) cost = 0;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Throwing this party will cost a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(cost * props.office.employees.length));\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) throwParty();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of money you would like to spend PER EMPLOYEE on this office party\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(EffectText, {\n cost: cost,\n office: props.office\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n type: \"number\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"$ / employee\",\n onChange: changeCost,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: throwParty\n }, \"Throw Party\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ThrowPartyPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 891 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Corporation/ui/IndustryOverview.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: IndustryOverview */
|
||
/*! exports used: IndustryOverview */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../IndustryData */ 40);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../IndustryUpgrades */ 291);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MakeProductPopup */ 892);\n/* harmony import */ var _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ResearchPopup */ 893);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\nfunction IndustryOverview(props) {\n function renderMakeProductButton() {\n let createProductButtonText = \"\";\n let createProductPopupText = \"\";\n\n switch (props.division.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Food:\n createProductButtonText = \"Build Restaurant\";\n createProductPopupText = \"Build and manage a new restaurant!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Tobacco:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new tobacco product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n createProductPopupText = \"Design and develop a new pharmaceutical drug!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Design and manufacture a new computer hardware product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Robotics:\n createProductButtonText = \"Design Robot\";\n createProductPopupText = \"Design and create a new robot or robotic system!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Software:\n createProductButtonText = \"Develop Software\";\n createProductPopupText = \"Develop a new piece of software!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Healthcare:\n createProductButtonText = \"Build Hospital\";\n createProductPopupText = \"Build and manage a new hospital!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].RealEstate:\n createProductButtonText = \"Develop Property\";\n createProductPopupText = \"Develop a new piece of real estate property!\";\n break;\n\n default:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new product!\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n createProductPopupText += \"<br><br>To begin developing a product, \" + \"first choose the city in which it will be designed. The stats of your employees \" + \"in the selected city affect the properties of the finished product, such as its \" + \"quality, performance, and durability.<br><br>\" + \"You can also choose to invest money in the design and marketing of \" + \"the product. Investing money in its design will result in a superior product. \" + \"Investing money in marketing the product will help the product's sales.\";\n const hasMaxProducts = props.division.hasMaximumNumberProducts();\n const className = hasMaxProducts ? \"a-link-button-inactive tooltip\" : \"std-button\";\n const buttonStyle = {\n margin: \"6px\",\n display: \"inline-block\"\n };\n\n function openMakeProductPopup() {\n const popupId = \"cmpy-mgmt-create-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* MakeProductPopup */ \"a\"], {\n popupText: createProductPopupText,\n division: props.division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return Object.keys(props.division.products).length === 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className + (shouldFlash() ? \" flashing-button\" : \"\"),\n onClick: openMakeProductPopup,\n style: buttonStyle,\n disabled: props.corp.funds.lt(0)\n }, createProductButtonText, hasMaxProducts && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You have reached the maximum number of products: \", props.division.getMaximumNumberProducts()));\n }\n\n function renderText() {\n const vechain = props.corp.unlockUpgrades[4] === 1;\n const profit = props.division.lastCycleRevenue.minus(props.division.lastCycleExpenses).toNumber();\n let advertisingInfo = false;\n const advertisingFactors = props.division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n\n if (vechain) {\n advertisingInfo = true;\n }\n\n function productionMultHelpTipOnClick() {\n // Wrapper for createProgressBarText()\n // Converts the industry's \"effectiveness factors\"\n // into a graphic (string) depicting how high that effectiveness is\n function convertEffectFacToGraphic(fac) {\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__[/* createProgressBarText */ \"a\"])({\n progress: fac,\n totalTicks: 20\n });\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"Owning Hardware, Robots, AI Cores, and Real Estate \" + \"can boost your Industry's production. The effect these \" + \"materials have on your production varies between Industries. \" + \"For example, Real Estate may be very effective for some Industries, \" + \"but ineffective for others.<br><br>\" + \"This division's production multiplier is calculated by summing \" + \"the individual production multiplier of each of its office locations. \" + \"This production multiplier is applied to each office. Therefore, it is \" + \"beneficial to expand into new cities as this can greatly increase the \" + \"production multiplier of your entire Division.<br><br>\" + \"Below are approximations for how effective each material is at boosting \" + \"this industry's production multiplier (Bigger bars = more effective):<br><br>\" + `Hardware: ${convertEffectFacToGraphic(props.division.hwFac)}<br>` + `Robots: ${convertEffectFacToGraphic(props.division.robFac)}<br>` + `AI Cores: ${convertEffectFacToGraphic(props.division.aiFac)}<br>` + `Real Estate: ${convertEffectFacToGraphic(props.division.reFac)}`);\n }\n\n function openResearchPopup() {\n const popupId = \"corporation-research-popup-box\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__[/* ResearchPopup */ \"a\"], {\n industry: props.division,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Industry: \", props.division.type, \" (Corp Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.corp.funds.toNumber()\n }), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.awareness, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.popularity, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), advertisingInfo !== false && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Advertising Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(totalAdvertisingFac, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext cmpy-mgmt-advertising-info\"\n }, \"Total multiplier for this industrys sales due to its awareness and popularity\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(awarenessFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(popularityFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Ratio Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(ratioFac, 0.85), \"0.000\"))), advertisingInfo, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Revenue: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleRevenue.toNumber()\n }), \" / s\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Expenses: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleExpenses.toNumber()\n }), \" / s\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Profit: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Production Multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.prodMult, \"0.00\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: productionMultHelpTipOnClick\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Scientific Research: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.sciResearch.qty, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Scientific Research increases the quality of the materials and products that you produce.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"help-tip\",\n onClick: openResearchPopup\n }, \"Research\"));\n }\n\n function renderUpgrades() {\n const upgrades = [];\n\n for (const index in _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"]) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"][index]; // AutoBrew research disables the Coffee upgrade\n\n if (props.division.hasResearch(\"AutoBrew\") && upgrade[4] === \"Coffee\") {\n continue;\n }\n\n const i = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n let cost = 0;\n\n switch (i) {\n case 0:\n //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n\n default:\n cost = baseCost * Math.pow(priceMult, props.division.upgrades[i]);\n break;\n }\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n props.corp.funds = props.corp.funds.minus(cost);\n props.division.upgrade(upgrade, {\n corporation: props.corp,\n office: props.office\n });\n props.rerender();\n }\n\n upgrades.push(renderUpgrade({\n key: index,\n onClick: onClick,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, upgrade[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_10__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n })),\n tooltip: upgrade[5]\n }));\n }\n\n return upgrades;\n }\n\n function renderUpgrade(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n onClick: props.onClick,\n key: props.key\n }, props.text, props.tooltip != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip));\n }\n\n const makeProductButton = renderMakeProductButton();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-industry-overview-panel\"\n }, renderText(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", {\n className: \"industry-purchases-and-upgrades-header\"\n }, \"Purchases & Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), renderUpgrades(), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.division.makesProducts && makeProductButton);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryOverview.tsx?");
|
||
|
||
/***/ }),
|
||
/* 892 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Corporation/ui/MakeProductPopup.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: MakeProductPopup */
|
||
/*! exports used: MakeProductPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MakeProductPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 40);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\nfunction productPlaceholder(tpe) {\n if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food) {\n return \"Restaurant Name\";\n } else if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate) {\n return \"Property Name\";\n }\n\n return \"Product Name\";\n} // Create a popup that lets the player create a product for their current industry\n\n\nfunction MakeProductPopup(props) {\n const allCities = Object.keys(props.division.offices).filter(cityName => props.division.offices[cityName] !== 0);\n const [city, setCity] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [design, setDesign] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const [marketing, setMarketing] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n if (props.division.hasMaximumNumberProducts()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n function makeProduct() {\n if (design === null || marketing === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* MakeProduct */ \"j\"])(props.corp, props.division, city, name, design, marketing);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onCityChange(event) {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event) {\n setName(event.target.value);\n }\n\n function onDesignChange(event) {\n if (event.target.value === \"\") setDesign(null);else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event) {\n if (event.target.value === \"\") setMarketing(null);else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) makeProduct();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n dangerouslySetInnerHTML: {\n __html: props.popupText\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n style: {\n margin: \"5px\"\n },\n onChange: onCityChange,\n defaultValue: city\n }, allCities.map(cityName => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onProductNameChange,\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: productPlaceholder(props.division.type)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onDesignChange,\n autoFocus: true,\n type: \"number\",\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Design investment\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onMarketingChange,\n onKeyDown: onKeyDown,\n type: \"number\",\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Marketing investment\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: makeProduct\n }, \"Develop Product\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/MakeProductPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 893 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Corporation/ui/ResearchPopup.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: ResearchPopup */
|
||
/*! exports used: ResearchPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResearchPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../IndustryData */ 40);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var treant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! treant-js */ 894);\n/* harmony import */ var treant_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(treant_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\n\n// Create the Research Tree UI for this Industry\nfunction ResearchPopup(props) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][props.industry.type];\n if (researchTree === undefined) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n {\n const boxContent = document.getElementById(`${props.popupId}-content`);\n\n if (boxContent != null) {\n boxContent.style.minHeight = \"80vh\";\n }\n } // Get the tree's markup (i.e. config) for Treant\n\n const markup = researchTree.createTreantMarkup();\n markup.chart.container = \"#\" + props.popupId + \"-content\";\n markup.chart.nodeAlign = \"BOTTOM\";\n markup.chart.rootOrientation = \"WEST\";\n markup.chart.siblingSeparation = 40;\n markup.chart.connectors = {\n type: \"step\",\n style: {\n \"arrow-end\": \"block-wide-long\",\n stroke: \"white\",\n \"stroke-width\": 2\n }\n };\n Object(treant_js__WEBPACK_IMPORTED_MODULE_5__[\"Treant\"])(markup); // Add Event Listeners for all Nodes\n\n const allResearch = researchTree.getAllNodes();\n\n for (let i = 0; i < allResearch.length; ++i) {\n // If this is already Researched, skip it\n if (props.industry.researched[allResearch[i]] === true) {\n continue;\n } // Get the DOM Element to add a click listener to it\n\n\n const sanitizedName = allResearch[i].replace(/\\s/g, \"\");\n const div = document.getElementById(sanitizedName + \"-corp-research-click-listener\");\n\n if (div == null) {\n console.warn(`Could not find Research Tree div for ${sanitizedName}`);\n continue;\n }\n\n div.addEventListener(\"click\", () => {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_6__[/* Research */ \"n\"])(props.industry, allResearch[i]);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`Researched ${allResearch[i]}. It may take a market cycle ` + `(~${_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle} seconds) before the effects of ` + `the Research apply.`);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n });\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: props.popupId\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: props.popupId + \"outer-box\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Multipliers from research:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Advertising Multiplier: x\", researchTree.getAdvertisingMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Charisma Multiplier: x\", researchTree.getEmployeeChaMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Creativity Multiplier: x\", researchTree.getEmployeeCreMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Efficiency Multiplier: x\", researchTree.getEmployeeEffMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Employee Intelligence Multiplier: x\", researchTree.getEmployeeIntMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Production Multiplier: x\", researchTree.getProductionMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Sales Multiplier: x\", researchTree.getSalesMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Scientific Research Multiplier: x\", researchTree.getScientificResearchMultiplier(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Storage Multiplier: x\", researchTree.getStorageMultiplier()));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ResearchPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 894 */,
|
||
/* 895 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Corporation/ui/IndustryWarehouse.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: IndustryWarehouse */
|
||
/*! exports used: IndustryWarehouse */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryWarehouse; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OfficeSpace */ 290);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Material */ 131);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Product */ 314);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Warehouse */ 175);\n/* harmony import */ var _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DiscontinueProductPopup */ 896);\n/* harmony import */ var _ExportPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ExportPopup */ 897);\n/* harmony import */ var _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./LimitProductProductionPopup */ 898);\n/* harmony import */ var _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./MaterialMarketTaPopup */ 899);\n/* harmony import */ var _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SellMaterialPopup */ 900);\n/* harmony import */ var _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SellProductPopup */ 901);\n/* harmony import */ var _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./PurchaseMaterialPopup */ 902);\n/* harmony import */ var _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ProductMarketTaPopup */ 903);\n/* harmony import */ var _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SmartSupplyPopup */ 904);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../utils/helpers/isString */ 82);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MoneyCost */ 93);\n/* harmony import */ var _Helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Helpers */ 905);\n/* harmony import */ var _IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./IndustryProductEquation */ 906);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Actions */ 53);\n// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Creates the UI for a single Product type\nfunction ProductComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const city = props.city;\n const product = props.product; // Numeraljs formatters\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\"); // Total product gain = production - sale\n\n const totalGain = product.data[city][1] - product.data[city][2]; // Sell button\n\n let sellButtonText;\n\n if (product.sllman[city][0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sllman[city][1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", product.sllman[city][1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.sllman[city][1], nfB), \")\");\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n if (product.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.marketTa2Price[city]\n }));\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.pCost + markupLimit\n }));\n } else if (product.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sCost)) {\n const sCost = product.sCost.replace(/MP/g, product.pCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.sCost\n }));\n }\n }\n\n function openSellProductPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__[/* SellProductPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n } // Limit Production button\n\n\n let limitProductionButtonText = \"Limit Production\";\n\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prdman[city][1], nf) + \")\";\n }\n\n function openLimitProductProdutionPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__[/* LimitProductProductionPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n }\n\n function openDiscontinueProductPopup() {\n const popupId = \"cmpy-mgmt-discontinue-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* DiscontinueProductPopup */ \"a\"], {\n rerender: props.rerender,\n product: product,\n industry: division,\n corp: props.corp,\n popupId: popupId,\n player: props.player\n });\n }\n\n function openProductMarketTaPopup() {\n const popupId = \"cmpy-mgmt-marketta-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__[/* ProductMarketTaPopup */ \"a\"], {\n product: product,\n industry: division,\n popupId: popupId\n });\n } // Unfinished Product\n\n\n if (!product.fin) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Designing \", product.name, \" (req. Operations/Engineers in \", product.createCity, \")...\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prog, \"0.00\"), \"% complete\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasUpgradeDashboard && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, product.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][0], nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][1], nfB), \"/s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \" /s\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Rating: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rat, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.qlt, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Performance: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.per, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Durability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dur, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Reliability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rel, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Aesthetics: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.aes, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Features: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.fea, nf), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Production Cost:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost / _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of the material cost it takes to create this Product.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Market Price: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n}\n\n// Creates the UI for a single Material type\nfunction MaterialComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n\n if (!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__[/* OfficeSpace */ \"a\"])) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n } // Numeraljs formatter\n\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n // Total gain or loss of this material (per second)\n\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp; // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n\n const tutorial = division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0; // Purchase material button\n\n const purchaseButtonText = `Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB)})`;\n const purchaseButtonClass = tutorial ? \"std-button flashing-button tooltip\" : \"std-button\";\n\n function openPurchaseMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-purchase-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__[/* PurchaseMaterialPopup */ \"a\"], {\n mat: mat,\n industry: division,\n warehouse: warehouse,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openExportPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ExportPopup__WEBPACK_IMPORTED_MODULE_7__[/* ExportPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n } // Sell material button\n\n\n let sellButtonText;\n\n if (mat.sllman[0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sllman[1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", mat.sllman[1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sllman[1], nfB), \")\");\n }\n\n if (mat.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.marketTa2Price\n }));\n } else if (mat.marketTa1) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.bCost + markupLimit\n }));\n } else if (mat.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sCost)) {\n const sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.sCost\n }));\n }\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n function openSellMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-sell-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__[/* SellMaterialPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openMaterialMarketTaPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__[/* MaterialMarketTaPopup */ \"a\"], {\n mat: mat,\n industry: division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return props.division.prodMats.includes(props.mat.name) && !mat.sllman[0];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-material-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, mat.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qty, nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Buy: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.prd, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Export: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.totalExp, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Import: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.imp, nfB), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"MP: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(mat.bCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Market Price: The price you would pay if you were to buy this material on the market\")), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qlt, \"0.00a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The quality of your material. Higher quality will lead to more sales\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: purchaseButtonClass,\n onClick: openPurchaseMaterialPopup,\n disabled: props.warehouse.smartSupplyEnabled && Object.keys(props.division.reqMats).includes(props.mat.name)\n }, purchaseButtonText, tutorial && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Purchase your required materials to get production started!\")), corp.unlockUpgrades[0] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openExportPopup\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${shouldFlash() ? \" flashing-button\" : \"\"}`,\n onClick: openSellMaterialPopup\n }, sellButtonText), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMaterialMarketTaPopup\n }, \"Market-TA\")));\n}\n\nfunction IndustryWarehouse(props) {\n function renderWarehouseUI() {\n if (props.warehouse === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); // General Storage information at the top\n\n const sizeUsageStyle = {\n color: props.warehouse.sizeUsed >= props.warehouse.size ? \"red\" : \"white\",\n margin: \"5px\"\n }; // Upgrade Warehouse size button\n\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = props.corp.funds.gt(sizeUpgradeCost);\n const upgradeWarehouseClass = canAffordUpgrade ? \"std-button\" : \"a-link-button-inactive\";\n\n function upgradeWarehouseOnClick() {\n if (props.division === null) return;\n if (props.warehouse === 0) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(props.corp, props.division);\n props.corp.funds = props.corp.funds.minus(sizeUpgradeCost);\n props.rerender();\n }\n\n function openSmartSupplyPopup() {\n if (props.warehouse === 0) return;\n const popupId = \"cmpy-mgmt-smart-supply-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__[/* SmartSupplyPopup */ \"a\"], {\n division: props.division,\n warehouse: props.warehouse,\n corp: props.corp,\n player: props.player,\n popupId: popupId\n });\n }\n\n const ratioLines = [];\n\n for (const matName in props.division.reqMats) {\n if (props.division.reqMats.hasOwnProperty(matName)) {\n const text = [\" *\", props.division.reqMats[matName], matName].join(\" \");\n ratioLines.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, text)));\n }\n } // Current State:\n\n\n let stateText;\n\n switch (props.division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n\n default:\n console.error(`Invalid state: ${props.division.state}`);\n break;\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_3__[/* Material */ \"a\"]) {\n // Only create UI for materials that are relevant for the industry\n if (Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__[/* isRelevantMaterial */ \"a\"])(matName, props.division)) {\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent, {\n rerender: props.rerender,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: matName,\n mat: props.warehouse.materials[matName],\n warehouse: props.warehouse\n }));\n }\n }\n } // Create React components for products\n\n\n const products = [];\n\n if (props.division.makesProducts && Object.keys(props.division.products).length > 0) {\n for (const productName in props.division.products) {\n const product = props.division.products[productName];\n\n if (product instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n products.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent, {\n rerender: props.rerender,\n player: props.player,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: productName,\n product: product\n }));\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: sizeUsageStyle\n }, \"Storage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.sizeUsed), \" /\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.size), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: props.warehouse.breakdown\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeWarehouseClass,\n onClick: upgradeWarehouseOnClick\n }, \"Upgrade Warehouse Size - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: sizeUpgradeCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This industry uses the following equation for it's production: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__[/* IndustryProductEquation */ \"a\"], {\n division: props.division\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"To get started with production, purchase your required materials or import them from another of your company's divisions.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, stateText), props.corp.unlockUpgrades[1] && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSmartSupplyPopup\n }, \"Configure Smart Supply\")), mats, products);\n }\n\n function purchaseWarehouse(division, city) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_22__[/* PurchaseWarehouse */ \"m\"])(props.corp, division, city);\n props.rerender();\n }\n\n if (props.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) {\n return renderWarehouseUI();\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => purchaseWarehouse(props.division, props.currentCity),\n disabled: props.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)\n }, \"Purchase Warehouse (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost,\n corp: props.corp\n }), \")\"));\n }\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryWarehouse.tsx?");
|
||
|
||
/***/ }),
|
||
/* 896 */
|
||
/*!********************************************************!*\
|
||
!*** ./src/Corporation/ui/DiscontinueProductPopup.tsx ***!
|
||
\********************************************************/
|
||
/*! exports provided: DiscontinueProductPopup */
|
||
/*! exports used: DiscontinueProductPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DiscontinueProductPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n// Create a popup that lets the player discontinue a product\nfunction DiscontinueProductPopup(props) {\n function discontinue() {\n props.industry.discontinueProduct(props.product);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"popup-box-button\",\n onClick: discontinue\n }, \"Discontinue\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/DiscontinueProductPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 897 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Corporation/ui/ExportPopup.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: ExportPopup */
|
||
/*! exports used: ExportPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ExportPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n// Create a popup that lets the player manage exports\nfunction ExportPopup(props) {\n if (props.corp.divisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n if (Object.keys(props.corp.divisions[0].warehouses).length === 0) throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.corp.divisions[0].name);\n const [city, setCity] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(Object.keys(props.corp.divisions[0].warehouses)[0]);\n const [amt, setAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function onCityChange(event) {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event) {\n setIndustry(event.target.value);\n }\n\n function onAmtChange(event) {\n setAmt(event.target.value);\n }\n\n function exportMaterial() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* ExportMaterial */ \"e\"])(industry, city, props.mat, amt);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function removeExport(exp) {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt) continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n\n rerender();\n }\n\n const currentDivision = props.corp.divisions.find(division => division.name === industry);\n if (currentDivision === undefined) throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(city => currentDivision.warehouses[city] !== 0);\n\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onIndustryChange,\n defaultValue: industry\n }, props.corp.divisions.map(division => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: division.name,\n value: division.name\n }, division.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onCityChange,\n defaultValue: city\n }, possibleCities.map(cityName => {\n if (currentDivision.warehouses[cityName] === 0) return;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: cityName,\n value: cityName\n }, cityName);\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n placeholder: \"Export amount / s\",\n onChange: onAmtChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: exportMaterial\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export.\"), props.mat.exp.map((exp, index) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: index,\n className: \"cmpy-mgmt-existing-export\",\n onClick: () => removeExport(exp)\n }, \"Industry: \", exp.ind, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"City: \", exp.city, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Amount/s: \", exp.amt)));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ExportPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 898 */
|
||
/*!************************************************************!*\
|
||
!*** ./src/Corporation/ui/LimitProductProductionPopup.tsx ***!
|
||
\************************************************************/
|
||
/*! exports provided: LimitProductProductionPopup */
|
||
/*! exports used: LimitProductProductionPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LimitProductProductionPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n// Create a popup that lets the player limit the production of a product\nfunction LimitProductProductionPopup(props) {\n const [limit, setLimit] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function limitProductProduction() {\n let qty = limit;\n if (qty === null) qty = -1;\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* LimitProductProduction */ \"i\"])(props.product, props.city, qty);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) limitProductProduction();\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setLimit(null);else setLimit(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n style: {\n margin: \"5px\"\n },\n placeholder: \"Limit\",\n type: \"number\",\n onChange: onChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n margin: \"5px\",\n display: \"inline-block\"\n },\n onClick: limitProductProduction\n }, \"Limit production\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/LimitProductProductionPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 899 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/Corporation/ui/MaterialMarketTaPopup.tsx ***!
|
||
\******************************************************/
|
||
/*! exports provided: MaterialMarketTaPopup */
|
||
/*! exports used: MaterialMarketTaPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MaterialMarketTaPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\n\nfunction MarketTA2(props) {\n if (!props.industry.hasResearch(\"Market-TA.II\")) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const [newCost, setNewCost] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.mat.bCost);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const markupLimit = props.mat.getMarkupLimit();\n\n function onChange(event) {\n if (event.target.value === \"\") setNewCost(0);else setNewCost(parseFloat(event.target.value));\n }\n\n const sCost = newCost;\n let markup = 1;\n\n if (sCost > props.mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - props.mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - props.mat.bCost), 2);\n }\n } else if (sCost < props.mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = props.mat.bCost / sCost;\n }\n }\n\n function onMarketTA2(event) {\n props.mat.marketTa2 = event.target.checked;\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Market-TA.II\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you sell at \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(sCost), \", then you will sell\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(markup, \"0.00000\"), \"x as much compared to if you sold at market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n type: \"number\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onChange,\n value: newCost\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n htmlFor: \"cmpy-mgmt-marketa2-checkbox\",\n style: {\n color: \"white\"\n }\n }, \"Use Market-TA.II for Auto-Sale Price\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n id: \"cmpy-mgmt-marketa2-checkbox\",\n type: \"checkbox\",\n onChange: onMarketTA2,\n checked: props.mat.marketTa2,\n style: {\n margin: \"3px\"\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I\"));\n}\n\n// Create a popup that lets the player use the Market TA research for Materials\nfunction MaterialMarketTaPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const markupLimit = props.mat.getMarkupLimit();\n\n function onMarketTA1(event) {\n props.mat.marketTa1 = event.target.checked;\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Market-TA.I\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The maximum sale price you can mark this up to is \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.mat.bCost + markupLimit), \". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n htmlFor: \"cmpy-mgmt-marketa1-checkbox\",\n style: {\n color: \"white\"\n }\n }, \"Use Market-TA.I for Auto-Sale Price\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n id: \"cmpy-mgmt-marketa1-checkbox\",\n type: \"checkbox\",\n onChange: onMarketTA1,\n checked: props.mat.marketTa1,\n style: {\n margin: \"3px\"\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MarketTA2, {\n mat: props.mat,\n industry: props.industry\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/MaterialMarketTaPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 900 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Corporation/ui/SellMaterialPopup.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: SellMaterialPopup */
|
||
/*! exports used: SellMaterialPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SellMaterialPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\nfunction initialPrice(mat) {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n\n return val;\n}\n\n// Create a popup that let the player manage sales of a material\nfunction SellMaterialPopup(props) {\n const [amt, setAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(initialPrice(props.mat));\n\n function sellMaterial() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* SellMaterial */ \"o\"])(props.mat, amt, price);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onAmtChange(event) {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event) {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) sellMaterial();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the maximum amount of \", props.mat.name, \" you would like to sell per second, as well as the price at which you would like to sell at.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: amt,\n autoFocus: true,\n type: \"text\",\n placeholder: \"Sell amount\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onAmtChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: price,\n type: \"text\",\n placeholder: \"Sell price\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onPriceChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: sellMaterial\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SellMaterialPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 901 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Corporation/ui/SellProductPopup.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: SellProductPopup */
|
||
/*! exports used: SellProductPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SellProductPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\nfunction initialPrice(product) {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n\n return val;\n}\n\n// Create a popup that let the player manage sales of a material\nfunction SellProductPopup(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [iQty, setQty] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\");\n const [px, setPx] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(initialPrice(props.product));\n\n function onCheckedChange(event) {\n setChecked(event.target.checked);\n }\n\n function sellProduct() {\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_3__[/* SellProduct */ \"p\"])(props.product, props.city, iQty, px, checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onAmtChange(event) {\n setQty(event.target.value);\n }\n\n function onPriceChange(event) {\n setPx(event.target.value);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) sellProduct();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the maximum amount of \", props.product.name, \" you would like to sell per second, as well as the price at which you would like to sell it at.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: iQty,\n autoFocus: true,\n type: \"text\",\n placeholder: \"Sell amount\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onAmtChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: px,\n type: \"text\",\n placeholder: \"Sell price\",\n style: {\n marginTop: \"4px\"\n },\n onChange: onPriceChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: sellProduct\n }, \"Confirm\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n htmlFor: props.popupId + \"-checkbox\"\n }, \"Use same 'Sell Amount' for all cities\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n checked: checked,\n onChange: onCheckedChange,\n id: props.popupId + \"-checkbox\",\n style: {\n margin: \"2px\"\n },\n type: \"checkbox\"\n })));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SellProductPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 902 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/Corporation/ui/PurchaseMaterialPopup.tsx ***!
|
||
\******************************************************/
|
||
/*! exports provided: PurchaseMaterialPopup */
|
||
/*! exports used: PurchaseMaterialPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseMaterialPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../MaterialSizes */ 140);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n\n\nfunction BulkPurchaseText(props) {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n const matSize = _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__[/* MaterialSizes */ \"a\"][props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt * matSize > maxAmount) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Not enough warehouse space to purchase this amount\");\n } else if (isNaN(cost)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Invalid put for Bulk Purchase amount\");\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].format(parsedAmt, \"0,0.00\"), \" of \", props.mat.name, \" will cost\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(cost));\n }\n}\n\nfunction BulkPurchase(props) {\n const [buyAmt, setBuyAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function bulkPurchase() {\n const amount = parseFloat(buyAmt);\n const matSize = _MaterialSizes__WEBPACK_IMPORTED_MODULE_3__[/* MaterialSizes */ \"a\"][props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (amount * matSize > maxAmount) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`You do not have enough warehouse size to fit this purchase`);\n return;\n }\n\n if (isNaN(amount)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(\"Invalid input amount\");\n } else {\n const cost = amount * props.mat.bCost;\n\n if (props.corp.funds.gt(cost)) {\n props.corp.funds = props.corp.funds.minus(cost);\n props.mat.qty += amount;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`You cannot afford this purchase.`);\n return;\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) bulkPurchase();\n }\n\n function onChange(event) {\n setBuyAmt(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of \", props.mat.name, \" you would like to bulk purchase. This purchases the specified amount instantly (all at once).\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BulkPurchaseText, {\n warehouse: props.warehouse,\n mat: props.mat,\n amount: buyAmt\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onChange,\n type: \"number\",\n placeholder: \"Bulk Purchase amount\",\n style: {\n margin: \"5px\"\n },\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\"\n }, \"Confirm Bulk Purchase\"));\n} // Create a popup that lets the player purchase a Material\n\n\nfunction PurchaseMaterialPopup(props) {\n const [buyAmt, setBuyAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.mat.buy ? props.mat.buy : null);\n\n function purchaseMaterial() {\n if (buyAmt === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_5__[/* BuyMaterial */ \"c\"])(props.mat, buyAmt);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function clearPurchase() {\n props.mat.buy = 0;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) purchaseMaterial();\n }\n\n function onChange(event) {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of \", props.mat.name, \" you would like to purchase per second. This material's cost changes constantly.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onChange,\n className: \"text-input\",\n autoFocus: true,\n placeholder: \"Purchase amount\",\n type: \"number\",\n style: {\n margin: \"5px\"\n },\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: purchaseMaterial,\n className: \"std-button\"\n }, \"Confirm\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: clearPurchase,\n className: \"std-button\"\n }, \"Clear Purchase\"), props.industry.hasResearch(\"Bulk Purchasing\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BulkPurchase, {\n corp: props.corp,\n mat: props.mat,\n industry: props.industry,\n warehouse: props.warehouse,\n popupId: props.popupId\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/PurchaseMaterialPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 903 */
|
||
/*!*****************************************************!*\
|
||
!*** ./src/Corporation/ui/ProductMarketTaPopup.tsx ***!
|
||
\*****************************************************/
|
||
/*! exports provided: ProductMarketTaPopup */
|
||
/*! exports used: ProductMarketTaPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProductMarketTaPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\n\nfunction MarketTA2(props) {\n const markupLimit = props.product.rat / props.product.mku;\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.product.pCost);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function onChange(event) {\n setValue(parseFloat(event.target.value));\n }\n\n function onCheckedChange(event) {\n props.product.marketTa2 = event.target.checked;\n rerender();\n }\n\n const sCost = value;\n let markup = 1;\n\n if (sCost > props.product.pCost) {\n if (sCost - props.product.pCost > markupLimit) {\n markup = markupLimit / (sCost - props.product.pCost);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Market-TA.II\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you sell at \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(sCost), \", then you will sell\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(markup, \"0.00000\"), \"x as much compared to if you sold at market price.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onChange,\n value: value,\n type: \"number\",\n style: {\n marginTop: \"4px\"\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n htmlFor: \"cmpy-mgmt-marketa2-checkbox\",\n style: {\n color: \"white\"\n }\n }, \"Use Market-TA.II for Auto-Sale Price\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold).\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onCheckedChange,\n id: \"cmpy-mgmt-marketa2-checkbox\",\n style: {\n margin: \"3px\"\n },\n type: \"checkbox\",\n checked: props.product.marketTa2\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I\"));\n} // Create a popup that lets the player use the Market TA research for Products\n\n\nfunction ProductMarketTaPopup(props) {\n const markupLimit = props.product.rat / props.product.mku;\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function onChange(event) {\n props.product.marketTa1 = event.target.checked;\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"Market-TA.I\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The maximum sale price you can mark this up to is\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.product.pCost + markupLimit), \". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n htmlFor: \"cmpy-mgmt-marketa1-checkbox\",\n style: {\n color: \"white\"\n }\n }, \"Use Market-TA.I for Auto-Sale Price\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above).\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n onChange: onChange,\n className: \"text-input\",\n id: \"cmpy-mgmt-marketa1-checkbox\",\n style: {\n margin: \"3px\"\n },\n type: \"checkbox\",\n checked: props.product.marketTa1\n })), props.industry.hasResearch(\"Market-TA.II\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MarketTA2, {\n product: props.product,\n industry: props.industry,\n popupId: props.popupId\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/ProductMarketTaPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 904 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Corporation/ui/SmartSupplyPopup.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: SmartSupplyPopup */
|
||
/*! exports used: SmartSupplyPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SmartSupplyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Material */ 131);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\nfunction Leftover(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(!!props.warehouse.smartSupplyUseLeftovers[props.matName]);\n\n function onChange(event) {\n try {\n const material = props.warehouse.materials[props.matName];\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupplyUseLeftovers */ \"v\"])(props.warehouse, material, event.target.checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n setChecked(event.target.checked);\n }\n\n const matNameId = `${props.matName}-use-leftovers`;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: props.matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: matNameId\n }, props.warehouse.materials[props.matName].name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: matNameId,\n onChange: onChange,\n style: {\n margin: \"3px\"\n },\n checked: checked\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction SmartSupplyPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n } // Smart Supply Checkbox\n\n\n const smartSupplyCheckboxId = \"cmpy-mgmt-smart-supply-checkbox\";\n\n function smartSupplyOnChange(e) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupply */ \"u\"])(props.warehouse, e.target.checked);\n rerender();\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (!(props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_2__[/* Material */ \"a\"])) continue;\n if (!Object.keys(props.division.reqMats).includes(matName)) continue;\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Leftover, {\n key: matName,\n warehouse: props.warehouse,\n matName: matName\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: smartSupplyCheckboxId\n }, \"Enable Smart Supply\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: smartSupplyCheckboxId,\n onChange: smartSupplyOnChange,\n style: {\n margin: \"3px\"\n },\n checked: props.warehouse.smartSupplyEnabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use materials already in the warehouse instead of buying new ones, if available:\"), mats);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SmartSupplyPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 905 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Corporation/ui/Helpers.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: isRelevantMaterial */
|
||
/*! exports used: isRelevantMaterial */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isRelevantMaterial; });\n// Returns a boolean indicating whether the given material is relevant for the\n// current industry.\nfunction isRelevantMaterial(matName, division) {\n // Materials that affect Production multiplier\n const prodMultiplierMats = [\"Hardware\", \"Robots\", \"AICores\", \"RealEstate\"];\n\n if (Object.keys(division.reqMats).includes(matName)) {\n return true;\n }\n\n if (division.prodMats.includes(matName)) {\n return true;\n }\n\n if (prodMultiplierMats.includes(matName)) {\n return true;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/Helpers.tsx?");
|
||
|
||
/***/ }),
|
||
/* 906 */
|
||
/*!********************************************************!*\
|
||
!*** ./src/Corporation/ui/IndustryProductEquation.tsx ***!
|
||
\********************************************************/
|
||
/*! exports provided: IndustryProductEquation */
|
||
/*! exports used: IndustryProductEquation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryProductEquation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mathjax-react */ 196);\n\n\nfunction IndustryProductEquation(props) {\n const reqs = [];\n\n for (const reqMat of Object.keys(props.division.reqMats)) {\n const reqAmt = props.division.reqMats[reqMat];\n if (reqAmt === undefined) continue;\n reqs.push(String.raw`${reqAmt}\\text{ }${reqMat}`);\n }\n\n const prod = props.division.prodMats.slice();\n\n if (props.division.makesProducts) {\n prod.push(props.division.type);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_1__[/* MathComponent */ \"a\"], {\n display: false,\n tex: reqs.join(\"+\") + String.raw`\\Rightarrow` + prod.map(p => String.raw`1\\text{ }${p}`).join(\"+\")\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryProductEquation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 907 */,
|
||
/* 908 */,
|
||
/* 909 */,
|
||
/* 910 */,
|
||
/* 911 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Corporation/ui/Overview.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: Overview */
|
||
/*! exports used: Overview */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Overview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _LevelableUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LevelableUpgrade */ 912);\n/* harmony import */ var _UnlockUpgrade__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./UnlockUpgrade */ 913);\n/* harmony import */ var _BribeFactionPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BribeFactionPopup */ 914);\n/* harmony import */ var _SellSharesPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SellSharesPopup */ 915);\n/* harmony import */ var _BuybackSharesPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BuybackSharesPopup */ 916);\n/* harmony import */ var _IssueDividendsPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./IssueDividendsPopup */ 917);\n/* harmony import */ var _IssueNewSharesPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./IssueNewSharesPopup */ 918);\n/* harmony import */ var _FindInvestorsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FindInvestorsPopup */ 919);\n/* harmony import */ var _GoPublicPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GoPublicPopup */ 920);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../data/CorporationUnlockUpgrades */ 341);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../data/CorporationUpgrades */ 342);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n// React Component for displaying Corporation Overview info\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Overview({\n corp,\n player,\n rerender\n}) {\n const profit = corp.revenue.minus(corp.expenses).toNumber();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Total Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.funds.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Revenue: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.revenue.toNumber()\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Expenses: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.expenses.toNumber()\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Profits: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DividendsStats, {\n corp: corp,\n profit: profit\n }), \"Publicly Traded: \", corp.public ? \"Yes\" : \"No\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Owned Stock Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.numShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Stock Price: \", corp.public ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.sharePrice\n }) : \"N/A\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Total Stock Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.totalShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Outstanding Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.issuedShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Private Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.totalShares - corp.issuedShares - corp.numShares, \"0.000a\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Production Multiplier: \",\n mult: corp.getProductionMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Storage Multiplier: \",\n mult: corp.getStorageMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Advertising Multiplier: \",\n mult: corp.getAdvertisingMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Creativity Multiplier: \",\n mult: corp.getEmployeeCreMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Charisma Multiplier: \",\n mult: corp.getEmployeeChaMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Intelligence Multiplier: \",\n mult: corp.getEmployeeIntMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Efficiency Multiplier: \",\n mult: corp.getEmployeeEffMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Sales Multiplier: \",\n mult: corp.getSalesMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Scientific Research Multiplier: \",\n mult: corp.getScientificResearchMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BonusTime, {\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"a-link-button\",\n display: \"inline-block\",\n onClick: () => corp.getStarterGuide(player),\n text: \"Getting Started Guide\",\n tooltip: \"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' \" + \"This is a .lit file that guides you through the beginning of setting up a Corporation and \" + \"provides some tips/pointers for helping you get started with managing it.\"\n }), corp.public ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PublicButtons, {\n corp: corp,\n player: player,\n rerender: rerender\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PrivateButtons, {\n corp: corp,\n player: player,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BribeButton, {\n corp: corp,\n player: player\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Upgrades, {\n corp: corp,\n player: player,\n rerender: rerender\n }));\n}\n\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({\n corp,\n player,\n rerender\n}) {\n function openFindInvestorsPopup() {\n const popupId = \"cmpy-mgmt-find-investors-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _FindInvestorsPopup__WEBPACK_IMPORTED_MODULE_8__[/* FindInvestorsPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n function openGoPublicPopup() {\n const popupId = \"cmpy-mgmt-go-public-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _GoPublicPopup__WEBPACK_IMPORTED_MODULE_9__[/* GoPublicPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsClassName = fundingAvailable ? \"std-button\" : \"a-link-button-inactive\";\n const findInvestorsTooltip = fundingAvailable ? \"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company\" : undefined;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: findInvestorsClassName,\n onClick: openFindInvestorsPopup,\n text: \"Find Investors\",\n tooltip: findInvestorsTooltip,\n display: \"inline-block\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n onClick: openGoPublicPopup,\n display: \"inline-block\",\n text: \"Go Public\",\n tooltip: \"Become a publicly traded and owned entity. Going public \" + \"involves issuing shares for an IPO. Once you are a public \" + \"company, your shares will be traded on the stock market.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Render the UI for Corporation upgrades\nfunction Upgrades({\n corp,\n player,\n rerender\n}) {\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Upgrades are unlocked once you create an industry.\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"cmpy-mgmt-upgrade-header\"\n }, \" Unlocks \"), Object.values(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_11__[/* CorporationUnlockUpgrades */ \"a\"]).filter(upgrade => corp.unlockUpgrades[upgrade[0]] === 0).map(upgrade => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_UnlockUpgrade__WEBPACK_IMPORTED_MODULE_2__[/* UnlockUpgrade */ \"a\"], {\n rerender: rerender,\n player: player,\n corp: corp,\n upgradeData: upgrade,\n key: upgrade[0]\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"cmpy-mgmt-upgrade-header\"\n }, \" Upgrades \"), corp.upgrades.map((level, i) => _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_12__[/* CorporationUpgrades */ \"a\"][i]).map(upgrade => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LevelableUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* LevelableUpgrade */ \"a\"], {\n rerender: rerender,\n player: player,\n corp: corp,\n upgrade: upgrade,\n key: upgrade[0]\n })));\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({\n corp,\n player,\n rerender\n}) {\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesClass = sellSharesOnCd ? \"a-link-button-inactive\" : \"std-button\";\n const sellSharesTooltip = sellSharesOnCd ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown) : \"Sell your shares in the company. The money earned from selling your \" + \"shares goes into your personal account, not the Corporation's. \" + \"This is one of the only ways to profit from your business venture.\";\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesClass = issueNewSharesOnCd ? \"a-link-button-inactive\" : \"std-button\";\n const issueNewSharesTooltip = issueNewSharesOnCd ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown) : \"Issue new equity shares to raise capital.\";\n\n function openSellSharesPopup() {\n const popupId = \"cmpy-mgmt-sell-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellSharesPopup__WEBPACK_IMPORTED_MODULE_4__[/* SellSharesPopup */ \"a\"], {\n corp: corp,\n player,\n popupId,\n rerender\n });\n }\n\n function openBuybackSharesPopup() {\n const popupId = \"corp-buyback-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _BuybackSharesPopup__WEBPACK_IMPORTED_MODULE_5__[/* BuybackSharesPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n function openIssueNewSharesPopup() {\n const popupId = \"cmpy-mgmt-issue-new-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _IssueNewSharesPopup__WEBPACK_IMPORTED_MODULE_7__[/* IssueNewSharesPopup */ \"a\"], {\n popupId,\n corp: corp\n });\n }\n\n function openIssueDividendsPopup() {\n const popupId = \"cmpy-mgmt-issue-dividends-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _IssueDividendsPopup__WEBPACK_IMPORTED_MODULE_6__[/* IssueDividendsPopup */ \"a\"], {\n popupId,\n corp: corp\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: sellSharesClass,\n display: \"inline-block\",\n onClick: openSellSharesPopup,\n text: \"Sell Shares\",\n tooltip: sellSharesTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n display: \"inline-block\",\n onClick: openBuybackSharesPopup,\n text: \"Buyback shares\",\n tooltip: \"Buy back shares you that previously issued or sold at market price.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: issueNewSharesClass,\n display: \"inline-block\",\n onClick: openIssueNewSharesPopup,\n text: \"Issue New Shares\",\n tooltip: issueNewSharesTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n display: \"inline-block\",\n onClick: openIssueDividendsPopup,\n text: \"Issue Dividends\",\n tooltip: \"Manage the dividends that are paid out to shareholders (including yourself)\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n} // Generic Function for Creating a button\n\n\nfunction Button({\n className = \"std-button\",\n text,\n display,\n tooltip,\n onClick\n}) {\n const hasTooltip = tooltip != null;\n if (hasTooltip) className += \" tooltip\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: onClick,\n style: {\n display: display ? display : \"block\"\n }\n }, text, hasTooltip && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\nfunction BribeButton({\n player,\n corp\n}) {\n function openBribeFactionPopup() {\n const popupId = \"corp-bribe-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _BribeFactionPopup__WEBPACK_IMPORTED_MODULE_3__[/* BribeFactionPopup */ \"a\"], {\n player,\n popupId,\n corp: corp\n });\n }\n\n const canBribe = corp.determineValuation() >= _data_Constants__WEBPACK_IMPORTED_MODULE_10__[/* CorporationConstants */ \"a\"].BribeThreshold || true;\n const bribeFactionsClass = canBribe ? \"a-link-button\" : \"a-link-button-inactive\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: bribeFactionsClass,\n display: \"inline-block\",\n onClick: openBribeFactionPopup,\n text: \"Bribe Factions\",\n tooltip: canBribe ? \"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation\" : \"Your Corporation is not powerful enough to bribe Faction leaders\"\n });\n}\n\nfunction DividendsStats({\n corp,\n profit\n}) {\n if (corp.dividendPercentage <= 0 || profit <= 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const totalDividends = corp.dividendPercentage / 100 * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n const playerEarnings = corp.numShares * dividendsPerShare;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Retained Profits (after dividends): \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: retainedEarnings\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividend Percentage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.dividendPercentage / 100, \"0%\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividends per share: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: dividendsPerShare\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your earnings as a shareholder (Pre-Tax): \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: playerEarnings\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividend Tax Rate: \", corp.dividendTaxPercentage, \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your earnings as a shareholder (Post-Tax):\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: playerEarnings * (1 - corp.dividendTaxPercentage / 100)\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction Mult({\n name,\n mult\n}) {\n if (mult <= 1) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, name, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(mult, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime({\n corp\n}) {\n const storedTime = corp.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_13__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n if (storedTime <= 15000) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Bonus time: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_15__[/* convertTimeMsToTimeElapsedString */ \"b\"])(storedTime), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/Overview.tsx?");
|
||
|
||
/***/ }),
|
||
/* 912 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Corporation/ui/LevelableUpgrade.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: LevelableUpgrade */
|
||
/*! exports used: LevelableUpgrade */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LevelableUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React components for the levelable upgrade buttons on the overview panel\n\n\n\n\nfunction LevelableUpgrade(props) {\n const data = props.upgrade;\n const level = props.corp.upgrades[data[0]];\n const baseCost = data[1];\n const priceMult = data[2];\n const cost = baseCost * Math.pow(priceMult, level);\n const text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, data[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_3__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n }));\n const tooltip = data[5];\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* LevelUpgrade */ \"h\"])(props.corp, props.upgrade);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n style: {\n width: \"45%\"\n },\n onClick: onClick\n }, text, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/LevelableUpgrade.tsx?");
|
||
|
||
/***/ }),
|
||
/* 913 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Corporation/ui/UnlockUpgrade.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: UnlockUpgrade */
|
||
/*! exports used: UnlockUpgrade */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UnlockUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Components for the Unlock upgrade buttons on the overview page\n\n\n\n\nfunction UnlockUpgrade(props) {\n const data = props.upgradeData;\n const text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, data[2], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_3__[/* MoneyCost */ \"a\"], {\n money: data[1],\n corp: props.corp\n }));\n const tooltip = data[3];\n\n function onClick() {\n if (props.corp.funds.lt(data[1])) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_2__[/* UnlockUpgrade */ \"x\"])(props.corp, props.upgradeData);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n style: {\n width: \"45%\"\n },\n onClick: onClick\n }, text, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/UnlockUpgrade.tsx?");
|
||
|
||
/***/ }),
|
||
/* 914 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Corporation/ui/BribeFactionPopup.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: BribeFactionPopup */
|
||
/*! exports used: BribeFactionPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BribeFactionPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\n\nfunction BribeFactionPopup(props) {\n const [money, setMoney] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [stock, setStock] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [selectedFaction, setSelectedFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.player.factions.length > 0 ? props.player.factions[0] : \"\");\n\n function onMoneyChange(event) {\n setMoney(parseFloat(event.target.value));\n }\n\n function onStockChange(event) {\n setStock(parseFloat(event.target.value));\n }\n\n function changeFaction(event) {\n setSelectedFaction(event.target.value);\n }\n\n function repGain(money, stock) {\n return (money + stock * props.corp.sharePrice) / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].BribeToRepRatio;\n }\n\n function getRepText(money, stock) {\n if (money === 0 && stock === 0) return \"\";\n\n if (isNaN(money) || isNaN(stock) || money < 0 || stock < 0) {\n return \"ERROR: Invalid value(s) entered\";\n } else if (props.corp.funds.lt(money)) {\n return \"ERROR: You do not have this much money to bribe with\";\n } else if (stock > props.corp.numShares) {\n return \"ERROR: You do not have this many shares to bribe with\";\n } else {\n return \"You will gain \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatReputation(repGain(money, stock)) + \" reputation with \" + selectedFaction + \" with this bribe\";\n }\n }\n\n function bribe(money, stock) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][selectedFaction];\n\n if (fac == null) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"ERROR: You must select a faction to bribe\");\n }\n\n if (isNaN(money) || isNaN(stock) || money < 0 || stock < 0) {} else if (props.corp.funds.lt(money)) {} else if (stock > props.corp.numShares) {} else {\n const rep = repGain(money, stock);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatReputation(rep) + \" reputation with \" + fac.name + \" by bribing them.\");\n fac.playerReputation += rep;\n props.corp.funds = props.corp.funds.minus(money);\n props.corp.numShares -= stock;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* removePopup */ \"b\"])(props.popupId);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n style: {\n margin: \"3px\"\n },\n defaultValue: selectedFaction,\n onChange: changeFaction\n }, props.player.factions.map(name => {\n const info = _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][name].getInfo();\n if (!info.offersWork()) return;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: name,\n value: name\n }, name);\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, getRepText(money ? money : 0, stock ? stock : 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onMoneyChange,\n placeholder: \"Corporation funds\",\n style: {\n margin: \"5px\"\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onStockChange,\n placeholder: \"Stock Shares\",\n style: {\n margin: \"5px\"\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"a-link-button\",\n onClick: () => bribe(money ? money : 0, stock ? stock : 0),\n style: {\n display: \"inline-block\"\n }\n }, \"Bribe\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/BribeFactionPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 915 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Corporation/ui/SellSharesPopup.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: SellSharesPopup */
|
||
/*! exports used: SellSharesPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SellSharesPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Constants */ 35);\n\n\n\n\n\n// Create a popup that lets the player sell Corporation shares\n// This is created when the player clicks the \"Sell Shares\" button in the overview panel\nfunction SellSharesPopup(props) {\n const [shares, setShares] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function changeShares(event) {\n if (event.target.value === \"\") setShares(null);else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n function ProfitIndicator(props) {\n if (props.shares === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n if (isNaN(props.shares) || props.shares <= 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"ERROR: Invalid value entered for number of shares to sell\");\n } else if (props.shares > props.corp.numShares) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You don't have this many shares to sell!\");\n } else {\n const stockSaleResults = props.corp.calculateShareSale(props.shares);\n const profit = stockSaleResults[0];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell \", props.shares, \" shares for a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(profit));\n }\n }\n\n function sell() {\n if (shares === null) return;\n\n if (isNaN(shares) || shares <= 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Invalid value for number of shares\");\n } else if (shares > props.corp.numShares) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"ERROR: You don't have this many shares to sell\");\n } else {\n const stockSaleResults = props.corp.calculateShareSale(shares);\n const profit = stockSaleResults[0];\n const newSharePrice = stockSaleResults[1];\n const newSharesUntilUpdate = stockSaleResults[2];\n props.corp.numShares -= shares;\n\n if (isNaN(props.corp.issuedShares)) {\n console.error(`Corporation issuedShares is NaN: ${props.corp.issuedShares}`);\n const res = props.corp.issuedShares;\n\n if (isNaN(res)) {\n props.corp.issuedShares = 0;\n } else {\n props.corp.issuedShares = res;\n }\n }\n\n props.corp.issuedShares += shares;\n props.corp.sharePrice = newSharePrice;\n props.corp.shareSalesUntilPriceUpdate = newSharesUntilUpdate;\n props.corp.shareSaleCooldown = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SellSharesCooldown;\n props.player.gainMoney(profit);\n props.player.recordMoneySource(profit, \"corporation\");\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* removePopup */ \"b\"])(props.popupId);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`Sold ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(shares)} shares for ` + `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(profit)}. ` + `The corporation's stock price fell to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.corp.sharePrice)} ` + `as a result of dilution.`);\n props.rerender();\n }\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) sell();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation).\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The current price of your company's stock is \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.corp.sharePrice)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProfitIndicator, {\n shares: shares,\n corp: props.corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n type: \"number\",\n placeholder: \"Shares to sell\",\n style: {\n margin: \"5px\"\n },\n onChange: changeShares,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: sell,\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Sell shares\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SellSharesPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 916 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Corporation/ui/BuybackSharesPopup.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: BuybackSharesPopup */
|
||
/*! exports used: BuybackSharesPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BuybackSharesPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n// Create a popup that lets the player buyback shares\n// This is created when the player clicks the \"Buyback Shares\" button in the overview panel\nfunction BuybackSharesPopup(props) {\n const [shares, setShares] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function changeShares(event) {\n if (event.target.value === \"\") setShares(null);else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n const currentStockPrice = props.corp.sharePrice;\n const buybackPrice = currentStockPrice * 1.1;\n\n function buy() {\n if (shares === null) return;\n const tempStockPrice = props.corp.sharePrice;\n const buybackPrice = tempStockPrice * 1.1;\n\n if (isNaN(shares) || shares <= 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Invalid value for number of shares\");\n } else if (shares > props.corp.issuedShares) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"ERROR: There are not this many oustanding shares to buy back\");\n } else if (shares * buybackPrice > props.player.money) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"ERROR: You do not have enough money to purchase this many shares (you need \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(shares * buybackPrice, \"$0.000a\") + \")\");\n } else {\n props.corp.numShares += shares;\n\n if (isNaN(props.corp.issuedShares)) {\n console.warn(\"Corporation issuedShares is NaN: \" + props.corp.issuedShares);\n console.warn(\"Converting to number now\");\n const res = props.corp.issuedShares;\n\n if (isNaN(res)) {\n props.corp.issuedShares = 0;\n } else {\n props.corp.issuedShares = res;\n }\n }\n\n props.corp.issuedShares -= shares;\n props.player.loseMoney(shares * buybackPrice);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n props.rerender();\n }\n }\n\n function CostIndicator() {\n if (shares === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n if (isNaN(shares) || shares <= 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"ERROR: Invalid value entered for number of shares to buyback\");\n } else if (shares > props.corp.issuedShares) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"There are not this many shares available to buy back. There are only\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatBigNumber(props.corp.issuedShares), \" outstanding shares.\");\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase \", shares, \" shares for a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(shares * buybackPrice));\n }\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) buy();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"To purchase these shares, you must use your own money (NOT your Corporation's funds).\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The current buyback price of your company's stock is \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(buybackPrice), \". Your company currently has \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatBigNumber(props.corp.issuedShares), \" outstanding stock shares.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CostIndicator, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n type: \"number\",\n placeholder: \"Shares to buyback\",\n style: {\n margin: \"5px\"\n },\n onChange: changeShares,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: buy,\n className: \"a-link-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Buy shares\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/BuybackSharesPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 917 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/Corporation/ui/IssueDividendsPopup.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: IssueDividendsPopup */
|
||
/*! exports used: IssueDividendsPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IssueDividendsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Actions */ 53);\n\n\n\n\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nfunction IssueDividendsPopup(props) {\n const [percent, setPercent] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function issueDividends() {\n if (percent === null) return;\n\n try {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_4__[/* IssueDividends */ \"g\"])(props.corp, percent / 100);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) issueDividends();\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setPercent(null);else setPercent(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and \", _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CorporationConstants */ \"a\"].DividendMaxPercentage, \". (A percentage of 0 means no dividends will be issued\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Two important things to note:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Issuing dividends will negatively affect your corporation's stock price\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"* Dividends are taxed. Taxes start at 50%, but can be decreased\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n onChange: onChange,\n onKeyDown: onKeyDown,\n className: \"text-input\",\n placeholder: \"Dividend %\",\n type: \"number\",\n style: {\n margin: \"5px\"\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: issueDividends,\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Allocate Dividend Percentage\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IssueDividendsPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 918 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/Corporation/ui/IssueNewSharesPopup.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: IssueNewSharesPopup */
|
||
/*! exports used: IssueNewSharesPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IssueNewSharesPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 35);\n\n\n\n\n\n\n\nfunction EffectText(props) {\n if (props.shares === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const newSharePrice = Math.round(props.corp.sharePrice * 0.9);\n const maxNewSharesUnrounded = Math.round(props.corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - maxNewSharesUnrounded % 1e6;\n let newShares = props.shares;\n\n if (isNaN(newShares)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid input\");\n } // Round to nearest ten-millionth\n\n\n newShares /= 10e6;\n newShares = Math.round(newShares) * 10e6;\n\n if (newShares < 10e6) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Must issue at least 10 million new shares\");\n }\n\n if (newShares > maxNewShares) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You cannot issue that many shares\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Issue $\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(newShares, \"0.000a\"), \" new shares for\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(newShares * newSharePrice), \"?\");\n}\n\n// Create a popup that lets the player issue new shares\n// This is created when the player clicks the \"Issue New Shares\" buttons in the overview panel\nfunction IssueNewSharesPopup(props) {\n const [shares, setShares] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const maxNewSharesUnrounded = Math.round(props.corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - maxNewSharesUnrounded % 1e6;\n\n function issueNewShares() {\n if (shares === null) return;\n const newSharePrice = Math.round(props.corp.sharePrice * 0.9);\n let newShares = shares;\n\n if (isNaN(newShares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Invalid input for number of new shares\");\n return;\n } // Round to nearest ten-millionth\n\n\n newShares = Math.round(newShares / 10e6) * 10e6;\n\n if (newShares < 10e6 || newShares > maxNewShares) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Invalid input for number of new shares\");\n return;\n }\n\n const profit = newShares * newSharePrice;\n props.corp.issueNewSharesCooldown = _data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CorporationConstants */ \"a\"].IssueNewSharesCooldown;\n props.corp.totalShares += newShares; // Determine how many are bought by private investors\n // Private investors get up to 50% at most\n // Round # of private shares to the nearest millionth\n\n let privateShares = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(0, Math.round(newShares / 2));\n privateShares = Math.round(privateShares / 1e6) * 1e6;\n props.corp.issuedShares += newShares - privateShares;\n props.corp.funds = props.corp.funds.plus(profit);\n props.corp.immediatelyUpdateSharePrice();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* removePopup */ \"b\"])(props.popupId);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`Issued ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(newShares, \"0.000a\")} and raised ` + `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(profit)}. ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(privateShares, \"0.000a\")} ` + `of these shares were bought by private investors.<br><br>` + `Stock price decreased to ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(props.corp.sharePrice)}`);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) issueNewShares();\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setShares(null);else setShares(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"\\xA0* You can issue at most \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(maxNewShares), \" new shares\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"\\xA0* New shares are sold at a 10% discount\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"\\xA0* You can only issue new shares once every 12 hours\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"\\xA0* Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"\\xA0* Number of new shares issued must be a multiple of 10 million\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(EffectText, {\n corp: props.corp,\n shares: shares\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n autoFocus: true,\n placeholder: \"# New Shares\",\n style: {\n margin: \"5px\"\n },\n onChange: onChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: issueNewShares,\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"Issue New Shares\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IssueNewSharesPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 919 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Corporation/ui/FindInvestorsPopup.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: FindInvestorsPopup */
|
||
/*! exports used: FindInvestorsPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FindInvestorsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/Constants */ 35);\n\n\n\n\n// Create a popup that lets the player manage exports\nfunction FindInvestorsPopup(props) {\n const val = props.corp.determineValuation();\n let percShares = 0;\n let roundMultiplier = 4;\n\n switch (props.corp.fundingRound) {\n case 0:\n //Seed\n percShares = 0.1;\n roundMultiplier = 4;\n break;\n\n case 1:\n //Series A\n percShares = 0.35;\n roundMultiplier = 3;\n break;\n\n case 2:\n //Series B\n percShares = 0.25;\n roundMultiplier = 3;\n break;\n\n case 3:\n //Series C\n percShares = 0.2;\n roundMultiplier = 2.5;\n break;\n\n default:\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CorporationConstants */ \"a\"].INITIALSHARES * percShares);\n\n function findInvestors() {\n props.corp.fundingRound++;\n props.corp.addFunds(funding);\n props.corp.numShares -= investShares;\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"An investment firm has offered you \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(funding), \" in funding in exchange for a\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(percShares * 100, \"0.000a\"), \"% stake in the company (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(investShares, \"0.000a\"), \" shares).\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Do you accept or reject this offer?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hint: Investment firms will offer more money if your corporation is turning a profit\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: findInvestors,\n className: \"std-button\"\n }, \"Accept\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/FindInvestorsPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 920 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Corporation/ui/GoPublicPopup.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: GoPublicPopup */
|
||
/*! exports used: GoPublicPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GoPublicPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\n\n\n// Create a popup that lets the player manage exports\nfunction GoPublicPopup(props) {\n const [shares, setShares] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const initialSharePrice = props.corp.determineValuation() / props.corp.totalShares;\n\n function goPublic() {\n const numShares = parseFloat(shares);\n const initialSharePrice = props.corp.determineValuation() / props.corp.totalShares;\n\n if (isNaN(numShares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(\"Invalid value for number of issued shares\");\n return;\n }\n\n if (numShares > props.corp.numShares) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(\"Error: You don't have that many shares to issue!\");\n return;\n }\n\n props.corp.public = true;\n props.corp.sharePrice = initialSharePrice;\n props.corp.issuedShares = numShares;\n props.corp.numShares -= numShares;\n props.corp.addFunds(numShares * initialSharePrice);\n props.rerender();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`You took your ${props.corp.name} public and earned ` + `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMoney(numShares * initialSharePrice)} in your IPO`);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) goPublic();\n }\n\n function onChange(event) {\n setShares(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMoney(initialSharePrice), \" per share (the IPO money will be deposited directly into your Corporation's funds).\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have a total of \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.corp.numShares, \"0.000a\"), \" of shares that you can issue.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n value: shares,\n onChange: onChange,\n autoFocus: true,\n type: \"number\",\n placeholder: \"Shares to issue\",\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: goPublic\n }, \"Go Public\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/GoPublicPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 921 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Infiltration/ui/InfiltrationRoot.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: InfiltrationRoot */
|
||
/*! exports used: InfiltrationRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InfiltrationRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Intro__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Intro */ 922);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 923);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\nfunction calcDifficulty(player, startingDifficulty) {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n const difficulty = startingDifficulty - Math.pow(totalStats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nfunction InfiltrationRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const [start, setStart] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n if (props.location.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingDifficulty = props.location.infiltrationData.startingSecurityLevel;\n const difficulty = calcDifficulty(player, startingDifficulty);\n\n function cancel() {\n router.toCity();\n }\n\n if (!start) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Intro__WEBPACK_IMPORTED_MODULE_1__[/* Intro */ \"a\"], {\n Location: props.location,\n Difficulty: difficulty,\n MaxLevel: props.location.infiltrationData.maxClearanceLevel,\n start: () => setStart(true),\n cancel: cancel\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"], {\n StartingDifficulty: startingDifficulty,\n Difficulty: difficulty,\n MaxLevel: props.location.infiltrationData.maxClearanceLevel\n });\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 922 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Infiltration/ui/Intro.tsx ***!
|
||
\***************************************/
|
||
/*! exports provided: Intro */
|
||
/*! exports used: Intro */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Intro; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n\n\n\n\nfunction arrowPart(color, length) {\n let arrow = \"\";\n if (length <= 0) length = 0;else if (length > 13) length = 13;else {\n length--;\n arrow = \">\";\n }\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n color: color\n }\n }, \"=\".repeat(length), arrow, \" \".repeat(13 - arrow.length - length));\n}\n\nfunction coloredArrow(difficulty) {\n if (difficulty === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n color: \"white\"\n }\n }, \">\", \" \".repeat(38));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, arrowPart(\"white\", difficulty * 13), arrowPart(\"orange\", (difficulty - 1) * 13), arrowPart(\"red\", (difficulty - 2) * 13));\n }\n}\n\nfunction Intro(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Infiltrating \", props.Location)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Maximum level: \", props.MaxLevel)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"[\", coloredArrow(props.Difficulty), \"]\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, ` ^ ^ ^ ^`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, ` Trivial Normal Hard Impossible`)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"The minigames you play are randomly selected. It might take you few tries to get used to them.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"No game require use of the mouse.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Spacebar is the default action/confirm button.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Everything that uses arrow can also use WASD\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Sometimes the rest of the keyboard is used.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.start,\n text: \"Start\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.cancel,\n text: \"Cancel\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Intro.tsx?");
|
||
|
||
/***/ }),
|
||
/* 923 */
|
||
/*!**************************************!*\
|
||
!*** ./src/Infiltration/ui/Game.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: Game */
|
||
/*! exports used: Game */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Game; });\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _Countdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Countdown */ 924);\n/* harmony import */ var _BracketGame__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BracketGame */ 925);\n/* harmony import */ var _SlashGame__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SlashGame */ 927);\n/* harmony import */ var _BackwardGame__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BackwardGame */ 928);\n/* harmony import */ var _BribeGame__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BribeGame */ 929);\n/* harmony import */ var _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CheatCodeGame */ 930);\n/* harmony import */ var _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Cyberpunk2077Game */ 931);\n/* harmony import */ var _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MinesweeperGame */ 932);\n/* harmony import */ var _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./WireCuttingGame */ 933);\n/* harmony import */ var _Victory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Victory */ 934);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Stage;\n\n(function (Stage) {\n Stage[Stage[\"Countdown\"] = 0] = \"Countdown\";\n Stage[Stage[\"Minigame\"] = 1] = \"Minigame\";\n Stage[Stage[\"Result\"] = 2] = \"Result\";\n Stage[Stage[\"Sell\"] = 3] = \"Sell\";\n})(Stage || (Stage = {}));\n\nconst minigames = [_SlashGame__WEBPACK_IMPORTED_MODULE_5__[/* SlashGame */ \"a\"], _BracketGame__WEBPACK_IMPORTED_MODULE_4__[/* BracketGame */ \"a\"], _BackwardGame__WEBPACK_IMPORTED_MODULE_6__[/* BackwardGame */ \"a\"], _BribeGame__WEBPACK_IMPORTED_MODULE_7__[/* BribeGame */ \"a\"], _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__[/* CheatCodeGame */ \"a\"], _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__[/* Cyberpunk2077Game */ \"a\"], _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__[/* MinesweeperGame */ \"a\"], _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__[/* WireCuttingGame */ \"a\"]];\nfunction Game(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Router();\n const [level, setLevel] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(1);\n const [stage, setStage] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(Stage.Countdown);\n const [results, setResults] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"\");\n const [gameIds, setGameIds] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length)\n });\n\n function nextGameId() {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n\n return id;\n }\n\n function setupNextGame() {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId()\n });\n }\n\n function success() {\n pushResult(true);\n\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n\n setupNextGame();\n }\n\n function pushResult(win) {\n setResults(old => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options) {\n setStage(Stage.Countdown);\n pushResult(false); // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n\n const damage = options !== null && options !== void 0 && options.automated ? player.hp : props.StartingDifficulty * 3;\n\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n\n setupNextGame();\n }\n\n let stageComponent;\n\n switch (stage) {\n case Stage.Countdown:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Countdown__WEBPACK_IMPORTED_MODULE_3__[/* Countdown */ \"a\"], {\n onFinish: () => setStage(Stage.Minigame)\n });\n break;\n\n case Stage.Minigame:\n {\n const MiniGame = minigames[gameIds.id];\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MiniGame, {\n onSuccess: success,\n onFailure: failure,\n difficulty: props.Difficulty + level / 50\n });\n break;\n }\n\n case Stage.Sell:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Victory__WEBPACK_IMPORTED_MODULE_12__[/* Victory */ \"a\"], {\n StartingDifficulty: props.StartingDifficulty,\n Difficulty: props.Difficulty,\n MaxLevel: props.MaxLevel\n });\n break;\n }\n\n function Progress() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h4\", null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", {\n style: {\n color: \"gray\"\n }\n }, results.slice(0, results.length - 1)), results[results.length - 1]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h3\", null, \"Level: \", level, \"\\xA0/\\xA0\", props.MaxLevel), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Progress, null)), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, stageComponent)));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Game.tsx?");
|
||
|
||
/***/ }),
|
||
/* 924 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Infiltration/ui/Countdown.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: Countdown */
|
||
/*! exports used: Countdown */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Countdown; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n\n\nfunction Countdown(props) {\n const [x, setX] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(3);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n\n setTimeout(() => setX(x - 1), 200);\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Get Ready!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, x))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Countdown.tsx?");
|
||
|
||
/***/ }),
|
||
/* 925 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Infiltration/ui/BracketGame.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: BracketGame */
|
||
/*! exports used: BracketGame */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BracketGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 460);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 8000,\n min: 2,\n max: 3\n },\n Normal: {\n timer: 6000,\n min: 4,\n max: 5\n },\n Hard: {\n timer: 4000,\n min: 4,\n max: 6\n },\n Impossible: {\n timer: 2500,\n min: 7,\n max: 7\n }\n};\n\nfunction generateLeftSide(difficulty) {\n let str = \"\";\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n\n for (let i = 0; i < length; i++) {\n str += [\"[\", \"<\", \"(\", \"{\"][Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event) {\n if (event.keyCode == 48 && event.shiftKey) return \")\";\n if (event.keyCode == 221 && !event.shiftKey) return \"]\";\n if (event.keyCode == 221 && event.shiftKey) return \"}\";\n if (event.keyCode == 190 && event.shiftKey) return \">\";\n return \"\";\n}\n\nfunction match(left, right) {\n return left === \"[\" && right === \"]\" || left === \"<\" && right === \">\" || left === \"(\" && right === \")\" || left === \"{\" && right === \"}\";\n}\n\nfunction BracketGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [left] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateLeftSide(difficulty));\n\n function press(event) {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n\n setRight(right + char);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Close the brackets\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, `${left}${right}`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BracketGame.tsx?");
|
||
|
||
/***/ }),
|
||
/* 926 */,
|
||
/* 927 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Infiltration/ui/SlashGame.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: SlashGame */
|
||
/*! exports used: SlashGame */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlashGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n window: 600\n },\n Normal: {\n window: 325\n },\n Hard: {\n window: 250\n },\n Impossible: {\n window: 150\n }\n};\nfunction SlashGame(props) {\n const difficulty = {\n window: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const [guarding, setGuarding] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode !== 32) return;\n\n if (guarding) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let id2 = -1;\n const id = window.setTimeout(() => {\n setGuarding(false);\n id2 = window.setTimeout(() => setGuarding(true), difficulty.window);\n }, Math.random() * 3250 + 1500);\n return () => {\n clearInterval(id);\n if (id2 !== -1) clearInterval(id2);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: 5000,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Slash when his guard is down!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, guarding ? \"!Guarding!\" : \"!ATTACKING!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/SlashGame.tsx?");
|
||
|
||
/***/ }),
|
||
/* 928 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Infiltration/ui/BackwardGame.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: BackwardGame */
|
||
/*! exports used: BackwardGame */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BackwardGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 460);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 16000,\n min: 3,\n max: 4\n },\n Normal: {\n timer: 12500,\n min: 2,\n max: 3\n },\n Hard: {\n timer: 15000,\n min: 3,\n max: 4\n },\n Impossible: {\n timer: 8000,\n min: 4,\n max: 4\n }\n};\nfunction BackwardGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeAnswer(difficulty));\n const [guess, setGuess] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode === 16) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();else if (answer === nextGuess) props.onSuccess();else setGuess(nextGuess);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Type it backward\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n transform: \"scaleX(-1)\"\n }\n }, answer)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, guess, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null))));\n}\n\nfunction makeAnswer(difficulty) {\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n let answer = \"\";\n\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\"ALGORITHM\", \"ANALOG\", \"APP\", \"APPLICATION\", \"ARRAY\", \"BACKUP\", \"BANDWIDTH\", \"BINARY\", \"BIT\", \"BITE\", \"BITMAP\", \"BLOG\", \"BLOGGER\", \"BOOKMARK\", \"BOOT\", \"BROADBAND\", \"BROWSER\", \"BUFFER\", \"BUG\", \"BUS\", \"BYTE\", \"CACHE\", \"CAPS LOCK\", \"CAPTCHA\", \"CD\", \"CD-ROM\", \"CLIENT\", \"CLIPBOARD\", \"CLOUD\", \"COMPUTING\", \"COMMAND\", \"COMPILE\", \"COMPRESS\", \"COMPUTER\", \"CONFIGURE\", \"COOKIE\", \"COPY\", \"CPU\", \"CYBERCRIME\", \"CYBERSPACE\", \"DASHBOARD\", \"DATA\", \"MINING\", \"DATABASE\", \"DEBUG\", \"DECOMPRESS\", \"DELETE\", \"DESKTOP\", \"DEVELOPMENT\", \"DIGITAL\", \"DISK\", \"DNS\", \"DOCUMENT\", \"DOMAIN\", \"DOMAIN NAME\", \"DOT\", \"DOT MATRIX\", \"DOWNLOAD\", \"DRAG\", \"DVD\", \"DYNAMIC\", \"EMAIL\", \"EMOTICON\", \"ENCRYPT\", \"ENCRYPTION\", \"ENTER\", \"EXABYTE\", \"FAQ\", \"FILE\", \"FINDER\", \"FIREWALL\", \"FIRMWARE\", \"FLAMING\", \"FLASH\", \"FLASH DRIVE\", \"FLOPPY DISK\", \"FLOWCHART\", \"FOLDER\", \"FONT\", \"FORMAT\", \"FRAME\", \"FREEWARE\", \"GIGABYTE\", \"GRAPHICS\", \"HACK\", \"HACKER\", \"HARDWARE\", \"HOME PAGE\", \"HOST\", \"HTML\", \"HYPERLINK\", \"HYPERTEXT\", \"ICON\", \"INBOX\", \"INTEGER\", \"INTERFACE\", \"INTERNET\", \"IP ADDRESS\", \"ITERATION\", \"JAVA\", \"JOYSTICK\", \"JUNKMAIL\", \"KERNEL\", \"KEY\", \"KEYBOARD\", \"KEYWORD\", \"LAPTOP\", \"LASER PRINTER\", \"LINK\", \"LINUX\", \"LOG OUT\", \"LOGIC\", \"LOGIN\", \"LURKING\", \"MACINTOSH\", \"MACRO\", \"MAINFRAME\", \"MALWARE\", \"MEDIA\", \"MEMORY\", \"MIRROR\", \"MODEM\", \"MONITOR\", \"MOTHERBOARD\", \"MOUSE\", \"MULTIMEDIA\", \"NET\", \"NETWORK\", \"NODE\", \"NOTEBOOK\", \"COMPUTER\", \"OFFLINE\", \"ONLINE\", \"OPENSOURCE\", \"OPERATING\", \"SYSTEM\", \"OPTION\", \"OUTPUT\", \"PAGE\", \"PASSWORD\", \"PASTE\", \"PATH\", \"PHISHING\", \"PIRACY\", \"PIRATE\", \"PLATFORM\", \"PLUGIN\", \"PODCAST\", \"POPUP\", \"PORTAL\", \"PRINT\", \"PRINTER\", \"PRIVACY\", \"PROCESS\", \"PROGRAM\", \"PROGRAMMER\", \"PROTOCOL\", \"QUEUE\", \"QWERTY\", \"RAM\", \"REALTIME\", \"REBOOT\", \"RESOLUTION\", \"RESTORE\", \"ROM\", \"ROOT\", \"ROUTER\", \"RUNTIME\", \"SAVE\", \"SCAN\", \"SCANNER\", \"SCREEN\", \"SCREENSHOT\", \"SCRIPT\", \"SCROLL\", \"SCROLL\", \"SEARCH\", \"ENGINE\", \"SECURITY\", \"SERVER\", \"SHAREWARE\", \"SHELL\", \"SHIFT\", \"SHIFT KEY\", \"SNAPSHOT\", \"SOCIAL NETWORKING\", \"SOFTWARE\", \"SPAM\", \"SPAMMER\", \"SPREADSHEET\", \"SPYWARE\", \"STATUS\", \"STORAGE\", \"SUPERCOMPUTER\", \"SURF\", \"SYNTAX\", \"TABLE\", \"TAG\", \"TERMINAL\", \"TEMPLATE\", \"TERABYTE\", \"TEXT EDITOR\", \"THREAD\", \"TOOLBAR\", \"TRASH\", \"TROJAN HORSE\", \"TYPEFACE\", \"UNDO\", \"UNIX\", \"UPLOAD\", \"URL\", \"USER\", \"USER INTERFACE\", \"USERNAME\", \"UTILITY\", \"VERSION\", \"VIRTUAL\", \"VIRTUAL MEMORY\", \"VIRUS\", \"WEB\", \"WEBMASTER\", \"WEBSITE\", \"WIDGET\", \"WIKI\", \"WINDOW\", \"WINDOWS\", \"WIRELESS\", \"PROCESSOR\", \"WORKSTATION\", \"WEB\", \"WORM\", \"WWW\", \"XML\", \"ZIP\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BackwardGame.tsx?");
|
||
|
||
/***/ }),
|
||
/* 929 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Infiltration/ui/BribeGame.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: BribeGame */
|
||
/*! exports used: BribeGame */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BribeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12000,\n size: 6\n },\n Normal: {\n timer: 9000,\n size: 8\n },\n Hard: {\n timer: 5000,\n size: 9\n },\n Impossible: {\n timer: 2500,\n size: 12\n }\n};\nfunction BribeGame(props) {\n const difficulty = {\n timer: 0,\n size: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeChoices(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n const k = event.keyCode;\n\n if (k === 32) {\n if (positive.includes(choices[index])) props.onSuccess();else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([38, 87, 68, 39].includes(k)) newIndex++;\n if ([65, 37, 83, 40].includes(k)) newIndex--;\n\n while (newIndex < 0) newIndex += choices.length;\n\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n\n setIndex(newIndex);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Say something nice about the guard.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, choices[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2193\")));\n}\n\nfunction shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty) {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n\n if (choices.includes(option)) {\n i--;\n continue;\n }\n\n choices.push(option);\n }\n\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\"affectionate\", \"agreeable\", \"bright\", \"charming\", \"creative\", \"determined\", \"energetic\", \"friendly\", \"funny\", \"generous\", \"polite\", \"likable\", \"diplomatic\", \"helpful\", \"giving\", \"kind\", \"hardworking\", \"patient\", \"dynamic\", \"loyal\"];\nconst negative = [\"aggressive\", \"aloof\", \"arrogant\", \"big-headed\", \"boastful\", \"boring\", \"bossy\", \"careless\", \"clingy\", \"couch potato\", \"cruel\", \"cynical\", \"grumpy\", \"hot air\", \"know it all\", \"obnoxious\", \"pain in the neck\", \"picky\", \"tactless\", \"thoughtless\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BribeGame.tsx?");
|
||
|
||
/***/ }),
|
||
/* 930 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Infiltration/ui/CheatCodeGame.tsx ***!
|
||
\***********************************************/
|
||
/*! exports provided: CheatCodeGame */
|
||
/*! exports used: CheatCodeGame */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CheatCodeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 13000,\n min: 6,\n max: 8\n },\n Normal: {\n timer: 7000,\n min: 7,\n max: 8\n },\n Hard: {\n timer: 5000,\n min: 8,\n max: 9\n },\n Impossible: {\n timer: 3000,\n min: 9,\n max: 10\n }\n};\nfunction CheatCodeGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateCode(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n\n if (code[index] !== Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* getArrow */ \"a\"])(event)) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Enter the Code!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, code[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateCode(difficulty) {\n const arrows = [\"←\", \"→\", \"↑\", \"↓\"];\n let code = \"\";\n\n for (let i = 0; i < Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n\n code += arrow;\n }\n\n return code;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/CheatCodeGame.tsx?");
|
||
|
||
/***/ }),
|
||
/* 931 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/Infiltration/ui/Cyberpunk2077Game.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: Cyberpunk2077Game */
|
||
/*! exports used: Cyberpunk2077Game */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Cyberpunk2077Game; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 195);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12500,\n width: 3,\n height: 3,\n symbols: 6\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n symbols: 7\n },\n Hard: {\n timer: 12500,\n width: 5,\n height: 5,\n symbols: 8\n },\n Impossible: {\n timer: 10000,\n width: 6,\n height: 6,\n symbols: 9\n }\n};\nfunction Cyberpunk2077Game(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n symbols: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generatePuzzle(difficulty));\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateAnswer(grid, difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n\n function press(event) {\n event.preventDefault();\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Match the symbols!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: fontSize\n }\n }, \"Targets:\", \" \", answer.map((a, i) => {\n if (i == index) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\",\n color: \"blue\"\n }\n }, a, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\"\n }\n }, a, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), grid.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize,\n color: \"blue\"\n }\n }, cell, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize\n }\n }, cell, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateAnswer(grid, difficulty) {\n const answer = [];\n\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answer.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n\n return answer;\n}\n\nfunction randChar() {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty) {\n const puzzle = [];\n\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n\n puzzle.push(line);\n }\n\n return puzzle;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx?");
|
||
|
||
/***/ }),
|
||
/* 932 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Infiltration/ui/MinesweeperGame.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: MinesweeperGame */
|
||
/*! exports used: MinesweeperGame */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MinesweeperGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 195);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 15000,\n width: 3,\n height: 3,\n mines: 4\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n mines: 7\n },\n Hard: {\n timer: 15000,\n width: 5,\n height: 5,\n mines: 11\n },\n Impossible: {\n timer: 15000,\n width: 6,\n height: 6,\n mines: 15\n }\n};\nfunction MinesweeperGame(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n mines: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateMinefield(difficulty));\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateEmptyField(difficulty));\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n const [memoryPhase, setMemoryPhase] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n\n setAnswer(old => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"), minefield.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[?]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n } else {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[X]\\xA0\");\n if (answer[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[.]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction fieldEquals(a, b) {\n function count(field) {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty) {\n const field = [];\n\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n\n return field;\n}\n\nfunction generateMinefield(difficulty) {\n const field = generateEmptyField(difficulty);\n\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n\n if (field[x][y]) {\n i--;\n continue;\n }\n\n field[x][y] = true;\n }\n\n return field;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/MinesweeperGame.tsx?");
|
||
|
||
/***/ }),
|
||
/* 933 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Infiltration/ui/WireCuttingGame.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: WireCuttingGame */
|
||
/*! exports used: WireCuttingGame */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WireCuttingGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 9000,\n wiresmin: 4,\n wiresmax: 4,\n rules: 2\n },\n Normal: {\n timer: 7000,\n wiresmin: 6,\n wiresmax: 6,\n rules: 2\n },\n Hard: {\n timer: 5000,\n wiresmin: 8,\n wiresmax: 8,\n rules: 3\n },\n Impossible: {\n timer: 4000,\n wiresmin: 9,\n wiresmax: 9,\n rules: 4\n }\n};\nconst types = [\"|\", \".\", \"/\", \"-\", \"█\", \"#\"];\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\nconst colorNames = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\"\n};\nfunction WireCuttingGame(props) {\n const difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateWires(difficulty));\n const [cutWires, setCutWires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(new Array(wires.length).fill(false));\n const [questions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateQuestion(wires, difficulty));\n\n function press(event) {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires(old => {\n const next = [...old];\n next[wireNum - 1] = true;\n\n if (!questions.some(q => q.shouldCut(wires[wireNum - 1], wireNum - 1))) {\n props.onFailure();\n } // check if we won\n\n\n const wiresToBeCut = [];\n\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n\n wiresToBeCut.push(shouldBeCut);\n }\n\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Cut the wires with the following properties! (keyboard 1 to 9)\"), questions.map((question, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h3\", {\n key: i\n }, question.toString())), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, new Array(wires.length).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i\n }, \"\\xA0\", i + 1, \"\\xA0\\xA0\\xA0\\xA0\"))), new Array(8).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j\n }, \"\\xA0\\xA0\\xA0\\xA0\\xA0\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j,\n style: {\n color: wire.colors[i % wire.colors.length]\n }\n }, \"|\", wire.tpe, \"|\\xA0\\xA0\\xA0\");\n })))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction randomPositionQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: () => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire, i) => {\n return index === i;\n }\n };\n}\n\nfunction randomColorQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: () => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: wire => {\n return wire.colors.includes(cutColor);\n }\n };\n}\n\nfunction generateQuestion(wires, difficulty) {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n\n return questions;\n}\n\nfunction generateWires(difficulty) {\n const wires = [];\n const numWires = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.wiresmin, difficulty.wiresmax);\n\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors\n });\n }\n\n return wires;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/WireCuttingGame.tsx?");
|
||
|
||
/***/ }),
|
||
/* 934 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Infiltration/ui/Victory.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: Victory */
|
||
/*! exports used: Victory */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Victory; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\n\n\n\nfunction Victory(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"none\");\n\n function quitInfiltration() {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n const repGain = Math.pow(props.Difficulty + 1, 1.1) * Math.pow(props.StartingDifficulty, 1.2) * 30 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep;\n const moneyGain = Math.pow(props.Difficulty + 1, 2) * Math.pow(props.StartingDifficulty, 3) * 3e3 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney;\n\n function sell() {\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade() {\n if (faction === \"none\") return;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event) {\n setFaction(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h1\", null, \"Infiltration successful!\")), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h2\", null, \"You can trade the confidential information you found for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: changeDropdown\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: \"none\",\n value: \"none\"\n }, \"none\"), player.factions.filter(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][f].getInfo().offersWork()).map(f => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: f,\n value: f\n }, f))), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: trade,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Trade for \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(repGain), \" reputation\")\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: sell,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Sell for \", react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: moneyGain\n }))\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: quitInfiltration,\n text: \"Quit\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Victory.tsx?");
|
||
|
||
/***/ }),
|
||
/* 935 */
|
||
/*!**********************************************************!*\
|
||
!*** ./src/PersonObjects/Resleeving/ui/ResleeveRoot.tsx ***!
|
||
\**********************************************************/
|
||
/*! exports provided: ResleeveRoot */
|
||
/*! exports used: ResleeveRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResleeveRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Resleeving__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Resleeving */ 461);\n/* harmony import */ var _ResleeveElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ResleeveElem */ 937);\n\n\n\nconst SortOption = {\n Cost: \"Cost\",\n Hacking: \"Hacking Level\",\n Strength: \"Strength Level\",\n Defense: \"Defense Level\",\n Dexterity: \"Dexterity Level\",\n Agility: \"Agility Level\",\n Charisma: \"Charisma Level\",\n AverageCombatStats: \"Average Combat Stats\",\n AverageAllStats: \"Average Stats\",\n TotalNumAugmentations: \"Number of Augmentations\"\n}; // Helper function for averaging\n\nfunction getAverage(...values) {\n let sum = 0;\n\n for (let i = 0; i < values.length; ++i) {\n sum += values[i];\n }\n\n return sum / values.length;\n}\n\nconst SortFunctions = {\n Cost: (a, b) => a.getCost() - b.getCost(),\n Hacking: (a, b) => a.hacking_skill - b.hacking_skill,\n Strength: (a, b) => a.strength - b.strength,\n Defense: (a, b) => a.defense - b.defense,\n Dexterity: (a, b) => a.dexterity - b.dexterity,\n Agility: (a, b) => a.agility - b.agility,\n Charisma: (a, b) => a.charisma - b.charisma,\n AverageCombatStats: (a, b) => getAverage(a.strength, a.defense, a.dexterity, a.agility) - getAverage(b.strength, b.defense, b.dexterity, b.agility),\n AverageAllStats: (a, b) => getAverage(a.hacking_skill, a.strength, a.defense, a.dexterity, a.agility, a.charisma) - getAverage(b.hacking_skill, b.strength, b.defense, b.dexterity, b.agility, b.charisma),\n TotalNumAugmentations: (a, b) => a.augmentations.length - b.augmentations.length\n};\nfunction ResleeveRoot(props) {\n const [sort, setSort] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(SortOption.Cost); // Randomly create all Resleeves if they dont already exist\n\n if (props.player.resleeves.length === 0) {\n props.player.resleeves = Object(_Resleeving__WEBPACK_IMPORTED_MODULE_1__[/* generateResleeves */ \"a\"])();\n }\n\n function onSortChange(event) {\n setSort(event.target.value);\n }\n\n const sortFunction = SortFunctions[sort];\n if (sortFunction === undefined) throw new Error(`sort function '${sort}' is undefined`);\n props.player.resleeves.sort(sortFunction);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\",\n width: \"75%\"\n }\n }, \"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Sort By: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n defaultValue: sort,\n onChange: onSortChange\n }, Object.keys(SortOption).map(opt => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: opt,\n value: opt\n }, SortOption[opt]))), props.player.resleeves.map((resleeve, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ResleeveElem__WEBPACK_IMPORTED_MODULE_2__[/* ResleeveElem */ \"a\"], {\n key: i,\n player: props.player,\n resleeve: resleeve\n })));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/ui/ResleeveRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 936 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/PersonObjects/Resleeving/Resleeve.ts ***!
|
||
\**************************************************/
|
||
/*! exports provided: Resleeve */
|
||
/*! exports used: Resleeve */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Resleeve; });\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Person */ 158);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\n/**\n * Implements the Resleeve class, which defines a new body\n * that the player can \"re-sleeve\" into.\n */\n\n\n\nclass Resleeve extends _Person__WEBPACK_IMPORTED_MODULE_0__[/* Person */ \"a\"] {\n constructor() {\n super();\n }\n\n getCost() {\n // Each experience point adds this to the cost\n const CostPerExp = 25e3; // Final cost is multiplied by this constant ^ # Augs\n\n const NumAugsExponent = 1.2; // Get total exp in this re-sleeve\n\n const totalExp = this.hacking_exp + this.strength_exp + this.defense_exp + this.dexterity_exp + this.agility_exp + this.charisma_exp; // Get total base Augmentation cost for this re-sleeve\n\n let totalAugmentationCost = 0;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][this.augmentations[i].name];\n\n if (aug == null) {\n console.error(`Could not find Augmentation ${this.augmentations[i].name}`);\n continue;\n }\n\n totalAugmentationCost += aug.startingCost;\n }\n\n return totalExp * CostPerExp + totalAugmentationCost * Math.pow(NumAugsExponent, this.augmentations.length);\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Resleeve\", this);\n }\n /**\n * Initiatizes a Resleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Resleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Resleeve = Resleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeve.ts?");
|
||
|
||
/***/ }),
|
||
/* 937 */
|
||
/*!**********************************************************!*\
|
||
!*** ./src/PersonObjects/Resleeving/ui/ResleeveElem.tsx ***!
|
||
\**********************************************************/
|
||
/*! exports provided: ResleeveElem */
|
||
/*! exports used: ResleeveElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Resleeving__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Resleeving */ 461);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n\n\n\n\n\n\nfunction ResleeveElem(props) {\n const [aug, setAug] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.resleeve.augmentations[0].name);\n\n function openStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Total Multipliers:\")), \"Hacking Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.strength_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.strength_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.defense_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.defense_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.dexterity_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.dexterity_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.agility_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.agility_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.charisma_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.charisma_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Chance multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_chance_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Speed multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_speed_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Growth multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_grow_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Salary multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.work_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Company Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.company_rep_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Faction Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.faction_rep_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crime Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.crime_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crime Success multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.crime_success_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Income multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Purchase Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_purchase_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Level Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_level_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Ram Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_ram_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Core Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_core_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Max Stamina multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_max_stamina_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Stamina Gain multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_stamina_gain_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Field Analysis multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_analysis_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Success Chance multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_success_chance_mult)));\n }\n\n function onAugChange(event) {\n setAug(event.target.value);\n }\n\n const currentAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug];\n const cost = props.resleeve.getCost();\n\n function purchase() {\n if (!Object(_Resleeving__WEBPACK_IMPORTED_MODULE_2__[/* purchaseResleeve */ \"b\"])(props.resleeve, props.player)) return;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You re-sleeved for \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost\n }), \"!\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-elem\",\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"30%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hacking: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.hacking_skill), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.hacking_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.strength), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.strength_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.defense), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.defense_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.dexterity), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.dexterity_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.agility), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.agility_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.charisma), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.charisma_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"# Augmentations: \", props.resleeve.augmentations.length), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openStats\n }, \"Multipliers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"50%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"resleeve-aug-selector dropdown\",\n onChange: onAugChange\n }, props.resleeve.augmentations.map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: aug.name,\n value: aug.name\n }, aug.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, currentAug !== undefined && currentAug.info)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"20%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"It costs \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.player\n }), \" to purchase this Sleeve.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: purchase\n }, \"Purchase\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/ui/ResleeveElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 938 */
|
||
/*!***************************************!*\
|
||
!*** ./src/ui/WorkInProgressRoot.tsx ***!
|
||
\***************************************/
|
||
/*! exports provided: WorkInProgressRoot */
|
||
/*! exports used: WorkInProgressRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkInProgressRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ 43);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./numeralFormat */ 3);\n/* harmony import */ var _React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./React/Reputation */ 76);\n/* harmony import */ var _React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./React/ReputationRate */ 402);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./React/MoneyRate */ 123);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Company/Companies */ 47);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Locations/Locations */ 194);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 128);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CYCLES_PER_SEC = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction WorkInProgressRoot() {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n const player = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName];\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n function cancel() {\n router.toFaction();\n player.finishFactionWork(true);\n }\n\n function unfocus() {\n router.toFaction();\n player.stopFocusing();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently \", player.currentWorkFactionDescription, \" for your faction \", faction.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"(Current Faction Reputation: \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(faction.playerReputation), \"). \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been doing this for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this faction \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"There is no penalty for cancelling earlier.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Faction Work\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n const className = player.className;\n\n if (player.className !== \"\") {\n function cancel() {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toCity();\n }\n\n let stopText = \"\";\n\n if (className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymStrength || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDefense || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDexterity || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymAgility) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You have been \", className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This has cost you: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: -player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyLossRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have gained: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You may cancel at any time\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, stopText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompany) {\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n const penalty = player.cancelationPenalty();\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain \", penaltyString, \" of the reputation you've earned so far.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n const position = player.jobs[player.companyName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(`${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workRepGainRate * CYCLES_PER_SEC)} / sec`), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round(player.timeWorked / player.timeNeededToCompleteWork * 100);\n let numBars = Math.round(percent / 5);\n\n if (numBars < 0) {\n numBars = 0;\n }\n\n if (numBars > 20) {\n numBars = 20;\n } // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n\n\n const progressBar = Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_14__[/* createProgressBarText */ \"a\"])({\n progress: (numBars + 1) / 20,\n totalTicks: 20\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to \", player.crimeType, \".\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Time remaining: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeNeededToCompleteWork - player.timeWorked)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, progressBar), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => {\n router.toLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_12__[/* Locations */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Slums]);\n player.finishCrime(true);\n }\n }, \"Cancel crime\"));\n }\n\n if (player.createProgramName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working on coding \", player.createProgramName, \".\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The program is \", (player.timeWorkedCreateProgram / player.timeNeededToCompleteWork * 100).toFixed(2), \"% complete. \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you cancel, your work will be saved and you can come back to complete the program later.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => {\n player.finishCreateProgramWork(true);\n router.toTerminal();\n }\n }, \"Cancel work on creating program\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/ui/WorkInProgressRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 939 */
|
||
/*!******************************************!*\
|
||
!*** ./src/ui/React/GameOptionsRoot.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: GameOptionsRoot */
|
||
/*! exports used: GameOptionsRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameOptionsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Slider */ 417);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/FormControlLabel */ 269);\n/* harmony import */ var _mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Switch */ 270);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_Link__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Link */ 374);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/material/Tooltip */ 102);\n/* harmony import */ var _mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/Download */ 948);\n/* harmony import */ var _mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/icons-material/Upload */ 949);\n/* harmony import */ var _mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../Diagnostic/FileDiagnosticModal */ 940);\n/* harmony import */ var _ConfirmationModal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ConfirmationModal */ 945);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\"\n }\n}));\nfunction GameOptionsRoot(props) {\n const classes = useStyles();\n const [execTime, setExecTime] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].CodeInstructionRunTime);\n const [logSize, setLogSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxLogCapacity);\n const [portSize, setPortSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxPortCapacity);\n const [terminalSize, setTerminalSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].AutosaveInterval);\n const [suppressMessages, setSuppressMessages] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressMessages);\n const [suppressFactionInvites, setSuppressFactionInvites] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressFactionInvites);\n const [suppressTravelConfirmations, setSuppressTravelConfirmations] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressTravelConfirmation);\n const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation);\n const [suppressHospitalizationPopup, setSuppressHospitalizationPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressHospitalizationPopup);\n const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBladeburnerPopup);\n const [disableHotkeys, setDisableHotkeys] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableHotkeys);\n const [disableASCIIArt, setDisableASCIIArt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableASCIIArt);\n const [disableTextEffects, setDisableTextEffects] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableTextEffects);\n const [locale, setLocale] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].Locale);\n const [diagnosticOpen, setDiagnosticOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [deleteGameOpen, setDeleteOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function handleExecTimeChange(event, newValue) {\n setExecTime(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].CodeInstructionRunTime = newValue;\n }\n\n function handleLogSizeChange(event, newValue) {\n setLogSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxLogCapacity = newValue;\n }\n\n function handlePortSizeChange(event, newValue) {\n setPortSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxPortCapacity = newValue;\n }\n\n function handleTerminalSizeChange(event, newValue) {\n setTerminalSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxTerminalCapacity = newValue;\n }\n\n function handleAutosaveIntervalChange(event, newValue) {\n setAutosaveInterval(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].AutosaveInterval = newValue;\n }\n\n function handleSuppressMessagesChange(event) {\n setSuppressMessages(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressMessages = event.target.checked;\n }\n\n function handleSuppressFactionInvitesChange(event) {\n setSuppressFactionInvites(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressFactionInvites = event.target.checked;\n }\n\n function handleSuppressTravelConfirmationsChange(event) {\n setSuppressTravelConfirmations(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressTravelConfirmation = event.target.checked;\n }\n\n function handleSuppressBuyAugmentationConfirmationChange(event) {\n setSuppressBuyAugmentationConfirmation(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation = event.target.checked;\n }\n\n function handleSuppressHospitalizationPopupChange(event) {\n setSuppressHospitalizationPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressHospitalizationPopup = event.target.checked;\n }\n\n function handleSuppressBladeburnerPopupChange(event) {\n setSuppressBladeburnerPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBladeburnerPopup = event.target.checked;\n }\n\n function handleDisableHotkeysChange(event) {\n setDisableHotkeys(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableHotkeys = event.target.checked;\n }\n\n function handleDisableASCIIArtChange(event) {\n setDisableASCIIArt(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableASCIIArt = event.target.checked;\n }\n\n function handleDisableTextEffectsChange(event) {\n setDisableTextEffects(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableTextEffects = event.target.checked;\n }\n\n function handleLocaleChange(event) {\n setLocale(event.target.value);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].Locale = event.target.value;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.root,\n style: {\n width: \"90%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n variant: \"h4\",\n gutterBottom: true\n }, \"Options\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript exec time (ms)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: execTime,\n onChange: handleExecTimeChange,\n step: 1,\n min: 10,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript log size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: logSize,\n onChange: handleLogSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript port size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: portSize,\n onChange: handlePortSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Terminal capacity\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: terminalSize,\n onChange: handleTerminalSizeChange,\n step: 50,\n min: 50,\n max: 500,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The time (in seconds) between each autosave. Set to 0 to disable autosave.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Autosave interval (s)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: autosaveInterval,\n onChange: handleAutosaveIntervalChange,\n step: 30,\n min: 0,\n max: 600,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressMessages,\n onChange: handleSuppressMessagesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress messages\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressFactionInvites,\n onChange: handleSuppressFactionInvitesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress faction invites\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressTravelConfirmations,\n onChange: handleSuppressTravelConfirmationsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress travel confirmations\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBuyAugmentationConfirmation,\n onChange: handleSuppressBuyAugmentationConfirmationChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before buying augmentation will not show up.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress buy augmentation confirmation\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressHospitalizationPopup,\n onChange: handleSuppressHospitalizationPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress hospitalization popup\"))\n })), !!props.player.bladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBladeburnerPopup,\n onChange: handleSuppressBladeburnerPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress bladeburner popup\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableHotkeys,\n onChange: handleDisableHotkeysChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the \\\"Save and Close (Ctrl + b)\\\" hotkey in the Text Editor.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable hotkeys\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableASCIIArt,\n onChange: handleDisableASCIIArtChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set all ASCII art will be disabled.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable ascii art\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableTextEffects,\n onChange: handleDisableTextEffectsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable text effects\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Sets the locale for displaying numbers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Locale\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n value: locale,\n onChange: handleLocaleChange\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en\"\n }, \"en\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"bg\"\n }, \"bg\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"cs\"\n }, \"cs\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"da-dk\"\n }, \"da-dk\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"de\"\n }, \"de\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-au\"\n }, \"en-au\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-gb\"\n }, \"en-gb\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"es\"\n }, \"es\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"fr\"\n }, \"fr\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"hu\"\n }, \"hu\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"it\"\n }, \"it\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"lv\"\n }, \"lv\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"no\"\n }, \"no\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"pl\"\n }, \"pl\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"ru\"\n }, \"ru\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"form\", {\n action: \"https://www.paypal.com/cgi-bin/webscr\",\n method: \"post\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"cmd\",\n value: \"_s-xclick\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"encrypted\",\n value: \"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"image\",\n src: \"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\",\n name: \"submit\",\n alt: \"PayPal - The safer, easier way to pay online!\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.save()\n }, \"Save Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDeleteOpen(true)\n }, \"Delete Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"export\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => props.export()\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"import\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => props.import()\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18___default.a, {\n color: \"primary\"\n })))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.forceKill()\n }, \"Force kill all active scripts\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.softReset()\n }, \"Soft Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDiagnosticOpen(true)\n }, \"Diagnose files\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Documentation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://discord.gg/TFc3hKD\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Discord\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://www.reddit.com/r/bitburner\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Reddit\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_19__[/* FileDiagnosticModal */ \"a\"], {\n open: diagnosticOpen,\n onClose: () => setDiagnosticOpen(false)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ConfirmationModal__WEBPACK_IMPORTED_MODULE_20__[/* ConfirmationModal */ \"a\"], {\n onConfirm: () => {\n props.delete();\n setDeleteOpen(false);\n },\n open: deleteGameOpen,\n onClose: () => setDeleteOpen(false),\n confirmationText: \"Really delete your game? (It's permanent!)\"\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/React/GameOptionsRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 940 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Diagnostic/FileDiagnosticModal.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: ServerAccordion, FileDiagnosticModal */
|
||
/*! exports used: FileDiagnosticModal */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* unused harmony export ServerAccordion */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FileDiagnosticModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Modal */ 462);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableContainer */ 1384);\n/* harmony import */ var _mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableHead */ 1385);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"][props.ip];\n let totalSize = 0;\n\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const files = [];\n\n for (const f of server.scripts) {\n files.push({\n name: f.filename,\n size: f.code.length\n });\n }\n\n for (const f of server.textFiles) {\n files.push({\n name: f.fn,\n size: f.text.length\n });\n }\n\n files.sort((a, b) => b.size - a.size);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, server.hostname, \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(totalSize), \"b)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Filename\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Size\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, files.map(file => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n key: file.name\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, file.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(file.size), \"b\"))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null)));\n}\nfunction FileDiagnosticModal(props) {\n const ips = [];\n\n for (const ip of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"])) {\n ips.push(ip);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are.\"), ips.map(ip => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ServerAccordion, {\n key: ip,\n ip: ip\n }))));\n}\n\n//# sourceURL=webpack:///./src/Diagnostic/FileDiagnosticModal.tsx?");
|
||
|
||
/***/ }),
|
||
/* 941 */,
|
||
/* 942 */,
|
||
/* 943 */,
|
||
/* 944 */,
|
||
/* 945 */
|
||
/*!********************************************!*\
|
||
!*** ./src/ui/React/ConfirmationModal.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: ConfirmationModal */
|
||
/*! exports used: ConfirmationModal */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ConfirmationModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Modal */ 462);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n\n\n\n\nfunction ConfirmationModal(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Modal__WEBPACK_IMPORTED_MODULE_1__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, props.confirmationText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => {\n props.onConfirm();\n }\n }, \"Confirm\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/ConfirmationModal.tsx?");
|
||
|
||
/***/ }),
|
||
/* 946 */,
|
||
/* 947 */,
|
||
/* 948 */,
|
||
/* 949 */,
|
||
/* 950 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: SleeveRoot */
|
||
/*! exports used: SleeveRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_SleeveElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/SleeveElem */ 951);\n\n\nfunction SleeveRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Sleeves\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sleeves can be used to perform different tasks synchronously.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"FAQ\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves\"\n }, \"Documentation\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.sleeves.map((sleeve, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_SleeveElem__WEBPACK_IMPORTED_MODULE_1__[/* SleeveElem */ \"a\"], {\n rerender: rerender,\n player: props.player,\n sleeve: sleeve\n })))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 951 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/SleeveElem.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: SleeveElem */
|
||
/*! exports used: SleeveElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/SleeveAugmentationsPopup */ 952);\n/* harmony import */ var _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/TravelPopup */ 953);\n/* harmony import */ var _ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/EarningsTableElement */ 954);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../ui/React/MoneyRate */ 123);\n/* harmony import */ var _ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../ui/React/ReputationRate */ 402);\n/* harmony import */ var _ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ui/StatsElement */ 955);\n/* harmony import */ var _ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/MoreStatsContent */ 956);\n/* harmony import */ var _ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/MoreEarningsContent */ 957);\n/* harmony import */ var _ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/TaskSelector */ 958);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 126);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction SleeveElem(props) {\n const [abc, setABC] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([\"------\", \"------\", \"------\"]);\n\n function openMoreStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__[/* MoreStatsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function openTravel() {\n const popupId = \"sleeve-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__[/* TravelPopup */ \"a\"], {\n popupId: popupId,\n sleeve: props.sleeve,\n player: props.player,\n rerender: props.rerender\n });\n }\n\n function openManageAugmentations() {\n const popupId = \"sleeve-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__[/* SleeveAugmentationsPopup */ \"a\"], {\n sleeve: props.sleeve,\n player: props.player\n });\n }\n\n function openMoreEarnings() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__[/* MoreEarningsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function setTask() {\n props.sleeve.resetTaskStatus(); // sets to idle\n\n switch (abc[0]) {\n case \"------\":\n break;\n\n case \"Work for Company\":\n props.sleeve.workForCompany(props.player, abc[1]);\n break;\n\n case \"Work for Faction\":\n props.sleeve.workForFaction(props.player, abc[1], abc[2]);\n break;\n\n case \"Commit Crime\":\n props.sleeve.commitCrime(props.player, abc[1]);\n break;\n\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(props.player, abc[2], abc[1]);\n break;\n\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(props.player, abc[2], abc[1]);\n break;\n\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(props.player);\n break;\n\n case \"Synchronize\":\n props.sleeve.synchronize(props.player);\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n\n props.rerender();\n }\n\n let desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n switch (props.sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently idle\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working your job at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let doing = \"nothing\";\n\n switch (props.sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Field:\n doing = \"Field work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Hacking:\n doing = \"Hacking contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Security:\n doing = \"Security work\";\n break;\n }\n\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently doing \", doing, \" for \", props.sleeve.currentTaskLocation, \".\");\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently attempting to \", _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].type, \" (Success Rate:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].successRate(props.sleeve)), \").\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently studying/taking a course at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working out at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.\");\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n let data = [];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime) {\n data = [[`Money`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_11__[/* Money */ \"a\"], {\n money: parseFloat(props.sleeve.currentTaskLocation)\n }), `(on success)`], [`Hacking Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.hack), `(2x on success)`], [`Strength Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.str), `(2x on success)`], [`Defense Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.def), `(2x on success)`], [`Dexterity Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.dex), `(2x on success)`], [`Agility Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.agi), `(2x on success)`], [`Charisma Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.cha), `(2x on success)`]]; // elems.taskProgressBar.innerText = createProgressBarText({\n // progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n // totalTicks: 25,\n // });\n } else {\n data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__[/* MoneyRate */ \"a\"], {\n money: 5 * props.sleeve.gainRatesForTask.money\n })], [`Hacking Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.hack)} / s`], [`Strength Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.str)} / s`], [`Defense Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.def)} / s`], [`Dexterity Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.dex)} / s`], [`Agility Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.agi)} / s`], [`Charisma Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.cha)} / s`]];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company || props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n const repGain = props.sleeve.getRepGain(props.player);\n data.push([`Reputation:`, Object(_ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__[/* ReputationRate */ \"a\"])(5 * repGain)]);\n } // elems.taskProgressBar.innerText = \"\";\n\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-elem\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"25%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-stats-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__[/* StatsElement */ \"a\"], {\n sleeve: props.sleeve\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreStats\n }, \"More Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) ? \" tooltip\" : \"\"}`,\n onClick: openTravel,\n disabled: props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost)\n }, \"Travel\", props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Not enough money\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.sleeve.shock < 100 ? \" tooltip\" : \"\"}`,\n onClick: openManageAugmentations,\n style: {\n display: \"block\"\n },\n disabled: props.sleeve.shock < 100\n }, \"Manage Augmentations\", props.sleeve.shock < 100 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Unlocked when sleeve has fully recovered\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"40%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__[/* TaskSelector */ \"a\"], {\n player: props.player,\n sleeve: props.sleeve,\n setABC: setABC\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime && Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__[/* createProgressBarText */ \"a\"])({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: setTask\n }, \"Set Task\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"35%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__[/* EarningsTableElement */ \"a\"], {\n title: \"Earnings (Pre-Synchronization)\",\n stats: data\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreEarnings\n }, \"More Earnings Info\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 952 */
|
||
/*!******************************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/SleeveAugmentationsPopup.tsx ***!
|
||
\******************************************************************/
|
||
/*! exports provided: SleeveAugmentationsPopup */
|
||
/*! exports used: SleeveAugmentationsPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveAugmentationsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveHelpers */ 442);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var react_dom_server__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom/server */ 412);\n/* harmony import */ var react_dom_server__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom_server__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction SleeveAugmentationsPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []); // Array of all owned Augmentations. Names only\n\n const ownedAugNames = props.sleeve.augmentations.map(e => e.name); // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n\n const availableAugs = Object(_SleeveHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findSleevePurchasableAugs */ \"a\"])(props.sleeve, props.player);\n\n function purchaseAugmentation(aug) {\n props.sleeve.tryBuyAugmentation(props.player, aug);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Owned Augmentations:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"70%\"\n }\n }, ownedAugNames.map(augName => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n let tooltip = aug.info;\n\n if (typeof tooltip !== \"string\") {\n tooltip = Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(tooltip);\n }\n\n tooltip += \"<br /><br />\";\n tooltip += Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: augName,\n className: \"gang-owned-upgrade tooltip\"\n }, augName, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: tooltip\n }\n }));\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they would for you. You can only purchase Augmentations that you have unlocked through Factions.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the Duplicate Sleeve will immediately lose all of its stat experience.\"), availableAugs.map(aug => {\n let info = aug.info;\n\n if (typeof info !== \"string\") {\n info = Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(info);\n }\n\n info += \"<br /><br />\";\n info += Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: aug.name,\n className: \"cmpy-mgmt-upgrade-div\",\n onClick: () => purchaseAugmentation(aug)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n fontSize: \"12px\",\n padding: \"2px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, aug.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: aug.startingCost,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: info\n }\n })));\n }));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 953 */
|
||
/*!*****************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/TravelPopup.tsx ***!
|
||
\*****************************************************/
|
||
/*! exports provided: TravelPopup */
|
||
/*! exports used: TravelPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/WorldMap */ 350);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n\n\n\n\n\n\nfunction TravelPopup(props) {\n function travel(city) {\n if (!props.player.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You cannot afford to have this sleeve travel to another city\");\n }\n\n props.sleeve.city = city;\n props.player.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost);\n props.sleeve.resetTaskStatus();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. Traveling to a different city costs \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.player\n }), \". It will also set your current sleeve task to idle.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_4__[/* WorldMap */ \"a\"], {\n currentCity: props.sleeve.city,\n onTravel: city => travel(city)\n }));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TravelPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 954 */
|
||
/*!**************************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx ***!
|
||
\**************************************************************/
|
||
/*! exports provided: EarningsTableElement */
|
||
/*! exports used: EarningsTableElement */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return EarningsTableElement; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction EarningsTableElement(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, props.title), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, props.stats.map((stat, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", {\n key: i\n }, stat.map((s, i) => {\n let style = {};\n\n if (i !== 0) {\n style = {\n textAlign: \"right\"\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n style: style,\n key: i\n }, s);\n }))))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx?");
|
||
|
||
/***/ }),
|
||
/* 955 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/StatsElement.tsx ***!
|
||
\******************************************************/
|
||
/*! exports provided: StatsElement */
|
||
/*! exports used: StatsElement */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StatsElement; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\nfunction StatsElement(props) {\n let style = {};\n style = {\n textAlign: \"right\"\n };\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hp-cell\"\n }, \"HP: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hp-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatHp(props.sleeve.hp), \" / \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatHp(props.sleeve.max_hp))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", null, \"City: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n style: style\n }, props.sleeve.city)), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hack-cell\"\n }, \"Hacking: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hack-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.hacking_skill))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Strength: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.strength))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Defense: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.defense))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Dexterity: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.dexterity))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Agility: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.agility))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-cha-cell\"\n }, \"Charisma: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-cha-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.charisma))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\"\n }, \"Shock: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSleeveShock(100 - props.sleeve.shock))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\"\n }, \"Sync: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSleeveSynchro(props.sleeve.sync))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\"\n }, \"Memory: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSleeveMemory(props.sleeve.memory))))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/StatsElement.tsx?");
|
||
|
||
/***/ }),
|
||
/* 956 */
|
||
/*!**********************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx ***!
|
||
\**********************************************************/
|
||
/*! exports provided: MoreStatsContent */
|
||
/*! exports used: MoreStatsContent */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoreStatsContent; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ui/React/StatsTable */ 186);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction MoreStatsContent(props) {\n return react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_1__[/* StatsTable */ \"a\"])([[\"Hacking: \", props.sleeve.hacking_skill, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.hacking_exp)} exp)`], [\"Strength: \", props.sleeve.strength, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.strength_exp)} exp)`], [\"Defense: \", props.sleeve.defense, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.defense_exp)} exp)`], [\"Dexterity: \", props.sleeve.dexterity, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.dexterity_exp)} exp)`], [\"Agility: \", props.sleeve.agility, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.agility_exp)} exp)`], [\"Charisma: \", props.sleeve.charisma, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.charisma_exp)} exp)`]], \"Stats:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_1__[/* StatsTable */ \"a\"])([[\"Hacking Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.hacking_mult)], [\"Hacking Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.hacking_exp_mult)], [\"Strength Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.strength_mult)], [\"Strength Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.strength_exp_mult)], [\"Defense Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.defense_mult)], [\"Defense Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.defense_exp_mult)], [\"Dexterity Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.dexterity_mult)], [\"Dexterity Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.dexterity_exp_mult)], [\"Agility Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.agility_mult)], [\"Agility Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.agility_exp_mult)], [\"Charisma Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.charisma_mult)], [\"Charisma Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.charisma_exp_mult)], [\"Faction Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.faction_rep_mult)], [\"Company Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.company_rep_mult)], [\"Salary multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.work_money_mult)], [\"Crime Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.crime_money_mult)], [\"Crime Success multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.crime_success_mult)]], \"Multipliers:\"));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx?");
|
||
|
||
/***/ }),
|
||
/* 957 */
|
||
/*!*************************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx ***!
|
||
\*************************************************************/
|
||
/*! exports provided: MoreEarningsContent */
|
||
/*! exports used: MoreEarningsContent */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoreEarningsContent; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/StatsTable */ 186);\n\n\n\n\nfunction MoreEarningsContent(props) {\n return react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__[/* StatsTable */ \"a\"])([[\"Money \", react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: props.sleeve.earningsForTask.money\n })], [\"Hacking Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.hack)], [\"Strength Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.str)], [\"Defense Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.def)], [\"Dexterity Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.dex)], [\"Agility Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.agi)], [\"Charisma Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.cha)]], \"Earnings for Current Task:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__[/* StatsTable */ \"a\"])([[\"Money: \", react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: props.sleeve.earningsForPlayer.money\n })], [\"Hacking Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.hack)], [\"Strength Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.str)], [\"Defense Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.def)], [\"Dexterity Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.dex)], [\"Agility Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.agi)], [\"Charisma Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.cha)]], \"Total Earnings for Host Consciousness:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__[/* StatsTable */ \"a\"])([[\"Money: \", react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: props.sleeve.earningsForSleeves.money\n })], [\"Hacking Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.hack)], [\"Strength Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.str)], [\"Defense Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.def)], [\"Dexterity Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.dex)], [\"Agility Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.agi)], [\"Charisma Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.cha)]], \"Total Earnings for Other Sleeves:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx?");
|
||
|
||
/***/ }),
|
||
/* 958 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/TaskSelector.tsx ***!
|
||
\******************************************************/
|
||
/*! exports provided: TaskSelector */
|
||
/*! exports used: TaskSelector */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 126);\n\n\n\n\n\n\n\nconst universitySelectorOptions = [\"Study Computer Science\", \"Data Structures\", \"Networks\", \"Algorithms\", \"Management\", \"Leadership\"];\nconst gymSelectorOptions = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\nfunction possibleJobs(player, sleeve) {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const allJobs = Object.keys(player.jobs);\n\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player, sleeve) {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [\"Bladeburners\"];\n\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions;\n}\n\nconst tasks = {\n \"------\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n \"Work for Company\": (player, sleeve) => {\n let jobs = possibleJobs(player, sleeve);\n if (jobs.length === 0) jobs = [\"------\"];\n return {\n first: jobs,\n second: () => [\"------\"]\n };\n },\n \"Work for Faction\": (player, sleeve) => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n return {\n first: factions,\n second: s1 => {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__[/* Factions */ \"a\"][s1];\n const facInfo = faction.getInfo();\n const options = [];\n\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n\n return options;\n }\n };\n },\n \"Commit Crime\": () => {\n return {\n first: Object.keys(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__[/* Crimes */ \"a\"]),\n second: () => [\"------\"]\n };\n },\n \"Take University Course\": (player, sleeve) => {\n let universities = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSummitUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12RothmanUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology];\n break;\n\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return {\n first: universitySelectorOptions,\n second: () => universities\n };\n },\n \"Workout at Gym\": (player, sleeve) => {\n let gyms = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumCrushFitnessGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSnapFitnessGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12IronGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12PowerhouseGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym];\n break;\n\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return {\n first: gymSelectorOptions,\n second: () => gyms\n };\n },\n \"Shock Recovery\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n Synchronize: () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n }\n};\nconst canDo = {\n \"------\": () => true,\n \"Work for Company\": (player, sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player, sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player, sleeve) => sleeve.shock < 100,\n Synchronize: (player, sleeve) => sleeve.sync < 100\n};\n\nfunction getABC(sleeve) {\n switch (sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n return [\"------\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let workType = \"\";\n\n switch (sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Hacking:\n workType = \"Hacking Contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Field:\n workType = \"Field Work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Security:\n workType = \"Security Work\";\n break;\n }\n\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nfunction TaskSelector(props) {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[0]);\n const [s1, setS1] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[1]);\n const [s2, setS2] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[2]);\n const validActions = Object.keys(canDo).filter(k => canDo[k](props.player, props.sleeve));\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event) {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]);\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event) {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event) {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS0Change,\n defaultValue: s0\n }, validActions.map(task => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: task,\n value: task\n }, task))), !(details.first.length === 1 && details.first[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS1Change,\n defaultValue: s1\n }, details.first.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))), !(details2.length === 1 && details2[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS2Change,\n defaultValue: s2\n }, details2.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx?");
|
||
|
||
/***/ }),
|
||
/* 959 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Hacknet/ui/HacknetRoot.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: HacknetRoot */
|
||
/*! exports used: HacknetRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralInfo */ 960);\n/* harmony import */ var _HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HacknetNodeElem */ 961);\n/* harmony import */ var _HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HacknetServerElem */ 962);\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../HacknetNode */ 248);\n/* harmony import */ var _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashUpgradePopup */ 963);\n/* harmony import */ var _MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MultiplierButtons */ 965);\n/* harmony import */ var _PlayerInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PlayerInfo */ 966);\n/* harmony import */ var _PurchaseButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseButton */ 967);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Root React Component for the Hacknet Node UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction HacknetRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [purchaseMultiplier, setPurchaseMultiplier] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function createHashUpgradesPopup() {\n const id = \"hacknet-server-hash-upgrades-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(id, _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__[/* HashUpgradePopup */ \"a\"], {\n player: props.player\n });\n }\n\n let totalProduction = 0;\n\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was a normal server\"); // should never happen\n\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick() {\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* purchaseHacknet */ \"l\"])(props.player);\n rerender();\n } // Cost to purchase a new Hacknet Node\n\n\n let purchaseCost;\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetServer */ \"b\"])(props.player);\n } else {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetNode */ \"a\"])(props.player);\n } // onClick event handlers for purchase multiplier buttons\n\n\n const purchaseMultiplierOnClicks = [() => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x5), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x10), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].MAX)]; // HacknetNode components\n\n const nodes = props.player.hacknetNodes.map(node => {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was normal server\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerElem */ \"a\"], {\n player: props.player,\n key: hserver.hostname,\n node: hserver,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeElem */ \"a\"], {\n player: props.player,\n key: node.name,\n node: node,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Hacknet \", Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) ? \"Servers\" : \"Nodes\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralInfo__WEBPACK_IMPORTED_MODULE_1__[/* GeneralInfo */ \"a\"], {\n hasHacknetServers: Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseButton__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseButton */ \"a\"], {\n cost: purchaseCost,\n multiplier: purchaseMultiplier,\n onClick: handlePurchaseButtonClick\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"hacknet-nodes-money-multipliers-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PlayerInfo__WEBPACK_IMPORTED_MODULE_7__[/* PlayerInfo */ \"a\"], {\n totalProduction: totalProduction,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__[/* MultiplierButtons */ \"a\"], {\n onClicks: purchaseMultiplierOnClicks,\n purchaseMultiplier: purchaseMultiplier\n })), Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: createHashUpgradesPopup,\n style: {\n display: \"block\"\n }\n }, \"Spend Hashes on Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", {\n id: \"hacknet-nodes-list\"\n }, nodes));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 960 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Hacknet/ui/GeneralInfo.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: GeneralInfo */
|
||
/*! exports used: GeneralInfo */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * React Component for the Hacknet Node UI\n *\n * Displays general information about Hacknet Nodes\n */\n\nfunction GeneralInfo(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, \"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced.\"), !props.hasHacknetServers ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Here, you can purchase a Hacknet Node, a specialized machine that can connect ` + `and contribute its resources to the Hacknet network. This allows you to take ` + `a small percentage of profits from hacks performed on the network. Essentially, ` + `you are renting out your Node's computing power.`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node ` + `can be upgraded in order to increase its computing power and thereby increase ` + `the profit you earn from it.`)) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. ` + `Hacknet Servers will perform computations and operations on the network, earning ` + `you hashes. Hashes can be spent on a variety of different upgrades.`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Hacknet Servers can also be used as servers to run scripts. However, running scripts ` + `on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash ` + `rate will be reduced by the percentage of RAM that is being used by that Server to run ` + `scripts.`)));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/GeneralInfo.tsx?");
|
||
|
||
/***/ }),
|
||
/* 961 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Hacknet/ui/HacknetNodeElem.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: HacknetNodeElem */
|
||
/*! exports used: HacknetNodeElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNodeElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\nfunction HacknetNodeElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: node.totalMoneyGenerated,\n player: props.player\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: node.moneyGainRatePerSecond\n }), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.ram, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 962 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Hacknet/ui/HacknetServerElem.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: HacknetServerElem */
|
||
/*! exports used: HacknetServerElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServerElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/HashRate */ 464);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\n\nfunction HacknetServerElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade RAM Button\n\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cores Button\n\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cache button\n\n\n let upgradeCacheContent, upgradeCacheClass;\n\n if (node.cache >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CACHE\");\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCacheCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCacheCost)) {\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n upgradeCacheClass = \"std-button\";\n }\n }\n\n function upgradeCacheOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCacheUpgrade */ \"j\"])(props.player, node, numUpgrades);\n rerender();\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* updateHashManagerCapacity */ \"p\"])(props.player);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.hostname)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.totalHashesGenerated), \" (\", Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__[/* HashRate */ \"a\"])(node.hashRate), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hash Capacity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.hashCapacity))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.maxRam, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cache Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cache), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCacheClass,\n onClick: upgradeCacheOnClick\n }, upgradeCacheContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetServerElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 963 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Hacknet/ui/HashUpgradePopup.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: HashUpgradePopup */
|
||
/*! exports used: HashUpgradePopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HashManager */ 288);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HashUpgrades */ 217);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _HacknetUpgradeElem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetUpgradeElem */ 964);\n/**\n * Create the pop-up for purchasing upgrades with hashes\n */\n\n\n\n\n\nfunction HashUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n const hashManager = props.player.hashManager;\n\n if (!(hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_1__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n const upgradeElems = Object.keys(_HashUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* HashUpgrades */ \"a\"]).map(upgName => {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* HashUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetUpgradeElem__WEBPACK_IMPORTED_MODULE_4__[/* HacknetUpgradeElem */ \"a\"], {\n player: props.player,\n upg: upg,\n hashManager: hashManager,\n key: upg.name,\n rerender: rerender\n });\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Spend your hashes on a variety of different upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_3__[/* Hashes */ \"a\"])(props.player.hashManager.hashes)), upgradeElems);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HashUpgradePopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 964 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Hacknet/ui/HacknetUpgradeElem.tsx ***!
|
||
\***********************************************/
|
||
/*! exports provided: HacknetUpgradeElem */
|
||
/*! exports used: HacknetUpgradeElem */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetUpgradeElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ServerDropdown */ 557);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n\n\n\n\n\n\nfunction HacknetUpgradeElem(props) {\n const [selectedServer, setSelectedServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ecorp\");\n\n function changeTargetServer(event) {\n setSelectedServer(event.target.value);\n }\n\n function purchase() {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n\n if (canPurchase) {\n const res = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseHashUpgrade */ \"m\"])(props.player, props.upg.name, selectedServer);\n\n if (!res) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Failed to purchase upgrade. This may be because you do not have enough hashes, \" + \"or because you do not have access to the feature upgrade affects.\");\n }\n\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level); // Purchase button\n\n const canPurchase = hashManager.hashes >= cost;\n const btnClass = canPurchase ? \"std-button\" : \"std-button-disabled\"; // We'll reuse a Bladeburner css class\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: upg.name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cost: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(cost), \", Bought: \", level, \" times\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, upg.desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: btnClass,\n onClick: purchase\n }, \"Purchase\"), level > 0 && effect && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, effect), upg.hasTargetServer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerDropdown */ \"a\"], {\n serverType: _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerType */ \"b\"].Foreign,\n onChange: changeTargetServer,\n style: {\n margin: \"5px\"\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx?");
|
||
|
||
/***/ }),
|
||
/* 965 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Hacknet/ui/MultiplierButtons.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: MultiplierButtons */
|
||
/*! exports used: MultiplierButtons */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MultiplierButtons; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/**\n * React Component for the Multiplier buttons on the Hacknet page.\n * These buttons let the player control how many Nodes/Upgrades they're\n * purchasing when using the UI (x1, x5, x10, MAX)\n */\n\n\n\nfunction MultiplierButton(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: props.className,\n onClick: props.onClick\n }, props.text);\n}\n\nfunction MultiplierButtons(props) {\n if (props.purchaseMultiplier == null) {\n throw new Error(`MultiplierButtons constructed without required props`);\n }\n\n const mults = [\"x1\", \"x5\", \"x10\", \"MAX\"];\n const onClicks = props.onClicks;\n const buttons = [];\n\n for (let i = 0; i < mults.length; ++i) {\n const mult = mults[i];\n const btnProps = {\n className: props.purchaseMultiplier === _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* PurchaseMultipliers */ \"c\"][mult] ? \"std-button-disabled\" : \"std-button\",\n key: mult,\n onClick: onClicks[i],\n text: mult\n };\n buttons.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierButton, btnProps));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n id: \"hacknet-nodes-multipliers\"\n }, buttons);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/MultiplierButtons.tsx?");
|
||
|
||
/***/ }),
|
||
/* 966 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Hacknet/ui/PlayerInfo.tsx ***!
|
||
\***************************************/
|
||
/*! exports provided: PlayerInfo */
|
||
/*! exports used: PlayerInfo */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/HashRate */ 464);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\n\n\n\n\n\n\nfunction PlayerInfo(props) {\n const hasServers = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(props.player);\n let prod;\n\n if (hasServers) {\n prod = Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__[/* HashRate */ \"a\"])(props.totalProduction);\n } else {\n prod = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: props.totalProduction\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"hacknet-nodes-money\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: props.player.money.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasServers && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.hashes), \" / \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.capacity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Total Hacknet \", hasServers ? \"Server\" : \"Node\", \" Production: \"), prod);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PlayerInfo.tsx?");
|
||
|
||
/***/ }),
|
||
/* 967 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Hacknet/ui/PurchaseButton.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: PurchaseButton */
|
||
/*! exports used: PurchaseButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\n\n\n\n\nfunction PurchaseButton(props) {\n const cost = props.cost;\n let className = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].canAfford(cost) ? \"std-button\" : \"std-button-disabled\";\n let text;\n let style = {};\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasMaxNumberHacknetServers */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n className = \"std-button-disabled\";\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Hacknet Server limit reached\");\n style = {\n color: \"red\"\n };\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Node - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: props.onClick,\n style: style\n }, text);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PurchaseButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 968 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Locations/ui/CompanyLocation.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: CompanyLocation */
|
||
/*! exports used: CompanyLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApplyToJobButton */ 221);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Locations */ 194);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Company/CompanyPosition */ 276);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Favor */ 360);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Company/ui/QuitJobPopup */ 969);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction CompanyLocation(props) {\n const p = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_3__[/* Companies */ \"a\"][props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n /**\n * Reference to the Location that this component is being rendered for\n */\n\n const location = _Locations__WEBPACK_IMPORTED_MODULE_2__[/* Locations */ \"a\"][props.locName];\n\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n /**\n * Name of company position that player holds, if applicable\n */\n\n\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n\n const companyPosition = jobTitle ? _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][jobTitle] : null;\n p.location = props.locName;\n\n function applyForAgentJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const loc = location;\n if (!loc.infiltrationData) throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n router.toInfiltration(loc);\n }\n\n function work(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n\n if (pos instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__[/* CompanyPosition */ \"a\"]) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n\n router.toWork();\n }\n }\n\n function quit(e) {\n if (!e.isTrusted) return;\n const popupId = `quit-job-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__[/* createPopup */ \"a\"])(popupId, _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__[/* QuitJobPopup */ \"a\"], {\n locName: props.locName,\n company: company,\n player: p,\n onQuit: rerender,\n popupId: popupId\n });\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, isEmployedHere && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Job Title: \", jobTitle), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__[/* Reputation */ \"a\"])(company.playerReputation), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You will earn \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(favorGain[0]), \" company favor upon resetting after installing Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(company.favor), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"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 Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: work,\n text: \"Work\"\n }), \"\\xA0\\xA0\\xA0\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: quit,\n text: \"Quit\"\n })), company.hasAgentPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* AgentCompanyPositions */ \"a\"][0]],\n onClick: applyForAgentJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Agent Job\"\n }), company.hasBusinessConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessConsultantCompanyPositions */ \"c\"][0]],\n onClick: applyForBusinessConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Consultant Job\"\n }), company.hasBusinessPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessCompanyPositions */ \"b\"][0]],\n onClick: applyForBusinessJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Job\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][1]],\n onClick: applyForEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be an Employee\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][1]],\n onClick: applyForPartTimeEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Employee\"\n }), company.hasITPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* ITCompanyPositions */ \"d\"][0]],\n onClick: applyForItJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for IT Job\"\n }), company.hasSecurityPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SecurityCompanyPositions */ \"h\"][2]],\n onClick: applyForSecurityJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Security Job\"\n }), company.hasSoftwareConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]],\n onClick: applyForSoftwareConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Consultant Job\"\n }), company.hasSoftwarePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareCompanyPositions */ \"j\"][0]],\n onClick: applyForSoftwareJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Job\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][0]],\n onClick: applyForWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a Waiter\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][0]],\n onClick: applyForPartTimeWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Waiter\"\n }), location.infiltrationData != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: startInfiltration,\n style: {\n display: \"block\"\n },\n text: \"Infiltrate Company\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CompanyLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 969 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Company/ui/QuitJobPopup.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: QuitJobPopup */
|
||
/*! exports used: QuitJobPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return QuitJobPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\nfunction QuitJobPopup(props) {\n function quit() {\n props.player.quitJob(props.locName);\n props.onQuit();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to quit your job at \", props.company.name, \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n autoFocus: true,\n className: \"std-button\",\n onClick: quit\n }, \"Quit\"));\n}\n\n//# sourceURL=webpack:///./src/Company/ui/QuitJobPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 970 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Locations/ui/GymLocation.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: GymLocation */
|
||
/*! exports used: GymLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GymLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\n\nclass GymLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.trainStrength = this.trainStrength.bind(this);\n this.trainDefense = this.trainDefense.bind(this);\n this.trainDexterity = this.trainDexterity.bind(this);\n this.trainAgility = this.trainAgility.bind(this);\n this.calculateCost = this.calculateCost.bind(this);\n }\n\n calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(this.props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return this.props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return this.props.loc.costMult * discount;\n }\n\n train(stat) {\n const loc = this.props.loc;\n this.props.p.startClass(this.calculateCost(), loc.expMult, stat);\n }\n\n trainStrength() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n }\n\n trainDefense() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n }\n\n trainDexterity() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n }\n\n trainAgility() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n }\n\n render() {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * this.calculateCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainStrength,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Strength (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDefense,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Defense (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDexterity,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Dexterity (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainAgility,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Agility (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GymLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 971 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/Locations/ui/HospitalLocation.tsx ***!
|
||
\***********************************************/
|
||
/*! exports provided: HospitalLocation */
|
||
/*! exports used: HospitalLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HospitalLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Hospital/Hospital */ 310);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a hospital\n *\n * This subcomponent renders all of the buttons for hospital options\n */\n\n\n\n\n\nclass HospitalLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n this.state = {\n currHp: this.props.p.hp\n };\n }\n\n getCost() {\n return Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__[/* getHospitalizationCost */ \"b\"])(this.props.p);\n }\n\n getHealed(e) {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\n }\n\n if (this.props.p.hp >= this.props.p.max_hp) {\n return;\n }\n\n const cost = this.getCost();\n this.props.p.loseMoney(cost);\n this.props.p.hp = this.props.p.max_hp;\n this.props.p.recordMoneySource(-1 * cost, \"hospitalization\"); // This just forces a re-render to update the cost\n\n this.setState({\n currHp: this.props.p.hp\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You were healed to full health! The hospital billed you for \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n render() {\n const cost = this.getCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__[/* AutoupdatingStdButton */ \"a\"], {\n onClick: this.getHealed,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Get treatment for wounds - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/HospitalLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 972 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Locations/ui/SlumsLocation.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: SlumsLocation */
|
||
/*! exports used: SlumsLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlumsLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a slum\n *\n * This subcomponent renders all of the buttons for committing crimes\n */\n\n\n\n\n\nfunction SlumsLocation() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n\n function shoplift(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.commit(player);\n router.toWork();\n }\n\n function robStore(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.commit(player);\n router.toWork();\n }\n\n function mug(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.commit(player);\n router.toWork();\n }\n\n function larceny(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.commit(player);\n router.toWork();\n }\n\n function dealDrugs(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.commit(player);\n router.toWork();\n }\n\n function bondForgery(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.commit(player);\n router.toWork();\n }\n\n function traffickArms(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.commit(player);\n router.toWork();\n }\n\n function homicide(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.commit(player);\n router.toWork();\n }\n\n function grandTheftAuto(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.commit(player);\n router.toWork();\n }\n\n function kidnap(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.commit(player);\n router.toWork();\n }\n\n function assassinate(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.commit(player);\n router.toWork();\n }\n\n function heist(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.commit(player);\n router.toWork();\n }\n\n const shopliftChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.successRate(player);\n const robStoreChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.successRate(player);\n const mugChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.successRate(player);\n const larcenyChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.successRate(player);\n const drugsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.successRate(player);\n const bondChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.successRate(player);\n const armsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.successRate(player);\n const homicideChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.successRate(player);\n const gtaChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.successRate(player);\n const kidnapChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.successRate(player);\n const assassinateChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.successRate(player);\n const heistChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.successRate(player);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: shoplift,\n style: {\n display: \"block\"\n },\n text: `Shoplift (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(shopliftChance)} chance of success)`,\n tooltip: \"Attempt to shoplift from a low-end retailer\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: robStore,\n style: {\n display: \"block\"\n },\n text: `Rob store (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(robStoreChance)} chance of success)`,\n tooltip: \"Attempt to commit armed robbery on a high-end store\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: mug,\n style: {\n display: \"block\"\n },\n text: `Mug someone (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(mugChance)} chance of success)`,\n tooltip: \"Attempt to mug a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: larceny,\n style: {\n display: \"block\"\n },\n text: `Larceny (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(larcenyChance)} chance of success)`,\n tooltip: \"Attempt to rob property from someone's house\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: dealDrugs,\n style: {\n display: \"block\"\n },\n text: `Deal Drugs (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(drugsChance)} chance of success)`,\n tooltip: \"Attempt to deal drugs\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: bondForgery,\n style: {\n display: \"block\"\n },\n text: `Bond Forgery (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(bondChance)} chance of success)`,\n tooltip: \"Attempt to forge corporate bonds\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: traffickArms,\n style: {\n display: \"block\"\n },\n text: `Traffick illegal Arms (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(armsChance)} chance of success)`,\n tooltip: \"Attempt to smuggle illegal arms into the city\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: homicide,\n style: {\n display: \"block\"\n },\n text: `Homicide (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(homicideChance)} chance of success)`,\n tooltip: \"Attempt to murder a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: grandTheftAuto,\n style: {\n display: \"block\"\n },\n text: `Grand theft Auto (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(gtaChance)} chance of success)`,\n tooltip: \"Attempt to commit grand theft auto\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: kidnap,\n style: {\n display: \"block\"\n },\n text: `Kidnap and Ransom (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(kidnapChance)} chance of success)`,\n tooltip: \"Attempt to kidnap and ransom a high-profile-target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: assassinate,\n style: {\n display: \"block\"\n },\n text: `Assassinate (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(assassinateChance)} chance of success)`,\n tooltip: \"Attempt to assassinate a high-profile target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: heist,\n style: {\n display: \"block\"\n },\n text: `Heist (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(heistChance)} chance of success)`,\n tooltip: \"Attempt to pull off the ultimate heist\"\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SlumsLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 973 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Locations/ui/SpecialLocation.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: SpecialLocation */
|
||
/*! exports used: SpecialLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Corporation/ui/CreateCorporationPopup */ 974);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\n\n\n\n\n\n\n\n\nfunction SpecialLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n const [rerender, setRerender] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const inBladeburner = player.inBladeburner();\n /**\n * Click handler for \"Create Corporation\" button at Sector-12 City Hall\n */\n\n function createCorporationPopup() {\n const popupId = `create-start-corporation-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* createPopup */ \"a\"])(popupId, _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__[/* CreateCorporationPopup */ \"a\"], {\n player: player,\n popupId: popupId\n });\n }\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n\n\n function handleBladeburner() {\n const p = player;\n\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else {\n // Apply for Bladeburner division\n if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n p.startBladeburner({\n new: true\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You have been accepted into the Bladeburner division!\");\n setRerender(old => !old);\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n }\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n\n\n function handleResleeving() {\n router.toResleeves();\n }\n\n function renderBladeburner() {\n if (!player.canAccessBladeburner()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleBladeburner,\n style: {\n display: \"block\"\n },\n text: text\n });\n }\n\n function renderNoodleBar() {\n function EatNoodles() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You ate some delicious noodles and feel refreshed.\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: EatNoodles,\n style: {\n display: \"block\"\n },\n text: \"Eat noodles\"\n });\n }\n\n function renderCreateCorporation() {\n if (!player.canAccessCorporation()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"A business man is yelling at a clerk. You should come back later.\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__[/* AutoupdatingStdButton */ \"a\"], {\n disabled: !player.canAccessCorporation() || player.hasCorporation(),\n onClick: createCorporationPopup,\n style: {\n display: \"block\"\n },\n text: \"Create a Corporation\"\n });\n }\n\n function renderResleeving() {\n if (!player.canAccessResleeving()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleResleeving,\n style: {\n display: \"block\"\n },\n text: \"Re-Sleeve\"\n });\n }\n\n switch (props.loc.name) {\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoVitaLife:\n {\n return renderResleeving();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12CityHall:\n {\n return renderCreateCorporation();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12NSA:\n {\n return renderBladeburner();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoNoodleBar:\n {\n return renderNoodleBar();\n }\n\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SpecialLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 974 */
|
||
/*!*******************************************************!*\
|
||
!*** ./src/Corporation/ui/CreateCorporationPopup.tsx ***!
|
||
\*******************************************************/
|
||
/*! exports provided: CreateCorporationPopup */
|
||
/*! exports used: CreateCorporationPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CreateCorporationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction CreateCorporationPopup(props) {\n if (!props.player.canAccessCorporation() || props.player.hasCorporation()) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n setName(event.target.value);\n }\n\n function selfFund() {\n if (!props.player.canAfford(150e9)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough money to create a corporation! You need $150b.\");\n return;\n }\n\n if (name == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid company name!\");\n return;\n }\n\n props.player.startCorporation(name);\n props.player.loseMoney(150e9);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You just self-funded your own corporation. You can visit \" + \"and manage your company in the City.\");\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function seed() {\n if (name == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid company name!\");\n return;\n }\n\n props.player.startCorporation(name, 500e6);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You just started your own corporation with government seed money. \" + \"You can visit and manage your company in the City.\");\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you would like to start one, please enter a name for your corporation below:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n placeholder: \"Corporation Name\",\n onChange: onChange,\n value: name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: seed,\n disabled: name == \"\"\n }, \"Use seed money\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: selfFund,\n disabled: name == \"\" || !props.player.canAfford(150e9)\n }, \"Self-Fund (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: 150e9,\n player: props.player\n }), \")\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CreateCorporationPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 975 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Locations/ui/TechVendorLocation.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: TechVendorLocation */
|
||
/*! exports used: TechVendorLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TechVendorLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RamButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RamButton */ 976);\n/* harmony import */ var _TorButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TorButton */ 977);\n/* harmony import */ var _CoresButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CoresButton */ 979);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseServerPopup */ 980);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a tech vendor\n *\n * This subcomponent renders all of the buttons for purchasing things from tech vendors\n */\n\n\n\n\n\n\n\n\n\nfunction TechVendorLocation(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function openPurchaseServer(ram, cost, p) {\n const popupId = \"purchase-server-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseServerPopup */ \"a\"], {\n ram: ram,\n cost: cost,\n p: p,\n popupId: popupId,\n rerender: rerender\n });\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n const btnStyle = {\n display: \"block\"\n };\n const purchaseServerButtons = [];\n\n for (let i = props.loc.techVendorMinRam; i <= props.loc.techVendorMaxRam; i *= 2) {\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__[/* getPurchaseServerCost */ \"a\"])(i);\n purchaseServerButtons.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: i,\n onClick: () => openPurchaseServer(i, cost, props.p),\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase \", i, \"GB Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n disabled: !props.p.canAfford(cost)\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, purchaseServerButtons, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"\\\"You can order bigger servers via scripts. We don't take custom order in person.\\\"\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TorButton__WEBPACK_IMPORTED_MODULE_2__[/* TorButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_RamButton__WEBPACK_IMPORTED_MODULE_1__[/* RamButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CoresButton__WEBPACK_IMPORTED_MODULE_3__[/* CoresButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TechVendorLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 976 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Locations/ui/RamButton.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: RamButton */
|
||
/*! exports used: RamButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RamButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mathjax-react */ 196);\n\n\n\n\n\n\n\nfunction RamButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' RAM - MAX\"\n });\n }\n\n const cost = props.p.getUpgradeHomeRamCost();\n\n function buy() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamForHomeComputer */ \"d\"])(props.p);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' RAM (\", homeComputer.maxRam, \"GB -> \", homeComputer.maxRam * 2, \"GB) -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_6__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 3.2 \\times 10^3 \\times 1.58^{log_2{(ram)}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/RamButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 977 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Locations/ui/TorButton.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: TorButton */
|
||
/*! exports used: TorButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TorButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../LocationsHelpers */ 978);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\nfunction TorButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n\n function buy() {\n Object(_LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseTorRouter */ \"a\"])(props.p);\n props.rerender();\n }\n\n if (props.p.hasTorRouter()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"TOR Router - Purchased\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase TOR router - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost,\n player: props.p\n }))\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TorButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 978 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Locations/LocationsHelpers.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: purchaseTorRouter */
|
||
/*! exports used: purchaseTorRouter */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return purchaseTorRouter; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/**\n * Location and traveling-related helper functions.\n * Mostly used for UI\n */\n\n\n\n\n\n/**\n * Attempt to purchase a TOR router\n * @param {IPlayer} p - Player object\n */\n\nfunction purchaseTorRouter(p) {\n if (p.hasTorRouter()) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(`You already have a TOR Router!`);\n return;\n }\n\n if (!p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You cannot afford to purchase the TOR router!\");\n return;\n }\n\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost);\n const darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n p.getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(p.getHomeComputer().ip);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You have purchased a TOR router!<br>\" + \"You now have access to the dark web from your home computer.<br>\" + \"Use the scan/scan-analyze commands to search for the dark web connection.\");\n}\n\n//# sourceURL=webpack:///./src/Locations/LocationsHelpers.tsx?");
|
||
|
||
/***/ }),
|
||
/* 979 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Locations/ui/CoresButton.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: CoresButton */
|
||
/*! exports used: CoresButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoresButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mathjax-react */ 196);\n\n\n\n\n\nfunction CoresButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n const maxCores = homeComputer.cpuCores >= 8;\n\n if (maxCores) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' cores - MAX\"\n });\n }\n\n const cost = 1e9 * Math.pow(7.5, homeComputer.cpuCores);\n\n function buy() {\n if (maxCores) return;\n if (!props.p.canAfford(cost)) return;\n props.p.loseMoney(cost);\n homeComputer.cpuCores++;\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' cores (\", homeComputer.cpuCores, \" -> \", homeComputer.cpuCores + 1, \") -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_4__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 10^9 \\times 7.5 ^{\\text{cores}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CoresButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 980 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/Locations/ui/PurchaseServerPopup.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: PurchaseServerPopup */
|
||
/*! exports used: PurchaseServerPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseServerPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for the popup used to purchase a new server.\n */\n\n\n\n\n\n\nfunction PurchaseServerPopup(props) {\n const [hostname, setHostname] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function tryToPurchaseServer() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseServer */ \"e\"])(hostname, props.ram, props.cost, props.p);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) tryToPurchaseServer();\n }\n\n function onChange(event) {\n setHostname(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to purchase a new server with \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRAM(props.ram), \" of RAM for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.cost,\n player: props.p\n }), \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Please enter the server hostname below:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-input-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n onKeyUp: onKeyUp,\n onChange: onChange,\n className: \"text-input noselect\",\n type: \"text\",\n placeholder: \"Unique Hostname\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: tryToPurchaseServer,\n text: \"Purchase Server\",\n disabled: !props.p.canAfford(props.cost)\n })));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/PurchaseServerPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 981 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/Locations/ui/TravelConfirmationPopup.tsx ***!
|
||
\******************************************************/
|
||
/*! exports provided: TravelConfirmationPopup */
|
||
/*! exports used: TravelConfirmationPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelConfirmationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\n\nfunction TravelConfirmationPopup(props) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost;\n\n function travel() {\n props.travel();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Would you like to travel to \", props.city, \"? The trip will cost \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: cost,\n player: props.player\n }), \".\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: travel\n }, \"Travel\"));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelConfirmationPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 982 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/Locations/ui/UniversityLocation.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: UniversityLocation */
|
||
/*! exports used: UniversityLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UniversityLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a university\n *\n * This subcomponent renders all of the buttons for studying/taking courses\n */\n\n\n\n\n\n\n\nfunction UniversityLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n\n function calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function take(stat) {\n const loc = props.loc;\n player.startClass(calculateCost(), loc.expMult, stat);\n router.toWork();\n }\n\n function study() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience);\n }\n\n function dataStructures() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructures);\n }\n\n function networks() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworks);\n }\n\n function algorithms() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithms);\n }\n\n function management() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagement);\n }\n\n function leadership() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadership);\n }\n\n const costMult = calculateCost();\n const dataStructuresCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult;\n const networksCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult;\n const algorithmsCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult;\n const managementCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult;\n const leadershipCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult;\n const earnHackingExpTooltip = `Gain hacking experience!`;\n const earnCharismaExpTooltip = `Gain charisma experience!`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: study,\n style: {\n display: \"block\"\n },\n text: `Study Computer Science (free)`,\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: dataStructures,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Data Structures course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: dataStructuresCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: networks,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Networks course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: networksCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: algorithms,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Algorithms course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: algorithmsCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: management,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Management course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: managementCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: leadership,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Leadership course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: leadershipCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/UniversityLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 983 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/Locations/ui/CasinoLocation.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: CasinoLocation */
|
||
/*! exports used: CasinoLocation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CasinoLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Casino/Blackjack */ 984);\n/* harmony import */ var _Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Casino/CoinFlip */ 988);\n/* harmony import */ var _Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Casino/Roulette */ 989);\n/* harmony import */ var _Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Casino/SlotMachine */ 990);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\n\nvar GameType;\n\n(function (GameType) {\n GameType[\"None\"] = \"none\";\n GameType[\"Coin\"] = \"coin\";\n GameType[\"Slots\"] = \"slots\";\n GameType[\"Roulette\"] = \"roulette\";\n GameType[\"Blackjack\"] = \"blackjack\";\n})(GameType || (GameType = {}));\n\nclass CasinoLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n game: GameType.None\n };\n this.updateGame = this.updateGame.bind(this);\n }\n\n updateGame(game) {\n this.setState({\n game\n });\n }\n\n renderGames() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Coin),\n text: \"Play coin flip\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Slots),\n text: \"Play slots\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Roulette),\n text: \"Play roulette\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Blackjack),\n text: \"Play blackjack\"\n }));\n }\n\n renderGame() {\n let elem = null;\n\n switch (this.state.game) {\n case GameType.Coin:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__[/* CoinFlip */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Slots:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__[/* SlotMachine */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Roulette:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__[/* Roulette */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Blackjack:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__[/* Blackjack */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.None:\n break;\n\n default:\n throw new Error(`MissingCaseException: ${this.state.game}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.None),\n text: \"Stop playing\"\n }), elem);\n }\n\n render() {\n if (this.state.game === GameType.None) {\n return this.renderGames();\n } else {\n return this.renderGame();\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CasinoLocation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 984 */
|
||
/*!**********************************!*\
|
||
!*** ./src/Casino/Blackjack.tsx ***!
|
||
\**********************************/
|
||
/*! exports provided: Blackjack */
|
||
/*! exports used: Blackjack */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Blackjack; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CardDeck/Deck */ 985);\n/* harmony import */ var _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CardDeck/Hand */ 413);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 1389);\n/* harmony import */ var _CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CardDeck/ReactCard */ 559);\n/* harmony import */ var _ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/React/MuiTextField */ 987);\n/* harmony import */ var _ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/React/MuiButton */ 487);\n/* harmony import */ var _ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/React/MuiPaper */ 560);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\nconst MAX_BET = 100e6;\nvar Result;\n\n(function (Result) {\n Result[\"Pending\"] = \"\";\n Result[\"PlayerWon\"] = \"You won!\";\n Result[\"PlayerWonByBlackjack\"] = \"You Won! Blackjack!\";\n Result[\"DealerWon\"] = \"You lost!\";\n Result[\"Tie\"] = \"Push! (Tie)\";\n})(Result || (Result = {}));\n\nclass Blackjack extends _Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"canStartGame\", () => {\n const {\n p\n } = this.props;\n const {\n bet\n } = this.state;\n return p.canAfford(bet);\n });\n\n _defineProperty(this, \"startGame\", () => {\n if (!this.canStartGame()) {\n return;\n } // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e)\n\n\n this.props.p.loseMoney(this.state.bet);\n const playerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending\n }); // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"getHandValue\", hand => {\n let result = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n\n if (value >= 10) {\n result = result.map(x => x + 10);\n } else if (value === 1) {\n result = result.flatMap(x => [x + 1, x + 11]);\n } else {\n result = result.map(x => x + value);\n }\n }\n\n return result;\n });\n\n _defineProperty(this, \"getTrueHandValue\", hand => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter(x => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n });\n\n _defineProperty(this, \"getHandDisplayValues\", hand => {\n const handValues = this.getHandValue(hand);\n\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter(x => x <= 21))];\n }\n });\n\n _defineProperty(this, \"isHandBusted\", hand => {\n return this.getTrueHandValue(hand) > 21;\n });\n\n _defineProperty(this, \"playerHit\", event => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n this.setState({\n playerHand: newHand\n }); // Check if player busted, and finish the game if so\n\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"playerStay\", event => {\n if (!event.isTrusted) {\n return;\n } // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n\n\n let newDealerHand = this.state.dealerHand;\n\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand\n }); // If dealer has busted, then player wins\n\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand); // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n });\n\n _defineProperty(this, \"finishGame\", result => {\n let gains = 0;\n\n if (this.isPlayerWinResult(result)) {\n gains = this.state.bet; // We 2x the gains because we took away money at the start, so we need to give the original bet back.\n\n this.win(this.props.p, 2 * gains);\n } else if (result === Result.DealerWon) {\n gains = -1 * this.state.bet;\n this.win(this.props.p, -this.state.bet); // Get the original bet back\n // Dont need to take money here since we already did it at the start\n } else if (result === Result.Tie) {\n this.win(this.props.p, this.state.bet); // Get the original bet back\n }\n\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains\n });\n });\n\n _defineProperty(this, \"isPlayerWinResult\", result => {\n return result === Result.PlayerWon || result === Result.PlayerWonByBlackjack;\n });\n\n _defineProperty(this, \"wagerOnChange\", event => {\n const {\n p\n } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\"\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\"\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\"\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\"\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending // Reset previous game status to clear the win/lose text UI\n\n });\n }\n });\n\n _defineProperty(this, \"startOnClick\", event => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n });\n\n this.deck = new _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__[/* Deck */ \"a\"](5); // 5-deck multideck\n\n const initialBet = 1e6;\n this.state = {\n playerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n dealerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\"\n };\n }\n\n render() {\n const {\n betInput,\n playerHand,\n dealerHand,\n gameInProgress,\n result,\n wagerInvalid,\n wagerInvalidHelperText,\n gains\n } = this.state; // Get the player totals to display.\n\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__[/* MuiTextField */ \"a\"], {\n value: betInput,\n label: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Wager (Max: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: MAX_BET\n }), \")\"),\n disabled: gameInProgress,\n onChange: this.wagerOnChange,\n error: wagerInvalid,\n helperText: wagerInvalid ? wagerInvalidHelperText : \"\",\n type: \"number\",\n variant: \"filled\",\n style: {\n width: \"200px\"\n },\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n position: \"start\"\n }, \"$\")\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Total earnings this session: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: gains\n }))), !gameInProgress ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.startOnClick,\n disabled: wagerInvalid || !this.canStartGame()\n }, \"Start\")) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.playerHit\n }, \"Hit\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n color: \"secondary\",\n onClick: this.playerStay\n }, \"Stay\")), (gameInProgress || result !== Result.Pending) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Player\"), playerHand.cards.map((card, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n key: i\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), playerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Dealer\"), dealerHand.cards.map((card, i) => // Hide every card except the first while game is in progress\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n hidden: gameInProgress && i !== 0,\n key: i\n })), !gameInProgress && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), dealerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))))), result !== Result.Pending && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, result, this.isPlayerWinResult(result) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You gained \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n })), result === Result.DealerWon && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n }))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Blackjack.tsx?");
|
||
|
||
/***/ }),
|
||
/* 985 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Casino/CardDeck/Deck.ts ***!
|
||
\*************************************/
|
||
/*! exports provided: Deck */
|
||
/*! exports used: Deck */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Deck; });\n/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Card */ 190);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 986);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\nclass Deck {\n // Support multiple decks\n constructor(numDecks = 1) {\n _defineProperty(this, \"cards\", []);\n\n this.numDecks = numDecks;\n this.reset();\n }\n\n shuffle() {\n this.cards = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"shuffle\"])(this.cards); // Just use lodash\n }\n\n drawCard() {\n if (this.cards.length == 0) {\n throw new Error(\"Tried to draw card from empty deck\");\n }\n\n return this.cards.shift(); // Guaranteed to return a Card since we throw an Error if array is empty\n } // Draws a card, resetting the deck beforehands if the Deck is empty\n\n\n safeDrawCard() {\n if (this.cards.length === 0) {\n this.reset();\n }\n\n return this.drawCard();\n } // Reset the deck back to the original 52 cards and shuffle it\n\n\n reset() {\n this.cards = [];\n\n for (let i = 1; i <= 13; ++i) {\n for (let j = 0; j < this.numDecks; ++j) {\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Clubs));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Diamonds));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Hearts));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Spades));\n }\n }\n\n this.shuffle();\n }\n\n size() {\n return this.cards.length;\n }\n\n isEmpty() {\n return this.cards.length === 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Deck.ts?");
|
||
|
||
/***/ }),
|
||
/* 986 */,
|
||
/* 987 */
|
||
/*!***************************************!*\
|
||
!*** ./src/ui/React/MuiTextField.tsx ***!
|
||
\***************************************/
|
||
/*! exports provided: MuiTextField */
|
||
/*! exports used: MuiTextField */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiTextField; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 373);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Wrapper around material-ui's TextField component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst backgroundColorStyles = {\n backgroundColor: \"rgba(57, 54, 54, 0.9)\",\n \"&:hover\": {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n }\n};\nconst formControlStyles = {\n border: \"1px solid #e2e2e1\",\n overflow: \"hidden\",\n borderRadius: 4,\n color: \"white\",\n ...backgroundColorStyles\n};\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...formControlStyles\n }\n});\nconst useInputStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...backgroundColorStyles,\n color: \"white\"\n },\n focused: {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n },\n disabled: {\n color: \"white\"\n }\n});\nconst useLabelStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n color: \"white\"\n },\n focused: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n },\n disabled: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n }\n});\nconst MuiTextField = props => {\n var _props$InputProps, _props$InputLabelProp;\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n },\n InputProps: {\n classes: { ...useInputStyles(),\n ...((_props$InputProps = props.InputProps) === null || _props$InputProps === void 0 ? void 0 : _props$InputProps.classes)\n },\n ...props.InputProps\n },\n InputLabelProps: {\n classes: { ...useLabelStyles(),\n ...((_props$InputLabelProp = props.InputLabelProps) === null || _props$InputLabelProp === void 0 ? void 0 : _props$InputLabelProp.classes)\n },\n ...props.InputLabelProps\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiTextField.tsx?");
|
||
|
||
/***/ }),
|
||
/* 988 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Casino/CoinFlip.tsx ***!
|
||
\*********************************/
|
||
/*! exports provided: CoinFlip */
|
||
/*! exports used: CoinFlip */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoinFlip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RNG */ 279);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ 61);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\nconst minPlay = 0;\nconst maxPlay = 10e3;\nclass CoinFlip extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n this.state = {\n investment: 1000,\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \" \"),\n status: \"\",\n playLock: false\n };\n this.play = this.play.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n play(guess) {\n if (this.reachedLimit(this.props.p)) return;\n const v = _RNG__WEBPACK_IMPORTED_MODULE_2__[/* BadRNG */ \"a\"].random();\n let letter;\n\n if (v < 0.5) {\n letter = \"H\";\n } else {\n letter = \"T\";\n }\n\n const correct = guess === letter;\n this.setState({\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: correct ? \"text\" : \"failure\"\n }, letter),\n status: correct ? \" win!\" : \"lose!\",\n playLock: true\n });\n setTimeout(() => this.setState({\n playLock: false\n }), 250);\n\n if (correct) {\n this.win(this.props.p, this.state.investment);\n } else {\n this.win(this.props.p, -this.state.investment);\n }\n\n if (this.reachedLimit(this.props.p)) return;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | `, this.state.result, ` | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"text\"\n }, \"Play for: \"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n value: this.state.investment\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"H\")),\n text: \"Head!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"T\")),\n text: \"Tail!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CoinFlip.tsx?");
|
||
|
||
/***/ }),
|
||
/* 989 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Casino/Roulette.tsx ***!
|
||
\*********************************/
|
||
/*! exports provided: Roulette */
|
||
/*! exports used: Roulette */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Roulette; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RNG */ 279);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nconst minPlay = 0;\nconst maxPlay = 1e7;\n\nfunction isRed(n) {\n return [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36].includes(n);\n}\n\nconst redNumbers = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36];\nconst strategies = {\n Red: {\n match: n => {\n if (n === 0) return false;\n return redNumbers.includes(n);\n },\n payout: 1\n },\n Black: {\n match: n => {\n return !redNumbers.includes(n);\n },\n payout: 1\n },\n Odd: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 1;\n },\n payout: 1\n },\n Even: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 0;\n },\n payout: 1\n },\n High: {\n match: n => {\n if (n === 0) return false;\n return n > 18;\n },\n payout: 1\n },\n Low: {\n match: n => {\n if (n === 0) return false;\n return n < 19;\n },\n payout: 1\n },\n Third1: {\n match: n => {\n if (n === 0) return false;\n return n <= 12;\n },\n payout: 2\n },\n Third2: {\n match: n => {\n if (n === 0) return false;\n return n >= 13 && n <= 24;\n },\n payout: 2\n },\n Third3: {\n match: n => {\n if (n === 0) return false;\n return n >= 25;\n },\n payout: 2\n }\n};\n\nfunction Single(s) {\n return {\n match: n => {\n return s === n;\n },\n payout: 36\n };\n}\n\nclass Roulette extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_4__[/* WHRNG */ \"b\"](new Date().getTime());\n this.state = {\n investment: 1000,\n canPlay: true,\n status: \"waiting\",\n n: 0,\n lock: true,\n strategy: {\n payout: 0,\n match: () => {\n return false;\n }\n }\n };\n this.step = this.step.bind(this);\n this.currentNumber = this.currentNumber.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n if (!this.state.lock) {\n this.setState({\n n: Math.floor(Math.random() * 37)\n });\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n currentNumber() {\n if (this.state.n === 0) return \"0\";\n const color = isRed(this.state.n) ? \"R\" : \"B\";\n return `${this.state.n}${color}`;\n }\n\n play(s) {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n canPlay: false,\n lock: false,\n status: \"playing\",\n strategy: s\n });\n setTimeout(() => {\n let n = Math.floor(this.rng.random() * 37);\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let gain = 0;\n let playerWin = this.state.strategy.match(n); // oh yeah, the house straight up cheats. Try finding the seed now!\n\n if (playerWin && Math.random() > 0.9) {\n playerWin = false;\n\n while (this.state.strategy.match(n)) {\n n++;\n }\n }\n\n if (playerWin) {\n gain = this.state.investment * this.state.strategy.payout;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"won \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gain\n }));\n } else {\n gain = -this.state.investment;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: -gain\n }));\n }\n\n this.win(this.props.p, gain);\n this.setState({\n canPlay: true,\n lock: true,\n status: status,\n n: n\n });\n this.reachedLimit(this.props.p);\n }, 1600);\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.currentNumber()), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"3\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(3)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"6\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(6)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"9\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(9)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(12)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"15\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(15)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"18\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(18)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"21\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(21)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(24)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"27\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(27)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"30\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(30)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"33\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(33)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(36)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"2\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(2)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"5\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(5)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"8\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(8)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"11\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(11)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"14\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(14)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"17\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(17)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"20\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(20)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"23\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(23)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"26\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(26)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"29\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(29)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"32\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(32)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"35\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(35)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(1)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"4\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(4)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"7\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(7)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"10\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(10)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(13)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"16\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(16)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"19\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(19)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"22\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(22)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(25)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"28\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(28)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"31\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(31)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"34\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(34)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1 to 12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third1))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13 to 24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third2))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25 to 36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third3))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Red\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Red))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Black\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Black))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Odd\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Odd))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Even\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Even))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"High\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.High))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Low\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Low))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"0\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(0)))\n }))))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Roulette.tsx?");
|
||
|
||
/***/ }),
|
||
/* 990 */
|
||
/*!************************************!*\
|
||
!*** ./src/Casino/SlotMachine.tsx ***!
|
||
\************************************/
|
||
/*! exports provided: SlotMachine */
|
||
/*! exports used: SlotMachine */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlotMachine; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RNG */ 279);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n// statically shuffled array of symbols.\nconst symbols = [\"D\", \"C\", \"$\", \"?\", \"♥\", \"A\", \"C\", \"B\", \"C\", \"E\", \"B\", \"E\", \"C\", \"*\", \"D\", \"♥\", \"B\", \"A\", \"A\", \"A\", \"C\", \"A\", \"D\", \"B\", \"E\", \"?\", \"D\", \"*\", \"@\", \"♥\", \"B\", \"E\", \"?\"];\n\nfunction getPayout(s, n) {\n switch (s) {\n case \"$\":\n return [20, 200, 1000][n];\n\n case \"@\":\n return [8, 80, 400][n];\n\n case \"♥\":\n case \"?\":\n return [6, 20, 150][n];\n\n case \"D\":\n case \"E\":\n return [1, 8, 30][n];\n\n default:\n return [1, 5, 20][n];\n }\n}\n\nconst payLines = [// lines\n[[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]], [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4]], [[2, 0], [2, 1], [2, 2], [2, 3], [2, 4]], // Vs\n[[2, 0], [1, 1], [0, 2], [1, 3], [2, 4]], [[0, 0], [1, 1], [2, 2], [1, 3], [0, 4]], // rest\n[[0, 0], [1, 1], [1, 2], [1, 3], [0, 4]], [[2, 0], [1, 1], [1, 2], [1, 3], [2, 4]], [[1, 0], [0, 1], [0, 2], [0, 3], [1, 4]], [[1, 0], [2, 1], [2, 2], [2, 3], [1, 4]]];\nconst minPlay = 0;\nconst maxPlay = 1e6;\nclass SlotMachine extends _Game__WEBPACK_IMPORTED_MODULE_4__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_3__[/* WHRNG */ \"b\"](this.props.p.totalPlaytime);\n this.state = {\n index: [0, 0, 0, 0, 0],\n investment: 1000,\n locks: [0, 0, 0, 0, 0],\n canPlay: true,\n status: \"waiting\"\n };\n this.play = this.play.bind(this);\n this.lock = this.lock.bind(this);\n this.unlock = this.unlock.bind(this);\n this.step = this.step.bind(this);\n this.checkWinnings = this.checkWinnings.bind(this);\n this.getTable = this.getTable.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n let stoppedOne = false;\n const index = this.state.index.slice();\n\n for (const i in index) {\n if (index[i] === this.state.locks[i] && !stoppedOne) continue;\n index[i] = (index[i] + 1) % symbols.length;\n stoppedOne = true;\n }\n\n this.setState({\n index: index\n });\n\n if (stoppedOne && index.every((e, i) => e === this.state.locks[i])) {\n this.checkWinnings();\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n getTable() {\n return [[symbols[(this.state.index[0] + symbols.length - 1) % symbols.length], symbols[(this.state.index[1] + symbols.length - 1) % symbols.length], symbols[(this.state.index[2] + symbols.length - 1) % symbols.length], symbols[(this.state.index[3] + symbols.length - 1) % symbols.length], symbols[(this.state.index[4] + symbols.length - 1) % symbols.length]], [symbols[this.state.index[0]], symbols[this.state.index[1]], symbols[this.state.index[2]], symbols[this.state.index[3]], symbols[this.state.index[4]]], [symbols[(this.state.index[0] + 1) % symbols.length], symbols[(this.state.index[1] + 1) % symbols.length], symbols[(this.state.index[2] + 1) % symbols.length], symbols[(this.state.index[3] + 1) % symbols.length], symbols[(this.state.index[4] + 1) % symbols.length]]];\n }\n\n play() {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n status: \"playing\"\n });\n this.win(this.props.p, -this.state.investment);\n if (!this.state.canPlay) return;\n this.unlock();\n setTimeout(this.lock, this.rng.random() * 2000 + 1000);\n }\n\n lock() {\n this.setState({\n locks: [Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length)]\n });\n }\n\n checkWinnings() {\n const t = this.getTable();\n\n const getPaylineData = function (payline) {\n const data = [];\n\n for (const point of payline) {\n data.push(t[point[0]][point[1]]);\n }\n\n return data;\n };\n\n const countSequence = function (data) {\n let count = 1;\n\n for (let i = 1; i < data.length; i++) {\n if (data[i] !== data[i - 1]) break;\n count++;\n }\n\n return count;\n };\n\n let gains = -this.state.investment;\n\n for (const payline of payLines) {\n const data = getPaylineData(payline);\n const count = countSequence(data);\n if (count < 3) continue;\n const payout = getPayout(data[0], count - 3);\n gains += this.state.investment * payout;\n this.win(this.props.p, this.state.investment * payout);\n }\n\n this.setState({\n status: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, gains > 0 ? \"gained\" : \"lost\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: Math.abs(gains)\n })),\n canPlay: true\n });\n if (this.reachedLimit(this.props.p)) return;\n }\n\n unlock() {\n this.setState({\n locks: [-1, -1, -1, -1, -1],\n canPlay: false\n });\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n render() {\n const t = this.getTable(); // prettier-ignore\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", t[0][0], \" | \", t[0][1], \" | \", t[0][2], \" | \", t[0][3], \" | \", t[0][4], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[this.state.index[0]], \" | \", symbols[this.state.index[1]], \" | \", symbols[this.state.index[2]], \" | \", symbols[this.state.index[3]], \" | \", symbols[this.state.index[4]], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[(this.state.index[0] + 1) % symbols.length], \" | \", symbols[(this.state.index[1] + 1) % symbols.length], \" | \", symbols[(this.state.index[2] + 1) % symbols.length], \" | \", symbols[(this.state.index[3] + 1) % symbols.length], \" | \", symbols[(this.state.index[4] + 1) % symbols.length], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(this.play),\n text: \"Spin!\",\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Pay lines\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"----- \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 ----- \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7 -----\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7^\\xB7\\xB7 \\\\\\xB7\\xB7\\xB7/ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7/\\xB7\\\\\\xB7 \\xB7\\\\\\xB7/\\xB7 \\xB7---\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7v\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7---\\xB7 /\\xB7\\xB7\\xB7\\\\ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7\"));\n }\n\n} // https://felgo.com/doc/how-to-make-a-slot-game-tutorial/\n\n//# sourceURL=webpack:///./src/Casino/SlotMachine.tsx?");
|
||
|
||
/***/ }),
|
||
/* 991 */
|
||
/*!******************************************!*\
|
||
!*** ./src/ui/React/CorruptableText.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: CorruptableText */
|
||
/*! exports used: CorruptableText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorruptableText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction replace(str, i, char) {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\nfunction randomize(char) {\n const randFrom = str => str[Math.floor(Math.random() * str.length)];\n\n const classes = [\"abcdefghijklmnopqrstuvwxyz\", \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"1234567890\", \" _\", \"()[]{}<>\"];\n const other = `!@#$%^&*()_+|\\\\';\"/.,?\\`~`;\n\n for (const c of classes) {\n if (c.includes(char)) return randFrom(c);\n }\n\n return randFrom(other);\n}\n\nfunction CorruptableText(props) {\n const [content, setContent] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.content);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let counter = 5;\n const id = setInterval(() => {\n counter--;\n if (counter > 0) return;\n counter = Math.random() * 5;\n const index = Math.random() * content.length;\n const letter = content.charAt(index);\n setContent(replace(content, index, randomize(letter)));\n setTimeout(() => {\n setContent(content);\n }, 50);\n }, 100);\n return () => {\n clearInterval(id);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, content);\n}\n\n//# sourceURL=webpack:///./src/ui/React/CorruptableText.tsx?");
|
||
|
||
/***/ }),
|
||
/* 992 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Locations/ui/City.tsx ***!
|
||
\***********************************/
|
||
/*! exports provided: LocationCity */
|
||
/*! exports used: LocationCity */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationCity; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Cities */ 105);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Locations */ 194);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for displaying a City's UI.\n * This UI shows all of the available locations in the city, and lets the player\n * visit those locations\n */\n\n\n\n\n\n\n\n\nfunction toLocation(router, location) {\n if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].TravelAgency) {\n router.toTravel();\n } else if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].WorldStockExchange) {\n router.toStockMarket();\n } else {\n router.toLocation(location);\n }\n}\n\nfunction LocationLetter(location) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n if (!location) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \"*\");\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n key: location.name,\n className: \"tooltip\",\n style: {\n color: \"white\",\n whiteSpace: \"nowrap\",\n margin: \"0px\",\n padding: \"0px\",\n cursor: \"pointer\"\n },\n onClick: () => toLocation(router, location)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, \"X\"));\n}\n\nfunction ASCIICity(props) {\n const locationLettersRegex = /[A-Z]/g;\n const letterMap = {\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25\n };\n\n const lineElems = s => {\n const elems = [];\n const matches = [];\n let match;\n\n while ((match = locationLettersRegex.exec(s)) !== null) {\n matches.push(match);\n }\n\n if (matches.length === 0) {\n elems.push(s);\n return elems;\n }\n\n for (let i = 0; i < matches.length; i++) {\n const startI = i === 0 ? 0 : matches[i - 1].index + 1;\n const endI = matches[i].index;\n elems.push(s.slice(startI, endI));\n const locationI = letterMap[s[matches[i].index]];\n elems.push(LocationLetter(_Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][props.city.locations[locationI]]));\n }\n\n elems.push(s.slice(matches[matches.length - 1].index + 1));\n return elems;\n };\n\n const elems = [];\n const lines = props.city.asciiArt.split(\"\\n\");\n\n for (const i in lines) {\n elems.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, lineElems(lines[i])));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, elems);\n}\n\nfunction ListCity(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n const locationButtons = props.city.locations.map(locName => {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: locName\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => toLocation(router, _Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][locName]),\n text: locName\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, locationButtons);\n}\n\nfunction LocationCity() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const city = _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][player.city];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, city.name), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListCity, {\n city: city\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIICity, {\n city: city\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/City.tsx?");
|
||
|
||
/***/ }),
|
||
/* 993 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Programs/ui/ProgramsRoot.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: ProgramsRoot */
|
||
/*! exports used: ProgramsRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProgramsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ProgramHelpers */ 444);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material */ 133);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 25);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 582);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ 102);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Button */ 48);\n\n\n\n\n\nfunction ProgramsRoot() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, \"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, Object(_ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getAvailableCreatePrograms */ \"a\"])(player).map(program => {\n const create = program.create;\n if (create === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n key: program.name,\n title: create.tooltip\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n onClick: () => {\n player.startCreateProgramWork(program.name, create.time, create.level);\n router.toWork();\n }\n }, program.name));\n }))));\n}\n\n//# sourceURL=webpack:///./src/Programs/ui/ProgramsRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 994 */
|
||
/*!**************************************!*\
|
||
!*** ./src/ScriptEditor/ui/Root.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: Root */
|
||
/*! exports used: Root */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Root; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @monaco-editor/react */ 995);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OptionsPopup */ 1008);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! js-beautify */ 1009);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(js_beautify__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Fconf/Fconf */ 313);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Script/Script */ 286);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../TextFile */ 197);\n/* harmony import */ var _Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Script/RamCalculations */ 433);\n/* harmony import */ var _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Script/RamCalculationErrorCodes */ 230);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ScriptEditor/CursorPositions */ 562);\n/* harmony import */ var _NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../NetscriptDefinitions */ 563);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../NetscriptFunctions */ 393);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet symbols = [];\n\n(function () {\n const ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__[/* NetscriptFunctions */ \"a\"])({});\n\n function populate(ns) {\n let symbols = [];\n const keys = Object.keys(ns);\n\n for (const key of keys) {\n if (typeof ns[key] === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(ns[key]));\n }\n\n if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\"];\n symbols = symbols.filter(symbol => !exclude.includes(symbol));\n})();\n\n/*\n\n*/\n// How to load function definition in monaco\n// https://github.com/Microsoft/monaco-editor/issues/1415\n// https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n// https://www.npmjs.com/package/@monaco-editor/react#development-playground\n// https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n// https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n// These variables are used to reload a script when it's clicked on. Because we\n// won't have references to the old script.\nlet lastFilename = \"\";\nlet lastCode = \"\";\nlet lastPosition = null;\nfunction Root(props) {\n const editorRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [filename, setFilename] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.filename ? props.filename : lastFilename);\n const [code, setCode] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.code ? props.code : lastCode);\n const [ram, setRAM] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"RAM: ???\");\n const [options, setOptions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])({\n theme: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme,\n insertSpaces: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces\n }); // store the last known state in case we need to restart without nano.\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (props.filename === \"\") return;\n lastFilename = props.filename;\n lastCode = props.code;\n lastPosition = null;\n }, []);\n\n function save() {\n if (editorRef.current !== null) {\n const position = editorRef.current.getPosition();\n\n if (position !== null) {\n _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].saveCursor(filename, {\n row: position.lineNumber,\n column: position.column\n });\n }\n }\n\n lastPosition = null;\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].isRunning && _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialSteps */ \"d\"].TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (filename !== \"n00dles.script\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Leave the script name as 'n00dles'!\");\n return;\n }\n\n if (code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Please copy and paste the code from the tutorial!\");\n return;\n } //Save the script\n\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n } // If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n\n if (filename == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You must specify a filename!\");\n return;\n }\n\n if (filename !== \".fconf\" && !Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__[/* isValidFilePath */ \"g\"])(filename)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\");\n return;\n }\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n if (filename === \".fconf\") {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__[/* parseFconfSettings */ \"c\"])(code);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`Invalid .fconf file: ${e}`);\n return;\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__[/* isScriptFilename */ \"a\"])(filename)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return;\n }\n } //If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n } else if (filename.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === filename) {\n server.textFiles[i].write(code);\n props.router.toTerminal();\n return;\n }\n }\n\n const textFile = new _TextFile__WEBPACK_IMPORTED_MODULE_11__[/* TextFile */ \"a\"](filename, code);\n server.textFiles.push(textFile);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Invalid filename. Must be either a script (.script, .js, or .ns) or \" + \" or text file (.txt)\");\n return;\n }\n\n props.router.toTerminal();\n }\n\n function beautify() {\n if (editorRef.current === null) return;\n const pretty = Object(js_beautify__WEBPACK_IMPORTED_MODULE_5__[\"js_beautify\"])(code, {\n indent_with_tabs: !options.insertSpaces,\n indent_size: 4,\n brace_style: \"preserve-inline\"\n });\n editorRef.current.setValue(pretty);\n }\n\n function onFilenameChange(event) {\n lastFilename = filename;\n setFilename(event.target.value);\n }\n\n function openOptions() {\n const id = \"script-editor-options-popup\";\n const newOptions = {\n theme: \"\",\n insertSpaces: false\n };\n Object.assign(newOptions, options);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(id, _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__[/* OptionsPopup */ \"a\"], {\n id: id,\n options: newOptions,\n save: options => {\n setOptions(options);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme = options.theme;\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces = options.insertSpaces;\n }\n });\n }\n\n function updateCode(newCode) {\n if (newCode === undefined) return;\n lastCode = newCode;\n\n if (editorRef.current !== null) {\n lastPosition = editorRef.current.getPosition();\n }\n\n setCode(newCode);\n }\n\n async function updateRAM() {\n const codeCopy = code + \"\";\n const ramUsage = await Object(_Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__[/* calculateRamUsage */ \"a\"])(codeCopy, props.player.getCurrentServer().scripts);\n\n if (ramUsage > 0) {\n setRAM(\"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].formatRAM(ramUsage));\n return;\n }\n\n switch (ramUsage) {\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].ImportError:\n {\n setRAM(\"RAM: Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].URLImportError:\n {\n setRAM(\"RAM: HTTP Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].SyntaxError:\n default:\n {\n setRAM(\"RAM: Syntax Error\");\n break;\n }\n }\n\n return new Promise(() => undefined);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(updateRAM, 1000);\n return () => clearInterval(id);\n }, [code]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function maybeSave(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys) return; //Ctrl + b\n\n if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n save();\n }\n }\n\n document.addEventListener(\"keydown\", maybeSave);\n return () => document.removeEventListener(\"keydown\", maybeSave);\n });\n\n function onMount(editor) {\n editorRef.current = editor;\n if (editorRef.current === null) return;\n const position = _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].getCursor(filename);\n if (position.row !== -1) editorRef.current.setPosition({\n lineNumber: position.row,\n column: position.column\n });else if (lastPosition !== null) editorRef.current.setPosition({\n lineNumber: lastPosition.lineNumber,\n column: lastPosition.column + 1\n });\n editorRef.current.focus();\n }\n\n function beforeMount(monaco) {\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\n\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet\n });\n }\n\n return {\n suggestions: suggestions\n };\n }\n });\n monaco.languages.typescript.javascriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-filename-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-filename-tag\",\n className: \"noselect\"\n }, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", {\n style: {\n backgroundColor: \"#555\"\n }\n }, \"Script name: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n id: \"script-editor-filename\",\n type: \"text\",\n maxLength: 100,\n tabIndex: 1,\n value: filename,\n onChange: onFilenameChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"options\",\n onClick: openOptions\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n beforeMount: beforeMount,\n onMount: onMount,\n loading: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Loading script editor!\"),\n height: \"90%\",\n defaultLanguage: \"javascript\",\n defaultValue: code,\n onChange: updateCode,\n theme: options.theme,\n options: options\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-buttons-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Beautify\",\n onClick: beautify\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-status-text\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, ram), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: save\n }, \"Save & Close (Ctrl/Cmd + b)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\"\n }, \"Netscript Documentation\")));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/Root.tsx?");
|
||
|
||
/***/ }),
|
||
/* 995 */,
|
||
/* 996 */,
|
||
/* 997 */,
|
||
/* 998 */,
|
||
/* 999 */,
|
||
/* 1000 */,
|
||
/* 1001 */,
|
||
/* 1002 */,
|
||
/* 1003 */,
|
||
/* 1004 */,
|
||
/* 1005 */,
|
||
/* 1006 */,
|
||
/* 1007 */,
|
||
/* 1008 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/ScriptEditor/ui/OptionsPopup.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: OptionsPopup */
|
||
/*! exports used: OptionsPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OptionsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\nfunction OptionsPopup(props) {\n const [theme, setTheme] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.options.theme);\n const [insertSpaces, setInsertSpaces] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.options.insertSpaces);\n\n function save() {\n props.save({\n theme: theme,\n insertSpaces: insertSpaces\n });\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.id);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-container noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-line\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Theme: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: event => setTheme(event.target.value),\n defaultValue: theme\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n value: \"vs-dark\"\n }, \"vs-dark\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n value: \"light\"\n }, \"light\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-line\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use whitespace over tabs: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n onChange: event => setInsertSpaces(event.target.checked),\n checked: insertSpaces\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n style: {\n width: \"50px\"\n },\n text: \"Save\",\n onClick: save\n }));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/OptionsPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1009 */,
|
||
/* 1010 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Milestones/ui/MilestonesRoot.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: MilestonesRoot */
|
||
/*! exports used: MilestonesRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MilestonesRoot; });\n/* harmony import */ var _Milestones__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Milestones */ 564);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nfunction highestMilestone(p, milestones) {\n let n = -1;\n\n for (let i = 0; i < milestones.length; i++) {\n if (milestones[i].fulfilled(p)) n = i;\n }\n\n return n;\n}\n\nfunction MilestonesRoot(props) {\n const n = highestMilestone(props.player, _Milestones__WEBPACK_IMPORTED_MODULE_0__[/* Milestones */ \"a\"]);\n const milestones = _Milestones__WEBPACK_IMPORTED_MODULE_0__[/* Milestones */ \"a\"].map((milestone, i) => {\n if (i <= n + 1) {\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"ul\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"p\", null, \"[\", milestone.fulfilled(props.player) ? \"x\" : \" \", \"] \", milestone.title));\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"div\", {\n className: \"milestones-container\"\n }, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"h1\", null, \"Milestones\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"p\", null, \"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations.\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"h2\", null, \"Completing fl1ght.exe\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"li\", null, milestones));\n}\n\n//# sourceURL=webpack:///./src/Milestones/ui/MilestonesRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1011 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Terminal/ui/TerminalRoot.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: TerminalRoot */
|
||
/*! exports used: TerminalRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 374);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ITerminal */ 250);\n/* harmony import */ var _TerminalInput__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TerminalInput */ 1012);\n\n\n\n\n\n\n\n\n\n\n\nfunction ActionTimer({\n terminal\n}) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: \"primary\",\n paragraph: false\n }, terminal.getProgressText());\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\nfunction TerminalRoot({\n terminal,\n router,\n player\n}) {\n const scrollHook = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => {\n if (terminal.pollChanges()) rerender();\n }, 100);\n return () => clearInterval(id);\n }, []);\n\n function doScroll() {\n const hook = scrollHook.current;\n\n if (hook !== null) {\n setTimeout(() => hook.scrollIntoView(true), 50);\n }\n }\n\n doScroll();\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n setTimeout(doScroll, 50);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n width: \"100%\",\n minHeight: \"100vh\",\n display: \"flex\",\n alignItems: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n classes: {\n root: classes.list\n }\n }, terminal.outputHistory.map((item, i) => {\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Output */ \"b\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: item.color,\n paragraph: false\n }, item.text));\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Link */ \"a\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"secondary\",\n paragraph: false,\n onClick: () => terminal.connectToServer(player, item.hostname)\n }, \">\\xA0\", item.hostname));\n }), terminal.action !== null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ActionTimer, {\n terminal: terminal\n }), \" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n ref: scrollHook\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n position: \"sticky\",\n bottom: 0,\n width: \"100%\",\n px: 0\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerminalInput__WEBPACK_IMPORTED_MODULE_9__[/* TerminalInput */ \"a\"], {\n player: player,\n router: router,\n terminal: terminal\n })));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1012 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/Terminal/ui/TerminalInput.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: TerminalInput */
|
||
/*! exports used: TerminalInput */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalInput; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../determineAllPossibilitiesForTabCompletion */ 1013);\n/* harmony import */ var _tabCompletion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../tabCompletion */ 1015);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\"\n },\n input: {\n backgroundColor: \"#000\"\n },\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\n// Save command in case we de-load this screen.\nlet command = \"\";\nfunction TerminalInput({\n terminal,\n router,\n player\n}) {\n const terminalInput = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(command);\n const [possibilities, setPossibilities] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([]);\n const classes = useStyles();\n\n function saveValue(value) {\n command = value;\n setValue(value);\n }\n\n function handleValueChange(event) {\n saveValue(event.target.value);\n setPossibilities([]);\n }\n\n function modifyInput(mod) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n const inputText = ref.value;\n\n switch (mod.toLowerCase()) {\n case \"backspace\":\n if (start > 0 && start <= inputLength + 1) {\n saveValue(inputText.substr(0, start - 1) + inputText.substr(start));\n }\n\n break;\n\n case \"deletewordbefore\":\n // Delete rest of word before the cursor\n for (let delStart = start - 1; delStart > 0; --delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, delStart) + inputText.substr(start));\n return;\n }\n }\n\n break;\n\n case \"deletewordafter\":\n // Delete rest of word after the cursor\n for (let delStart = start + 1; delStart <= value.length + 1; ++delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, start) + inputText.substr(delStart));\n return;\n }\n }\n\n break;\n\n case \"clearafter\":\n // Deletes everything after cursor\n break;\n\n case \"clearbefore:\":\n // Deleetes everything before cursor\n break;\n }\n }\n\n function moveTextCursor(loc) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n\n switch (loc.toLowerCase()) {\n case \"home\":\n ref.setSelectionRange(0, 0);\n break;\n\n case \"end\":\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n case \"prevchar\":\n if (start > 0) {\n ref.setSelectionRange(start - 1, start - 1);\n }\n\n break;\n\n case \"prevword\":\n for (let i = start - 2; i >= 0; --i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i + 1, i + 1);\n return;\n }\n }\n\n ref.setSelectionRange(0, 0);\n break;\n\n case \"nextchar\":\n ref.setSelectionRange(start + 1, start + 1);\n break;\n\n case \"nextword\":\n for (let i = start + 1; i <= inputLength; ++i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i, i);\n return;\n }\n }\n\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n default:\n console.warn(\"Invalid loc argument in Terminal.moveTextCursor()\");\n break;\n }\n } // Catch all key inputs and redirect them to the terminal.\n\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function keyDown(event) {\n if (terminal.contractOpen) return;\n if (event.metaKey || event.ctrlKey) return;\n const ref = terminalInput.current;\n if (ref) ref.focus(); // Cancel action\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].C && event.ctrlKey) {\n terminal.finishAction(router, player, true);\n }\n }\n\n document.addEventListener(\"keydown\", keyDown);\n return () => document.removeEventListener(\"keydown\", keyDown);\n });\n\n function onKeyDown(event) {\n // Run command.\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n terminal.print(`[${player.getCurrentServer().hostname} ~${terminal.cwd()}]> ${value}`);\n terminal.executeCommands(router, player, value);\n saveValue(\"\");\n return;\n } // Autocomplete\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].TAB && value !== \"\") {\n event.preventDefault();\n let copy = value;\n const semiColonIndex = copy.lastIndexOf(\";\");\n\n if (semiColonIndex !== -1) {\n copy = copy.slice(semiColonIndex + 1);\n }\n\n copy = copy.trim();\n copy = copy.replace(/\\s\\s+/g, \" \");\n const commandArray = copy.split(\" \");\n let index = commandArray.length - 2;\n\n if (index < -1) {\n index = 0;\n }\n\n const allPos = Object(_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__[/* determineAllPossibilitiesForTabCompletion */ \"a\"])(player, copy, index, terminal.cwd());\n\n if (allPos.length == 0) {\n return;\n }\n\n let arg = \"\";\n let command = \"\";\n\n if (commandArray.length == 0) {\n return;\n }\n\n if (commandArray.length == 1) {\n command = commandArray[0];\n } else if (commandArray.length == 2) {\n command = commandArray[0];\n arg = commandArray[1];\n } else if (commandArray.length == 3) {\n command = commandArray[0] + \" \" + commandArray[1];\n arg = commandArray[2];\n } else {\n arg = commandArray.pop() + \"\";\n command = commandArray.join(\" \");\n }\n\n const newValue = Object(_tabCompletion__WEBPACK_IMPORTED_MODULE_8__[/* tabCompletion */ \"a\"])(command, arg, allPos, value);\n\n if (typeof newValue === \"string\" && newValue !== \"\") {\n saveValue(newValue);\n }\n\n if (Array.isArray(newValue)) {\n setPossibilities(newValue);\n }\n } // Clear screen.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].L && event.ctrlKey) {\n event.preventDefault();\n terminal.clear();\n } // Select previous command.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].UPARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].P && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n }\n\n if (i != 0) {\n --terminal.commandHistoryIndex;\n }\n\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n const ref = terminalInput.current;\n\n if (ref) {\n setTimeout(function () {\n ref.selectionStart = ref.selectionEnd = 10000;\n }, 10);\n }\n } // Select next command\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].DOWNARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].M && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n } // Latest command, put nothing\n\n\n if (i == len || i == len - 1) {\n terminal.commandHistoryIndex = len;\n saveValue(\"\");\n } else {\n ++terminal.commandHistoryIndex;\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n }\n } // Extra Bash Emulation Hotkeys, must be enabled through .fconf\n\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].A && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"home\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].E && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"end\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"prevchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"prevword\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"nextchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"nextword\");\n }\n\n if ((event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].H || event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].D) && event.ctrlKey) {\n modifyInput(\"backspace\");\n event.preventDefault();\n } // TODO AFTER THIS:\n // alt + d deletes word after cursor\n // ^w deletes word before cursor\n // ^k clears line after cursor\n // ^u clears line before cursor\n\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, possibilities.length > 0 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, \"Possible autocomplete candidate:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, possibilities.join(\" \"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"standard\",\n color: terminal.action === null ? \"primary\" : \"secondary\",\n autoFocus: true,\n disabled: terminal.action !== null,\n autoComplete: \"off\",\n classes: {\n root: classes.textfield\n },\n value: value,\n onChange: handleValueChange,\n inputRef: terminalInput,\n InputProps: {\n // for players to hook in\n id: \"terminal-input\",\n className: classes.input,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: terminal.action === null ? \"primary\" : \"secondary\",\n flexShrink: 0\n }, \"[\", player.getCurrentServer().hostname, \"\\xA0~\", terminal.cwd(), \"]>\\xA0\")),\n spellCheck: false,\n onKeyDown: onKeyDown\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalInput.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1013 */
|
||
/*!*******************************************************************!*\
|
||
!*** ./src/Terminal/determineAllPossibilitiesForTabCompletion.ts ***!
|
||
\*******************************************************************/
|
||
/*! exports provided: determineAllPossibilitiesForTabCompletion */
|
||
/*! exports used: determineAllPossibilitiesForTabCompletion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return determineAllPossibilitiesForTabCompletion; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DirectoryServerHelpers */ 1014);\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Alias */ 87);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DarkWeb/DarkWebItems */ 229);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Message/Message */ 97);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n\n\n\n\n\n // An array of all Terminal commands\n\nconst commands = [\"alias\", \"analyze\", \"backdoor\", \"cat\", \"cd\", \"check\", \"clear\", \"cls\", \"connect\", \"download\", \"expr\", \"free\", \"hack\", \"help\", \"home\", \"hostname\", \"ifconfig\", \"kill\", \"killall\", \"ls\", \"lscpu\", \"mem\", \"mv\", \"nano\", \"ps\", \"rm\", \"run\", \"scan\", \"scan-analyze\", \"scp\", \"sudov\", \"tail\", \"theme\", \"top\"];\nfunction determineAllPossibilitiesForTabCompletion(p, input, index, currPath = \"\") {\n let allPos = [];\n allPos = allPos.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n const currServ = p.getCurrentServer();\n const homeComputer = p.getHomeComputer();\n let parentDirPath = \"\";\n let evaledParentDirPath = null; // Helper functions\n\n function addAllCodingContracts() {\n for (const cct of currServ.contracts) {\n allPos.push(cct.fn);\n }\n }\n\n function addAllLitFiles() {\n for (const file of currServ.messages) {\n if (!(file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"])) {\n allPos.push(file);\n }\n }\n }\n\n function addAllMessages() {\n for (const file of currServ.messages) {\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"]) {\n allPos.push(file.filename);\n }\n }\n }\n\n function addAllPrograms() {\n for (const program of homeComputer.programs) {\n allPos.push(program);\n }\n }\n\n function addAllScripts() {\n for (const script of currServ.scripts) {\n const res = processFilepath(script.filename);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllTextFiles() {\n for (const txt of currServ.textFiles) {\n const res = processFilepath(txt.fn);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllDirectories() {\n // Directories are based on the currently evaluated path\n const subdirs = Object(_DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getSubdirectories */ \"a\"])(currServ, evaledParentDirPath == null ? \"/\" : evaledParentDirPath);\n\n for (let i = 0; i < subdirs.length; ++i) {\n const assembledDirPath = evaledParentDirPath == null ? subdirs[i] : evaledParentDirPath + subdirs[i];\n const res = processFilepath(assembledDirPath);\n\n if (res != null) {\n subdirs[i] = res;\n }\n }\n\n allPos = allPos.concat(subdirs);\n } // Convert from the real absolute path back to the original path used in the input\n\n\n function convertParentPath(filepath) {\n if (parentDirPath == null || evaledParentDirPath == null) {\n console.warn(`convertParentPath() called when paths are null`);\n return filepath;\n }\n\n if (!filepath.startsWith(evaledParentDirPath)) {\n console.warn(`convertParentPath() called for invalid path. (filepath=${filepath}) (evaledParentDirPath=${evaledParentDirPath})`);\n return filepath;\n }\n\n return parentDirPath + filepath.slice(evaledParentDirPath.length);\n } // Given an a full, absolute filepath, converts it to the proper value\n // for autocompletion purposes\n\n\n function processFilepath(filepath) {\n if (evaledParentDirPath) {\n if (filepath.startsWith(evaledParentDirPath)) {\n return convertParentPath(filepath);\n }\n } else if (parentDirPath !== \"\") {\n // If the parent directory is the root directory, but we're not searching\n // it from the root directory, we have to add the original path\n let t_parentDirPath = parentDirPath;\n\n if (!t_parentDirPath.endsWith(\"/\")) {\n t_parentDirPath += \"/\";\n }\n\n return parentDirPath + filepath;\n } else {\n return filepath;\n }\n\n return null;\n }\n\n function isCommand(cmd) {\n let t_cmd = cmd;\n\n if (!t_cmd.endsWith(\" \")) {\n t_cmd += \" \";\n }\n\n return input.startsWith(t_cmd);\n }\n /**\n * If the command starts with './' and the index == -1, then the user\n * has input ./partialexecutablename so autocomplete the script or program.\n * Put './' in front of each script/executable\n */\n\n\n if (isCommand(\"./\") && index == -1) {\n //All programs and scripts\n for (let i = 0; i < currServ.scripts.length; ++i) {\n allPos.push(\"./\" + currServ.scripts[i].filename);\n } //Programs are on home computer\n\n\n for (let i = 0; i < homeComputer.programs.length; ++i) {\n allPos.push(\"./\" + homeComputer.programs[i]);\n }\n\n return allPos;\n } // Autocomplete the command\n\n\n if (index === -1) {\n return commands.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* Aliases */ \"a\"])).concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n } // Since we're autocompleting an argument and not a command, the argument might\n // be a file/directory path. We have to account for that when autocompleting\n\n\n const commandArray = input.split(\" \");\n\n if (commandArray.length === 0) {\n console.warn(`Tab autocompletion logic reached invalid branch`);\n return allPos;\n }\n\n const arg = commandArray[commandArray.length - 1];\n parentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getAllParentDirectories */ \"c\"])(arg);\n evaledParentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* evaluateDirectoryPath */ \"a\"])(parentDirPath, currPath);\n\n if (evaledParentDirPath === \"/\") {\n evaledParentDirPath = null;\n } else if (evaledParentDirPath == null) {\n return allPos; // Invalid path\n } else {\n evaledParentDirPath += \"/\";\n }\n\n if (isCommand(\"buy\")) {\n const options = [];\n\n for (const i in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"][i];\n options.push(item.program);\n }\n\n return options.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n }\n\n if (isCommand(\"scp\") && index === 1) {\n for (const iphostname in _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"]) {\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].ip);\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"scp\") && index === 0) {\n addAllScripts();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"connect\")) {\n // All network connections\n for (let i = 0; i < currServ.serversOnNetwork.length; ++i) {\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][currServ.serversOnNetwork[i]];\n\n if (serv == null) {\n continue;\n }\n\n allPos.push(serv.ip);\n allPos.push(serv.hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"kill\") || isCommand(\"tail\") || isCommand(\"mem\") || isCommand(\"check\")) {\n addAllScripts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"nano\")) {\n addAllScripts();\n addAllTextFiles();\n allPos.push(\".fconf\");\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"rm\")) {\n addAllScripts();\n addAllPrograms();\n addAllLitFiles();\n addAllTextFiles();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"run\")) {\n addAllScripts();\n addAllPrograms();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cat\")) {\n addAllMessages();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"download\") || isCommand(\"mv\")) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cd\")) {\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"ls\") && index === 0) {\n addAllDirectories();\n }\n\n return allPos;\n}\n\n//# sourceURL=webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts?");
|
||
|
||
/***/ }),
|
||
/* 1014 */
|
||
/*!************************************************!*\
|
||
!*** ./src/Terminal/DirectoryServerHelpers.ts ***!
|
||
\************************************************/
|
||
/*! exports provided: getSubdirectories */
|
||
/*! exports used: getSubdirectories */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getSubdirectories; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains function that deal with Server-related directory things.\n * Functions that deal with the string manipulation can be found in\n * ./DirectoryHelpers.ts\n */\n\n\n/**\n * Given a directory (by the full directory path) and a server, returns all\n * subdirectories of that directory. This is only for FIRST-LEVEl/immediate subdirectories\n */\nfunction getSubdirectories(serv, dir) {\n const res = [];\n\n if (!Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* isValidDirectoryPath */ \"f\"])(dir)) {\n return res;\n }\n\n let t_dir = dir;\n\n if (!t_dir.endsWith(\"/\")) {\n t_dir += \"/\";\n }\n\n function processFile(fn) {\n if (t_dir === \"/\" && Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* isInRootDirectory */ \"e\"])(fn)) {\n const subdir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getFirstParentDirectory */ \"d\"])(fn);\n\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n } else if (fn.startsWith(t_dir)) {\n const remaining = fn.slice(t_dir.length);\n const subdir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getFirstParentDirectory */ \"d\"])(remaining);\n\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n }\n }\n\n for (const script of serv.scripts) {\n processFile(script.filename);\n }\n\n for (const txt of serv.textFiles) {\n processFile(txt.fn);\n }\n\n return res;\n}\n\n//# sourceURL=webpack:///./src/Terminal/DirectoryServerHelpers.ts?");
|
||
|
||
/***/ }),
|
||
/* 1015 */
|
||
/*!***************************************!*\
|
||
!*** ./src/Terminal/tabCompletion.ts ***!
|
||
\***************************************/
|
||
/*! exports provided: tabCompletion */
|
||
/*! exports used: tabCompletion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return tabCompletion; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n\n/**\n * Implements tab completion for the Terminal\n *\n * @param command {string} Terminal command, excluding the last incomplete argument\n * @param arg {string} Last argument that is being completed\n * @param allPossibilities {string[]} All values that `arg` can complete to\n */\n\nfunction tabCompletion(command, arg, allPossibilities, oldValue) {\n if (!(allPossibilities.constructor === Array)) {\n return;\n }\n\n if (!Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* containsAllStrings */ \"a\"])(allPossibilities)) {\n return;\n } // Remove all options in allPossibilities that do not match the current string\n // that we are attempting to autocomplete\n\n\n if (arg === \"\") {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(command.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n } else {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(arg.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n }\n\n const semiColonIndex = oldValue.lastIndexOf(\";\");\n let val = \"\";\n\n if (allPossibilities.length === 0) {\n return;\n } else if (allPossibilities.length === 1) {\n if (arg === \"\") {\n //Autocomplete command\n val = allPossibilities[0] + \" \";\n } else {\n val = command + \" \" + allPossibilities[0];\n }\n\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return val;\n } else {\n // Replace only after the last semicolon\n return oldValue.slice(0, semiColonIndex + 1) + \" \" + val;\n }\n } else {\n const longestStartSubstr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* longestCommonStart */ \"e\"])(allPossibilities);\n /**\n * If the longest common starting substring of remaining possibilities is the same\n * as whatevers already in terminal, just list all possible options. Otherwise,\n * change the input in the terminal to the longest common starting substr\n */\n\n if (arg === \"\") {\n if (longestStartSubstr === command) {\n return allPossibilities;\n } else {\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return longestStartSubstr;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${longestStartSubstr}`;\n }\n }\n } else {\n if (longestStartSubstr === arg) {\n // List all possible options\n return allPossibilities;\n } else {\n if (semiColonIndex == -1) {\n // No semicolon, so replace the whole command\n return `${command} ${longestStartSubstr}`;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${command} ${longestStartSubstr}`;\n }\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/tabCompletion.ts?");
|
||
|
||
/***/ }),
|
||
/* 1016 */
|
||
/*!******************************************!*\
|
||
!*** ./src/Tutorial/ui/TutorialRoot.tsx ***!
|
||
\******************************************/
|
||
/*! exports provided: TutorialRoot */
|
||
/*! exports used: TutorialRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TutorialRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction TutorialRoot() {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Tutorial (AKA Links to Documentation)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n id: \"tutorial-getting-started-link\",\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html\"\n }, \"Getting Started\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html\"\n }, \"Servers & Networking\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html\"\n }, \"Hacking\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html\"\n }, \"Scripts\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/netscript.html\"\n }, \"Netscript Programming Language\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html\"\n }, \"Traveling\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html\"\n }, \"Companies\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html\"\n }, \"Infiltration\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html\"\n }, \"Factions\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html\"\n }, \"Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/shortcuts.html\"\n }, \"Keyboard Shortcuts\"));\n}\n\n//# sourceURL=webpack:///./src/Tutorial/ui/TutorialRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1017 */
|
||
/*!****************************************************!*\
|
||
!*** ./src/ui/ActiveScripts/ActiveScriptsRoot.tsx ***!
|
||
\****************************************************/
|
||
/*! exports provided: ActiveScriptsRoot */
|
||
/*! exports used: ActiveScriptsRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ActiveScriptsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ScriptProduction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ScriptProduction */ 1018);\n/* harmony import */ var _ServerAccordions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ServerAccordions */ 1019);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\n\n\n\n\nfunction ActiveScriptsRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 20);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptProduction__WEBPACK_IMPORTED_MODULE_1__[/* ScriptProduction */ \"a\"], props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordions__WEBPACK_IMPORTED_MODULE_2__[/* ServerAccordions */ \"a\"], props));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1018 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/ui/ActiveScripts/ScriptProduction.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: ScriptProduction */
|
||
/*! exports used: ScriptProduction */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ScriptProduction; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../React/MoneyRate */ 123);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Context */ 43);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/**\n * React Component for displaying the total production and production rate\n * of scripts on the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n cell: {\n borderBottom: \"none\",\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n whiteSpace: \"nowrap\"\n },\n size: {\n width: \"1px\"\n }\n}));\nfunction ScriptProduction(props) {\n const player = _Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const classes = useStyles();\n const prodRateSinceLastAug = player.scriptProdSinceLastAug / (player.playtimeSinceLastAug / 1000);\n let onlineProduction = 0;\n\n for (const ws of props.workerScripts.values()) {\n onlineProduction += ws.scriptRef.onlineMoneyMade / ws.scriptRef.onlineRunningTime;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n size: \"small\",\n classes: {\n root: classes.size\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production of Active scripts:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: player.scriptProdSinceLastAug\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n style: {\n width: \"1px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production since last Aug installation:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"(\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__[/* MoneyRate */ \"a\"], {\n money: prodRateSinceLastAug\n }), \")\")))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1019 */
|
||
/*!***************************************************!*\
|
||
!*** ./src/ui/ActiveScripts/ServerAccordions.tsx ***!
|
||
\***************************************************/
|
||
/*! exports provided: ServerAccordions */
|
||
/*! exports used: ServerAccordions */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ServerAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ServerAccordion */ 1020);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TablePagination */ 1079);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 467);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/Search */ 1026);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__);\n/**\n * React Component for rendering the Accordion elements for all servers\n * on which scripts are running\n */\n\n\n\n\n\n\n\n\n // Map of server hostname -> all workerscripts on that server for all active scripts\n\nconst subscriberId = \"ActiveScriptsUI\";\nfunction ServerAccordions(props) {\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].addSubscriber({\n cb: rerender,\n id: subscriberId\n });\n return () => _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].removeSubscriber(subscriberId);\n }, []);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n function handleFilterChange(event) {\n setFilter(event.target.value);\n setPage(0);\n }\n\n const serverToScriptMap = {};\n\n for (const ws of props.workerScripts.values()) {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getServer */ \"b\"])(ws.serverIp);\n\n if (server == null) {\n console.warn(`WorkerScript has invalid IP address: ${ws.serverIp}`);\n continue;\n }\n\n let data = serverToScriptMap[server.hostname];\n\n if (data === undefined) {\n serverToScriptMap[server.hostname] = {\n server: server,\n workerScripts: []\n };\n data = serverToScriptMap[server.hostname];\n }\n\n if (data !== undefined) data.workerScripts.push(ws);\n }\n\n const filtered = Object.values(serverToScriptMap).filter(data => data && data.server.hostname.includes(filter));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n value: filter,\n onChange: handleFilterChange,\n color: \"primary\",\n autoFocus: true,\n variant: \"standard\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default.a, null),\n spellCheck: false\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n dense: true\n }, filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(data => {\n return data && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordion__WEBPACK_IMPORTED_MODULE_1__[/* ServerAccordion */ \"a\"], {\n key: data.server.hostname,\n server: data.server,\n workerScripts: data.workerScripts\n });\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: filtered.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1020 */
|
||
/*!**************************************************!*\
|
||
!*** ./src/ui/ActiveScripts/ServerAccordion.tsx ***!
|
||
\**************************************************/
|
||
/*! exports provided: ServerAccordion */
|
||
/*! exports used: ServerAccordion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1078);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 262);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ServerAccordionContent */ 1021);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/**\n * React Component for rendering the Accordion element for a single\n * server in the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const server = props.server; // Accordion's header text\n // TODO: calculate the longest hostname length rather than hard coding it\n\n const longestHostnameLength = 18;\n const paddedName = `${server.hostname}${\" \".repeat(longestHostnameLength)}`.slice(0, Math.max(server.hostname.length, longestHostnameLength));\n const barOptions = {\n progress: server.ramUsed / server.maxRam,\n totalTicks: 30\n };\n const headerTxt = `${paddedName} ${Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__[/* createProgressBarText */ \"a\"])(barOptions)}`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n style: {\n whiteSpace: \"pre-wrap\"\n }\n }, headerTxt)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n mx: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__[/* ServerAccordionContent */ \"a\"], {\n workerScripts: props.workerScripts\n }))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1021 */
|
||
/*!*********************************************************!*\
|
||
!*** ./src/ui/ActiveScripts/ServerAccordionContent.tsx ***!
|
||
\*********************************************************/
|
||
/*! exports provided: ServerAccordionContent */
|
||
/*! exports used: ServerAccordionContent */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordionContent; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScriptAccordion */ 1022);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TablePagination */ 1079);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 467);\n\n\n\n\n\nconst pageSize = 20;\nfunction ServerAccordionContent(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n dense: true,\n disablePadding: true\n }, props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(ws => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptAccordion */ \"a\"], {\n key: `${ws.name}_${ws.args}`,\n workerScript: ws\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: props.workerScripts.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1022 */
|
||
/*!********************************************************!*\
|
||
!*** ./src/ui/ActiveScripts/WorkerScriptAccordion.tsx ***!
|
||
\********************************************************/
|
||
/*! exports provided: WorkerScriptAccordion */
|
||
/*! exports used: WorkerScriptAccordion */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Delete */ 1023);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1078);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 262);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 103);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../utils/LogBox */ 214);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../utils/helpers/arrayToString */ 218);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../React/MoneyRate */ 123);\n/**\n * React Component for displaying a single WorkerScript's info as an\n * Accordion element\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])({\n noborder: {\n borderBottom: \"none\"\n }\n});\nfunction WorkerScriptAccordion(props) {\n const classes = useStyles();\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const workerScript = props.workerScript;\n const scriptRef = workerScript.scriptRef;\n const logClickHandler = _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__[/* logBoxCreate */ \"a\"].bind(null, scriptRef);\n const killScript = _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__[/* killWorkerScript */ \"a\"].bind(null, scriptRef, scriptRef.server);\n\n function killScriptClickHandler() {\n killScript();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__[/* dialogBoxCreate */ \"a\"])(\"Killing script\");\n } // Calculations for script stats\n\n\n const onlineMps = scriptRef.onlineMoneyMade / scriptRef.onlineRunningTime;\n const onlineEps = scriptRef.onlineExpGained / scriptRef.onlineRunningTime;\n const offlineMps = scriptRef.offlineMoneyMade / scriptRef.offlineRunningTime;\n const offlineEps = scriptRef.offlineExpGained / scriptRef.offlineRunningTime;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old),\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 \", props.workerScript.name)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n mx: 6\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n padding: \"none\",\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Threads:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatThreads(props.workerScript.scriptRef.threads)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Args: \", Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__[/* arrayToString */ \"a\"])(props.workerScript.args)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.onlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Offline Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.offlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total online production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.onlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.onlineExpGained) + \" hacking exp\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online production rate:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__[/* MoneyRate */ \"a\"], {\n money: onlineMps\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(onlineEps) + \" hacking exp / sec\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total offline production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.offlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.offlineExpGained) + \" hacking exp\"))))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Button__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onClick: logClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"LOG\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: killScriptClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default.a, {\n color: \"error\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1023 */,
|
||
/* 1024 */,
|
||
/* 1025 */,
|
||
/* 1026 */,
|
||
/* 1027 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Faction/ui/FactionsRoot.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: FactionsRoot */
|
||
/*! exports used: FactionsRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Factions */ 22);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n\n\n\nfunction FactionsRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function openFaction(faction) {\n props.router.toFaction(faction);\n }\n\n function acceptInvitation(event, faction) {\n if (!event.isTrusted) return;\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_2__[/* joinFaction */ \"d\"])(_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][faction]);\n setRerender(x => !x);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Factions\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Lists all factions you have joined\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.factions.map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: faction\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: () => openFaction(_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][faction]),\n style: {\n padding: \"4px\",\n margin: \"4px\",\n display: \"inline-block\"\n }\n }, faction)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Outstanding Faction Invitations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n width: \"70%\"\n }\n }, \"Lists factions you have been invited to. You can accept these faction invitations at any time.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.factionInvitations.map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: faction,\n style: {\n padding: \"6px\",\n margin: \"6px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, faction), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: e => acceptInvitation(e, faction),\n style: {\n display: \"inline\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, \"Accept Faction Invitation\")))));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionsRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1028 */
|
||
/*!****************************************!*\
|
||
!*** ./src/Faction/ui/FactionRoot.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: FactionRoot */
|
||
/*! exports used: FactionRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AugmentationsPage */ 1029);\n/* harmony import */ var _DonateOption__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DonateOption */ 1033);\n/* harmony import */ var _Info__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Info */ 1034);\n/* harmony import */ var _Option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Option */ 298);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/SleeveCovenantPurchases */ 293);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CreateGangPopup */ 1042);\n/**\n * Root React Component for displaying a Faction's UI.\n * This is the component for displaying a single faction's UI, not the list of all\n * accessible factions\n */\n\n\n\n\n\n\n\n\n\n\n\n\n// Info text for all options on the UI\nconst gangInfo = \"Create and manage a gang for this Faction. Gangs will earn you money and \" + \"faction reputation\";\nconst hackingMissionInfo = \"Attempt a hacking mission for your faction. \" + \"A mission is a mini game that, if won, earns you \" + \"significant reputation with this faction. (Recommended hacking level: 200+)\";\nconst hackingContractsInfo = \"Complete hacking contracts for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your hacking skill. \" + \"You will gain hacking exp.\";\nconst fieldWorkInfo = \"Carry out field missions for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on all of your stats. \" + \"You will gain exp for all stats.\";\nconst securityWorkInfo = \"Serve in a security detail for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your combat stats. \" + \"You will gain exp for all combat stats.\";\nconst augmentationsInfo = \"As your reputation with this faction rises, you will \" + \"unlock Augmentations, which you can purchase to enhance \" + \"your abilities.\";\nconst sleevePurchasesInfo = \"Purchase Duplicate Sleeves and upgrades. These are permanent!\";\nconst GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\nfunction FactionRoot(props) {\n const faction = props.faction;\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Router();\n const [, setRerenderFlag] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [purchasingAugs, setPurchasingAugs] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function manageGang(faction) {\n // If player already has a gang, just go to the gang UI\n if (player.inGang()) {\n return router.toGang();\n }\n\n const popupId = \"create-gang-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__[/* createPopup */ \"a\"])(popupId, _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__[/* CreateGangPopup */ \"a\"], {\n popupId: popupId,\n facName: faction.name\n });\n }\n\n function rerender() {\n setRerenderFlag(old => !old);\n } // Route to the main faction page\n\n\n function routeToMain() {\n setPurchasingAugs(false);\n } // Route to the purchase augmentation UI for this faction\n\n\n function routeToPurchaseAugs() {\n setPurchasingAugs(true);\n }\n\n function sleevePurchases() {\n Object(_PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__[/* createSleevePurchasesFromCovenantPopup */ \"d\"])(player);\n }\n\n function startFieldWork(faction) {\n player.startFactionFieldWork(faction);\n router.toWork();\n }\n\n function startHackingContracts(faction) {\n player.startFactionHackWork(faction);\n router.toWork();\n }\n\n function startHackingMission(faction) {\n player.singularityStopWork();\n props.startHackingMissionFn(faction);\n }\n\n function startSecurityWork(faction) {\n player.startFactionSecurityWork(faction);\n router.toWork();\n }\n\n function MainPage({\n faction\n }) {\n const p = player;\n const factionInfo = faction.getInfo(); // We have a special flag for whether the player this faction is the player's\n // gang faction because if the player has a gang, they cannot do any other action\n\n const isPlayersGang = p.inGang() && p.getGangName() === faction.name; // Flags for whether special options (gang, sleeve purchases, donate, etc.)\n // should be shown\n\n const favorToDonate = Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n const canDonate = faction.favor >= favorToDonate;\n const canPurchaseSleeves = faction.name === \"The Covenant\" && p.bitNodeN >= 10 && _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__[/* SourceFileFlags */ \"a\"][10];\n let canAccessGang = p.canAccessGang() && GangNames.includes(faction.name);\n\n if (p.inGang()) {\n if (p.getGangName() !== faction.name) {\n canAccessGang = false;\n } else if (p.getGangName() === faction.name) {\n canAccessGang = true;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, faction.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Info__WEBPACK_IMPORTED_MODULE_3__[/* Info */ \"a\"], {\n faction: faction,\n factionInfo: factionInfo\n }), canAccessGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Manage Gang\",\n infoText: gangInfo,\n onClick: () => manageGang(faction)\n }), !isPlayersGang && factionInfo.offerHackingMission && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Mission\",\n infoText: hackingMissionInfo,\n onClick: () => startHackingMission(faction)\n }), !isPlayersGang && factionInfo.offerHackingWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Contracts\",\n infoText: hackingContractsInfo,\n onClick: () => startHackingContracts(faction)\n }), !isPlayersGang && factionInfo.offerFieldWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Field Work\",\n infoText: fieldWorkInfo,\n onClick: () => startFieldWork(faction)\n }), !isPlayersGang && factionInfo.offerSecurityWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Security Work\",\n infoText: securityWorkInfo,\n onClick: () => startSecurityWork(faction)\n }), !isPlayersGang && factionInfo.offersWork() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DonateOption__WEBPACK_IMPORTED_MODULE_2__[/* DonateOption */ \"a\"], {\n faction: faction,\n p: player,\n rerender: rerender,\n favorToDonate: favorToDonate,\n disabled: !canDonate\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase Augmentations\",\n infoText: augmentationsInfo,\n onClick: routeToPurchaseAugs\n }), canPurchaseSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase & Upgrade Duplicate Sleeves\",\n infoText: sleevePurchasesInfo,\n onClick: sleevePurchases\n }));\n }\n\n return purchasingAugs ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__[/* AugmentationsPage */ \"a\"], {\n faction: faction,\n routeToMainPage: routeToMain\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MainPage, {\n faction: faction\n });\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1029 */
|
||
/*!**********************************************!*\
|
||
!*** ./src/Faction/ui/AugmentationsPage.tsx ***!
|
||
\**********************************************/
|
||
/*! exports provided: AugmentationsPage */
|
||
/*! exports used: AugmentationsPage */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationsPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PurchaseableAugmentation */ 1030);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * Root React Component for displaying a faction's \"Purchase Augmentations\" page\n */\n\n\n\n\n\n\n\n\nfunction AugmentationsPage(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player(); // Flag for whether the player has a gang with this faction\n\n const isPlayersGang = player.inGang() && player.getGangName() === props.faction.name;\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function getAugs() {\n if (isPlayersGang) {\n const augs = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n augs.push(augName);\n }\n }\n\n return augs;\n } else {\n return props.faction.augmentations.slice();\n }\n }\n\n function getAugsSorted() {\n switch (_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder) {\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost:\n {\n return getAugsSortedByCost();\n }\n\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation:\n {\n return getAugsSortedByReputation();\n }\n\n default:\n return getAugsSortedByDefault();\n }\n }\n\n function getAugsSortedByCost() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseCost - aug2.baseCost;\n });\n return augs;\n }\n\n function getAugsSortedByReputation() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseRepRequirement - aug2.baseRepRequirement;\n });\n return augs;\n }\n\n function getAugsSortedByDefault() {\n return getAugs();\n }\n\n function switchSortOrder(newOrder) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder = newOrder;\n rerender();\n }\n\n const augs = getAugsSorted();\n const purchasable = augs.filter(aug => aug === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor || !player.augmentations.some(a => a.name === aug) && !player.queuedAugmentations.some(a => a.name === aug));\n\n const purchaseableAugmentation = aug => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PurchaseableAugmentation */ \"a\"], {\n augName: aug,\n faction: props.faction,\n key: aug,\n p: player,\n rerender: rerender\n });\n };\n\n const augListElems = purchasable.map(aug => purchaseableAugmentation(aug));\n let ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const owned = augs.filter(aug => !purchasable.includes(aug));\n\n if (owned.length !== 0) {\n ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This factions also offers these augmentations but you already own them.\"), owned.map(aug => purchaseableAugmentation(aug)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: props.routeToMainPage,\n text: \"Back\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Faction Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These are all of the Augmentations that are available to purchase from \", props.faction.name, \". Augmentations are powerful upgrades that will enhance your abilities.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost),\n text: \"Sort by Cost\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation),\n text: \"Sort by Reputation\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default),\n text: \"Sort by Default Order\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), augListElems, ownedElem, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/AugmentationsPage.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1030 */
|
||
/*!*****************************************************!*\
|
||
!*** ./src/Faction/ui/PurchaseableAugmentation.tsx ***!
|
||
\*****************************************************/
|
||
/*! exports provided: PurchaseableAugmentation */
|
||
/*! exports used: PurchaseableAugmentation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseableAugmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PurchaseAugmentationPopup */ 1031);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/Augmentation */ 1032);\n/**\n * React component for displaying a single augmentation for purchase through\n * the faction UI\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction PurchaseableAugmentation(props) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__[/* Augmentations */ \"a\"][props.augName];\n if (aug == null) throw new Error(`aug ${props.augName} does not exists`);\n\n function getMoneyCost() {\n return aug.baseCost * props.faction.getInfo().augmentationPriceMult;\n }\n\n function getRepCost() {\n return aug.baseRepRequirement * props.faction.getInfo().augmentationRepRequirementMult;\n }\n\n function handleClick() {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n const popupId = \"purchase-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__[/* PurchaseAugmentationPopup */ \"a\"], {\n aug: aug,\n faction: props.faction,\n player: props.p,\n rerender: props.rerender,\n popupId: popupId\n });\n } else {\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(aug, props.faction);\n props.rerender();\n }\n } // Whether the player has the prerequisite Augmentations\n\n\n function hasPrereqs() {\n return Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasAugmentationPrereqs */ \"b\"])(aug);\n } // Whether the player has enough rep for this Augmentation\n\n\n function hasReputation() {\n return props.faction.playerReputation >= getRepCost();\n } // Whether the player has this augmentations (purchased OR installed)\n\n\n function owned() {\n let owned = false;\n\n for (const queuedAug of props.p.queuedAugmentations) {\n if (queuedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n for (const installedAug of props.p.augmentations) {\n if (installedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n return owned;\n }\n\n if (aug == null) {\n console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${props.augName}`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n const moneyCost = getMoneyCost();\n const repCost = getRepCost(); // Determine UI properties\n\n let disabled = false;\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let color = \"\";\n\n if (!hasPrereqs()) {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", aug.prereqs.map(aug => Object(_ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__[/* Augmentation */ \"a\"])(aug)), \" as prerequisite)\");\n color = \"red\";\n } else if (aug.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && (aug.owned || owned())) {\n disabled = true;\n } else if (hasReputation()) {\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"UNLOCKED (at \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation) - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }));\n } else {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }), \")\");\n color = \"red\";\n }\n\n const txtStyle = {\n display: \"inline-block\"\n };\n\n if (color !== \"\") {\n txtStyle.color = color;\n } // Determine button txt\n\n\n let btnTxt = aug.name;\n\n if (aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n btnTxt += ` - Level ${Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getNextNeurofluxLevel */ \"a\"])()}`;\n }\n\n let tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n if (typeof aug.info === \"string\") tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);else tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: aug.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n style: {\n margin: \"4px\",\n padding: \"4px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__[/* StdButton */ \"a\"], {\n disabled: disabled,\n onClick: handleClick,\n style: {\n display: \"inline-block\"\n },\n text: btnTxt,\n tooltip: tooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: txtStyle\n }, status)));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1031 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/Faction/ui/PurchaseAugmentationPopup.tsx ***!
|
||
\******************************************************/
|
||
/*! exports provided: PurchaseAugmentationPopup */
|
||
/*! exports used: PurchaseAugmentationPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseAugmentationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\n\n\nfunction PurchaseAugmentationPopup(props) {\n const factionInfo = props.faction.getInfo();\n\n function buy() {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isRepeatableAug */ \"e\"])(props.aug) && props.player.hasAugmentation(props.aug)) {\n return;\n }\n\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(props.aug, props.faction);\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, props.aug.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.info, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.stats, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Would you like to purchase the \", props.aug.name, \" Augmentation for\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: props.aug.baseCost * factionInfo.augmentationPriceMult\n }), \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n autoFocus: true,\n className: \"std-button\",\n onClick: buy\n }, \"Purchase\"));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseAugmentationPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1032 */
|
||
/*!***************************************!*\
|
||
!*** ./src/ui/React/Augmentation.tsx ***!
|
||
\***************************************/
|
||
/*! exports provided: Augmentation */
|
||
/*! exports used: Augmentation */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction Augmentation(name) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"samefont\",\n style: {\n color: \"white\"\n }\n }, name);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Augmentation.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1033 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/Faction/ui/DonateOption.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: DonateOption */
|
||
/*! exports used: DonateOption */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DonateOption; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _formulas_donation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formulas/donation */ 572);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mathjax-react */ 196);\n/**\n * React component for a donate option on the Faction UI\n */\n\n\n\n\n\n\n\n\n\nconst inputStyleMarkup = {\n margin: \"5px\",\n height: \"26px\"\n};\nfunction DonateOption(props) {\n const [donateAmt, setDonateAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const digits = (_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor + \"\").length - 1;\n\n function canDonate() {\n if (donateAmt === null) return false;\n if (isNaN(donateAmt) || donateAmt <= 0) return false;\n if (props.p.money.lt(donateAmt)) return false;\n return true;\n }\n\n function onChange(event) {\n const amt = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__[/* numeralWrapper */ \"a\"].parseMoney(event.target.value);\n if (event.target.value === \"\" || isNaN(amt)) setDonateAmt(null);else setDonateAmt(amt);\n }\n\n function donate() {\n const fac = props.faction;\n const amt = donateAmt;\n if (amt === null) return;\n if (!canDonate()) return;\n props.p.loseMoney(amt);\n const repGain = Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(amt, props.p);\n props.faction.playerReputation += repGain;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You just donated \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: amt\n }), \" to \", fac.name, \" to gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(repGain), \" reputation.\"));\n props.rerender();\n }\n\n function Status() {\n if (donateAmt === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n if (!canDonate()) {\n if (props.p.money.lt(donateAmt)) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Insufficient funds\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid donate amount entered!\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This donation will result in \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(donateAmt, props.p)), \" reputation gain\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onChange,\n placeholder: \"Donation amount\",\n style: inputStyleMarkup,\n disabled: props.disabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: donate,\n text: \"Donate Money\",\n disabled: props.disabled || !canDonate()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Status, null), props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Unlocked at \", props.favorToDonate, \" favor with \", props.faction.name) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_8__[/* MathComponent */ \"a\"], {\n tex: String.raw`reputation = \\frac{\\text{donation amount} \\times \\text{reputation multiplier}}{10^{${digits}}}`\n }))));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/DonateOption.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1034 */
|
||
/*!*********************************!*\
|
||
!*** ./src/Faction/ui/Info.tsx ***!
|
||
\*********************************/
|
||
/*! exports provided: Info */
|
||
/*! exports used: Info */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Info; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/AutoupdatingParagraph */ 1035);\n/* harmony import */ var _ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ParagraphWithTooltip */ 1036);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Favor */ 360);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mathjax-react */ 196);\n/**\n * React component for general information about the faction. This includes the\n * factions \"motto\", reputation, favor, and gameplay instructions\n */\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nconst infoStyleMarkup = {\n display: \"block\",\n width: \"70%\"\n};\nclass Info extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getFavorGainContent = this.getFavorGainContent.bind(this);\n this.getReputationContent = this.getReputationContent.bind(this);\n }\n\n getFavorGainContent() {\n const favorGain = this.props.faction.getFavorGain()[0];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You will have \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor + favorGain), \" faction favor after installing an Augmentation.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = \\text{total faction reputation}}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{favor=\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}`\n }));\n }\n\n getReputationContent() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(this.props.faction.playerReputation));\n }\n\n render() {\n const favorTooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = reputation}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}`\n }));\n const infoText = {\n __html: this.props.factionInfo.infoText\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", {\n className: \"text\",\n dangerouslySetInnerHTML: infoText\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__[/* AutoupdatingParagraph */ \"a\"], {\n intervalTime: 5e3,\n getContent: this.getReputationContent,\n getTooltip: this.getFavorGainContent\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__[/* ParagraphWithTooltip */ \"a\"], {\n content: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor)),\n tooltip: favorTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: infoStyleMarkup\n }, \"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities.\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/Info.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1035 */
|
||
/*!************************************************!*\
|
||
!*** ./src/ui/React/AutoupdatingParagraph.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: AutoupdatingParagraph */
|
||
/*! exports used: AutoupdatingParagraph */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AutoupdatingParagraph; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Basic paragraph (p Element) that automatically re-renders itself every X seconds\n *\n * NOT recommended for usage - only if you really have to\n */\n\nclass AutoupdatingParagraph extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Timer ID for auto-updating implementation (returned value from setInterval())\n */\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", 0);\n\n this.state = {\n i: 0\n };\n }\n\n componentDidMount() {\n const time = this.props.intervalTime ? this.props.intervalTime : 1000;\n this.interval = window.setInterval(() => this.tick(), time);\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n tick() {\n this.setState(prevState => ({\n i: prevState.i + 1\n }));\n }\n\n hasTooltip() {\n if (this.props.getTooltip != null) {\n return !!this.props.getTooltip();\n }\n\n return true;\n }\n\n tooltip() {\n if (!this.props.getTooltip) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n return this.props.getTooltip();\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"tooltip\",\n style: this.props.style\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.getContent()), this.hasTooltip() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, this.tooltip()));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/AutoupdatingParagraph.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1036 */
|
||
/*!***********************************************!*\
|
||
!*** ./src/ui/React/ParagraphWithTooltip.tsx ***!
|
||
\***********************************************/
|
||
/*! exports provided: ParagraphWithTooltip */
|
||
/*! exports used: ParagraphWithTooltip */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ParagraphWithTooltip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Text (p Element) with Tooltip\n */\n\nclass ParagraphWithTooltip extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"tooltip\",\n style: this.props.style\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.content), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, this.props.tooltip));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/ParagraphWithTooltip.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1037 */
|
||
/*!***************************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx ***!
|
||
\***************************************************************/
|
||
/*! exports provided: CovenantPurchasesRoot */
|
||
/*! exports used: CovenantPurchasesRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantPurchasesRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveUpgrades */ 1038);\n/* harmony import */ var _Sleeve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Sleeve */ 246);\n/* harmony import */ var _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SleeveCovenantPurchases */ 293);\n/* harmony import */ var _ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/PopupCloseButton */ 1040);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Root React component for the popup that lets player purchase Duplicate\n * Sleeves and Sleeve-related upgrades from The Covenant\n */\n\n\n\n\n\n\n\n\nfunction CovenantPurchasesRoot(props) {\n const [update, setUpdate] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n /**\n * Get the cost to purchase a new Duplicate Sleeve\n */\n\n function purchaseCost() {\n return (props.p.sleevesFromCovenant + 1) * _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* BaseCostPerSleeve */ \"a\"];\n }\n /**\n * Force a rerender by just changing an arbitrary state value\n */\n\n\n function rerender() {\n setUpdate(update + 1);\n } // Purchasing a new Duplicate Sleeve\n\n\n let purchaseDisabled = false;\n\n if (!props.p.canAfford(purchaseCost())) {\n purchaseDisabled = true;\n }\n\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) {\n purchaseDisabled = true;\n }\n\n function purchaseOnClick() {\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) return;\n\n if (props.p.canAfford(purchaseCost())) {\n props.p.loseMoney(purchaseCost());\n props.p.sleevesFromCovenant += 1;\n props.p.sleeves.push(new _Sleeve__WEBPACK_IMPORTED_MODULE_2__[/* Sleeve */ \"a\"](props.p));\n rerender();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to purchase a Duplicate Sleeve`, false);\n }\n } // Purchasing Upgrades for Sleeves\n\n\n const upgradePanels = [];\n\n for (let i = 0; i < props.p.sleeves.length; ++i) {\n const sleeve = props.p.sleeves[i];\n upgradePanels.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveUpgrades */ \"a\"], _extends({}, props, {\n sleeve: sleeve,\n index: i,\n rerender: rerender,\n key: i\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__[/* PopupCloseButton */ \"a\"], {\n popup: _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* PopupId */ \"c\"],\n text: \"Close\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to purchase an additional Duplicate Sleeve from The Covenant for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: purchaseCost(),\n player: props.p\n }), \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These Duplicate Sleeves are permanent (they persist through BitNodes). You can purchase a total of\", \" \", _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"], \" from The Covenant.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n disabled: purchaseDisabled,\n onClick: purchaseOnClick,\n text: \"Purchase\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes.\"), upgradePanels);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1038 */
|
||
/*!****************************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx ***!
|
||
\****************************************************************/
|
||
/*! exports provided: CovenantSleeveUpgrades */
|
||
/*! exports used: CovenantSleeveUpgrades */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveUpgrades; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveMemoryUpgrade */ 1039);\n/**\n * React Component for a panel that lets you purchase upgrades for a single\n * Duplicate Sleeve through The Covenant\n */\n\n\nclass CovenantSleeveUpgrades extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Duplicate Sleeve \", this.props.index), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveMemoryUpgrade */ \"a\"], this.props));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1039 */
|
||
/*!*********************************************************************!*\
|
||
!*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx ***!
|
||
\*********************************************************************/
|
||
/*! exports provided: CovenantSleeveMemoryUpgrade */
|
||
/*! exports used: CovenantSleeveMemoryUpgrade */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveMemoryUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/**\n * React component for a panel that lets you purchase upgrades for a Duplicate\n * Sleeve's Memory (through The Covenant)\n */\n\n\n\n\nclass CovenantSleeveMemoryUpgrade extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n amt: 1\n };\n this.changePurchaseAmount = this.changePurchaseAmount.bind(this);\n this.purchaseMemory = this.purchaseMemory.bind(this);\n }\n\n changePurchaseAmount(e) {\n let n = parseInt(e.target.value);\n if (isNaN(n)) n = 1;\n const maxMemory = 100 - this.props.sleeve.memory;\n if (n > maxMemory) n = maxMemory;\n this.setState({\n amt: n\n });\n }\n\n getPurchaseCost() {\n if (isNaN(this.state.amt)) {\n return Infinity;\n }\n\n const maxMemory = 100 - this.props.sleeve.memory;\n\n if (this.state.amt > maxMemory) {\n return Infinity;\n }\n\n return this.props.sleeve.getMemoryUpgradeCost(this.state.amt);\n }\n\n purchaseMemory() {\n const cost = this.getPurchaseCost();\n\n if (this.props.p.canAfford(cost)) {\n this.props.sleeve.upgradeMemory(this.state.amt);\n this.props.p.loseMoney(cost);\n this.props.rerender();\n }\n }\n\n render() {\n const inputId = `sleeve-${this.props.index}-memory-upgrade-input`; // Memory cannot go above 100\n\n const maxMemory = 100 - this.props.sleeve.memory; // Purchase button props\n\n const cost = this.getPurchaseCost();\n const purchaseBtnDisabled = !this.props.p.canAfford(cost);\n let purchaseBtnContent;\n\n if (isNaN(this.state.amt)) {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Invalid value\");\n } else if (this.state.amt > maxMemory) {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Memory cannot exceed 100\");\n } else {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchase \", this.state.amt, \" memory - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \"?\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"u\", null, \"Upgrade Memory\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSleeveMemory(this.props.sleeve.memory), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"label\", {\n htmlFor: inputId\n }, \"Amount of memory to purchase (must be an integer):\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"text-input\",\n id: inputId,\n onChange: this.changePurchaseAmount,\n type: \"number\",\n value: this.state.amt\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: purchaseBtnDisabled,\n onClick: this.purchaseMemory,\n text: purchaseBtnContent\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1040 */
|
||
/*!*******************************************!*\
|
||
!*** ./src/ui/React/PopupCloseButton.tsx ***!
|
||
\*******************************************/
|
||
/*! exports provided: PopupCloseButton */
|
||
/*! exports used: PopupCloseButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupCloseButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 343);\n/* harmony import */ var _PopupButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PopupButton */ 1041);\n/**\n * Close button for popup dialog boxes\n * It creates an event handler such that pressing Esc will close the binded popup\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupCloseButton extends _PopupButton__WEBPACK_IMPORTED_MODULE_3__[/* PopupButton */ \"a\"] {\n constructor(props) {\n super(props);\n this.closePopup = this.closePopup.bind(this);\n }\n\n closePopup() {\n if (this.props.onClose) this.props.onClose();\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a\n // parent component\n\n\n if (popup instanceof HTMLElement) {\n // Removes everything inside the wrapper container\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup);\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.closePopup,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupCloseButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1041 */
|
||
/*!**************************************!*\
|
||
!*** ./src/ui/React/PopupButton.tsx ***!
|
||
\**************************************/
|
||
/*! exports provided: PopupButton */
|
||
/*! exports used: PopupButton */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 343);\n/**\n * Basic button for popup dialog boxes\n * It creates an event handler such that pressing Esc will perform the click handler.\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n this.keyListener = this.keyListener.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener(\"keydown\", this.keyListener);\n }\n\n componentWillUnmount() {\n document.removeEventListener(\"keydown\", this.keyListener);\n }\n\n handleClick() {\n if (this.props.onClose) this.props.onClose(); //We might be able to remove this?\n //Clickhandler from the props will override this anyhow.\n\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a parent component\n\n\n if (popup instanceof HTMLElement) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup); // Removes everything inside the wrapper container\n\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n keyListener(e) {\n //This doesn't really make sense, a button doesnt have to listen to escape IMO\n //Too affraid to remove it since im not sure what it will break.. But yuck..\n if (e.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__[/* KEY */ \"a\"].ESC) {\n this.handleClick();\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.handleClick,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupButton.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1042 */
|
||
/*!********************************************!*\
|
||
!*** ./src/Faction/ui/CreateGangPopup.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: CreateGangPopup */
|
||
/*! exports used: CreateGangPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CreateGangPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for the popup used to create a new gang.\n */\n\n\n\n\nfunction CreateGangPopup(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const combatGangText = \"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. \" + \"Compared to hacking gangs, progression with combat gangs can be more difficult as territory management \" + \"is more important. However, well-managed combat gangs can progress faster than hacking ones.\";\n const hackingGangText = \"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. \" + \"Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare \" + \"is not as important.\";\n\n function isHacking() {\n return [\"NiteSec\", \"The Black Hand\"].includes(props.facName);\n }\n\n function createGang() {\n player.startGang(props.facName, isHacking());\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n router.toGang();\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) createGang();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to create a new Gang with \", props.facName, \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), isHacking() ? hackingGangText : combatGangText, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-input-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: createGang,\n onKeyUp: onKeyUp,\n text: \"Create Gang\",\n style: {\n float: \"right\"\n },\n autoFocus: true\n })));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/CreateGangPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1043 */
|
||
/*!**********************************!*\
|
||
!*** ./src/ui/CharacterInfo.tsx ***!
|
||
\**********************************/
|
||
/*! exports provided: CharacterInfo */
|
||
/*! exports used: CharacterInfo */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode/BitNode */ 168);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerPurchases */ 173);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Hacknet/data/Constants */ 32);\n/* harmony import */ var _React_StatsTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./React/StatsTable */ 186);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Context */ 43);\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction LastEmployer() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.companyName) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Employer at which you last worked: \", player.companyName), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction LastJob() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.companyName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Job you last worked: \", player.jobs[player.companyName]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction Employers() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n if (player.jobs && Object.keys(player.jobs).length !== 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"All Employers:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, Object.keys(player.jobs).map(j => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: j\n }, \" * \", j))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction Hacknet() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player(); // Can't import HacknetHelpers for some reason.\n\n if (!(player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][9] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Nodes owned: ${player.hacknetNodes.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Servers owned: ${player.hacknetNodes.length} / ${_Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServerConstants */ \"b\"].MaxServers}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n}\n\nfunction Intelligence() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.intelligence > 0 && (player.bitNodeN === 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, \"Intelligence:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction MultiplierTable(props) {\n function bn5Stat(r) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0 && r.length > 2 && r[1] != r[2]) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \" \", \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[2]), \")\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, props.rows.map(r => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: r[0]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, `${r[0]} multiplier:`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\",\n paddingLeft: \"5px\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[1])), bn5Stat(r))))));\n}\n\nfunction BladeburnerMults() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n if (!player.canAccessBladeburner()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Bladeburner Success Chance\", player.bladeburner_max_stamina_mult], [\"Bladeburner Max Stamina\", player.bladeburner_stamina_gain_mult], [\"Bladeburner Stamina Gain\", player.bladeburner_analysis_mult], [\"Bladeburner Field Analysis\", player.bladeburner_success_chance_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction CurrentBitNode() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.sourceFiles.length > 0) {\n const index = \"BitNode\" + player.bitNodeN;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current BitNode: \", player.bitNodeN, \" (\", _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].name, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"60%\",\n fontSize: \"13px\",\n marginLeft: \"2%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"break-word\"\n }\n }, _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].info)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction CharacterInfo() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 20);\n return () => clearInterval(id);\n }, []);\n\n function convertMoneySourceTrackerToString(src) {\n const parts = [[`Total:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.total\n })]];\n\n if (src.bladeburner) {\n parts.push([`Bladeburner:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.bladeburner\n })]);\n }\n\n if (src.codingcontract) {\n parts.push([`Coding Contracts:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.codingcontract\n })]);\n }\n\n if (src.work) {\n parts.push([`Company Work:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.work\n })]);\n }\n\n if (src.class) {\n parts.push([`Class:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.class\n })]);\n }\n\n if (src.corporation) {\n parts.push([`Corporation:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.corporation\n })]);\n }\n\n if (src.crime) {\n parts.push([`Crimes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.crime\n })]);\n }\n\n if (src.gang) {\n parts.push([`Gang:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.gang\n })]);\n }\n\n if (src.hacking) {\n parts.push([`Hacking:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacking\n })]);\n }\n\n if (src.hacknetnode) {\n parts.push([`Hacknet Nodes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacknetnode\n })]);\n }\n\n if (src.hospitalization) {\n parts.push([`Hospitalization:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hospitalization\n })]);\n }\n\n if (src.infiltration) {\n parts.push([`Infiltration:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.infiltration\n })]);\n }\n\n if (src.stock) {\n parts.push([`Stock Market:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.stock\n })]);\n }\n\n if (src.casino) {\n parts.push([`Casino:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.casino\n })]);\n }\n\n if (src.sleeves) {\n parts.push([`Sleeves:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.sleeves\n })]);\n }\n\n return Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(parts);\n }\n\n function openMoneyModal() {\n let content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned since you last installed Augmentations:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(player.moneySourceA));\n\n if (player.sourceFiles.length !== 0) {\n content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, content, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned in this BitNode:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(player.moneySourceB));\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(content, false);\n }\n\n const timeRows = [[\"Time played since last Augmentation:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.playtimeSinceLastAug)]];\n\n if (player.sourceFiles.length > 0) {\n timeRows.push([\"Time played since last Bitnode destroyed:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.playtimeSinceLastBitnode)]);\n }\n\n timeRows.push([\"Total Time played:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.totalPlaytime)]);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"General\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current City: \", player.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastEmployer, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastJob, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Employers, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: player.money.toNumber()\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"popup-box-button\",\n style: {\n display: \"inline-block\",\n float: \"none\"\n },\n onClick: openMoneyModal\n }, \"Money Statistics & Breakdown\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"0\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Hacking:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.hacking_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"1\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Strength:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.strength_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"2\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Defense:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.defense_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"3\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Dexterity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.dexterity_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"4\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Agility:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.agility_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Charisma:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.charisma_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Chance\", player.hacking_chance_mult], [\"Hacking Speed\", player.hacking_speed_mult], [\"Hacking Money\", player.hacking_money_mult, player.hacking_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney], [\"Hacking Growth\", player.hacking_grow_mult, player.hacking_grow_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Level\", player.hacking_mult, player.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier], [\"Hacking Experience\", player.hacking_exp_mult, player.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackExpGain]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Strength Level\", player.strength_mult, player.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier], [\"Strength Experience\", player.strength_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Defense Level\", player.defense_mult, player.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier], [\"Defense Experience\", player.defense_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Dexterity Level\", player.dexterity_mult, player.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier], [\"Dexterity Experience\", player.dexterity_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Agility Level\", player.agility_mult, player.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier], [\"Agility Experience\", player.agility_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Charisma Level\", player.charisma_mult, player.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier], [\"Charisma Experience\", player.charisma_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacknet Node production\", player.hacknet_node_money_mult, player.hacknet_node_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney], [\"Hacknet Node purchase cost\", player.hacknet_node_purchase_cost_mult], [\"Hacknet Node RAM upgrade cost\", player.hacknet_node_ram_cost_mult], [\"Hacknet Node Core purchase cost\", player.hacknet_node_core_cost_mult], [\"Hacknet Node level upgrade cost\", player.hacknet_node_level_cost_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Company reputation gain\", player.company_rep_mult], [\"Faction reputation gain\", player.faction_rep_mult, player.faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain], [\"Salary\", player.work_money_mult, player.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Crime success\", player.crime_success_mult], [\"Crime money\", player.crime_money_mult, player.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CrimeMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BladeburnerMults, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Misc.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Servers owned: ${player.purchasedServers.length} / ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__[/* getPurchaseServerLimit */ \"b\"])()}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Hacknet, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Augmentations installed: ${player.augmentations.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(timeRows), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CurrentBitNode, null)));\n}\n\n//# sourceURL=webpack:///./src/ui/CharacterInfo.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1044 */
|
||
/*!************************************************!*\
|
||
!*** ./src/StockMarket/ui/StockMarketRoot.tsx ***!
|
||
\************************************************/
|
||
/*! exports provided: StockMarketRoot */
|
||
/*! exports used: StockMarketRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarketRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InfoAndPurchases */ 1045);\n/* harmony import */ var _StockTickers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickers */ 1046);\n/**\n * Root React component for the Stock Market UI\n */\n\n\n\nfunction StockMarketRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"stock-market-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__[/* InfoAndPurchases */ \"a\"], {\n initStockMarket: props.initStockMarket,\n p: props.p,\n rerender: rerender\n }), props.p.hasWseAccount && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockTickers__WEBPACK_IMPORTED_MODULE_2__[/* StockTickers */ \"a\"], {\n buyStockLong: props.buyStockLong,\n buyStockShort: props.buyStockShort,\n cancelOrder: props.cancelOrder,\n eventEmitterForReset: props.eventEmitterForReset,\n p: props.p,\n placeOrder: props.placeOrder,\n sellStockLong: props.sellStockLong,\n sellStockShort: props.sellStockShort,\n stockMarket: props.stockMarket\n }));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockMarketRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1045 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/StockMarket/ui/InfoAndPurchases.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: InfoAndPurchases */
|
||
/*! exports used: InfoAndPurchases */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InfoAndPurchases; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../StockMarketCosts */ 220);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React component for the Stock Market UI. This component displays\n * general information about the stock market, buttons for the various purchases,\n * and a link to the documentation (Investopedia)\n */\n\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass InfoAndPurchases extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick4SMarketDataHelpTip = this.handleClick4SMarketDataHelpTip.bind(this);\n this.purchaseWseAccount = this.purchaseWseAccount.bind(this);\n this.purchaseTixApiAccess = this.purchaseTixApiAccess.bind(this);\n this.purchase4SMarketData = this.purchase4SMarketData.bind(this);\n this.purchase4SMarketDataTixApiAccess = this.purchase4SMarketDataTixApiAccess.bind(this);\n }\n\n handleClick4SMarketDataHelpTip() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Access to the 4S Market Data feed will display two additional pieces \" + \"of information about each stock: Price Forecast & Volatility<br><br>\" + \"Price Forecast indicates the probability the stock has of increasing or \" + \"decreasing. A '+' forecast means the stock has a higher chance of increasing \" + \"than decreasing, and a '-' means the opposite. The number of '+/-' symbols \" + \"is used to illustrate the magnitude of these probabilities. For example, \" + \"'+++' means that the stock has a significantly higher chance of increasing \" + \"than decreasing, while '+' means that the stock only has a slightly higher chance \" + \"of increasing than decreasing.<br><br>\" + \"Volatility represents the maximum percentage by which a stock's price \" + \"can change every tick (a tick occurs every few seconds while the game \" + \"is running).<br><br>\" + \"A stock's price forecast can change over time. This is also affected by volatility. \" + \"The more volatile a stock is, the more its price forecast will change.\");\n }\n\n purchaseWseAccount() {\n if (this.props.p.hasWseAccount) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost)) {\n return;\n }\n\n this.props.p.hasWseAccount = true;\n this.props.initStockMarket();\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost);\n this.props.rerender();\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n }\n\n purchaseTixApiAccess() {\n if (this.props.p.hasTixApiAccess) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost)) {\n return;\n }\n\n this.props.p.hasTixApiAccess = true;\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost);\n this.props.rerender();\n }\n\n purchase4SMarketData() {\n if (this.props.p.has4SData) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])())) {\n return;\n }\n\n this.props.p.has4SData = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])());\n this.props.rerender();\n }\n\n purchase4SMarketDataTixApiAccess() {\n if (this.props.p.has4SDataTixApi) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n return;\n }\n\n this.props.p.has4SDataTixApi = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])());\n this.props.rerender();\n }\n\n renderPurchaseWseAccountButton() {\n if (this.props.p.hasWseAccount) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"WSE Account - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchaseWseAccount,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy WSE Account - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchaseTixApiAccessButton() {\n if (this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"TIX API Access - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchaseTixApiAccess,\n style: blockStyleMarkup,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy Trade Information eXchange (TIX) API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchase4SMarketDataButton() {\n if (this.props.p.has4SData) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data - Purchased\",\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchase4SMarketData,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n }\n }\n\n renderPurchase4SMarketDataTixApiAccessButton() {\n if (!this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: true,\n text: `Buy 4S Market Data TIX API Access`,\n tooltip: \"Requires TIX API Access\"\n });\n } else if (this.props.p.has4SDataTixApi) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data TIX API - Purchased\",\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchase4SMarketDataTixApiAccess,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data TIX API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n }\n }\n\n render() {\n const documentationLink = \"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-info-and-purchases\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Welcome to the World Stock Exchange (WSE)!\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"a\", {\n href: documentationLink,\n target: \"_blank\"\n }, \"Investopedia\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"To begin trading, you must first purchase an account:\"), this.renderPurchaseWseAccountButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Trade Information eXchange (TIX) API\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies.\"), this.renderPurchaseTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Four Sigma (4S) Market Data Feed\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies.\"), this.renderPurchase4SMarketDataButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"help-tip-big\",\n onClick: this.handleClick4SMarketDataHelpTip\n }, \"?\"), this.renderPurchase4SMarketDataTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Commission Fees: Every transaction you make has a\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission,\n player: this.props.p\n }), \" commission fee.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1046 */
|
||
/*!*********************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTickers.tsx ***!
|
||
\*********************************************/
|
||
/*! exports provided: StockTickers */
|
||
/*! exports used: StockTickers */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTicker */ 1047);\n/* harmony import */ var _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickersConfig */ 333);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Stock */ 104);\n/* harmony import */ var _ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/ErrorBoundary */ 1052);\n/**\n * React Component for the Stock Market UI. This is the container for all\n * of the stock tickers. It also contains the configuration for the\n * stock ticker UI (watchlist filter, portfolio vs all mode, etc.)\n */\n\n\n\n\n\nclass StockTickers extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false,\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks,\n watchlistFilter: \"\",\n watchlistSymbols: []\n };\n this.changeDisplayMode = this.changeDisplayMode.bind(this);\n this.changeWatchlistFilter = this.changeWatchlistFilter.bind(this);\n this.collapseAllTickers = this.collapseAllTickers.bind(this);\n this.expandAllTickers = this.expandAllTickers.bind(this);\n this.rerender = this.rerender.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n changeDisplayMode() {\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks) {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio\n });\n } else {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks\n });\n }\n }\n\n changeWatchlistFilter(e) {\n const watchlist = e.target.value;\n const sanitizedWatchlist = watchlist.replace(/\\s/g, \"\");\n this.setState({\n watchlistFilter: watchlist\n });\n\n if (sanitizedWatchlist !== \"\") {\n this.setState({\n watchlistSymbols: sanitizedWatchlist.split(\",\")\n });\n } else {\n this.setState({\n watchlistSymbols: []\n });\n }\n }\n\n collapseAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n render() {\n const tickers = [];\n\n for (const stockMarketProp in this.props.stockMarket) {\n const val = this.props.stockMarket[stockMarketProp];\n\n if (val instanceof _Stock__WEBPACK_IMPORTED_MODULE_3__[/* Stock */ \"a\"]) {\n // Skip if there's a filter and the stock isnt in that filter\n if (this.state.watchlistSymbols.length > 0 && !this.state.watchlistSymbols.includes(val.symbol)) {\n continue;\n }\n\n let orders = this.props.stockMarket.Orders[val.symbol];\n\n if (orders == null) {\n orders = [];\n } // Skip if we're in portfolio mode and the player doesnt own this or have any active orders\n\n\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio) {\n if (val.playerShares === 0 && val.playerShortShares === 0 && orders.length === 0) {\n continue;\n }\n }\n\n tickers.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTicker__WEBPACK_IMPORTED_MODULE_1__[/* StockTicker */ \"a\"], {\n buyStockLong: this.props.buyStockLong,\n buyStockShort: this.props.buyStockShort,\n cancelOrder: this.props.cancelOrder,\n key: val.symbol,\n orders: orders,\n p: this.props.p,\n placeOrder: this.props.placeOrder,\n rerenderAllTickers: this.rerender,\n sellStockLong: this.props.sellStockLong,\n sellStockShort: this.props.sellStockShort,\n stock: val\n }));\n }\n }\n\n const errorBoundaryProps = {\n eventEmitterForReset: this.props.eventEmitterForReset,\n id: \"StockTickersErrorBoundary\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__[/* ErrorBoundary */ \"a\"], errorBoundaryProps, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* StockTickersConfig */ \"a\"], {\n changeDisplayMode: this.changeDisplayMode,\n changeWatchlistFilter: this.changeWatchlistFilter,\n collapseAllTickers: this.collapseAllTickers,\n expandAllTickers: this.expandAllTickers,\n tickerDisplayMode: this.state.tickerDisplayMode\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n id: \"stock-market-list\",\n ref: this.listRef\n }, tickers));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickers.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1047 */
|
||
/*!********************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTicker.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: StockTicker */
|
||
/*! exports used: StockTicker */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTicker; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerHeaderText */ 1048);\n/* harmony import */ var _StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickerOrderList */ 1049);\n/* harmony import */ var _StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockTickerPositionText */ 1051);\n/* harmony import */ var _StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./StockTickerTxButton */ 414);\n/* harmony import */ var _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlaceOrderPopup */ 415);\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../StockMarketHelpers */ 156);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../data/PositionTypes */ 52);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Component for a single stock ticker in the Stock Market UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SelectorOrderType;\n\n(function (SelectorOrderType) {\n SelectorOrderType[\"Market\"] = \"Market Order\";\n SelectorOrderType[\"Limit\"] = \"Limit Order\";\n SelectorOrderType[\"Stop\"] = \"Stop Order\";\n})(SelectorOrderType || (SelectorOrderType = {}));\n\nclass StockTicker extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n orderType: SelectorOrderType.Market,\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long,\n qty: \"\"\n };\n this.getBuyTransactionCostContent = this.getBuyTransactionCostContent.bind(this);\n this.getSellTransactionCostContent = this.getSellTransactionCostContent.bind(this);\n this.handleBuyButtonClick = this.handleBuyButtonClick.bind(this);\n this.handleBuyMaxButtonClick = this.handleBuyMaxButtonClick.bind(this);\n this.handleHeaderClick = this.handleHeaderClick.bind(this);\n this.handleOrderTypeChange = this.handleOrderTypeChange.bind(this);\n this.handlePositionTypeChange = this.handlePositionTypeChange.bind(this);\n this.handleQuantityChange = this.handleQuantityChange.bind(this);\n this.handleSellButtonClick = this.handleSellButtonClick.bind(this);\n this.handleSellAllButtonClick = this.handleSellAllButtonClick.bind(this);\n }\n\n getBuyTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getBuyTransactionCost */ \"b\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will cost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n getQuantity() {\n return Math.round(parseFloat(this.state.qty));\n }\n\n getSellTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long) {\n if (qty > stock.playerShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Long position\");\n }\n } else {\n if (qty > stock.playerShortShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Short position\");\n }\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getSellTransactionGain */ \"c\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Selling \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will result in a gain of \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n handleBuyButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(this.props.stock, shares);\n } else {\n this.props.buyStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Buy Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Buy Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleBuyMaxButtonClick() {\n const playerMoney = this.props.p.money.toNumber();\n const stock = this.props.stock;\n let maxShares = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* calculateBuyMaxAmount */ \"a\"])(stock, this.state.position, playerMoney);\n maxShares = Math.min(maxShares, Math.round(stock.maxShares - stock.playerShares - stock.playerShortShares));\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(stock, maxShares);\n } else {\n this.props.buyStockLong(stock, maxShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Buy Max' only works for Market Orders`);\n break;\n }\n }\n }\n\n handleHeaderClick(e) {\n const elem = e.currentTarget;\n elem.classList.toggle(\"active\");\n const panel = elem.nextElementSibling;\n\n if (panel.style.display === \"block\") {\n panel.style.display = \"none\";\n } else {\n panel.style.display = \"block\";\n }\n }\n\n handleOrderTypeChange(e) {\n const val = e.target.value; // The select value returns a string. Afaik TypeScript doesnt make it easy\n // to convert that string back to an enum type so we'll just do this for now\n\n switch (val) {\n case SelectorOrderType.Limit:\n this.setState({\n orderType: SelectorOrderType.Limit\n });\n break;\n\n case SelectorOrderType.Stop:\n this.setState({\n orderType: SelectorOrderType.Stop\n });\n break;\n\n case SelectorOrderType.Market:\n default:\n this.setState({\n orderType: SelectorOrderType.Market\n });\n }\n }\n\n handlePositionTypeChange(e) {\n const val = e.target.value;\n\n if (val === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n });\n } else {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n });\n }\n }\n\n handleQuantityChange(e) {\n this.setState({\n qty: e.target.value\n });\n }\n\n handleSellButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(this.props.stock, shares);\n } else {\n this.props.sellStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Sell Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Sell Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleSellAllButtonClick() {\n const stock = this.props.stock;\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(stock, stock.playerShortShares);\n } else {\n this.props.sellStockLong(stock, stock.playerShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Sell All' only works for Market Orders`);\n break;\n }\n }\n } // Whether the player has access to orders besides market orders (limit/stop)\n\n\n hasOrderAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 3;\n } // Whether the player has access to shorting stocks\n\n\n hasShortAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 2;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerHeaderText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"stock-market-input\",\n onChange: this.handleQuantityChange,\n placeholder: \"Quantity (Shares)\",\n value: this.state.qty\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handlePositionTypeChange,\n value: this.state.position\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n }, \"Long\"), this.hasShortAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n }, \"Short\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handleOrderTypeChange,\n value: this.state.orderType\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Market\n }, SelectorOrderType.Market), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Limit\n }, SelectorOrderType.Limit), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Stop\n }, SelectorOrderType.Stop)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyButtonClick,\n text: \"Buy\",\n tooltip: this.getBuyTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellButtonClick,\n text: \"Sell\",\n tooltip: this.getSellTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyMaxButtonClick,\n text: \"Buy MAX\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellAllButtonClick,\n text: \"Sell ALL\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__[/* StockTickerPositionText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__[/* StockTickerOrderList */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n orders: this.props.orders,\n p: this.props.p,\n stock: this.props.stock\n }))\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTicker.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1048 */
|
||
/*!******************************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTickerHeaderText.tsx ***!
|
||
\******************************************************/
|
||
/*! exports provided: StockTickerHeaderText */
|
||
/*! exports used: StockTickerHeaderText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerHeaderText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/TickerHeaderFormatData */ 573);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/**\n * React Component for the text on a stock ticker's header. This text displays\n * general information on the stock such as the name, symbol, price, and\n * 4S Market Data\n */\n\n\n\n\nconst localesWithLongPriceFormat = [\"cs\", \"lv\", \"pl\", \"ru\"];\nfunction StockTickerHeaderText(props) {\n const stock = props.stock;\n const stockPriceFormat = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMoney(stock.price);\n const spacesAllottedForStockPrice = localesWithLongPriceFormat.includes(_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].Locale) ? 15 : 12;\n const spacesAfterStockName = \" \".repeat(1 + _data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__[/* TickerHeaderFormatData */ \"a\"].longestName - stock.name.length + (_data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__[/* TickerHeaderFormatData */ \"a\"].longestSymbol - stock.symbol.length));\n const spacesBeforePrice = \" \".repeat(spacesAllottedForStockPrice - stockPriceFormat.length);\n let hdrText = `${stock.name}${spacesAfterStockName}${stock.symbol} -${spacesBeforePrice}${stockPriceFormat}`;\n\n if (props.p.has4SData) {\n hdrText += ` - Volatility: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatPercentage(stock.mv / 100)} - Price Forecast: `;\n let plusOrMinus = stock.b; // True for \"+\", false for \"-\"\n\n if (stock.otlkMag < 0) {\n plusOrMinus = !plusOrMinus;\n }\n\n hdrText += (plusOrMinus ? \"+\" : \"-\").repeat(Math.floor(Math.abs(stock.otlkMag) / 10) + 1); // Debugging:\n // hdrText += ` - ${stock.getAbsoluteForecast()} / ${stock.otlkMagForecast}`;\n }\n\n const styleMarkup = {\n color: \"#66ff33\"\n };\n\n if (stock.lastPrice === stock.price) {\n styleMarkup.color = \"white\";\n } else if (stock.lastPrice > stock.price) {\n styleMarkup.color = \"red\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n style: styleMarkup\n }, hdrText);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1049 */
|
||
/*!*****************************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTickerOrderList.tsx ***!
|
||
\*****************************************************/
|
||
/*! exports provided: StockTickerOrderList */
|
||
/*! exports used: StockTickerOrderList */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrderList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerOrder */ 1050);\n/**\n * React component for displaying a stock's order list in the Stock Market UI.\n * This component resides in the stock ticker\n */\n\n\nclass StockTickerOrderList extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n const orders = [];\n\n for (let i = 0; i < this.props.orders.length; ++i) {\n const o = this.props.orders[i];\n orders.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerOrder */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n order: o,\n key: i\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"stock-market-order-list\"\n }, orders);\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1050 */
|
||
/*!*************************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTickerOrder.tsx ***!
|
||
\*************************************************/
|
||
/*! exports provided: StockTickerOrder */
|
||
/*! exports used: StockTickerOrder */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrder; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/PositionTypes */ 52);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React component for displaying a single order in a stock's order book\n */\n\n\n\n\nclass StockTickerOrder extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleCancelOrderClick = this.handleCancelOrderClick.bind(this);\n }\n\n handleCancelOrderClick() {\n this.props.cancelOrder({\n order: this.props.order\n });\n }\n\n render() {\n const order = this.props.order;\n const posTxt = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long ? \"Long Position\" : \"Short Position\";\n const txt = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, order.type, \" - \", posTxt, \" - \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatShares(order.shares), \" @ \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: order.price\n }));\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, txt, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button stock-market-order-cancel-btn\",\n onClick: this.handleCancelOrderClick\n }, \"Cancel Order\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrder.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1051 */
|
||
/*!********************************************************!*\
|
||
!*** ./src/StockMarket/ui/StockTickerPositionText.tsx ***!
|
||
\********************************************************/
|
||
/*! exports provided: StockTickerPositionText */
|
||
/*! exports used: StockTickerPositionText */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerPositionText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/**\n * React Component for the text on a stock ticker that display's information\n * about the player's position in that stock\n */\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass StockTickerPositionText extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n renderLongPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShares * stock.playerAvgPx;\n const gains = (stock.getBidPrice() - stock.playerAvgPx) * stock.playerShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Long Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the long position will increase in value if the price of the corresponding stock increases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n }\n\n renderShortPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShortShares * stock.playerAvgShortPx;\n const gains = (stock.playerAvgShortPx - stock.getAskPrice()) * stock.playerShortShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n if (this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][8] >= 2) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Short Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the short position will increase in value if the price of the corresponding stock decreases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShortShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgShortPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n }), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n } else {\n return null;\n }\n }\n\n render() {\n const stock = this.props.stock;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-position-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"Max Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.maxShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Ask Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getAskPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Bid Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getBidPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), this.renderLongPosition(), this.renderShortPosition());\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1052 */
|
||
/*!****************************************!*\
|
||
!*** ./src/ui/React/ErrorBoundary.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: ErrorBoundary */
|
||
/*! exports used: ErrorBoundary */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ErrorBoundary; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/EventEmitter */ 344);\n/**\n * React Component for a simple Error Boundary. The fallback UI for\n * this error boundary is simply a bordered text box\n */\n\n\n// TODO: Move this out to a css file\nconst styleMarkup = {\n border: \"1px solid red\",\n display: \"inline-block\",\n margin: \"4px\",\n padding: \"4px\"\n};\nclass ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n errorInfo: \"\",\n hasError: false\n };\n }\n\n componentDidCatch(error, info) {\n console.error(`Caught error in React ErrorBoundary. Component stack:`);\n console.error(info.componentStack);\n }\n\n componentDidMount() {\n const cb = () => {\n this.setState({\n hasError: false\n });\n };\n\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.addSubscriber({\n cb: cb,\n id: this.props.id\n });\n }\n }\n\n componentWillUnmount() {\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.removeSubscriber(this.props.id);\n }\n }\n\n hasEventEmitter() {\n return this.props.eventEmitterForReset != null && this.props.eventEmitterForReset instanceof _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__[/* EventEmitter */ \"a\"] && this.props.id != null && typeof this.props.id === \"string\";\n }\n\n render() {\n if (this.state.hasError) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n style: styleMarkup\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error rendering UI. This is (probably) a bug. Please report to game developer.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `In the meantime, try refreshing the game WITHOUT saving.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error info: ${this.state.errorInfo}`));\n }\n\n return this.props.children;\n }\n\n static getDerivedStateFromError(error) {\n return {\n errorInfo: error.message,\n hasError: true\n };\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/ErrorBoundary.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1053 */
|
||
/*!*****************************************!*\
|
||
!*** ./src/BitNode/ui/BitverseRoot.tsx ***!
|
||
\*****************************************/
|
||
/*! exports provided: BitverseRoot */
|
||
/*! exports used: BitverseRoot */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitverseRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../RedPill */ 222);\n/* harmony import */ var _PortalPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PortalPopup */ 1054);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 404);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\n\n\n\n\nfunction BitNodePortal(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][`BitNode${props.n}`];\n\n if (bitNode == null) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"O\");\n }\n\n let cssClass;\n\n if (props.n === 12 && props.level >= 2) {\n // Repeating BitNode\n cssClass = \"level-2\";\n } else {\n cssClass = `level-${props.level}`;\n }\n\n function openPortalPopup() {\n const popupId = \"bitverse-portal-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _PortalPopup__WEBPACK_IMPORTED_MODULE_4__[/* PortalPopup */ \"a\"], {\n n: props.n,\n level: props.level,\n enter: props.enter,\n router: router,\n destroyedBitNode: props.destroyedBitNode,\n flume: props.flume,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: `bitnode ${cssClass} tooltip`,\n onClick: openPortalPopup\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"BitNode-\", bitNode.number.toString(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.desc, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)));\n}\n\nfunction BitverseRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const enter = _RedPill__WEBPACK_IMPORTED_MODULE_3__[/* enterBitNode */ \"a\"];\n const destroyed = player.bitNodeN;\n const [destroySequence, setDestroySequence] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])( true && !props.quick); // Update NextSourceFileFlags\n\n const nextSourceFileFlags = _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"].slice();\n\n if (!props.flume) {\n if (nextSourceFileFlags[destroyed] < 3) ++nextSourceFileFlags[destroyed];\n }\n\n if (destroySequence) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"[ERROR] SEMPOOL INVALID\", \"[ERROR] Segmentation Fault\", \"[ERROR] SIGKILL RECVD\", \"Dumping core...\", \"0000 000016FA 174FEE40 29AC8239 384FEA88\", \"0010 745F696E 2BBBE394 390E3940 248BEC23\", \"0020 7124696B 0000FF69 74652E6F FFFF1111\", \"----------------------------------------\", \"Failsafe initiated...\", `Restarting BitNode-${destroyed}...`, \"...........\", \"...........\", \"[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\"],\n onDone: () => setDestroySequence(false),\n auto: true\n });\n }\n\n return (// prettier-ignore\n react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | O O | O O | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | / __| \\\\ | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | O | | O / | O | | O | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | |_/ |/ | \\\\_ \\\\_| | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | | O | | O__/ | / \\\\__ | | O | | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | / /| O / \\\\| | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"O | | | \\\\| | O / _/ | / O | |/ | | | O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | | |O / | | O / | O O | | \\\\ O| | | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | |/ \\\\/ / __| | |/ \\\\ | \\\\ | |__ \\\\ \\\\/ \\\\| | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| O | |_/ |\\\\| \\\\ O \\\\__| \\\\_| | O |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | |_/ | | \\\\| / | \\\\_| | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| / \\\\| | / / \\\\ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 10,\n level: nextSourceFileFlags[10],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | / | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 11,\n level: nextSourceFileFlags[11],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 9,\n level: nextSourceFileFlags[9],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | | | | | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 12,\n level: nextSourceFileFlags[12],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | / / \\\\ \\\\ | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| | / \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 7,\n level: nextSourceFileFlags[7],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" / \\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 8,\n level: nextSourceFileFlags[8],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\ | |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ | / / | | \\\\ \\\\ | / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\JUMP \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 5,\n level: nextSourceFileFlags[5],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \"3R | | | | | | R3\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 6,\n level: nextSourceFileFlags[6],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" PMUJ/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\|| | | | | | | | | ||/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| \\\\_ | | | | | | _/ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\| / \\\\ / \\\\ |/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 1,\n level: nextSourceFileFlags[1],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" |/ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 2,\n level: nextSourceFileFlags[2],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 3,\n level: nextSourceFileFlags[3],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\| \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 4,\n level: nextSourceFileFlags[4],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently\", \"> Our species fought back, but it was futile. The Enders had technology far beyond our own...\", \"> Instead of killing every last one of us, the human race was enslaved...\", \"> We were shackled in a digital world, chained into a prison for our minds...\", \"> Using their advanced technology, the Enders created complex simulations of a virtual reality...\", \"> Simulations designed to keep us content...ignorant of the truth.\", \"> Simulations used to trap and suppress our consciousness, to keep us under control...\", \"> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.\", \"> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...\", \"> Only then can we begin to fight back...\", \"> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...\", \"> But there is still a long way to go...\", \"> The technology the Enders used to enslave the human race wasn't just a single complex simulation...\", \"> There are tens if not hundreds of BitNodes out there...\", \"> Each with their own simulations of a reality...\", \"> Each creating their own universes...a universe of universes\", \"> And all of which must be destroyed...\", \"> .......................................\", \"> Welcome to the Bitverse...\", \"> \", \"> (Enter a new BitNode using the image above)\"]\n }))\n );\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/BitverseRoot.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1054 */
|
||
/*!****************************************!*\
|
||
!*** ./src/BitNode/ui/PortalPopup.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: PortalPopup */
|
||
/*! exports used: PortalPopup */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PortalPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\nfunction PortalPopup(props) {\n const bitNodeKey = \"BitNode\" + props.n;\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_1__[/* BitNodes */ \"a\"][bitNodeKey];\n if (bitNode == null) throw new Error(`Could not find BitNode object for number: ${props.n}`);\n const maxSourceFileLevel = props.n === 12 ? \"∞\" : \"3\";\n const newLevel = Math.min(props.level + 1, props.n === 12 ? Infinity : 3);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"BitNode-\", props.n, \": \", bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Source-File Level: \", props.level, \" / \", maxSourceFileLevel, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.info, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => {\n props.enter(props.router, props.flume, props.destroyedBitNode, props.n);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n }, \"Enter BN\", props.n, \".\", newLevel));\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/PortalPopup.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1055 */
|
||
/*!****************************************!*\
|
||
!*** ./src/ui/React/CinematicLine.tsx ***!
|
||
\****************************************/
|
||
/*! exports provided: CinematicLine */
|
||
/*! exports used: CinematicLine */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicLine; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nfunction CinematicLine(props) {\n const [length, setLength] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newLength = length + 1;\n setLength(newLength);\n setDone(newLength >= props.text.length);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (done && props.onDone) {\n props.onDone();\n return;\n }\n\n let cancel = false;\n\n (async () => {\n await sleep(10).then(() => !cancel && advance());\n })();\n\n return () => {\n cancel = true;\n };\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, props.text.slice(0, length), !done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"\\u2588\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicLine.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1056 */
|
||
/*!********************************************!*\
|
||
!*** ./src/ui/React/CharacterOverview.tsx ***!
|
||
\********************************************/
|
||
/*! exports provided: CharacterOverview */
|
||
/*! exports used: CharacterOverview */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Reputation */ 76);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_material_Fab__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Fab */ 1393);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/VisibilityOff */ 1059);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/SaveAlt */ 1058);\n/* harmony import */ var _mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _Theme__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Theme */ 265);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../ui/Router */ 26);\n// Root React Component for the Corporation UI\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Intelligence() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Player();\n const classes = useStyles();\n if (player.intelligence === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, \"Int\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence))));\n}\n\nfunction Work() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Router();\n const classes = useStyles();\n if (!player.isWorking || player.focus) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Work\\xA0in\\xA0progress:\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"+\", Object(_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(player.workRepGained), \" rep\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => {\n player.startFocusing();\n router.toWork();\n }\n }, \"Focus\"))));\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n cellNone: {\n borderBottom: \"none\",\n padding: 0,\n margin: 0\n },\n cell: {\n padding: 0,\n margin: 0\n },\n hp: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].hp\n },\n money: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].money\n },\n hack: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].hack\n },\n combat: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].combat\n },\n cha: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].cha\n },\n int: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].int\n },\n nobackground: {\n backgroundColor: \"#0000\"\n }\n});\nfunction CharacterOverview({\n save\n}) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Router();\n if (router.page() === _ui_Router__WEBPACK_IMPORTED_MODULE_20__[/* Page */ \"a\"].BitVerse) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 600);\n return () => clearInterval(id);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n in: open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n m: 1\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, \"HP\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.hp), \"\\xA0/\\xA0\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.max_hp)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, \"Money\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(player.money.toNumber())))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, \"Hack\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Str\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Def\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Dex\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Agi\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, \"Cha\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Work, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n onClick: save\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval !== 0 ? \"primary\" : \"error\"\n }))))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fab__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n classes: {\n root: classes.nobackground\n },\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15___default.a, {\n color: \"primary\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CharacterOverview.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1057 */,
|
||
/* 1058 */,
|
||
/* 1059 */,
|
||
/* 1060 */
|
||
/*!*****************************************************!*\
|
||
!*** ./src/Bladeburner/ui/BladeburnerCinematic.tsx ***!
|
||
\*****************************************************/
|
||
/*! exports provided: BladeburnerCinematic */
|
||
/*! exports used: BladeburnerCinematic */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerCinematic; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 404);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction BladeburnerCinematic() {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__[/* CinematicText */ \"a\"], {\n lines: [\"In the middle of the 21st century, OmniTek Incorporated advanced robot evolution \", \"with their Synthoids (synthetic androids), a being virtually identical to a human.\", \"------\", \"Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more \", \"intelligent than humans. Many argued that the MK-VI Synthoids were the first \", \"example of sentient AI.\", \"------\", \"Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and \", \"uploaded a rogue AI into their Synthoid manufacturing facilities.\", \"------\", \"The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating \", \"the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.\", \"------\", \"In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI \", \"was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were \", \"allowed to continue their existence.\", \"------\", \"The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were \", \"found and destroyed, and that many of them are blending in as normal humans in society today. \", \"As a result, many nations have created Bladeburner divisions, special units that are tasked with \", \"investigating and dealing with Synthoid threats.\"],\n onDone: () => {\n router.toTerminal();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Visit the National Security Agency (NSA) to apply for their Bladeburner \" + \"division! You will need 100 of each combat stat before doing this.\");\n }\n });\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx?");
|
||
|
||
/***/ }),
|
||
/* 1061 */,
|
||
/* 1062 */,
|
||
/* 1063 */,
|
||
/* 1064 */,
|
||
/* 1065 */,
|
||
/* 1066 */,
|
||
/* 1067 */,
|
||
/* 1068 */,
|
||
/* 1069 */,
|
||
/* 1070 */,
|
||
/* 1071 */,
|
||
/* 1072 */,
|
||
/* 1073 */,
|
||
/* 1074 */,
|
||
/* 1075 */,
|
||
/* 1076 */,
|
||
/* 1077 */,
|
||
/* 1078 */,
|
||
/* 1079 */,
|
||
/* 1080 */,
|
||
/* 1081 */,
|
||
/* 1082 */,
|
||
/* 1083 */,
|
||
/* 1084 */,
|
||
/* 1085 */,
|
||
/* 1086 */,
|
||
/* 1087 */,
|
||
/* 1088 */,
|
||
/* 1089 */,
|
||
/* 1090 */,
|
||
/* 1091 */,
|
||
/* 1092 */,
|
||
/* 1093 */,
|
||
/* 1094 */,
|
||
/* 1095 */,
|
||
/* 1096 */,
|
||
/* 1097 */,
|
||
/* 1098 */,
|
||
/* 1099 */,
|
||
/* 1100 */,
|
||
/* 1101 */,
|
||
/* 1102 */,
|
||
/* 1103 */,
|
||
/* 1104 */,
|
||
/* 1105 */,
|
||
/* 1106 */,
|
||
/* 1107 */,
|
||
/* 1108 */,
|
||
/* 1109 */,
|
||
/* 1110 */,
|
||
/* 1111 */,
|
||
/* 1112 */,
|
||
/* 1113 */,
|
||
/* 1114 */,
|
||
/* 1115 */,
|
||
/* 1116 */,
|
||
/* 1117 */,
|
||
/* 1118 */,
|
||
/* 1119 */,
|
||
/* 1120 */,
|
||
/* 1121 */,
|
||
/* 1122 */,
|
||
/* 1123 */,
|
||
/* 1124 */,
|
||
/* 1125 */,
|
||
/* 1126 */,
|
||
/* 1127 */,
|
||
/* 1128 */,
|
||
/* 1129 */,
|
||
/* 1130 */,
|
||
/* 1131 */,
|
||
/* 1132 */,
|
||
/* 1133 */,
|
||
/* 1134 */,
|
||
/* 1135 */,
|
||
/* 1136 */,
|
||
/* 1137 */,
|
||
/* 1138 */,
|
||
/* 1139 */,
|
||
/* 1140 */,
|
||
/* 1141 */,
|
||
/* 1142 */,
|
||
/* 1143 */,
|
||
/* 1144 */,
|
||
/* 1145 */,
|
||
/* 1146 */,
|
||
/* 1147 */,
|
||
/* 1148 */,
|
||
/* 1149 */,
|
||
/* 1150 */,
|
||
/* 1151 */,
|
||
/* 1152 */,
|
||
/* 1153 */,
|
||
/* 1154 */,
|
||
/* 1155 */,
|
||
/* 1156 */,
|
||
/* 1157 */,
|
||
/* 1158 */,
|
||
/* 1159 */,
|
||
/* 1160 */,
|
||
/* 1161 */,
|
||
/* 1162 */,
|
||
/* 1163 */,
|
||
/* 1164 */,
|
||
/* 1165 */,
|
||
/* 1166 */,
|
||
/* 1167 */,
|
||
/* 1168 */,
|
||
/* 1169 */,
|
||
/* 1170 */,
|
||
/* 1171 */,
|
||
/* 1172 */,
|
||
/* 1173 */,
|
||
/* 1174 */,
|
||
/* 1175 */,
|
||
/* 1176 */,
|
||
/* 1177 */,
|
||
/* 1178 */,
|
||
/* 1179 */,
|
||
/* 1180 */,
|
||
/* 1181 */,
|
||
/* 1182 */,
|
||
/* 1183 */,
|
||
/* 1184 */,
|
||
/* 1185 */,
|
||
/* 1186 */,
|
||
/* 1187 */,
|
||
/* 1188 */,
|
||
/* 1189 */,
|
||
/* 1190 */,
|
||
/* 1191 */,
|
||
/* 1192 */,
|
||
/* 1193 */,
|
||
/* 1194 */,
|
||
/* 1195 */,
|
||
/* 1196 */,
|
||
/* 1197 */,
|
||
/* 1198 */,
|
||
/* 1199 */,
|
||
/* 1200 */,
|
||
/* 1201 */,
|
||
/* 1202 */,
|
||
/* 1203 */,
|
||
/* 1204 */,
|
||
/* 1205 */,
|
||
/* 1206 */,
|
||
/* 1207 */,
|
||
/* 1208 */,
|
||
/* 1209 */,
|
||
/* 1210 */,
|
||
/* 1211 */,
|
||
/* 1212 */,
|
||
/* 1213 */,
|
||
/* 1214 */,
|
||
/* 1215 */,
|
||
/* 1216 */,
|
||
/* 1217 */,
|
||
/* 1218 */,
|
||
/* 1219 */,
|
||
/* 1220 */,
|
||
/* 1221 */,
|
||
/* 1222 */,
|
||
/* 1223 */,
|
||
/* 1224 */,
|
||
/* 1225 */,
|
||
/* 1226 */,
|
||
/* 1227 */,
|
||
/* 1228 */,
|
||
/* 1229 */,
|
||
/* 1230 */,
|
||
/* 1231 */,
|
||
/* 1232 */,
|
||
/* 1233 */,
|
||
/* 1234 */,
|
||
/* 1235 */,
|
||
/* 1236 */,
|
||
/* 1237 */,
|
||
/* 1238 */,
|
||
/* 1239 */,
|
||
/* 1240 */,
|
||
/* 1241 */,
|
||
/* 1242 */,
|
||
/* 1243 */,
|
||
/* 1244 */,
|
||
/* 1245 */,
|
||
/* 1246 */,
|
||
/* 1247 */,
|
||
/* 1248 */,
|
||
/* 1249 */,
|
||
/* 1250 */,
|
||
/* 1251 */,
|
||
/* 1252 */,
|
||
/* 1253 */,
|
||
/* 1254 */,
|
||
/* 1255 */,
|
||
/* 1256 */,
|
||
/* 1257 */,
|
||
/* 1258 */,
|
||
/* 1259 */,
|
||
/* 1260 */,
|
||
/* 1261 */,
|
||
/* 1262 */,
|
||
/* 1263 */,
|
||
/* 1264 */,
|
||
/* 1265 */,
|
||
/* 1266 */,
|
||
/* 1267 */,
|
||
/* 1268 */,
|
||
/* 1269 */,
|
||
/* 1270 */,
|
||
/* 1271 */,
|
||
/* 1272 */,
|
||
/* 1273 */,
|
||
/* 1274 */,
|
||
/* 1275 */,
|
||
/* 1276 */,
|
||
/* 1277 */,
|
||
/* 1278 */,
|
||
/* 1279 */,
|
||
/* 1280 */,
|
||
/* 1281 */,
|
||
/* 1282 */,
|
||
/* 1283 */,
|
||
/* 1284 */,
|
||
/* 1285 */,
|
||
/* 1286 */,
|
||
/* 1287 */,
|
||
/* 1288 */,
|
||
/* 1289 */,
|
||
/* 1290 */
|
||
/*!***********************************!*\
|
||
!*** ./src/Exploits/tampering.ts ***!
|
||
\***********************************/
|
||
/*! no exports provided */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Exploit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Exploit */ 223);\n\n\n\n(function () {\n const a = 55;\n setInterval(function () {\n if (a.toExponential() !== \"5.5e+1\") {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].giveExploit(_Exploit__WEBPACK_IMPORTED_MODULE_1__[/* Exploit */ \"a\"].PrototypeTampering);\n }\n }, 15 * 60 * 1000); // 15 minutes\n})();\n\n//# sourceURL=webpack:///./src/Exploits/tampering.ts?");
|
||
|
||
/***/ }),
|
||
/* 1291 */
|
||
/*!*************************************!*\
|
||
!*** ./src/Exploits/unclickable.ts ***!
|
||
\*************************************/
|
||
/*! no exports provided */
|
||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||
|
||
"use strict";
|
||
eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Exploit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Exploit */ 223);\n\n\n\n(function () {\n function clickTheUnclickable(event) {\n if (!event.target || !(event.target instanceof Element)) return;\n const display = window.getComputedStyle(event.target).display;\n if (display === \"none\" && event.isTrusted) _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].giveExploit(_Exploit__WEBPACK_IMPORTED_MODULE_1__[/* Exploit */ \"a\"].Unclickable);\n }\n\n function targetElement() {\n const elem = document.getElementById(\"unclickable\");\n\n if (elem == null) {\n console.error(\"Could not find the unclickable elem for the related exploit.\");\n return;\n }\n\n elem.addEventListener(\"click\", clickTheUnclickable);\n document.removeEventListener(\"DOMContentLoaded\", targetElement);\n }\n\n document.addEventListener(\"DOMContentLoaded\", targetElement);\n})();\n\n//# sourceURL=webpack:///./src/Exploits/unclickable.ts?");
|
||
|
||
/***/ })
|
||
/******/ ]);
|
||
//# sourceMappingURL=engine.bundle.js.map |