0;x--)h="0"+h;return k>-1&&(h=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+m.delimiters.thousands)),0===c.indexOf(".")&&(h=""),l=h+v+(q?q:""),n?l=(n&&w?"(":"")+l+(n&&w?")":""):j>=0?l=0===j?(w?"-":"+")+l:l+(w?"-":"+"):w&&(l="-"+l),l},stringToNumber:function(a){var b,c,d,e=f[h.currentLocale],g=a,i={thousand:3,million:6,billion:9,trillion:12};if(h.zeroFormat&&a===h.zeroFormat)c=0;else if(h.nullFormat&&a===h.nullFormat||!a.replace(/[^0-9]+/g,"").length)c=null;else{c=1,"."!==e.delimiters.decimal&&(a=a.replace(/\./g,"").replace(e.delimiters.decimal,"."));for(b in i)if(d=new RegExp("[^a-zA-Z]"+e.abbreviations[b]+"(?:\\)|(\\"+e.currency.symbol+")?(?:\\))?)?$"),g.match(d)){c*=Math.pow(10,i[b]);break}c*=(a.split("-").length+Math.min(a.split("(").length-1,a.split(")").length-1))%2?1:-1,a=a.replace(/[^0-9\.]+/g,""),c*=Number(a)}return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},includes:function(a,b){return-1!==a.indexOf(b)},insert:function(a,b,c){return a.slice(0,c)+b+a.slice(c)},reduce:function(a,b){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof b)throw new TypeError(b+" is not a function");var c,d=Object(a),e=d.length>>>0,f=0;if(3===arguments.length)c=arguments[2];else{for(;e>f&&!(f in d);)f++;if(f>=e)throw new TypeError("Reduce of empty array with no initial value");c=d[f++]}for(;e>f;f++)f in d&&(c=b(c,d[f],f,d));return c},multiplier:function(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)},correctionFactor:function(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var d=c.multiplier(b);return a>d?a:d},1)},toFixed:function(a,b,c,d){var e,f,g,h,i=a.toString().split("."),j=b-(d||0);return e=2===i.length?Math.min(Math.max(i[1].length,j),b):j,g=Math.pow(10,e),h=(c(a+"e+"+e)/g).toFixed(e),d>b-e&&(f=new RegExp("\\.?0{1,"+(d-(b-e))+"}$"),h=h.replace(f,"")),h}},b.options=h,b.formats=e,b.locales=f,b.locale=function(a){return a&&(h.currentLocale=a.toLowerCase()),h.currentLocale},b.localeData=function(a){if(!a)return f[h.currentLocale];if(a=a.toLowerCase(),!f[a])throw new Error("Unknown locale : "+a);return f[a]},b.reset=function(){for(var a in g)h[a]=g[a]},b.zeroFormat=function(a){h.zeroFormat="string"==typeof a?a:null},b.nullFormat=function(a){h.nullFormat="string"==typeof a?a:null},b.defaultFormat=function(a){h.defaultFormat="string"==typeof a?a:"0.0"},b.register=function(a,b,c){if(b=b.toLowerCase(),this[a+"s"][b])throw new TypeError(b+" "+a+" already registered.");return this[a+"s"][b]=c,c},b.validate=function(a,c){var d,e,f,g,h,i,j,k;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(""===a)return!1;try{j=b.localeData(c)}catch(l){j=b.localeData(b.locale())}return f=j.currency.symbol,h=j.abbreviations,d=j.delimiters.decimal,e="."===j.delimiters.thousands?"\\.":j.delimiters.thousands,k=a.match(/^[^\d]+/),null!==k&&(a=a.substr(1),k[0]!==f)?!1:(k=a.match(/[^\d]+$/),null!==k&&(a=a.slice(0,-1),k[0]!==h.thousand&&k[0]!==h.million&&k[0]!==h.billion&&k[0]!==h.trillion)?!1:(i=new RegExp(e+"{2}"),a.match(/[^\d.,]/g)?!1:(g=a.split(d),g.length>2?!1:g.length<2?!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i):1===g[0].length?!!g[0].match(/^\d+$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/):!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/))))},b.fn=a.prototype={clone:function(){return b(this)},format:function(a,c){var d,f,g,i=this._value,j=a||h.defaultFormat;if(c=c||Math.round,0===i&&null!==h.zeroFormat)f=h.zeroFormat;else if(null===i&&null!==h.nullFormat)f=h.nullFormat;else{for(d in e)if(j.match(e[d].regexps.format)){g=e[d].format;break}g=g||b._.numberToFormat,f=g(i,j,c)}return f},value:function(){return this._value},input:function(){return this._input},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b,c,e){return a+Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([this._value,a],b,0)/d,this},subtract:function(a){function b(a,b,c,e){return a-Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([a],b,Math.round(this._value*d))/d,this},multiply:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)*Math.round(b*f)/Math.round(f*f)}return this._value=c.reduce([this._value,a],b,1),this},divide:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)/Math.round(b*f)}return this._value=c.reduce([this._value,a],b),this},difference:function(a){return Math.abs(b(this._value).subtract(a).value())}},b.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$"}}),function(){b.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(a,c,d){var e,f=b._.includes(c," BPS")?" ":"";return a=1e4*a,c=c.replace(/\s?BPS/,""),e=b._.numberToFormat(a,c,d),b._.includes(e,")")?(e=e.split(""),e.splice(-1,0,f+"BPS"),e=e.join("")):e=e+f+"BPS",e},unformat:function(a){return+(1e-4*b._.stringToNumber(a)).toFixed(15)}})}(),function(){var a={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},d=a.suffixes.concat(c.suffixes.filter(function(b){return a.suffixes.indexOf(b)<0})),e=d.join("|");e="("+e.replace("B","B(?!PS)")+")",b.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(e)},format:function(d,e,f){var g,h,i,j,k=b._.includes(e,"ib")?c:a,l=b._.includes(e," b")||b._.includes(e," ib")?" ":"";for(e=e.replace(/\s?i?b/,""),h=0;h<=k.suffixes.length;h++)if(i=Math.pow(k.base,h),j=Math.pow(k.base,h+1),null===d||0===d||d>=i&&j>d){l+=k.suffixes[h],i>0&&(d/=i);break}return g=b._.numberToFormat(d,e,f),g+l},unformat:function(d){var e,f,g=b._.stringToNumber(d);if(g){for(e=a.suffixes.length-1;e>=0;e--){if(b._.includes(d,a.suffixes[e])){f=Math.pow(a.base,e);break}if(b._.includes(d,c.suffixes[e])){f=Math.pow(c.base,e);break}}g*=f||1}return g}})}(),function(){b.register("format","currency",{regexps:{format:/(\$)/},format:function(a,c,d){var e,f,g,h=b.locales[b.options.currentLocale],i={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(c=c.replace(/\s?\$\s?/,""),e=b._.numberToFormat(a,c,d),a>=0?(i.before=i.before.replace(/[\-\(]/,""),i.after=i.after.replace(/[\-\)]/,"")):0>a&&!b._.includes(i.before,"-")&&!b._.includes(i.before,"(")&&(i.before="-"+i.before),g=0;g 0;x--)h="0"+h;return k>-1&&(h=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+m.delimiters.thousands)),0===c.indexOf(".")&&(h=""),l=h+v+(q?q:""),n?l=(n&&w?"(":"")+l+(n&&w?")":""):j>=0?l=0===j?(w?"-":"+")+l:l+(w?"-":"+"):w&&(l="-"+l),l},stringToNumber:function(a){var b,c,d,e=f[h.currentLocale],g=a,i={thousand:3,million:6,billion:9,trillion:12};if(h.zeroFormat&&a===h.zeroFormat)c=0;else if(h.nullFormat&&a===h.nullFormat||!a.replace(/[^0-9]+/g,"").length)c=null;else{c=1,"."!==e.delimiters.decimal&&(a=a.replace(/\./g,"").replace(e.delimiters.decimal,"."));for(b in i)if(d=new RegExp("[^a-zA-Z]"+e.abbreviations[b]+"(?:\\)|(\\"+e.currency.symbol+")?(?:\\))?)?$"),g.match(d)){c*=Math.pow(10,i[b]);break}c*=(a.split("-").length+Math.min(a.split("(").length-1,a.split(")").length-1))%2?1:-1,a=a.replace(/[^0-9\.]+/g,""),c*=Number(a)}return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},includes:function(a,b){return-1!==a.indexOf(b)},insert:function(a,b,c){return a.slice(0,c)+b+a.slice(c)},reduce:function(a,b){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof b)throw new TypeError(b+" is not a function");var c,d=Object(a),e=d.length>>>0,f=0;if(3===arguments.length)c=arguments[2];else{for(;e>f&&!(f in d);)f++;if(f>=e)throw new TypeError("Reduce of empty array with no initial value");c=d[f++]}for(;e>f;f++)f in d&&(c=b(c,d[f],f,d));return c},multiplier:function(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)},correctionFactor:function(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var d=c.multiplier(b);return a>d?a:d},1)},toFixed:function(a,b,c,d){var e,f,g,h,i=a.toString().split("."),j=b-(d||0);return e=2===i.length?Math.min(Math.max(i[1].length,j),b):j,g=Math.pow(10,e),h=(c(a+"e+"+e)/g).toFixed(e),d>b-e&&(f=new RegExp("\\.?0{1,"+(d-(b-e))+"}$"),h=h.replace(f,"")),h}},b.options=h,b.formats=e,b.locales=f,b.locale=function(a){return a&&(h.currentLocale=a.toLowerCase()),h.currentLocale},b.localeData=function(a){if(!a)return f[h.currentLocale];if(a=a.toLowerCase(),!f[a])throw new Error("Unknown locale : "+a);return f[a]},b.reset=function(){for(var a in g)h[a]=g[a]},b.zeroFormat=function(a){h.zeroFormat="string"==typeof a?a:null},b.nullFormat=function(a){h.nullFormat="string"==typeof a?a:null},b.defaultFormat=function(a){h.defaultFormat="string"==typeof a?a:"0.0"},b.register=function(a,b,c){if(b=b.toLowerCase(),this[a+"s"][b])throw new TypeError(b+" "+a+" already registered.");return this[a+"s"][b]=c,c},b.validate=function(a,c){var d,e,f,g,h,i,j,k;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),a.match(/^\d+$/))return!0;if(""===a)return!1;try{j=b.localeData(c)}catch(l){j=b.localeData(b.locale())}return f=j.currency.symbol,h=j.abbreviations,d=j.delimiters.decimal,e="."===j.delimiters.thousands?"\\.":j.delimiters.thousands,k=a.match(/^[^\d]+/),null!==k&&(a=a.substr(1),k[0]!==f)?!1:(k=a.match(/[^\d]+$/),null!==k&&(a=a.slice(0,-1),k[0]!==h.thousand&&k[0]!==h.million&&k[0]!==h.billion&&k[0]!==h.trillion)?!1:(i=new RegExp(e+"{2}"),a.match(/[^\d.,]/g)?!1:(g=a.split(d),g.length>2?!1:g.length<2?!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i):1===g[0].length?!!g[0].match(/^\d+$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/):!!g[0].match(/^\d+.*\d$/)&&!g[0].match(i)&&!!g[1].match(/^\d+$/))))},b.fn=a.prototype={clone:function(){return b(this)},format:function(a,c){var d,f,g,i=this._value,j=a||h.defaultFormat;if(c=c||Math.round,0===i&&null!==h.zeroFormat)f=h.zeroFormat;else if(null===i&&null!==h.nullFormat)f=h.nullFormat;else{for(d in e)if(j.match(e[d].regexps.format)){g=e[d].format;break}g=g||b._.numberToFormat,f=g(i,j,c)}return f},value:function(){return this._value},input:function(){return this._input},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b,c,e){return a+Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([this._value,a],b,0)/d,this},subtract:function(a){function b(a,b,c,e){return a-Math.round(d*b)}var d=c.correctionFactor.call(null,this._value,a);return this._value=c.reduce([a],b,Math.round(this._value*d))/d,this},multiply:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)*Math.round(b*f)/Math.round(f*f)}return this._value=c.reduce([this._value,a],b,1),this},divide:function(a){function b(a,b,d,e){var f=c.correctionFactor(a,b);return Math.round(a*f)/Math.round(b*f)}return this._value=c.reduce([this._value,a],b),this},difference:function(a){return Math.abs(b(this._value).subtract(a).value())}},b.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$"}}),function(){b.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(a,c,d){var e,f=b._.includes(c," BPS")?" ":"";return a=1e4*a,c=c.replace(/\s?BPS/,""),e=b._.numberToFormat(a,c,d),b._.includes(e,")")?(e=e.split(""),e.splice(-1,0,f+"BPS"),e=e.join("")):e=e+f+"BPS",e},unformat:function(a){return+(1e-4*b._.stringToNumber(a)).toFixed(15)}})}(),function(){var a={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},d=a.suffixes.concat(c.suffixes.filter(function(b){return a.suffixes.indexOf(b)<0})),e=d.join("|");e="("+e.replace("B","B(?!PS)")+")",b.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(e)},format:function(d,e,f){var g,h,i,j,k=b._.includes(e,"ib")?c:a,l=b._.includes(e," b")||b._.includes(e," ib")?" ":"";for(e=e.replace(/\s?i?b/,""),h=0;h<=k.suffixes.length;h++)if(i=Math.pow(k.base,h),j=Math.pow(k.base,h+1),null===d||0===d||d>=i&&j>d){l+=k.suffixes[h],i>0&&(d/=i);break}return g=b._.numberToFormat(d,e,f),g+l},unformat:function(d){var e,f,g=b._.stringToNumber(d);if(g){for(e=a.suffixes.length-1;e>=0;e--){if(b._.includes(d,a.suffixes[e])){f=Math.pow(a.base,e);break}if(b._.includes(d,c.suffixes[e])){f=Math.pow(c.base,e);break}}g*=f||1}return g}})}(),function(){b.register("format","currency",{regexps:{format:/(\$)/},format:function(a,c,d){var e,f,g,h=b.locales[b.options.currentLocale],i={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(c=c.replace(/\s?\$\s?/,""),e=b._.numberToFormat(a,c,d),a>=0?(i.before=i.before.replace(/[\-\(]/,""),i.after=i.after.replace(/[\-\)]/,"")):0>a&&!b._.includes(i.before,"-")&&!b._.includes(i.before,"(")&&(i.before="-"+i.before),g=0;g " + mat.name + ": " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.qty, 3) +
"(" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(totalGain, 3) + "/s)" +
@@ -57870,7 +58853,7 @@ _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__["Reviver"].constructors.Corpo
/***/ }),
-/* 42 */
+/* 44 */
/*!*************************!*\
!*** ./src/TextFile.js ***!
\*************************/
@@ -57881,9 +58864,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextFile", function() { return TextFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextFile", function() { return getTextFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTextFile", function() { return createTextFile; });
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Server.js */ 8);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
@@ -57975,600 +58958,6 @@ function deleteTextFile(fn, server) {
-/***/ }),
-/* 43 */
-/*!***************************!*\
- !*** ./src/SourceFile.js ***!
- \***************************/
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SourceFiles", function() { return SourceFiles; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlayerOwnedSourceFile", function() { return PlayerOwnedSourceFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applySourceFile", function() { return applySourceFile; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initSourceFiles", function() { return initSourceFiles; });
-/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNode.js */ 15);
-
-
-
-/* SourceFile.js */
-//Each SourceFile corresponds to a BitNode with the same number
-function SourceFile(number, info="") {
- var bitnodeKey = "BitNode" + number;
- var bitnode = _BitNode_js__WEBPACK_IMPORTED_MODULE_1__["BitNodes"][bitnodeKey];
- if (bitnode == null) {
- throw new Error("Invalid Bit Node for this Source File");
- }
-
- this.n = number;
- this.name = "Source-File " + number + ": " + bitnode.name;
- this.lvl = 1;
- this.info = info;
- this.owned = false;
-}
-
-let SourceFiles = {};
-function initSourceFiles() {
- SourceFiles = {};
- SourceFiles["SourceFile1"] = new SourceFile(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:
" +
"Server growth rate is reduced by 80%
" +
"You will start out with $150b so that you can start your corporation
" +
- "You now only need 75 reputation with a faction in order to donate to it, rather than 150
" +
+ "You now only need 75 favour with a faction in order to donate to it, rather than 150
" +
"Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will " +
"upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although " +
"some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:
" +
@@ -12318,7 +12670,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createRandomIp", function() { return createRandomIp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ipExists", function() { return ipExists; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidIPAddress", function() { return isValidIPAddress; });
-/* harmony import */ var _src_Server_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/Server.js */ 10);
+/* harmony import */ var _src_Server_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/Server.js */ 8);
/* Functions to deal with manipulating IP addresses*/
@@ -12392,11 +12744,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Prestige_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Prestige.js */ 56);
/* harmony import */ var _SaveObject_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SaveObject.js */ 46);
/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Script.js */ 25);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server.js */ 10);
-/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SourceFile.js */ 43);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server.js */ 8);
+/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SourceFile.js */ 41);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
@@ -15021,72 +15373,6 @@ function displaySourceFiles(listElement, sourceFiles) {
/***/ }),
/* 18 */
-/*!*********************************!*\
- !*** ./src/SpecialServerIps.js ***!
- \*********************************/
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpecialServerNames", function() { return SpecialServerNames; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpecialServerIps", function() { return SpecialServerIps; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpecialServerIpsMap", function() { return SpecialServerIpsMap; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadSpecialServerIps", function() { return loadSpecialServerIps; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prestigeSpecialServerIps", function() { return prestigeSpecialServerIps; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initSpecialServerIps", function() { return initSpecialServerIps; });
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
-
-
-/* Holds IP of Special Servers */
-let SpecialServerNames = {
- FulcrumSecretTechnologies: "Fulcrum Secret Technologies Server",
- CyberSecServer: "CyberSec Server",
- NiteSecServer: "NiteSec Server",
- TheBlackHandServer: "The Black Hand Server",
- BitRunnersServer: "BitRunners Server",
- TheDarkArmyServer: "The Dark Army Server",
- DaedalusServer: "Daedalus Server",
- WorldDaemon: "w0r1d_d43m0n",
-}
-function SpecialServerIpsMap() {}
-
-SpecialServerIpsMap.prototype.addIp = function(name, ip) {
- this[name] = ip;
-}
-
-SpecialServerIpsMap.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Generic_toJSON"])("SpecialServerIpsMap", this);
-}
-
-SpecialServerIpsMap.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Generic_fromJSON"])(SpecialServerIpsMap, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Reviver"].constructors.SpecialServerIpsMap = SpecialServerIpsMap;
-
-let SpecialServerIps = new SpecialServerIpsMap();
-
-function prestigeSpecialServerIps() {
- for (var member in SpecialServerIps) {
- delete SpecialServerIps[member];
- }
- SpecialServerIps = null;
- SpecialServerIps = new SpecialServerIpsMap();
-}
-
-function loadSpecialServerIps(saveString) {
- SpecialServerIps = JSON.parse(saveString, _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Reviver"]);
-}
-
-function initSpecialServerIps() {
- SpecialServerIps = new SpecialServerIpsMap();
-}
-
-
-
-
-/***/ }),
-/* 19 */
/*!*************************!*\
!*** ./src/Terminal.js ***!
\*************************/
@@ -15100,7 +15386,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "KEY", function() { return KEY; });
/* harmony import */ var _Alias_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias.js */ 29);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants.js */ 3);
-/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
+/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CreateProgram.js */ 13);
/* harmony import */ var _DarkWeb_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DarkWeb.js */ 34);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./engine.js */ 5);
/* harmony import */ var _Fconf_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf.js */ 32);
@@ -15111,12 +15397,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./NetscriptEvaluator.js */ 6);
/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./RedPill.js */ 44);
+/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./RedPill.js */ 38);
/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Script.js */ 25);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Server.js */ 8);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
-/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./TextFile.js */ 42);
+/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./SpecialServerIps.js */ 19);
+/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./TextFile.js */ 44);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
/* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/LogBox.js */ 50);
@@ -17155,7 +17441,73 @@ let Terminal = {
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
+
+/***/ }),
+/* 19 */
+/*!*********************************!*\
+ !*** ./src/SpecialServerIps.js ***!
+ \*********************************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpecialServerNames", function() { return SpecialServerNames; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpecialServerIps", function() { return SpecialServerIps; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SpecialServerIpsMap", function() { return SpecialServerIpsMap; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadSpecialServerIps", function() { return loadSpecialServerIps; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prestigeSpecialServerIps", function() { return prestigeSpecialServerIps; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initSpecialServerIps", function() { return initSpecialServerIps; });
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
+
+
+/* Holds IP of Special Servers */
+let SpecialServerNames = {
+ FulcrumSecretTechnologies: "Fulcrum Secret Technologies Server",
+ CyberSecServer: "CyberSec Server",
+ NiteSecServer: "NiteSec Server",
+ TheBlackHandServer: "The Black Hand Server",
+ BitRunnersServer: "BitRunners Server",
+ TheDarkArmyServer: "The Dark Army Server",
+ DaedalusServer: "Daedalus Server",
+ WorldDaemon: "w0r1d_d43m0n",
+}
+function SpecialServerIpsMap() {}
+
+SpecialServerIpsMap.prototype.addIp = function(name, ip) {
+ this[name] = ip;
+}
+
+SpecialServerIpsMap.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Generic_toJSON"])("SpecialServerIpsMap", this);
+}
+
+SpecialServerIpsMap.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Generic_fromJSON"])(SpecialServerIpsMap, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Reviver"].constructors.SpecialServerIpsMap = SpecialServerIpsMap;
+
+let SpecialServerIps = new SpecialServerIpsMap();
+
+function prestigeSpecialServerIps() {
+ for (var member in SpecialServerIps) {
+ delete SpecialServerIps[member];
+ }
+ SpecialServerIps = null;
+ SpecialServerIps = new SpecialServerIpsMap();
+}
+
+function loadSpecialServerIps(saveString) {
+ SpecialServerIps = JSON.parse(saveString, _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_0__["Reviver"]);
+}
+
+function initSpecialServerIps() {
+ SpecialServerIps = new SpecialServerIpsMap();
+}
+
+
+
/***/ }),
/* 20 */
@@ -17174,16 +17526,16 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addWorkerScript", function() { return addWorkerScript; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateOnlineScriptTimes", function() { return updateOnlineScriptTimes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prestigeWorkerScripts", function() { return prestigeWorkerScripts; });
-/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 40);
+/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 42);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Constants.js */ 3);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine.js */ 5);
/* harmony import */ var _NetscriptEnvironment_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./NetscriptEnvironment.js */ 67);
/* harmony import */ var _NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NetscriptEvaluator.js */ 6);
/* harmony import */ var _NetscriptJSEvaluator_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./NetscriptJSEvaluator.js */ 82);
/* harmony import */ var _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./NetscriptPort.js */ 45);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Server.js */ 8);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/acorn.js */ 35);
+/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/acorn.js */ 36);
/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn_js__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
@@ -17552,8 +17904,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Player.js */ 0);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/min/numeral.min */ 14);
/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
@@ -18922,6 +19274,7 @@ let Settings = {
MaxPortCapacity: 50,
SuppressMessages: false,
SuppressFactionInvites: false,
+ SuppressTravelConfirmation: false,
AutosaveInterval: 60,
DisableHotkeys: false,
ThemeHighlightColor: "#ffffff",
@@ -18941,6 +19294,7 @@ function initSettings() {
Settings.MaxPortCapacity = 50;
Settings.SuppressMessages = false;
Settings.SuppressFactionInvites = false;
+ Settings.SuppressTravelConfirmation = false,
Settings.AutosaveInterval = 60;
Settings.DisableHotkeys = false;
}
@@ -18951,6 +19305,7 @@ function setSettingsLabels() {
var nsPortLimit = document.getElementById("settingsNSPortRangeValLabel");
var suppressMsgs = document.getElementById("settingsSuppressMessages");
var suppressFactionInv = document.getElementById("settingsSuppressFactionInvites")
+ var suppressTravelConfirmation = document.getElementById("settingsSuppressTravelConfirmation");
var autosaveInterval = document.getElementById("settingsAutosaveIntervalValLabel");
var disableHotkeys = document.getElementById("settingsDisableHotkeys");
@@ -18960,6 +19315,7 @@ function setSettingsLabels() {
nsPortLimit.innerHTML = Settings.MaxPortCapacity;
suppressMsgs.checked = Settings.SuppressMessages;
suppressFactionInv.checked = Settings.SuppressFactionInvites;
+ suppressTravelConfirmation.checked = Settings.suppressTravelConfirmation;
autosaveInterval.innerHTML = Settings.AutosaveInterval;
disableHotkeys.checked = Settings.DisableHotkeys;
@@ -19006,6 +19362,10 @@ function setSettingsLabels() {
Settings.SuppressFactionInvites = this.checked;
};
+ suppressTravelConfirmation.onclick = function() {
+ Settings.SuppressTravelConfirmation = this.checked;
+ };
+
disableHotkeys.onclick = function() {
Settings.DisableHotkeys = this.checked;
}
@@ -24529,33 +24889,33 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _NetscriptFunctions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./NetscriptFunctions.js */ 30);
/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Server.js */ 8);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Terminal.js */ 19);
-/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TextFile.js */ 42);
-/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn.js */ 35);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Terminal.js */ 18);
+/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TextFile.js */ 44);
+/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/acorn.js */ 36);
/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn_js__WEBPACK_IMPORTED_MODULE_12__);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
-var ace = __webpack_require__(/*! brace */ 196);
-__webpack_require__(/*! brace/mode/javascript */ 195);
-__webpack_require__(/*! ../netscript */ 194);
-__webpack_require__(/*! brace/theme/chaos */ 193);
-__webpack_require__(/*! brace/theme/chrome */ 192);
-__webpack_require__(/*! brace/theme/monokai */ 191);
-__webpack_require__(/*! brace/theme/solarized_dark */ 190);
-__webpack_require__(/*! brace/theme/solarized_light */ 189);
-__webpack_require__(/*! brace/theme/terminal */ 188);
-__webpack_require__(/*! brace/theme/twilight */ 187);
-__webpack_require__(/*! brace/theme/xcode */ 186);
-__webpack_require__(/*! brace/keybinding/vim */ 185);
-__webpack_require__(/*! brace/keybinding/emacs */ 184);
-__webpack_require__(/*! brace/ext/language_tools */ 183);
+var ace = __webpack_require__(/*! brace */ 197);
+__webpack_require__(/*! brace/mode/javascript */ 196);
+__webpack_require__(/*! ../netscript */ 195);
+__webpack_require__(/*! brace/theme/chaos */ 194);
+__webpack_require__(/*! brace/theme/chrome */ 193);
+__webpack_require__(/*! brace/theme/monokai */ 192);
+__webpack_require__(/*! brace/theme/solarized_dark */ 191);
+__webpack_require__(/*! brace/theme/solarized_light */ 190);
+__webpack_require__(/*! brace/theme/terminal */ 189);
+__webpack_require__(/*! brace/theme/twilight */ 188);
+__webpack_require__(/*! brace/theme/xcode */ 187);
+__webpack_require__(/*! brace/keybinding/vim */ 186);
+__webpack_require__(/*! brace/keybinding/emacs */ 185);
+__webpack_require__(/*! brace/ext/language_tools */ 184);
// Importing this doesn't work for some reason.
-const walk = __webpack_require__(/*! acorn/dist/walk */ 182);
+const walk = __webpack_require__(/*! acorn/dist/walk */ 183);
@@ -24985,6 +25345,7 @@ function parseOnlyRamCalculate(server, code, workerScript) {
if (ref == specialReferenceFOR) ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptForRamCost;
if (ref == specialReferenceWHILE) ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptWhileRamCost;
if (ref == "hacknetnodes") ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptHacknetNodesRamCost;
+ if (ref == "document" || ref == "window") ram += _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].ScriptCheatRamCost;
// Check if this ident is a function in the workerscript env. If it is, then we need to
// get its RAM cost. We do this by calling it, which works because the running script
@@ -25503,7 +25864,7 @@ _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_14__["Reviver"].constructors.AllS
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
/***/ }),
/* 26 */
@@ -25521,12 +25882,12 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Faction.js */ 11);
/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Location.js */ 4);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./RedPill.js */ 44);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Terminal.js */ 19);
+/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./RedPill.js */ 38);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Terminal.js */ 18);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/min/numeral.min */ 14);
/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
@@ -29573,7 +29934,7 @@ function initBladeburner() {
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
/***/ }),
/* 27 */
@@ -29884,14 +30245,14 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initMessages", function() { return initMessages; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Message", function() { return Message; });
/* harmony import */ var _Augmentations_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentations.js */ 17);
-/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
+/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CreateProgram.js */ 13);
/* harmony import */ var _Missions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Missions.js */ 33);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedPill.js */ 44);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _RedPill_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedPill.js */ 38);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server.js */ 8);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Settings.js */ 22);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
@@ -30102,7 +30463,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "substituteAliases", function() { return substituteAliases; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadAliases", function() { return loadAliases; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadGlobalAliases", function() { return loadGlobalAliases; });
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Terminal.js */ 19);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Terminal.js */ 18);
let Aliases = {};
@@ -30236,39 +30597,40 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasCorporationSF", function() { return hasCorporationSF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasAISF", function() { return hasAISF; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasBladeburnerSF", function() { return hasBladeburnerSF; });
-/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 40);
+/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 42);
/* harmony import */ var _Augmentations_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations.js */ 17);
/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BitNode.js */ 15);
/* harmony import */ var _Crimes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Crimes.js */ 27);
/* harmony import */ var _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Bladeburner.js */ 26);
-/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company.js */ 9);
+/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company.js */ 10);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Constants.js */ 3);
-/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
+/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./CreateProgram.js */ 13);
/* harmony import */ var _DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./DarkWeb.js */ 34);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./engine.js */ 5);
-/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction.js */ 11);
-/* harmony import */ var _HacknetNode_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./HacknetNode.js */ 37);
-/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Location.js */ 4);
-/* harmony import */ var _Message_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Message.js */ 28);
-/* harmony import */ var _Missions_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Missions.js */ 33);
-/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Script.js */ 25);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Server.js */ 10);
-/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
-/* harmony import */ var _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./StockMarket.js */ 21);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Terminal.js */ 19);
-/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./TextFile.js */ 42);
-/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
-/* harmony import */ var _NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./NetscriptEvaluator.js */ 6);
-/* harmony import */ var _NetscriptEnvironment_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./NetscriptEnvironment.js */ 67);
-/* harmony import */ var _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./NetscriptPort.js */ 45);
-/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! decimal.js */ 23);
-/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
-/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
-/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
+/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Gang.js */ 35);
+/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction.js */ 11);
+/* harmony import */ var _HacknetNode_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HacknetNode.js */ 37);
+/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Location.js */ 4);
+/* harmony import */ var _Message_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Message.js */ 28);
+/* harmony import */ var _Missions_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Missions.js */ 33);
+/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Player.js */ 0);
+/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Script.js */ 25);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server.js */ 8);
+/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Settings.js */ 22);
+/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SpecialServerIps.js */ 19);
+/* harmony import */ var _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./StockMarket.js */ 21);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Terminal.js */ 18);
+/* harmony import */ var _TextFile_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./TextFile.js */ 44);
+/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
+/* harmony import */ var _NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./NetscriptEvaluator.js */ 6);
+/* harmony import */ var _NetscriptEnvironment_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./NetscriptEnvironment.js */ 67);
+/* harmony import */ var _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./NetscriptPort.js */ 45);
+/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! decimal.js */ 23);
+/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
+/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
+/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
+/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
+/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
var sprintf = __webpack_require__(/*! sprintf-js */ 66).sprintf,
vsprintf = __webpack_require__(/*! sprintf-js */ 66).vsprintf
@@ -30306,6 +30668,7 @@ var sprintf = __webpack_require__(/*! sprintf-js */ 66).sprintf,
+
var hasCorporationSF = false, //Source-File 3
@@ -30374,20 +30737,20 @@ var possibleLogs = {
//Used to check and set flags for every Source File, despite the name of the function
function initSingularitySFFlags() {
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 3) {hasCorporationSF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 4) {
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles.length; ++i) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 3) {hasCorporationSF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 4) {
hasSingularitySF = true;
- singularitySFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].lvl;
+ singularitySFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].lvl;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 5) {hasAISF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 6) {hasBladeburnerSF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 7) {hasBladeburner2079SF = true;}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 5) {hasAISF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 6) {hasBladeburnerSF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 7) {hasBladeburner2079SF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 8) {
hasWallStreetSF = true;
- wallStreetSFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].lvl;
+ wallStreetSFLvl = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].lvl;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].sourceFiles[i].n === 11) {hasBn11SF = true;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].sourceFiles[i].n === 11) {hasBn11SF = true;}
}
}
@@ -30397,7 +30760,7 @@ function NetscriptFunctions(workerScript) {
workerScript.dynamicLoadedFns[fnName] = true;
workerScript.dynamicRamUsage += ramCost;
if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript,
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript,
"Dynamic RAM usage calculated to be greater than initial RAM usage. " +
"This is probably because you somehow circumvented the static RAM " +
"calculation.
Please don't do that :(");
@@ -30417,7 +30780,7 @@ function NetscriptFunctions(workerScript) {
Math : Math,
Date : Date,
Number : Number,
- hacknetnodes : _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknetNodeWrappers,
+ hacknetnodes : _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknetNodeWrappers,
sprintf : sprintf,
vsprintf: vsprintf,
scan : function(ip=workerScript.serverIp, hostnames=true){
@@ -30425,9 +30788,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("scan", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
}
updateDynamicRam("scan", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, 'Invalid IP or hostname passed into scan() command');
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, 'Invalid IP or hostname passed into scan() command');
}
var out = [];
for (var i = 0; i < server.serversOnNetwork.length; i++) {
@@ -30453,41 +30816,41 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("hack", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptHackRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Hack() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Hack() call has incorrect number of arguments. Takes 1 argument");
}
var threads = workerScript.scriptRef.threads;
if (isNaN(threads) || threads < 1) {threads = 1;}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping...");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping...");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "hack() error. Invalid IP or hostname passed in: " + ip + ". Stopping...");
}
//Calculate the hacking time
- var hackingTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateHackingTime"])(server); //This is in seconds
+ var hackingTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateHackingTime"])(server); //This is in seconds
//No root access or skill level too low
if (server.hasAdminRights == false) {
workerScript.scriptRef.log("Cannot hack this server (" + server.hostname + ") because user does not have root access");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user does not have root access");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user does not have root access");
}
- if (server.requiredHackingSkill > _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill) {
+ if (server.requiredHackingSkill > _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill) {
workerScript.scriptRef.log("Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot hack this server (" + server.hostname + ") because user's hacking skill is not high enough");
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.hack == null) {
workerScript.scriptRef.log("Attempting to hack " + ip + " in " + hackingTime.toFixed(3) + " seconds (t=" + threads + ")");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(hackingTime* 1000, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(hackingTime* 1000, workerScript).then(function() {
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
- var hackChance = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateHackingChance"])(server);
+ var hackChance = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateHackingChance"])(server);
var rand = Math.random();
- var expGainedOnSuccess = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateExpGain"])(server) * threads;
+ var expGainedOnSuccess = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateExpGain"])(server) * threads;
var expGainedOnFailure = (expGainedOnSuccess / 4);
if (rand < hackChance) { //Success!
- var moneyGained = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculatePercentMoneyHacked"])(server);
+ var moneyGained = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculatePercentMoneyHacked"])(server);
moneyGained = Math.floor(server.moneyAvailable * moneyGained) * threads;
//Over-the-top safety checks
@@ -30499,23 +30862,23 @@ function NetscriptFunctions(workerScript) {
server.moneyAvailable -= moneyGained;
if (server.moneyAvailable < 0) {server.moneyAvailable = 0;}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainMoney(moneyGained);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainMoney(moneyGained);
workerScript.scriptRef.onlineMoneyMade += moneyGained;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].scriptProdSinceLastAug += moneyGained;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].scriptProdSinceLastAug += moneyGained;
workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGainedOnSuccess);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGainedOnSuccess);
workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.hack == null) {
- workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(moneyGained, 2) + " and " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGainedOnSuccess, 4) + " exp (t=" + threads + ")");
+ workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(moneyGained, 2) + " and " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGainedOnSuccess, 4) + " exp (t=" + threads + ")");
}
server.fortify(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ServerFortifyAmount * threads);
return Promise.resolve(moneyGained);
} else {
//Player only gains 25% exp for failure?
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGainedOnFailure);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGainedOnFailure);
workerScript.scriptRef.onlineExpGained += expGainedOnFailure;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.hack == null) {
- workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGainedOnFailure, 4) + " exp (t=" + threads + ")");
+ workerScript.scriptRef.log("Script FAILED to hack " + server.hostname + ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGainedOnFailure, 4) + " exp (t=" + threads + ")");
}
return Promise.resolve(0);
}
@@ -30524,12 +30887,12 @@ function NetscriptFunctions(workerScript) {
sleep : function(time){
if (workerScript.checkingRam) {return 0;}
if (time === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "sleep() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "sleep() call has incorrect number of arguments. Takes 1 argument");
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sleep == null) {
workerScript.scriptRef.log("Sleeping for " + time + " milliseconds");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(time, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(time, workerScript).then(function() {
return Promise.resolve(true);
});
},
@@ -30541,40 +30904,42 @@ function NetscriptFunctions(workerScript) {
var threads = workerScript.scriptRef.threads;
if (isNaN(threads) || threads < 1) {threads = 1;}
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "grow() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "grow() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot grow(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot grow(). Invalid IP or hostname passed in: " + ip);
}
//No root access or skill level too low
if (server.hasAdminRights == false) {
workerScript.scriptRef.log("Cannot grow this server (" + server.hostname + ") because user does not have root access");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot grow this server (" + server.hostname + ") because user does not have root access");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot grow this server (" + server.hostname + ") because user does not have root access");
}
- var growTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateGrowTime"])(server);
+ var growTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateGrowTime"])(server);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.grow == null) {
- workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(growTime/1000, 3) + " seconds (t=" + threads + ")");
+ workerScript.scriptRef.log("Executing grow() on server " + server.hostname + " in " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(growTime/1000, 3) + " seconds (t=" + threads + ")");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(growTime, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(growTime, workerScript).then(function() {
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
+ const moneyBefore = server.moneyAvailable;
server.moneyAvailable += (1 * threads); //It can be grown even if it has no money
- var growthPercentage = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["processSingleServerGrowth"])(server, 450 * threads);
+ var growthPercentage = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["processSingleServerGrowth"])(server, 450 * threads);
+ const moneyAfter = server.moneyAvailable;
workerScript.scriptRef.recordGrow(server.ip, threads);
- var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateExpGain"])(server) * threads;
+ var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateExpGain"])(server) * threads;
if (growthPercentage == 1) {
expGain = 0;
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.grow == null) {
workerScript.scriptRef.log("Available money on " + server.hostname + " grown by " +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(growthPercentage*100 - 100, 6) + "%. Gained " +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads +")");
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])((moneyAfter/moneyBefore)*100 - 100, 6) + "%. Gained " +
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads +")");
}
workerScript.scriptRef.onlineExpGained += expGain;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGain);
return Promise.resolve(growthPercentage);
});
},
@@ -30586,60 +30951,60 @@ function NetscriptFunctions(workerScript) {
var threads = workerScript.scriptRef.threads;
if (isNaN(threads) || threads < 1) {threads = 1;}
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "weaken() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "weaken() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot weaken(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot weaken(). Invalid IP or hostname passed in: " + ip);
}
//No root access or skill level too low
if (server.hasAdminRights == false) {
workerScript.scriptRef.log("Cannot weaken this server (" + server.hostname + ") because user does not have root access");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot weaken this server (" + server.hostname + ") because user does not have root access");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot weaken this server (" + server.hostname + ") because user does not have root access");
}
- var weakenTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateWeakenTime"])(server);
+ var weakenTime = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateWeakenTime"])(server);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.weaken == null) {
workerScript.scriptRef.log("Executing weaken() on server " + server.hostname + " in " +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(weakenTime/1000, 3) + " seconds (t=" + threads + ")");
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(weakenTime/1000, 3) + " seconds (t=" + threads + ")");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["netscriptDelay"])(weakenTime, workerScript).then(function() {
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["netscriptDelay"])(weakenTime, workerScript).then(function() {
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
server.weaken(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ServerWeakenAmount * threads);
workerScript.scriptRef.recordWeaken(server.ip, threads);
- var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateExpGain"])(server) * threads;
+ var expGain = Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateExpGain"])(server) * threads;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.weaken == null) {
workerScript.scriptRef.log("Server security level on " + server.hostname + " weakened to " + server.hackDifficulty +
- ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads + ")");
+ ". Gained " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(expGain, 4) + " hacking exp (t=" + threads + ")");
}
workerScript.scriptRef.onlineExpGained += expGain;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainHackingExp(expGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainHackingExp(expGain);
return Promise.resolve(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ServerWeakenAmount * threads);
});
},
print : function(args){
if (workerScript.checkingRam) {return 0;}
if (args === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "print() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "print() call has incorrect number of arguments. Takes 1 argument");
}
workerScript.scriptRef.log(args.toString());
},
tprint : function(args) {
if (workerScript.checkingRam) {return 0;}
if (args === undefined || args == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "tprint() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "tprint() call has incorrect number of arguments. Takes 1 argument");
}
var x = args.toString();
- if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isHTML"])(x)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].takeDamage(1);
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_28__["dialogBoxCreate"])("You suddenly feel a sharp shooting pain through your body as an angry voice in your head exclaims:
" +
+ if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isHTML"])(x)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].takeDamage(1);
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_29__["dialogBoxCreate"])("You suddenly feel a sharp shooting pain through your body as an angry voice in your head exclaims:
" +
"DON'T USE TPRINT() TO OUTPUT HTML ELEMENTS TO YOUR TERMINAL!!!!
" +
"(You lost 1 HP)");
return;
}
- Object(_Terminal_js__WEBPACK_IMPORTED_MODULE_21__["post"])(workerScript.scriptRef.filename + ": " + args.toString());
+ Object(_Terminal_js__WEBPACK_IMPORTED_MODULE_22__["post"])(workerScript.scriptRef.filename + ": " + args.toString());
},
clearLog : function() {
if (workerScript.checkingRam) {return 0;}
@@ -30648,7 +31013,7 @@ function NetscriptFunctions(workerScript) {
disableLog : function(fn) {
if (workerScript.checkingRam) {return 0;}
if(possibleLogs[fn]===undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to disableLog: "+fn);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to disableLog: "+fn);
}
workerScript.disableLogs[fn] = true;
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.disableLog == null) {
@@ -30658,7 +31023,7 @@ function NetscriptFunctions(workerScript) {
enableLog : function(fn) {
if (workerScript.checkingRam) {return 0;}
if(possibleLogs[fn]===undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to enableLog: "+fn);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument to enableLog: "+fn);
}
delete workerScript.disableLogs[fn];
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.enableLog == null) {
@@ -30671,18 +31036,18 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("nuke", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the NUKE.exe virus!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the NUKE.exe virus!");
}
if (server.openPortCount < server.numOpenPortsRequired) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Not enough ports opened to use NUKE.exe virus");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Not enough ports opened to use NUKE.exe virus");
}
if (server.hasAdminRights) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.nuke == null) {
@@ -30702,16 +31067,16 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("brutessh", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram)) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram)) {
workerScript.scriptRef.log("You do not have the BruteSSH.exe program!");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the BruteSSH.exe program!");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the BruteSSH.exe program!");
}
if (!server.sshPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.brutessh == null) {
@@ -30732,15 +31097,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("ftpcrack", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the FTPCrack.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the FTPCrack.exe program!");
}
if (!server.ftpPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.ftpcrack == null) {
@@ -30761,15 +31126,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("relaysmtp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the relaySMTP.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the relaySMTP.exe program!");
}
if (!server.smtpPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.relaysmtp == null) {
@@ -30790,15 +31155,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("httpworm", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the HTTPWorm.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the HTTPWorm.exe program!");
}
if (!server.httpPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.httpworm == null) {
@@ -30819,15 +31184,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("sqlinject", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPortProgramRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You do not have the SQLInject.exe program!");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasProgram(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram)) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You do not have the SQLInject.exe program!");
}
if (!server.sqlPortOpen) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sqlinject == null) {
@@ -30848,21 +31213,21 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("run", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptRunRamCost);
if (scriptname === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");
}
if (isNaN(threads) || threads < 1) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0");
}
var argsForNewScript = [];
for (var i = 2; i < arguments.length; ++i) {
argsForNewScript.push(arguments[i]);
}
- var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (scriptServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["runScriptFromScript"])(scriptServer, scriptname, argsForNewScript, workerScript, threads);
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["runScriptFromScript"])(scriptServer, scriptname, argsForNewScript, workerScript, threads);
},
exec : function(scriptname,ip,threads = 1) {
if (workerScript.checkingRam) {
@@ -30870,20 +31235,20 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("exec", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptExecRamCost);
if (scriptname === undefined || ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
}
if (isNaN(threads) || threads < 1) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument for thread count passed into exec(). Must be numeric and greater than 0");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument for thread count passed into exec(). Must be numeric and greater than 0");
}
var argsForNewScript = [];
for (var i = 3; i < arguments.length; ++i) {
argsForNewScript.push(arguments[i]);
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid hostname/ip passed into exec() command: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid hostname/ip passed into exec() command: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["runScriptFromScript"])(server, scriptname, argsForNewScript, workerScript, threads);
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["runScriptFromScript"])(server, scriptname, argsForNewScript, workerScript, threads);
},
spawn : function(scriptname, threads) {
if (workerScript.checkingRam) {
@@ -30891,7 +31256,7 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("spawn", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSpawnRamCost);
if (scriptname == null || threads == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid scriptname or numThreads argument passed to spawn()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid scriptname or numThreads argument passed to spawn()");
}
setTimeout(()=>{
NetscriptFunctions(workerScript).run.apply(this, arguments);
@@ -30907,31 +31272,31 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("kill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
if (filename === undefined || ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("kill() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "kill() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "kill() failed. Invalid IP or hostname passed in: " + ip);
}
var argsForKillTarget = [];
for (var i = 2; i < arguments.length; ++i) {
argsForKillTarget.push(arguments[i]);
}
- var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(filename, argsForKillTarget, server);
+ var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(filename, argsForKillTarget, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForKillTarget));
+ workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForKillTarget));
return false;
}
- var res = Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(runningScriptObj, server.ip);
+ var res = Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(runningScriptObj, server.ip);
if (res) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.kill == null) {
- workerScript.scriptRef.log("Killing " + filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForKillTarget) + ". May take up to a few minutes for the scripts to die...");
+ workerScript.scriptRef.log("Killing " + filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForKillTarget) + ". May take up to a few minutes for the scripts to die...");
}
return true;
} else {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.kill == null) {
- workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForKillTarget));
+ workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForKillTarget));
}
return false;
}
@@ -30942,16 +31307,16 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("killall", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "killall() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "killall() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("killall() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "killall() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "killall() failed. Invalid IP or hostname passed in: " + ip);
}
var scriptsRunning = (server.runningScripts.length > 0);
for (var i = server.runningScripts.length-1; i >= 0; --i) {
- Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(server.runningScripts[i], server.ip);
+ Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(server.runningScripts[i], server.ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.killall == null) {
workerScript.scriptRef.log("killall(): Killing all scripts on " + server.hostname + ". May take a few minutes for the scripts to die");
@@ -30963,11 +31328,11 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("exit", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
}
updateDynamicRam("exit", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptKillRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in exit(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in exit(). This is a bug please contact game dev");
}
- if (Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(workerScript.scriptRef, server.ip)) {
+ if (Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(workerScript.scriptRef, server.ip)) {
workerScript.scriptRef.log("Exiting...");
} else {
workerScript.scriptRef.log("Exit failed(). This is a bug please contact game developer");
@@ -30979,7 +31344,7 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("scp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScpRamCost);
if (arguments.length !== 2 && arguments.length !== 3) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
}
if (scriptname && scriptname.constructor === Array) {
//Recursively call scp on all elements of array
@@ -30991,38 +31356,38 @@ function NetscriptFunctions(workerScript) {
});
return res;
}
- if (!scriptname.endsWith(".lit") && !Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["isScriptFilename"])(scriptname) &&
+ if (!scriptname.endsWith(".lit") && !Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["isScriptFilename"])(scriptname) &&
!scriptname.endsWith("txt")) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");
}
var destServer, currServ;
if (arguments.length === 3) { //scriptname, source, destination
if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
}
- destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip2);
+ destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip2);
if (destServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
}
- currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip1);
+ currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip1);
if (currServ == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
}
} else if (arguments.length === 2) { //scriptname, destination
if (scriptname === undefined || ip1 === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
}
- destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip1);
+ destServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip1);
if (destServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid hostname/ip passed into scp() command: " + ip);
}
- currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ currServ = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (currServ == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server ip for this script. This is a bug please contact game developer");
}
}
@@ -31030,7 +31395,7 @@ function NetscriptFunctions(workerScript) {
if (scriptname.endsWith(".lit")) {
var found = false;
for (var i = 0; i < currServ.messages.length; ++i) {
- if (!(currServ.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) && currServ.messages[i] == scriptname) {
+ if (!(currServ.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) && currServ.messages[i] == scriptname) {
found = true;
break;
}
@@ -31082,7 +31447,7 @@ function NetscriptFunctions(workerScript) {
return true;
}
}
- var newFile = new _TextFile_js__WEBPACK_IMPORTED_MODULE_22__["TextFile"](txtFile.fn, txtFile.text);
+ var newFile = new _TextFile_js__WEBPACK_IMPORTED_MODULE_23__["TextFile"](txtFile.fn, txtFile.text);
destServer.textFiles.push(newFile);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.scp == null) {
workerScript.scriptRef.log(scriptname + " copied over to " + destServer.hostname);
@@ -31118,7 +31483,7 @@ function NetscriptFunctions(workerScript) {
}
//Create new script if it does not already exist
- var newScript = new _Script_js__WEBPACK_IMPORTED_MODULE_16__["Script"]();
+ var newScript = new _Script_js__WEBPACK_IMPORTED_MODULE_17__["Script"]();
newScript.filename = scriptname;
newScript.code = sourceScript.code;
newScript.ramUsage = sourceScript.ramUsage;
@@ -31135,12 +31500,12 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("ls", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
if (ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("ls() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ls() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ls() failed. Invalid IP or hostname passed in: " + ip);
}
//Get the grep filter, if one exists
@@ -31171,7 +31536,7 @@ function NetscriptFunctions(workerScript) {
}
for (var i = 0; i < server.messages.length; i++) {
if (filter) {
- if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) {
+ if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) {
if (server.messages[i].filename.includes(filter)) {
allFiles.push(server.messages[i].filename);
}
@@ -31179,7 +31544,7 @@ function NetscriptFunctions(workerScript) {
allFiles.push(server.messages[i]);
}
} else {
- if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) {
+ if (server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) {
allFiles.push(server.messages[i].filename);
} else {
allFiles.push(server.messages[i]);
@@ -31201,18 +31566,35 @@ function NetscriptFunctions(workerScript) {
allFiles.sort();
return allFiles;
},
+ ps : function(ip=workerScript.serverIp) {
+ if (workerScript.checkingRam) {
+ return updateStaticRam("ps", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
+ }
+ updateDynamicRam("ps", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptScanRamCost);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
+ if (server == null){
+ workerScript.scriptRef.log("ps() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ps() failed. Invalid IP or hostname passed in: " + ip);
+ }
+ const processes = [];
+ for(const i in server.runningScripts) {
+ const script = server.runningScripts[i];
+ processes.push({filename:script.filename, threads: script.threads, args: script.args.slice()})
+ }
+ return processes;
+ },
hasRootAccess : function(ip) {
if (workerScript.checkingRam) {
return updateStaticRam("hasRootAccess", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptHasRootAccessRamCost);
}
updateDynamicRam("hasRootAccess", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptHasRootAccessRamCost);
if (ip===undefined){
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() call has incorrect number of arguments. Takes 1 argument");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() call has incorrect number of arguments. Takes 1 argument");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null){
workerScript.scriptRef.log("hasRootAccess() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "hasRootAccess() failed. Invalid IP or hostname passed in: " + ip);
}
return server.hasAdminRights;
},
@@ -31221,9 +31603,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getIp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
}
updateDynamicRam("getIp", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
- var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (scriptServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
}
return scriptServer.ip;
},
@@ -31232,9 +31614,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getHostname", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
}
updateDynamicRam("getHostname", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHostnameRamCost);
- var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var scriptServer = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (scriptServer == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
}
return scriptServer.hostname;
},
@@ -31243,11 +31625,11 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackingLevelRamCost);
}
updateDynamicRam("getHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackingLevelRamCost);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].updateSkillLevels();
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].updateSkillLevels();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getHackingLevel == null) {
- workerScript.scriptRef.log("getHackingLevel() returned " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill);
+ workerScript.scriptRef.log("getHackingLevel() returned " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill);
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill;
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill;
},
getHackingMultipliers : function() {
if (workerScript.checkingRam) {
@@ -31255,10 +31637,10 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getHackingMultipliers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetMultipliersRamCost);
return {
- chance: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_chance_mult,
- speed: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_speed_mult,
- money: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_money_mult,
- growth: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_grow_mult,
+ chance: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_chance_mult,
+ speed: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_speed_mult,
+ money: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_money_mult,
+ growth: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_grow_mult,
};
},
getHacknetMultipliers : function() {
@@ -31267,11 +31649,11 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getHacknetMultipliers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetMultipliersRamCost);
return {
- production: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_money_mult,
- purchaseCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_purchase_cost_mult,
- ramCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_ram_cost_mult,
- coreCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_core_cost_mult,
- levelCost: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacknet_node_level_cost_mult,
+ production: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_money_mult,
+ purchaseCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_purchase_cost_mult,
+ ramCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_ram_cost_mult,
+ coreCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_core_cost_mult,
+ levelCost: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacknet_node_level_cost_mult,
};
},
getBitNodeMultipliers: function() {
@@ -31280,7 +31662,7 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getBitNodeMultipliers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetMultipliersRamCost);
if (!hasAISF) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");
}
let copy = Object.assign({}, _BitNode_js__WEBPACK_IMPORTED_MODULE_2__["BitNodeMultipliers"]);
return copy;
@@ -31290,20 +31672,20 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerMoneyAvailable", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerMoneyAvailable", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMoneyAvailable() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerMoneyAvailable() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerMoneyAvailable() failed. Invalid IP or hostname passed in: " + ip);
}
if (server.hostname == "home") {
//Return player's money
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMoneyAvailable == null) {
- workerScript.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.toNumber(), 2));
+ workerScript.scriptRef.log("getServerMoneyAvailable('home') returned player's money: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.toNumber(), 2));
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.toNumber();
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.toNumber();
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMoneyAvailable == null) {
- workerScript.scriptRef.log("getServerMoneyAvailable() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.moneyAvailable, 2) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerMoneyAvailable() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.moneyAvailable, 2) + " for " + server.hostname);
}
return server.moneyAvailable;
},
@@ -31312,13 +31694,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerSecurityLevel == null) {
- workerScript.scriptRef.log("getServerSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.hackDifficulty, 3) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.hackDifficulty, 3) + " for " + server.hostname);
}
return server.hackDifficulty;
},
@@ -31327,13 +31709,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerBaseSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerBaseSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerBaseSecurityLevel == null) {
- workerScript.scriptRef.log("getServerBaseSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.baseDifficulty, 3) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerBaseSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.baseDifficulty, 3) + " for " + server.hostname);
}
return server.baseDifficulty;
},
@@ -31342,13 +31724,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerMinSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerMinSecurityLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMinSecurityLevel == null) {
- workerScript.scriptRef.log("getServerMinSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.minDifficulty, 3) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerMinSecurityLevel() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.minDifficulty, 3) + " for " + server.hostname);
}
return server.minDifficulty;
},
@@ -31357,13 +31739,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerRequiredHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerRequiredHackingLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerRequiredHackingLevel == null) {
- workerScript.scriptRef.log("getServerRequiredHackingLevel returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.requiredHackingSkill, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerRequiredHackingLevel returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.requiredHackingSkill, 0) + " for " + server.hostname);
}
return server.requiredHackingSkill;
},
@@ -31372,13 +31754,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerMaxMoney", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerMaxMoney", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerMaxMoney == null) {
- workerScript.scriptRef.log("getServerMaxMoney() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.moneyMax, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerMaxMoney() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.moneyMax, 0) + " for " + server.hostname);
}
return server.moneyMax;
},
@@ -31387,13 +31769,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerGrowth", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerGrowth", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerGrowth == null) {
- workerScript.scriptRef.log("getServerGrowth() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.serverGrowth, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerGrowth() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.serverGrowth, 0) + " for " + server.hostname);
}
return server.serverGrowth;
},
@@ -31402,13 +31784,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerNumPortsRequired", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerNumPortsRequired", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerNumPortsRequired == null) {
- workerScript.scriptRef.log("getServerNumPortsRequired() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.numOpenPortsRequired, 0) + " for " + server.hostname);
+ workerScript.scriptRef.log("getServerNumPortsRequired() returned " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.numOpenPortsRequired, 0) + " for " + server.hostname);
}
return server.numOpenPortsRequired;
},
@@ -31417,13 +31799,13 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getServerRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("getServerRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerRam() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getServerRam() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getServerRam() failed. Invalid IP or hostname passed in: " + ip);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.getServerRam == null) {
- workerScript.scriptRef.log("getServerRam() returned [" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.maxRam, 2) + "GB, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(server.ramUsed, 2) + "GB]");
+ workerScript.scriptRef.log("getServerRam() returned [" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.maxRam, 2) + "GB, " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(server.ramUsed, 2) + "GB]");
}
return [server.maxRam, server.ramUsed];
},
@@ -31432,7 +31814,7 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("serverExists", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
}
updateDynamicRam("serverExists", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetServerRamCost);
- return (Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip) !== null);
+ return (Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip) !== null);
},
fileExists : function(filename,ip=workerScript.serverIp) {
if (workerScript.checkingRam) {
@@ -31440,12 +31822,12 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("fileExists", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptFileExistsRamCost);
if (filename === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("fileExists() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "fileExists() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "fileExists() failed. Invalid IP or hostname passed in: " + ip);
}
for (var i = 0; i < server.scripts.length; ++i) {
if (filename == server.scripts[i].filename) {
@@ -31458,12 +31840,12 @@ function NetscriptFunctions(workerScript) {
}
}
for (var i = 0; i < server.messages.length; ++i) {
- if (!(server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) &&
+ if (!(server.messages[i] instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) &&
filename.toLowerCase() === server.messages[i]) {
return true;
}
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(filename, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(filename, server);
if (txtFile != null) {
return true;
}
@@ -31475,25 +31857,25 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("isRunning", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptIsRunningRamCost);
if (filename === undefined || ip === undefined) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");
}
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("isRunning() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isRunning() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isRunning() failed. Invalid IP or hostname passed in: " + ip);
}
var argsForTargetScript = [];
for (var i = 2; i < arguments.length; ++i) {
argsForTargetScript.push(arguments[i]);
}
- return (Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(filename, argsForTargetScript, server) != null);
+ return (Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(filename, argsForTargetScript, server) != null);
},
getNextHacknetNodeCost : function() {
if (workerScript.checkingRam) {
return updateStaticRam("getNextHacknetNodeCost", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
}
updateDynamicRam("getNextHacknetNodeCost", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
- return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_11__["getCostOfNextHacknetNode"])();
+ return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_12__["getCostOfNextHacknetNode"])();
},
purchaseHacknetNode : function() {
@@ -31501,19 +31883,19 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("purchaseHacknetNode", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
}
updateDynamicRam("purchaseHacknetNode", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseHacknetRamCost);
- return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_11__["purchaseHacknet"])();
+ return Object(_HacknetNode_js__WEBPACK_IMPORTED_MODULE_12__["purchaseHacknet"])();
},
getStockPrice : function(symbol) {
if (workerScript.checkingRam) {
return updateStaticRam("getStockPrice", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
}
updateDynamicRam("getStockPrice", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPrice()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPrice()");
}
return parseFloat(stock.price.toFixed(3));
},
@@ -31522,12 +31904,12 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getStockPosition", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
}
updateDynamicRam("getStockPosition", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPosition()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into getStockPosition()");
}
return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
},
@@ -31536,12 +31918,12 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("buyStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("buyStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use buyStock()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use buyStock()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into buyStock()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into buyStock()");
}
if (shares < 0 || isNaN(shares)) {
workerScript.scriptRef.log("ERROR: Invalid 'shares' argument passed to buyStock()");
@@ -31551,24 +31933,24 @@ function NetscriptFunctions(workerScript) {
if (shares === 0) {return 0;}
var totalPrice = stock.price * shares;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission)) {
- workerScript.scriptRef.log("Not enough money to purchase " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(shares, 0) + " shares of " +
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission)) {
+ workerScript.scriptRef.log("Not enough money to purchase " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(shares, 0) + " shares of " +
symbol + ". Need $" +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission, 2).toString());
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission, 2).toString());
return 0;
}
var origTotal = stock.playerShares * stock.playerAvgPx;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(totalPrice + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission);
var newTotal = origTotal + totalPrice;
stock.playerShares += shares;
stock.playerAvgPx = newTotal / stock.playerShares;
if (_engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].Page.StockMarket) {
- Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["updateStockPlayerPosition"])(stock);
+ Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["updateStockPlayerPosition"])(stock);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.buyStock == null) {
- workerScript.scriptRef.log("Bought " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(stock.price, 2) + " per share");
+ workerScript.scriptRef.log("Bought " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(stock.price, 2) + " per share");
}
return stock.price;
},
@@ -31577,12 +31959,12 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("sellStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("sellStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellStock()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellStock()");
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into sellStock()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid stock symbol passed into sellStock()");
}
if (shares < 0 || isNaN(shares)) {
workerScript.scriptRef.log("ERROR: Invalid 'shares' argument passed to sellStock()");
@@ -31592,25 +31974,25 @@ function NetscriptFunctions(workerScript) {
if (shares > stock.playerShares) {shares = stock.playerShares;}
if (shares === 0) {return 0;}
var gains = stock.price * shares - _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainMoney(gains);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainMoney(gains);
//Calculate net profit and add to script stats
var netProfit = ((stock.price - stock.playerAvgPx) * shares) - _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].StockMarketCommission;
if (isNaN(netProfit)) {netProfit = 0;}
workerScript.scriptRef.onlineMoneyMade += netProfit;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].scriptProdSinceLastAug += netProfit;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].scriptProdSinceLastAug += netProfit;
stock.playerShares -= shares;
if (stock.playerShares == 0) {
stock.playerAvgPx = 0;
}
if (_engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_9__["Engine"].Page.StockMarket) {
- Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["updateStockPlayerPosition"])(stock);
+ Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["updateStockPlayerPosition"])(stock);
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.sellStock == null) {
- workerScript.scriptRef.log("Sold " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(stock.price, 2) + " per share. Gained " +
- "$" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(gains, 2));
+ workerScript.scriptRef.log("Sold " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(shares, 0) + " shares of " + stock.symbol + " at $" +
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(stock.price, 2) + " per share. Gained " +
+ "$" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(gains, 2));
}
return stock.price;
},
@@ -31619,19 +32001,19 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("shortStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("shortStock", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use shortStock()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use shortStock()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into shortStock()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into shortStock()");
}
- var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["shortStock"])(stock, shares, workerScript);
+ var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["shortStock"])(stock, shares, workerScript);
return res ? stock.price : 0;
},
sellShort(symbol, shares) {
@@ -31639,19 +32021,19 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("sellShort", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("sellShort", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellShort()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use sellShort()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into sellShort()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into sellShort()");
}
- var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["sellShort"])(stock, shares, workerScript);
+ var res = Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["sellShort"])(stock, shares, workerScript);
return res ? stock.price : 0;
},
placeOrder(symbol, shares, price, type, pos) {
@@ -31659,84 +32041,84 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("placeOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("placeOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use placeOrder()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use placeOrder()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into placeOrder()");
}
var orderType, orderPos;
type = type.toLowerCase();
if (type.includes("limit") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitBuy;
} else if (type.includes("limit") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitSell;
} else if (type.includes("stop") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopBuy;
} else if (type.includes("stop") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopSell;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
}
pos = pos.toLowerCase();
if (pos.includes("l")) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Long;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Long;
} else if (pos.includes('s')) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Short;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Short;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
}
- return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["placeOrder"])(stock, shares, price, orderType, orderPos, workerScript);
+ return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["placeOrder"])(stock, shares, price, orderType, orderPos, workerScript);
},
cancelOrder(symbol, shares, price, type, pos) {
if (workerScript.checkingRam) {
return updateStaticRam("cancelOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
}
updateDynamicRam("cancelOrder", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBuySellStockRamCost);
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hasTixApiAccess) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use cancelOrder()");
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hasTixApiAccess) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "You don't have TIX API Access! Cannot use cancelOrder()");
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 8) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 8) {
if (!(hasWallStreetSF && wallStreetSFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");
}
}
- var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["SymbolToStockMap"][symbol];
+ var stock = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["SymbolToStockMap"][symbol];
if (stock == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into cancelOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid stock symbol passed into cancelOrder()");
}
if (isNaN(shares) || isNaN(price)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");
}
var orderType, orderPos;
type = type.toLowerCase();
if (type.includes("limit") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitBuy;
} else if (type.includes("limit") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].LimitSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].LimitSell;
} else if (type.includes("stop") && type.includes("buy")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopBuy;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopBuy;
} else if (type.includes("stop") && type.includes("sell")) {
- orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["OrderTypes"].StopSell;
+ orderType = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["OrderTypes"].StopSell;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Order Type passed into placeOrder()");
}
pos = pos.toLowerCase();
if (pos.includes("l")) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Long;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Long;
} else if (pos.includes('s')) {
- orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["PositionTypes"].Short;
+ orderPos = _StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["PositionTypes"].Short;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid Position Type passed into placeOrder()");
}
var params = {
stock: stock,
@@ -31745,7 +32127,7 @@ function NetscriptFunctions(workerScript) {
type: orderType,
pos: orderPos
};
- return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_20__["cancelOrder"])(params, workerScript);
+ return Object(_StockMarket_js__WEBPACK_IMPORTED_MODULE_21__["cancelOrder"])(params, workerScript);
},
purchaseServer : function(hostname, ram) {
if (workerScript.checkingRam) {
@@ -31759,14 +32141,14 @@ function NetscriptFunctions(workerScript) {
return "";
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.length >= _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].PurchasedServerLimit) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.length >= _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].PurchasedServerLimit) {
workerScript.scriptRef.log("ERROR: You have reached the maximum limit of " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].PurchasedServerLimit +
" servers. You cannot purchase any more.");
return "";
}
ram = Math.round(ram);
- if (isNaN(ram) || !Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["powerOfTwo"])(ram)) {
+ if (isNaN(ram) || !Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["powerOfTwo"])(ram)) {
workerScript.scriptRef.log("ERROR: purchaseServer() failed due to invalid ram argument. Must be numeric and a power of 2");
return "";
}
@@ -31777,12 +32159,12 @@ function NetscriptFunctions(workerScript) {
}
var cost = ram * _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].BaseCostFor1GBOfRamServer;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(cost)) {
- workerScript.scriptRef.log("ERROR: Not enough money to purchase server. Need $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(cost, 2));
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(cost)) {
+ workerScript.scriptRef.log("ERROR: Not enough money to purchase server. Need $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(cost, 2));
return "";
}
- var newServ = new _Server_js__WEBPACK_IMPORTED_MODULE_17__["Server"]({
- ip: Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_30__["createRandomIp"])(),
+ var newServ = new _Server_js__WEBPACK_IMPORTED_MODULE_18__["Server"]({
+ ip: Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_31__["createRandomIp"])(),
hostname: hostnameStr,
organizationName: "",
isConnectedTo: false,
@@ -31790,15 +32172,15 @@ function NetscriptFunctions(workerScript) {
purchasedByPlayer: true,
maxRam: ram,
});
- Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["AddToAllServers"])(newServ);
+ Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["AddToAllServers"])(newServ);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.push(newServ.ip);
- var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer();
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.push(newServ.ip);
+ var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer();
homeComputer.serversOnNetwork.push(newServ.ip);
newServ.serversOnNetwork.push(homeComputer.ip);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(cost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(cost);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseServer == null) {
- workerScript.scriptRef.log("Purchased new server with hostname " + newServ.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["formatNumber"])(cost, 2));
+ workerScript.scriptRef.log("Purchased new server with hostname " + newServ.hostname + " for $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["formatNumber"])(cost, 2));
}
return newServ.hostname;
},
@@ -31809,7 +32191,7 @@ function NetscriptFunctions(workerScript) {
updateDynamicRam("deleteServer", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseServerRamCost);
var hostnameStr = String(hostname);
hostnameStr = hostnameStr.replace(/\s\s+/g, '');
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["GetServerByHostname"])(hostnameStr);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["GetServerByHostname"])(hostnameStr);
if (server == null) {
workerScript.scriptRef.log("ERROR: Could not find server with hostname " + hostnameStr + ". deleteServer() failed");
return false;
@@ -31843,10 +32225,10 @@ function NetscriptFunctions(workerScript) {
//Delete from player's purchasedServers array
var found = false;
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.length; ++i) {
- if (ip == _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers[i]) {
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.length; ++i) {
+ if (ip == _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers[i]) {
found = true;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.splice(i, 1);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.splice(i, 1);
break;
}
}
@@ -31858,11 +32240,11 @@ function NetscriptFunctions(workerScript) {
}
//Delete from all servers
- delete _Server_js__WEBPACK_IMPORTED_MODULE_17__["AllServers"][ip];
+ delete _Server_js__WEBPACK_IMPORTED_MODULE_18__["AllServers"][ip];
//Delete from home computer
found = false;
- var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer();
+ var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer();
for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {
if (ip == homeComputer.serversOnNetwork[i]) {
homeComputer.serversOnNetwork.splice(i, 1);
@@ -31883,11 +32265,11 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getPurchasedServers", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptPurchaseServerRamCost);
var res = [];
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].purchasedServers.forEach(function(ip) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].purchasedServers.forEach(function(ip) {
if (hostname) {
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find server in getPurchasedServers(). This is a bug please report to game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find server in getPurchasedServers(). This is a bug please report to game dev");
}
res.push(server.hostname);
} else {
@@ -31905,22 +32287,22 @@ function NetscriptFunctions(workerScript) {
//Port 1-10
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to write to invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to write to invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.write(data);
- } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(port)) { //Write to text file
+ } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(port)) { //Write to text file
var fn = port;
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in write(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in write(). This is a bug please contact game dev");
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(fn, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(fn, server);
if (txtFile == null) {
- txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["createTextFile"])(fn, data, server);
+ txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["createTextFile"])(fn, data, server);
return true;
}
if (mode === "w") {
@@ -31930,7 +32312,7 @@ function NetscriptFunctions(workerScript) {
}
return true;
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for write: " + port);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for write: " + port);
}
},
read : function(port) {
@@ -31942,27 +32324,27 @@ function NetscriptFunctions(workerScript) {
//Port 1-10
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to read from invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to read from invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid.");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.read();
- } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(port)) { //Read from text file
+ } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(port)) { //Read from text file
var fn = port;
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in read(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in read(). This is a bug please contact game dev");
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(fn, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(fn, server);
if (txtFile !== null) {
return txtFile.text;
} else {
return "";
}
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for read(): " + port);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for read(): " + port);
}
},
peek : function(port) {
@@ -31971,15 +32353,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("peek", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost);
if (isNaN(port)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
}
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: peek() called with invalid argument. Must be a port number between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.peek();
},
@@ -31991,25 +32373,25 @@ function NetscriptFunctions(workerScript) {
if (!isNaN(port)) { //Clear port
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to clear invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Trying to clear invalid port: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port.clear();
- } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(port)) { //Clear text file
+ } else if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(port)) { //Clear text file
var fn = port;
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (server == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
}
- var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_22__["getTextFile"])(fn, server);
+ var txtFile = Object(_TextFile_js__WEBPACK_IMPORTED_MODULE_23__["getTextFile"])(fn, server);
if (txtFile != null) {
txtFile.write("");
}
} else {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for clear(): " + port);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid argument passed in for clear(): " + port);
}
return 0;
},
@@ -32019,15 +32401,15 @@ function NetscriptFunctions(workerScript) {
}
updateDynamicRam("getPortHandle", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost * 10);
if (isNaN(port)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and " + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts);
}
port = Math.round(port);
if (port < 1 || port > _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: getPortHandle() called with invalid port number: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: getPortHandle() called with invalid port number: " + port + ". Only ports 1-" + _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].NumNetscriptPorts + " are valid");
}
- var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["NetscriptPorts"][port-1];
- if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_26__["NetscriptPort"])) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
+ var port = _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["NetscriptPorts"][port-1];
+ if (port == null || !(port instanceof _NetscriptPort_js__WEBPACK_IMPORTED_MODULE_27__["NetscriptPort"])) {
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: Could not find port: " + port + ". This is a bug contact the game developer");
}
return port;
},
@@ -32036,9 +32418,9 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("rm", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost);
}
updateDynamicRam("rm", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptReadWriteRamCost);
- var s = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(workerScript.serverIp);
+ var s = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(workerScript.serverIp);
if (s == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
}
if (fn.includes(".exe")) {
@@ -32048,7 +32430,7 @@ function NetscriptFunctions(workerScript) {
return true;
}
}
- } else if (Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["isScriptFilename"])(fn)) {
+ } else if (Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["isScriptFilename"])(fn)) {
for (var i = 0; i < s.scripts.length; ++i) {
if (s.scripts[i].filename === fn) {
//Check that the script isnt currently running
@@ -32065,7 +32447,7 @@ function NetscriptFunctions(workerScript) {
} else if (fn.endsWith(".lit")) {
for (var i = 0; i < s.messages.length; ++i) {
var f = s.messages[i];
- if (!(f instanceof _Message_js__WEBPACK_IMPORTED_MODULE_13__["Message"]) && Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(f) && f === fn) {
+ if (!(f instanceof _Message_js__WEBPACK_IMPORTED_MODULE_14__["Message"]) && Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(f) && f === fn) {
s.messages.splice(i, 1);
return true;
}
@@ -32085,10 +32467,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("scriptRunning", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
}
updateDynamicRam("scriptRunning", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("scriptRunning() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "scriptRunning() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "scriptRunning() failed. Invalid IP or hostname passed in: " + ip);
}
for (var i = 0; i < server.runningScripts.length; ++i) {
if (server.runningScripts[i].filename == scriptname) {
@@ -32102,15 +32484,15 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("scriptKill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
}
updateDynamicRam("scriptKill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptArbScriptRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("scriptKill() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "scriptKill() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "scriptKill() failed. Invalid IP or hostname passed in: " + ip);
}
var suc = false;
for (var i = 0; i < server.runningScripts.length; ++i) {
if (server.runningScripts[i].filename == scriptname) {
- Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["killWorkerScript"])(server.runningScripts[i], server.ip);
+ Object(_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["killWorkerScript"])(server.runningScripts[i], server.ip);
suc = true;
}
}
@@ -32125,10 +32507,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getScriptRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetScriptRamCost);
}
updateDynamicRam("getScriptRam", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetScriptRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
}
for (var i = 0; i < server.scripts.length; ++i) {
if (server.scripts[i].filename == scriptname) {
@@ -32142,36 +32524,36 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getHackTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getHackTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getHackTime() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getHackTime() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getHackTime() failed. Invalid IP or hostname passed in: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateHackingTime"])(server); //Returns seconds
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateHackingTime"])(server); //Returns seconds
},
getGrowTime : function(ip) {
if (workerScript.checkingRam) {
return updateStaticRam("getGrowTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getGrowTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getGrowTime() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getGrowTime() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getGrowTime() failed. Invalid IP or hostname passed in: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateGrowTime"])(server) / 1000; //Returns seconds
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateGrowTime"])(server) / 1000; //Returns seconds
},
getWeakenTime : function(ip) {
if (workerScript.checkingRam) {
return updateStaticRam("getWeakenTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getWeakenTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getWeakenTime() failed. Invalid IP or hostname passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getWeakenTime() failed. Invalid IP or hostname passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getWeakenTime() failed. Invalid IP or hostname passed in: " + ip);
}
- return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["scriptCalculateWeakenTime"])(server) / 1000; //Returns seconds
+ return Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["scriptCalculateWeakenTime"])(server) / 1000; //Returns seconds
},
getScriptIncome : function(scriptname, ip) {
if (workerScript.checkingRam) {
@@ -32182,22 +32564,22 @@ function NetscriptFunctions(workerScript) {
//Get total script income
var res = [];
res.push(Object(_ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__["updateActiveScriptsItems"])());
- res.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].playtimeSinceLastAug/1000));
+ res.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].scriptProdSinceLastAug / (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].playtimeSinceLastAug/1000));
return res;
} else {
//Get income for a particular script
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getScriptIncome() failed. Invalid IP or hostnamed passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getScriptIncome() failed. Invalid IP or hostnamed passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getScriptIncome() failed. Invalid IP or hostnamed passed in: " + ip);
}
var argsForScript = [];
for (var i = 2; i < arguments.length; ++i) {
argsForScript.push(arguments[i]);
}
- var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(scriptname, argsForScript, server);
+ var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(scriptname, argsForScript, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("getScriptIncome() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForScript));
+ workerScript.scriptRef.log("getScriptIncome() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForScript));
return -1;
}
return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;
@@ -32210,24 +32592,24 @@ function NetscriptFunctions(workerScript) {
updateDynamicRam("getScriptExpGain", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetScriptRamCost);
if (arguments.length === 0) {
var total = 0;
- for (var i = 0; i < _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["workerScripts"].length; ++i) {
- total += (_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["workerScripts"][i].scriptRef.onlineExpGained / _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_23__["workerScripts"][i].scriptRef.onlineRunningTime);
+ for (var i = 0; i < _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["workerScripts"].length; ++i) {
+ total += (_NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["workerScripts"][i].scriptRef.onlineExpGained / _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_24__["workerScripts"][i].scriptRef.onlineRunningTime);
}
return total;
} else {
//Get income for a particular script
- var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["getServer"])(ip);
+ var server = Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["getServer"])(ip);
if (server == null) {
workerScript.scriptRef.log("getScriptExpGain() failed. Invalid IP or hostnamed passed in: " + ip);
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getScriptExpGain() failed. Invalid IP or hostnamed passed in: " + ip);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getScriptExpGain() failed. Invalid IP or hostnamed passed in: " + ip);
}
var argsForScript = [];
for (var i = 2; i < arguments.length; ++i) {
argsForScript.push(arguments[i]);
}
- var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_16__["findRunningScript"])(scriptname, argsForScript, server);
+ var runningScriptObj = Object(_Script_js__WEBPACK_IMPORTED_MODULE_17__["findRunningScript"])(scriptname, argsForScript, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("getScriptExpGain() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_29__["printArray"])(argsForScript));
+ workerScript.scriptRef.log("getScriptExpGain() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_30__["printArray"])(argsForScript));
return -1;
}
return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;
@@ -32238,51 +32620,51 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getTimeSinceLastAug", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
}
updateDynamicRam("getTimeSinceLastAug", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptGetHackTimeRamCost);
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].playtimeSinceLastAug;
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].playtimeSinceLastAug;
},
prompt : function(txt) {
if (workerScript.checkingRam) {return 0;}
- if (_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxOpen"]) {
+ if (_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxOpen"]) {
workerScript.scriptRef.log("ERROR: confirm() failed because a pop-up dialog box is already open");
return false;
}
- if (!Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(txt)) {txt = String(txt);}
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxGetNoButton"])();
+ if (!Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(txt)) {txt = String(txt);}
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxGetNoButton"])();
yesBtn.innerHTML = "Yes";
noBtn.innerHTML = "No";
return new Promise(function(resolve, reject) {
yesBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxClose"])();
resolve(true);
});
noBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxClose"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxClose"])();
resolve(false);
});
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_32__["yesNoBoxCreate"])(txt);
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_33__["yesNoBoxCreate"])(txt);
});
},
/* Singularity Functions */
universityCourse : function(universityName, className) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("universityCourse", ramCost);
}
updateDynamicRam("universityCourse", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.universityCourse == null) {
workerScript.scriptRef.log(txt);
}
@@ -32290,30 +32672,30 @@ function NetscriptFunctions(workerScript) {
var costMult, expMult;
switch(universityName.toLowerCase()) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSummitUniversity.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSummitUniversity.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum) {
workerScript.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSummitUniversity;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSummitUniversity;
costMult = 4;
expMult = 3;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12RothmanUniversity.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12RothmanUniversity.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12) {
workerScript.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12RothmanUniversity;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12RothmanUniversity;
costMult = 3;
expMult = 2;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenZBInstituteOfTechnology.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenZBInstituteOfTechnology.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven) {
workerScript.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenZBInstituteOfTechnology;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenZBInstituteOfTechnology;
costMult = 5;
expMult = 4;
break;
@@ -32346,7 +32728,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("Invalid class name: " + className + ". universityCourse() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, task);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, task);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.universityCourse == null) {
workerScript.scriptRef.log("Started " + task + " at " + universityName);
}
@@ -32355,71 +32737,71 @@ function NetscriptFunctions(workerScript) {
gymWorkout : function(gymName, stat) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("gymWorkout", ramCost);
}
updateDynamicRam("gymWorkout", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.gymWorkout == null) {
workerScript.scriptRef.log(txt);
}
}
var costMult, expMult;
switch(gymName.toLowerCase()) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumCrushFitnessGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumCrushFitnessGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum) {
workerScript.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumCrushFitnessGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumCrushFitnessGym;
costMult = 3;
expMult = 2;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSnapFitnessGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSnapFitnessGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum) {
workerScript.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSnapFitnessGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSnapFitnessGym;
costMult = 10;
expMult = 5;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12IronGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12IronGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12) {
workerScript.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12IronGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12IronGym;
costMult = 1;
expMult = 1;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12PowerhouseGym.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12PowerhouseGym.toLowerCase():
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12) {
workerScript.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12PowerhouseGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12PowerhouseGym;
costMult = 20;
expMult = 10;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenMilleniumFitnessGym:
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenMilleniumFitnessGym:
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city != _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven) {
workerScript.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenMilleniumFitnessGym;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenMilleniumFitnessGym;
costMult = 7;
expMult = 4;
break;
@@ -32431,19 +32813,19 @@ function NetscriptFunctions(workerScript) {
switch(stat.toLowerCase()) {
case "strength".toLowerCase():
case "str".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymStrength);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymStrength);
break;
case "defense".toLowerCase():
case "def".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDefense);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDefense);
break;
case "dexterity".toLowerCase():
case "dex".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDexterity);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymDexterity);
break;
case "agility".toLowerCase():
case "agi".toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymAgility);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startClass(costMult, expMult, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ClassGymAgility);
break;
default:
workerScript.scriptRef.log("Invalid stat: " + stat + ". gymWorkout() failed");
@@ -32457,32 +32839,32 @@ function NetscriptFunctions(workerScript) {
travelToCity(cityname) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("travelToCity", ramCost);
}
updateDynamicRam("travelToCity", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
switch(cityname) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Chongqing:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].NewTokyo:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Ishima:
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven:
- if(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost)) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Chongqing:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].NewTokyo:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Ishima:
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven:
+ if(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost)) {
workerScript.scriptRef.log("ERROR: not enough money to travel with travelToCity().");
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "ERROR: not enough money to travel with travelToCity().");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "ERROR: not enough money to travel with travelToCity().");
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city = cityname;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TravelCost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city = cityname;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.travelToCity == null) {
workerScript.scriptRef.log("Traveled to " + cityname);
}
@@ -32495,41 +32877,41 @@ function NetscriptFunctions(workerScript) {
purchaseTor() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("purchaseTor", ramCost);
}
updateDynamicRam("purchaseTor", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"]["Darkweb Server"] != null) {
+ if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"]["Darkweb Server"] != null) {
workerScript.scriptRef.log("You already have a TOR router! purchaseTor() failed");
return false;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost)) {
workerScript.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].TorRouterCost);
- var darkweb = new _Server_js__WEBPACK_IMPORTED_MODULE_17__["Server"]({
- ip:Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_30__["createRandomIp"])(), hostname:"darkweb", organizationName:"",
+ var darkweb = new _Server_js__WEBPACK_IMPORTED_MODULE_18__["Server"]({
+ ip:Object(_utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_31__["createRandomIp"])(), hostname:"darkweb", organizationName:"",
isConnectedTo:false, adminRights:false, purchasedByPlayer:false, maxRam:1
});
- Object(_Server_js__WEBPACK_IMPORTED_MODULE_17__["AddToAllServers"])(darkweb);
- _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"].addIp("Darkweb Server", darkweb.ip);
+ Object(_Server_js__WEBPACK_IMPORTED_MODULE_18__["AddToAllServers"])(darkweb);
+ _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"].addIp("Darkweb Server", darkweb.ip);
document.getElementById("location-purchase-tor").setAttribute("class", "a-link-button-inactive");
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().serversOnNetwork.push(darkweb.ip);
- darkweb.serversOnNetwork.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().ip);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().serversOnNetwork.push(darkweb.ip);
+ darkweb.serversOnNetwork.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().ip);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseTor == null) {
workerScript.scriptRef.log("You have purchased a Tor router!");
}
@@ -32537,19 +32919,19 @@ function NetscriptFunctions(workerScript) {
},
purchaseProgram(programName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("purchaseProgram", ramCost);
}
updateDynamicRam("purchaseProgram", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"]["Darkweb Server"] == null) {
+ if (_SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"]["Darkweb Server"] == null) {
workerScript.scriptRef.log("ERROR: You do not have TOR router. purchaseProgram() failed.");
return false;
}
@@ -32557,9 +32939,9 @@ function NetscriptFunctions(workerScript) {
switch(programName.toLowerCase()) {
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].BruteSSHProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the BruteSSH.exe program. The new program can be found on your home computer.");
}
@@ -32570,9 +32952,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].FTPCrackProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the FTPCrack.exe program. The new program can be found on your home computer.");
}
@@ -32583,9 +32965,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].RelaySMTPProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the relaySMTP.exe program. The new program can be found on your home computer.");
}
@@ -32596,9 +32978,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].HTTPWormProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the HTTPWorm.exe program. The new program can be found on your home computer.");
}
@@ -32609,9 +32991,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].SQLInjectProgram);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the SQLInject.exe program. The new program can be found on your home computer.");
}
@@ -32622,9 +33004,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].DeepScanV1Program);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the DeepscanV1.exe program. The new program can be found on your home computer.");
}
@@ -32635,9 +33017,9 @@ function NetscriptFunctions(workerScript) {
return true;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2.toLowerCase():
var price = Object(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["parseDarkwebItemPrice"])(_DarkWeb_js__WEBPACK_IMPORTED_MODULE_8__["DarkWebItems"].DeepScanV2Program);
- if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.gt(price)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(price);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2);
+ if (price > 0 && _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.gt(price)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(price);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer().programs.push(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.purchaseProgram == null) {
workerScript.scriptRef.log("You have purchased the DeepscanV2.exe program. The new program can be found on your home computer.");
}
@@ -32654,94 +33036,94 @@ function NetscriptFunctions(workerScript) {
},
getStats : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getStats", ramCost);
}
updateDynamicRam("getStats", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return {};
}
}
return {
- hacking: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill,
- strength: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].strength,
- defense: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].defense,
- dexterity: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].dexterity,
- agility: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].agility,
- charisma: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].charisma,
- intelligence: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].intelligence
+ hacking: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill,
+ strength: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].strength,
+ defense: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].defense,
+ dexterity: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].dexterity,
+ agility: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].agility,
+ charisma: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].charisma,
+ intelligence: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].intelligence
}
},
getCharacterInformation : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCharacterInformation", ramCost);
}
updateDynamicRam("getCharacterInformation", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return {};
}
}
var companyPositionTitle = "";
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"]) {
- companyPositionTitle = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.positionName;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"]) {
+ companyPositionTitle = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.positionName;
}
return {
- bitnode: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN,
- company: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyName,
+ bitnode: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN,
+ company: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyName,
jobTitle: companyPositionTitle,
- city: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city,
- factions: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factions.slice(),
- tor: _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_19__["SpecialServerIps"].hasOwnProperty("Darkweb Server"),
- timeWorked: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].timeWorked,
- workHackExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workHackExpGained,
- workStrExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workStrExpGained,
- workDefExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workDefExpGained,
- workDexExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workDexExpGained,
- workAgiExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workAgiExpGained,
- workChaExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workChaExpGained,
- workRepGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workRepGained,
- workMoneyGain: _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].workMoneyGained,
+ city: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city,
+ factions: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factions.slice(),
+ tor: _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_20__["SpecialServerIps"].hasOwnProperty("Darkweb Server"),
+ timeWorked: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].timeWorked,
+ workHackExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workHackExpGained,
+ workStrExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workStrExpGained,
+ workDefExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workDefExpGained,
+ workDexExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workDexExpGained,
+ workAgiExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workAgiExpGained,
+ workChaExpGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workChaExpGained,
+ workRepGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workRepGained,
+ workMoneyGain: _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].workMoneyGained,
};
},
isBusy : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("isBusy", ramCost);
}
updateDynamicRam("isBusy", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return;
}
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking;
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking;
},
stopAction : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn1RamCost / 2;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("stopAction", ramCost);
}
updateDynamicRam("stopAction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
return false;
}
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.stopAction == null) {
workerScript.scriptRef.log(txt);
}
@@ -32751,31 +33133,31 @@ function NetscriptFunctions(workerScript) {
},
upgradeHomeRam : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("upgradeHomeRam", ramCost);
}
updateDynamicRam("upgradeHomeRam", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- const cost = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getUpgradeHomeRamCost();
+ const cost = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getUpgradeHomeRamCost();
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].money.lt(cost)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].money.lt(cost)) {
workerScript.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money");
return false;
}
- var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getHomeComputer();
+ var homeComputer = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getHomeComputer();
homeComputer.maxRam *= 2;
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].loseMoney(cost);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].loseMoney(cost);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.upgradeHomeRam == null) {
workerScript.scriptRef.log("Purchased additional RAM for home computer! It now has " + homeComputer.maxRam + "GB of RAM.");
}
@@ -32783,71 +33165,71 @@ function NetscriptFunctions(workerScript) {
},
getUpgradeHomeRamCost : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 2;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getUpgradeHomeRamCost", ramCost);
}
updateDynamicRam("getUpgradeHomeRamCost", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].getUpgradeHomeRamCost();
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].getUpgradeHomeRamCost();
},
workForCompany : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("workForCompany", ramCost);
}
updateDynamicRam("workForCompany", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition == "" || !(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"])) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition == "" || !(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition instanceof _Company_js__WEBPACK_IMPORTED_MODULE_5__["CompanyPosition"])) {
workerScript.scriptRef.log("ERROR: workForCompany() failed because you do not have a job");
return false;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.workForCompany == null) {
workerScript.scriptRef.log(txt);
}
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.isPartTimeJob()) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startWorkPartTime();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.isPartTimeJob()) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startWorkPartTime();
} else {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startWork();
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startWork();
}
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.workForCompany == null) {
- workerScript.scriptRef.log("Began working at " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.positionName);
+ workerScript.scriptRef.log("Began working at " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.positionName);
}
return true;
},
applyToCompany : function(companyName, field) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("applyToCompany", ramCost);
}
updateDynamicRam("applyToCompany", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
@@ -32857,60 +33239,60 @@ function NetscriptFunctions(workerScript) {
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = companyName;
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = companyName;
var res;
switch (field.toLowerCase()) {
case "software":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSoftwareJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSoftwareJob(true);
break;
case "software consultant":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSoftwareConsultantJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSoftwareConsultantJob(true);
break;
case "it":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForItJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForItJob(true);
break;
case "security engineer":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSecurityEngineerJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSecurityEngineerJob(true);
break;
case "network engineer":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForNetworkEngineerJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForNetworkEngineerJob(true);
break;
case "business":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForBusinessJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForBusinessJob(true);
break;
case "business consultant":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForBusinessConsultantJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForBusinessConsultantJob(true);
break;
case "security":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForSecurityJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForSecurityJob(true);
break;
case "agent":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForAgentJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForAgentJob(true);
break;
case "employee":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForEmployeeJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForEmployeeJob(true);
break;
case "part-time employee":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForPartTimeEmployeeJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForPartTimeEmployeeJob(true);
break;
case "waiter":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForWaiterJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForWaiterJob(true);
break;
case "part-time waiter":
- res = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].applyForPartTimeWaiterJob(true);
+ res = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].applyForPartTimeWaiterJob(true);
break;
default:
workerScript.scriptRef.log("ERROR: Invalid job passed into applyToCompany: " + field + ". applyToCompany() failed");
return false;
}
//The Player object's applyForJob function can return string with special error messages
- if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(res)) {
+ if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(res)) {
workerScript.scriptRef.log(res);
return false;
}
if (res) {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.applyToCompany == null) {
- workerScript.scriptRef.log("You were offered a new job at " + companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].companyPosition.positionName);
+ workerScript.scriptRef.log("You were offered a new job at " + companyName + " as a " + _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].companyPosition.positionName);
}
} else {
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.applyToCompany == null) {
@@ -32921,14 +33303,14 @@ function NetscriptFunctions(workerScript) {
},
getCompanyRep : function(companyName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 2;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCompanyRep", ramCost);
}
updateDynamicRam("getCompanyRep", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
@@ -32942,14 +33324,14 @@ function NetscriptFunctions(workerScript) {
},
getCompanyFavor : function(companyName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCompanyFavor", ramCost);
}
updateDynamicRam("getCompanyFavor", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
@@ -32963,54 +33345,54 @@ function NetscriptFunctions(workerScript) {
},
checkFactionInvitations : function() {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("checkFactionInvitations", ramCost);
}
updateDynamicRam("checkFactionInvitations", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
//Make a copy of Player.factionInvitations
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.slice();
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factionInvitations.slice();
},
joinFaction : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("joinFaction", ramCost);
}
updateDynamicRam("joinFaction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist.");
return false;
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.includes(name)) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factionInvitations.includes(name)) {
workerScript.scriptRef.log("ERROR: Cannot join " + name + " Faction because you have not been invited. joinFaction() failed");
return false;
}
- var index = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.indexOf(name);
+ var index = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factionInvitations.indexOf(name);
if (index === -1) {
//Redundant and should never happen...
workerScript.scriptRef.log("ERROR: Cannot join " + name + " Faction because you have not been invited. joinFaction() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factionInvitations.splice(index, 1);
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name];
- Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["joinFaction"])(fac);
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factionInvitations.splice(index, 1);
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][name];
+ Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["joinFaction"])(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.joinFaction == null) {
workerScript.scriptRef.log("Joined the " + name + " faction.");
}
@@ -33018,41 +33400,47 @@ function NetscriptFunctions(workerScript) {
},
workForFaction : function(name, type) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("workForFaction", ramCost);
}
updateDynamicRam("workForFaction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ // if the player is in a gang and the target faction is any of the gang faction, fail
+ if(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gang != null && _Gang_js__WEBPACK_IMPORTED_MODULE_10__["AllGangs"][name] !== undefined) {
+ workerScript.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");
+ return;
+ }
+
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.");
return;
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist.");
return false;
}
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].factions.includes(name)) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].factions.includes(name)) {
workerScript.scriptRef.log("ERROR: workForFaction() failed because you are not a member of " + name);
return false;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.workForFaction == null) {
workerScript.scriptRef.log(txt);
}
}
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name];
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][name];
//Arrays listing factions that allow each time of work
var hackAvailable = ["Illuminati", "Daedalus", "The Covenant", "ECorp", "MegaCorp",
"Bachman & Associates", "Blade Industries", "NWO", "Clarke Incorporated",
@@ -33082,7 +33470,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("ERROR: Cannot carry out hacking contracts for " + fac.name + ". workForFaction() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startFactionHackWork(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startFactionHackWork(fac);
workerScript.scriptRef.log("Started carrying out hacking contracts for " + fac.name);
return true;
case "field":
@@ -33092,7 +33480,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("ERROR: Cannot carry out field missions for " + fac.name + ". workForFaction() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startFactionFieldWork(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startFactionFieldWork(fac);
workerScript.scriptRef.log("Started carrying out field missions for " + fac.name);
return true;
case "security":
@@ -33102,7 +33490,7 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("ERROR: Cannot serve as security detail for " + fac.name + ". workForFaction() failed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startFactionSecurityWork(fac);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startFactionSecurityWork(fac);
workerScript.scriptRef.log("Started serving as security details for " + fac.name);
return true;
default:
@@ -33112,65 +33500,65 @@ function NetscriptFunctions(workerScript) {
},
getFactionRep : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost / 4;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getFactionRep", ramCost);
}
updateDynamicRam("getFactionRep", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return -1;
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist.");
return -1;
}
- return _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name].playerReputation;
+ return _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][name].playerReputation;
},
getFactionFavor : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn2RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getFactionFavor", ramCost);
}
updateDynamicRam("getFactionFavor", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
return -1;
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(name)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(name)) {
workerScript.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist.");
return -1;
}
- return _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][name].favor;
+ return _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][name].favor;
},
createProgram : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("createProgram", ramCost);
}
updateDynamicRam("createProgram", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.createProgram == null) {
workerScript.scriptRef.log(txt);
}
@@ -33178,70 +33566,70 @@ function NetscriptFunctions(workerScript) {
switch(name.toLowerCase()) {
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram.toLowerCase():
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes, 1);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].NukeProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes, 1);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 50) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 50) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create BruteSSH (level 50 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes * 2, 50);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].BruteSSHProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerFiveMinutes * 2, 50);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 100) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 100) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create FTPCrack (level 100 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].FTPCrackProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 100);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 250) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 250) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create relaySMTP (level 250 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 250);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].RelaySMTPProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 250);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 500) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 500) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create HTTPWorm (level 500 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer4Hours, 500);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].HTTPWormProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer4Hours, 500);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 750) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 750) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create SQLInject (level 750 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer8Hours, 750);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].SQLInjectProgram, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer8Hours, 750);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 75) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 75) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV1 (level 75 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 75);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV1, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 75);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 400) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 400) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV2 (level 400 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 400);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].DeepscanV2, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPer2Hours, 400);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].ServerProfiler.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 75) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 75) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create ServerProfiler (level 75 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].ServerProfiler, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 75);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].ServerProfiler, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerHalfHour, 75);
break;
case _CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].AutoLink.toLowerCase():
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].hacking_skill < 25) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].hacking_skill < 25) {
workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create AutoLink (level 25 req)");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].AutoLink, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 25);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].startCreateProgramWork(_CreateProgram_js__WEBPACK_IMPORTED_MODULE_7__["Programs"].AutoLink, _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].MillisecondsPerQuarterHour, 25);
break;
default:
workerScript.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: " + name);
@@ -33252,47 +33640,47 @@ function NetscriptFunctions(workerScript) {
},
commitCrime : function(crimeRoughName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("commitCrime", ramCost);
}
updateDynamicRam("commitCrime", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return;
}
}
- if (_Missions_js__WEBPACK_IMPORTED_MODULE_14__["inMission"]) {
+ if (_Missions_js__WEBPACK_IMPORTED_MODULE_15__["inMission"]) {
workerScript.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");
return;
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].isWorking) {
- var txt = _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].singularityStopWork();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].isWorking) {
+ var txt = _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].singularityStopWork();
if (workerScript.disableLogs.ALL == null && workerScript.disableLogs.commitCrime == null) {
workerScript.scriptRef.log(txt);
}
}
//Set Location to slums
- switch(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].city) {
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Aevum:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].AevumSlums;
+ switch(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].city) {
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Aevum:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].AevumSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Chongqing:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].ChongqingSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Chongqing:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].ChongqingSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Sector12Slums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Sector12Slums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].NewTokyo:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].NewTokyoSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].NewTokyo:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].NewTokyoSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Ishima:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].IshimaSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Ishima:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].IshimaSlums;
break;
- case _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].Volhaven:
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_12__["Locations"].VolhavenSlums;
+ case _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].Volhaven:
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].location = _Location_js__WEBPACK_IMPORTED_MODULE_13__["Locations"].VolhavenSlums;
break;
default:
console.log("Invalid Player.city value");
@@ -33300,7 +33688,7 @@ function NetscriptFunctions(workerScript) {
const crime = Object(_Crimes_js__WEBPACK_IMPORTED_MODULE_3__["findCrime"])(crimeRoughName.toLowerCase());
if(crime == null) { // couldn't find crime
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into commitCrime(): " + crime);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into commitCrime(): " + crime);
}
if(workerScript.disableLogs.ALL == null && workerScript.disableLogs.commitCrime == null) {
workerScript.scriptRef.log("Attempting to commit crime: "+crime.name+"...");
@@ -33309,69 +33697,69 @@ function NetscriptFunctions(workerScript) {
},
getCrimeChance : function(crimeRoughName) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getCrimeChance", ramCost);
}
updateDynamicRam("getCrimeChance", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return;
}
}
const crime = Object(_Crimes_js__WEBPACK_IMPORTED_MODULE_3__["findCrime"])(crimeRoughName.toLowerCase());
if(crime == null) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into getCrimeChance(): " + crime);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Invalid crime passed into getCrimeChance(): " + crime);
}
return crime.successRate();
},
getOwnedAugmentations : function(purchased=false) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getOwnedAugmentations", ramCost);
}
updateDynamicRam("getOwnedAugmentations", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return [];
}
}
var res = [];
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations.length; ++i) {
- res.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations[i].name);
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations.length; ++i) {
+ res.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations[i].name);
}
if (purchased) {
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations.length; ++i) {
- res.push(_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations[i].name);
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations.length; ++i) {
+ res.push(_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations[i].name);
}
}
return res;
},
getAugmentationsFromFaction : function(facname) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getAugmentationsFromFaction", ramCost);
}
updateDynamicRam("getAugmentationsFromFaction", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return [];
}
}
- if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["factionExists"])(facname)) {
+ if (!Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["factionExists"])(facname)) {
workerScript.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): " + facname);
return [];
}
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][facname];
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][facname];
var res = [];
for (var i = 0; i < fac.augmentations.length; ++i) {
res.push(fac.augmentations[i]);
@@ -33380,14 +33768,14 @@ function NetscriptFunctions(workerScript) {
},
getAugmentationCost : function(name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("getAugmentationCost", ramCost);
}
updateDynamicRam("getAugmentationCost", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
@@ -33402,20 +33790,20 @@ function NetscriptFunctions(workerScript) {
},
purchaseAugmentation : function(faction, name) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("purchaseAugmentation", ramCost);
}
updateDynamicRam("purchaseAugmentation", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Factions"][faction];
- if (fac == null || !(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_10__["Faction"])) {
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Factions"][faction];
+ if (fac == null || !(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_11__["Faction"])) {
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: " + faction);
return false;
}
@@ -33437,14 +33825,14 @@ function NetscriptFunctions(workerScript) {
}
if (!isNeuroflux) {
- for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations.length; ++j) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations[j].name === aug.name) {
+ for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations.length; ++j) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations[j].name === aug.name) {
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
return false;
}
}
- for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations.length; ++j) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].augmentations[j].name === aug.name) {
+ for (var j = 0; j < _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations.length; ++j) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].augmentations[j].name === aug.name) {
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you already have " + name);
return false;
}
@@ -33456,10 +33844,10 @@ function NetscriptFunctions(workerScript) {
return false;
}
- var res = Object(_Faction_js__WEBPACK_IMPORTED_MODULE_10__["purchaseAugmentation"])(aug, fac, true);
+ var res = Object(_Faction_js__WEBPACK_IMPORTED_MODULE_11__["purchaseAugmentation"])(aug, fac, true);
workerScript.scriptRef.log(res);
- if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_31__["isString"])(res) && res.startsWith("You purchased")) {
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ if (Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_32__["isString"])(res) && res.startsWith("You purchased")) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
return true;
} else {
return false;
@@ -33467,23 +33855,23 @@ function NetscriptFunctions(workerScript) {
},
installAugmentations : function(cbScript) {
var ramCost = _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptSingularityFn3RamCost;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN !== 4) {ramCost *= 8;}
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN !== 4) {ramCost *= 8;}
if (workerScript.checkingRam) {
return updateStaticRam("installAugmentations", ramCost);
}
updateDynamicRam("installAugmentations", ramCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN != 4) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
return false;
}
}
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].queuedAugmentations.length === 0) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].queuedAugmentations.length === 0) {
workerScript.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed");
return false;
}
- _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
+ _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].gainIntelligenceExp(_Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].IntelligenceSingFnBaseExpGain);
workerScript.scriptRef.log("Installing Augmentations. This will cause this script to be killed");
Object(_Augmentations_js__WEBPACK_IMPORTED_MODULE_1__["installAugmentations"])(cbScript);
return true;
@@ -33496,10 +33884,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isContractName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isContractName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isContractNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isContractNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isContractName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isContractName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isOperationName : function(name) {
@@ -33507,10 +33895,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isOperationName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isOperationName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isOperationNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isOperationNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isOperationName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isOperationName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isBlackOpName : function(name) {
@@ -33518,10 +33906,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isBlackOpName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isBlackOpName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isBlackOpNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isBlackOpNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isBlackOpName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isBlackOpName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isGeneralActionName : function(name) {
@@ -33529,10 +33917,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isGeneralActionName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isGeneralActionName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isGeneralActionNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isGeneralActionNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isGeneralActionName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isGeneralActionName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
isSkillName : function(name) {
@@ -33540,10 +33928,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("isSkillName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
}
updateDynamicRam("isSkillName", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.isSkillNameNetscriptFn(name);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.isSkillNameNetscriptFn(name);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "isSkillName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "isSkillName() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
startAction : function(type="", name="") {
@@ -33551,14 +33939,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("startAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("startAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.startActionNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.startActionNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.startAction() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.startAction() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
stopAction : function() {
@@ -33566,10 +33954,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("stopAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 2);
}
updateDynamicRam("stopAction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 2);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.resetAction();
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.resetAction();
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "stopAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "stopAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getActionTime : function(type="", name="") {
@@ -33577,14 +33965,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getActionTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getActionTime", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getActionTimeNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getActionTimeNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionTime() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionTime() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getActionEstimatedSuccessChance : function(type="", name="") {
@@ -33592,14 +33980,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getActionEstimatedSuccessChance", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getActionEstimatedSuccessChance", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionEstimatedSuccessChance() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionEstimatedSuccessChance() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getActionCountRemaining : function(type="", name="") {
@@ -33607,14 +33995,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getActionCountRemaining", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getActionCountRemaining", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionCountRemaining() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getActionCountRemaining() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getRank : function() {
@@ -33622,10 +34010,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getRank", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getRank", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.rank;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.rank;
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getSkillPoints : function() {
@@ -33633,10 +34021,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getSkillPoints", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getSkillPoints", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.skillPoints;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.skillPoints;
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getSkillLevel : function(skillName="") {
@@ -33644,14 +34032,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getSkillLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getSkillLevel", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getSkillLevel() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getSkillLevel() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
upgradeSkill : function(skillName) {
@@ -33659,14 +34047,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("upgradeSkill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("upgradeSkill", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.upgradeSkill() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.upgradeSkill() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getTeamSize : function(type="", name="") {
@@ -33674,14 +34062,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getTeamSize() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getTeamSize() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
setTeamSize : function(type="", name="", size) {
@@ -33689,14 +34077,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("setTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("setTeamSize", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.setTeamSize() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.setTeamSize() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getCityEstimatedPopulation : function(cityName) {
@@ -33704,14 +34092,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getCityEstimatedPopulation", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getCityEstimatedPopulation", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getCityEstimatedPopulationNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getCityEstimatedPopulationNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedPopulation() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedPopulation() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getCityEstimatedCommunities : function(cityName) {
@@ -33719,14 +34107,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getCityEstimatedCommunities", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getCityEstimatedCommunities", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getCityEstimatedCommunitiesNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getCityEstimatedCommunitiesNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedCommunities() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityEstimatedCommunities() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getCityChaos : function(cityName) {
@@ -33734,14 +34122,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getCityChaos", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getCityChaos", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.getCityChaosNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getCityChaosNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityChaos() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.getCityChaos() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
switchCity : function(cityName) {
@@ -33749,14 +34137,14 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("switchCity", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("switchCity", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
try {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.switchCityNetscriptFn(cityName, workerScript);
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.switchCityNetscriptFn(cityName, workerScript);
} catch(e) {
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.switchCity() failed with exception: " + e);
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "Bladeburner.switchCity() failed with exception: " + e);
}
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
getStamina : function() {
@@ -33764,10 +34152,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("getStamina", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("getStamina", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return [_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.stamina, _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.maxStamina];
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return [_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.stamina, _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.maxStamina];
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
},
joinBladeburnerFaction : function() {
@@ -33775,10 +34163,10 @@ function NetscriptFunctions(workerScript) {
return updateStaticRam("joinBladeburnerFaction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
}
updateDynamicRam("joinBladeburnerFaction", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost);
- if (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
- return _Player_js__WEBPACK_IMPORTED_MODULE_15__["Player"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
+ return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);
}
- throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_24__["makeRuntimeRejectMsg"])(workerScript, "joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
+ throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
"at the Bladeburner division or because you do not have Source-File 7");
}
}
@@ -33801,7 +34189,7 @@ function NetscriptFunctions(workerScript) {
var support = __webpack_require__(/*! ./support */ 49);
var base64 = __webpack_require__(/*! ./base64 */ 105);
var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 63);
-var setImmediate = __webpack_require__(/*! core-js/library/fn/set-immediate */ 167);
+var setImmediate = __webpack_require__(/*! core-js/library/fn/set-immediate */ 168);
var external = __webpack_require__(/*! ./external */ 57);
@@ -34287,7 +34675,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFconf", function() { return createFconf; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseFconfSettings", function() { return parseFconfSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadFconf", function() { return loadFconf; });
-/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn.js */ 35);
+/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/acorn.js */ 36);
/* harmony import */ var _utils_acorn_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_utils_acorn_js__WEBPACK_IMPORTED_MODULE_0__);
@@ -34438,7 +34826,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
-/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! jsplumb */ 197);
+/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! jsplumb */ 198);
/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_7__);
@@ -35975,7 +36363,7 @@ HackingMission.prototype.finishMission = function(win) {
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
/***/ }),
/* 34 */
@@ -35992,10 +36380,10 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buyDarkwebItem", function() { return buyDarkwebItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseDarkwebItemPrice", function() { return parseDarkwebItemPrice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DarkWebItems", function() { return DarkWebItems; });
-/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
+/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CreateProgram.js */ 13);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Terminal.js */ 19);
+/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SpecialServerIps.js */ 19);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Terminal.js */ 18);
/* harmony import */ var _utils_IPAddress_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/IPAddress.js */ 16);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
@@ -36198,6 +36586,1495 @@ let DarkWebItems = {
/***/ }),
/* 35 */
+/*!*********************!*\
+ !*** ./src/Gang.js ***!
+ \*********************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gang", function() { return Gang; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayGangContent", function() { return displayGangContent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateGangContent", function() { return updateGangContent; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadAllGangs", function() { return loadAllGangs; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AllGangs", function() { return AllGangs; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetGangs", function() { return resetGangs; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteGangDisplayContent", function() { return deleteGangDisplayContent; });
+/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants.js */ 3);
+/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine.js */ 5);
+/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Faction.js */ 11);
+/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player.js */ 0);
+/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
+/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 14);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__);
+/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
+/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
+
+
+
+
+
+
+
+
+
+
+
+/* Gang.js */
+//Switch between territory and management screen with 1 and 2
+$(document).keydown(function(event) {
+ if (_engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].Page.Gang && !_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoBoxOpen"]) {
+ if (gangMemberFilter != null && gangMemberFilter === document.activeElement) {return;}
+ if (event.keyCode === 49) {
+ if(gangTerritorySubpage.style.display === "block") {
+ managementButton.click();
+ }
+ } else if (event.keyCode === 50) {
+ if (gangManagementSubpage.style.display === "block") {
+ territoryButton.click();
+ }
+ }
+ }
+});
+
+//Delete upgrade box when clicking outside
+$(document).mousedown(function(event) {
+ var boxId = "gang-member-upgrade-popup-box";
+ var contentId = "gang-member-upgrade-popup-box-content";
+ if (gangMemberUpgradeBoxOpened) {
+ if ( $(event.target).closest("#" + contentId).get(0) == null ) {
+ //Delete the box
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBox);
+ gangMemberUpgradeBox = null;
+ gangMemberUpgradeBoxContent = null;
+ gangMemberUpgradeBoxOpened = false;
+ gangMemberUpgradeBoxElements = null;
+ }
+ }
+});
+
+let GangNames = ["Slum Snakes", "Tetrads", "The Syndicate", "The Dark Army", "Speakers for the Dead",
+ "NiteSec", "The Black Hand"];
+let AllGangs = {
+ "Slum Snakes" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Tetrads" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Syndicate" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Dark Army" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Speakers for the Dead" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "NiteSec" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Black Hand" : {
+ power: 1,
+ territory: 1/7,
+ },
+}
+
+function resetGangs() {
+ AllGangs = {
+ "Slum Snakes" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Tetrads" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Syndicate" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Dark Army" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "Speakers for the Dead" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "NiteSec" : {
+ power: 1,
+ territory: 1/7,
+ },
+ "The Black Hand" : {
+ power: 1,
+ territory: 1/7,
+ },
+ }
+}
+
+function loadAllGangs(saveString) {
+ AllGangs = JSON.parse(saveString, _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"]);
+}
+
+//Power is an estimate of a gang's ability to gain/defend territory
+let gangStoredPowerCycles = 0;
+function processAllGangPowerGains(numCycles=1) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ gangStoredPowerCycles += numCycles;
+ if (gangStoredPowerCycles < 150) {return;}
+ var playerGangName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName;
+ for (var name in AllGangs) {
+ if (AllGangs.hasOwnProperty(name)) {
+ if (name == playerGangName) {
+ AllGangs[name].power += _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.calculatePower();
+ } else {
+ var gain = Math.random() * 0.02; //TODO Adjust as necessary
+ AllGangs[name].power += (gain);
+ }
+ }
+ }
+
+ gangStoredPowerCycles -= 150;
+}
+
+let gangStoredTerritoryCycles = 0;
+function processAllGangTerritory(numCycles=1) {
+ if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ gangStoredTerritoryCycles += numCycles;
+ if (gangStoredTerritoryCycles < _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer) {return;}
+
+ for (var i = 0; i < GangNames.length; ++i) {
+ var other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
+ while(other == i) {
+ other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
+ }
+ var thisPwr = AllGangs[GangNames[i]].power;
+ var otherPwr = AllGangs[GangNames[other]].power;
+ var thisChance = thisPwr / (thisPwr + otherPwr);
+
+ if (Math.random() < thisChance) {
+ if (AllGangs[GangNames[other]].territory <= 0) {
+ return;
+ }
+ AllGangs[GangNames[i]].territory += 0.0001;
+ AllGangs[GangNames[other]].territory -= 0.0001;
+ } else {
+ if (AllGangs[GangNames[i]].territory <= 0) {
+ return;
+ }
+ AllGangs[GangNames[i]].territory -= 0.0001;
+ AllGangs[GangNames[other]].territory += 0.0001;
+ }
+ }
+
+ gangStoredTerritoryCycles -= _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer;
+}
+
+/* faction - Name of corresponding faction
+ hacking - Boolean indicating whether its a hacking gang or not
+ */
+function Gang(facName, hacking=false) {
+ this.facName = facName;
+ this.members = []; //Array of GangMembers
+ this.wanted = 1;
+ this.respect = 1;
+ this.power = 0;
+
+ this.isHackingGang = hacking;
+
+ this.respectGainRate = 0;
+ this.wantedGainRate = 0;
+ this.moneyGainRate = 0;
+
+ //When processing gains, this stores the number of cycles until some
+ //limit is reached, and then calculates and applies the gains only at that limit
+ this.storedCycles = 0;
+}
+
+Gang.prototype.process = function(numCycles=1) {
+ this.processGains(numCycles);
+ this.processExperienceGains(numCycles);
+ processAllGangPowerGains(numCycles);
+ processAllGangTerritory(numCycles);
+}
+
+Gang.prototype.processGains = function(numCycles=1) {
+ this.storedCycles += numCycles;
+ if (isNaN(this.storedCycles)) {
+ console.log("ERROR: Gang's storedCylces is NaN");
+ this.storedCycles = 0;
+ }
+ if (this.storedCycles < 25) {return;} //Only process every 5 seconds at least
+
+ //Get gains per cycle
+ var moneyGains = 0, respectGains = 0, wantedLevelGains = 0;
+ for (var i = 0; i < this.members.length; ++i) {
+ respectGains += (this.members[i].calculateRespectGain());
+ wantedLevelGains += (this.members[i].calculateWantedLevelGain());
+ moneyGains += (this.members[i].calculateMoneyGain());
+ }
+ this.respectGainRate = respectGains;
+ this.wantedGainRate = wantedLevelGains;
+ this.moneyGainRate = moneyGains;
+
+ if (!isNaN(respectGains)) {
+ var gain = respectGains * this.storedCycles;
+ this.respect += (gain);
+ //Faction reputation gains is respect gain divided by some constant
+ var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][this.facName];
+ if (!(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Faction"])) {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev");
+ } else {
+ var favorMult = 1 + (fac.favor / 100);
+ fac.playerReputation += ((_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].faction_rep_mult * gain * favorMult) / _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangRespectToReputationRatio);
+ }
+
+ } else {
+ console.log("ERROR: respectGains is NaN");
+ }
+ if (!isNaN(wantedLevelGains)) {
+ if (this.wanted === 1 && wantedLevelGains < 0) {
+ //Do nothing
+ } else {
+ this.wanted += (wantedLevelGains * this.storedCycles);
+ if (this.wanted < 1) {this.wanted = 1;}
+ }
+ } else {
+ console.log("ERROR: wantedLevelGains is NaN");
+ }
+ if (!isNaN(moneyGains)) {
+ _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gainMoney(moneyGains * this.storedCycles);
+ } else {
+ console.log("ERROR: respectGains is NaN");
+ }
+
+ this.storedCycles = 0;
+}
+
+Gang.prototype.processExperienceGains = function(numCycles=1) {
+ for (var i = 0; i < this.members.length; ++i) {
+ this.members[i].gainExperience(numCycles);
+ this.members[i].updateSkillLevels();
+ }
+}
+
+//Calculates power GAIN, which is added onto the Gang's existing power
+Gang.prototype.calculatePower = function() {
+ var memberTotal = 0;
+ for (var i = 0; i < this.members.length; ++i) {
+ if (this.members[i].task instanceof GangMemberTask &&
+ this.members[i].task.name == "Territory Warfare") {
+ memberTotal += this.members[i].calculatePower();
+ }
+ }
+ return (0.0005 * memberTotal);
+}
+
+Gang.prototype.autoAssignMemberToTask = function(taskName) {
+ for (var i = 0; i < this.members.length; ++i) {
+ if (this.members[i].task.name === taskName) {
+ this.members[i].assignToTask(taskName);
+ return true;
+ }
+ }
+ return false;
+}
+
+Gang.prototype.autoUnassignMemberFromTask = function(taskName) {
+ for (var i = 0; i < this.members.length; ++i) {
+ if (this.members[i].task.name === taskName) {
+ this.members[i].unassignFromTask();
+ return true;
+ }
+ }
+ return false;
+}
+
+Gang.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("Gang", this);
+}
+
+Gang.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(Gang, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.Gang = Gang;
+
+/*** Gang Member object ***/
+function GangMember(name) {
+ this.name = name;
+ this.task = GangMemberTasks["Unassigned"]; //GangMemberTask object
+ this.city = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].city;
+
+ this.hack = 1;
+ this.str = 1;
+ this.def = 1;
+ this.dex = 1;
+ this.agi = 1;
+ this.cha = 1;
+
+ this.hack_exp = 0;
+ this.str_exp = 0;
+ this.def_exp = 0;
+ this.dex_exp = 0;
+ this.agi_exp = 0;
+ this.cha_exp = 0;
+
+ this.hack_mult = 1;
+ this.str_mult = 1;
+ this.def_mult = 1;
+ this.dex_mult = 1;
+ this.agi_mult = 1;
+ this.cha_mult = 1;
+
+ this.upgrades = []; //Names of upgrades
+}
+
+//Same formula for Player
+GangMember.prototype.calculateSkill = function(exp) {
+ return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);
+}
+
+GangMember.prototype.updateSkillLevels = function() {
+ this.hack = Math.floor(this.calculateSkill(this.hack_exp) * this.hack_mult);
+ this.str = Math.floor(this.calculateSkill(this.str_exp) * this.str_mult);
+ this.def = Math.floor(this.calculateSkill(this.def_exp) * this.def_mult);
+ this.dex = Math.floor(this.calculateSkill(this.dex_exp) * this.dex_mult);
+ this.agi = Math.floor(this.calculateSkill(this.agi_exp) * this.agi_mult);
+ this.cha = Math.floor(this.calculateSkill(this.cha_exp) * this.cha_mult);
+}
+
+GangMember.prototype.calculatePower = function() {
+ return (this.hack + this.str + this.def +
+ this.dex + this.agi + this.cha) / 100;
+}
+
+GangMember.prototype.assignToTask = function(taskName) {
+ if (GangMemberTasks.hasOwnProperty(taskName)) {
+ this.task = GangMemberTasks[taskName];
+ } else {
+ this.task = GangMemberTasks["Unassigned"];
+ }
+}
+
+GangMember.prototype.unassignFromTask = function() {
+ if (GangMemberTasks.hasOwnProperty("Unassigned")) {
+ this.task = GangMemberTasks["Unassigned"];
+ } else {
+ console.log("ERROR: Can't find Unassigned Gang member task");
+ this.task = null;
+ }
+}
+
+//Gains are per cycle
+GangMember.prototype.calculateRespectGain = function() {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask) || task.baseRespect === 0) {return 0;}
+ var statWeight = (task.hackWeight/100) * this.hack +
+ (task.strWeight/100) * this.str +
+ (task.defWeight/100) * this.def +
+ (task.dexWeight/100) * this.dex +
+ (task.agiWeight/100) * this.agi +
+ (task.chaWeight/100) * this.cha;
+ statWeight -= (3.5 * task.difficulty);
+ if (statWeight <= 0) {return 0;}
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
+ if (territoryMult <= 0) {return 0;}
+ var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
+ return 12 * task.baseRespect * statWeight * territoryMult * respectMult;
+}
+
+GangMember.prototype.calculateWantedLevelGain = function() {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask) || task.baseWanted === 0) {return 0;}
+ var statWeight = (task.hackWeight/100) * this.hack +
+ (task.strWeight/100) * this.str +
+ (task.defWeight/100) * this.def +
+ (task.dexWeight/100) * this.dex +
+ (task.agiWeight/100) * this.agi +
+ (task.chaWeight/100) * this.cha;
+ statWeight -= (3.5 * task.difficulty);
+ if (statWeight <= 0) {return 0;}
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
+ if (territoryMult <= 0) {return 0;}
+ if (task.baseWanted < 0) {
+ return task.baseWanted * statWeight * territoryMult;
+ } else {
+ return 6 * task.baseWanted / (3 * statWeight * territoryMult);
+ }
+}
+
+GangMember.prototype.calculateMoneyGain = function() {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask) || task.baseMoney === 0) {return 0;}
+ var statWeight = (task.hackWeight/100) * this.hack +
+ (task.strWeight/100) * this.str +
+ (task.defWeight/100) * this.def +
+ (task.dexWeight/100) * this.dex +
+ (task.agiWeight/100) * this.agi +
+ (task.chaWeight/100) * this.cha;
+ statWeight -= (3.5 * task.difficulty);
+ if (statWeight <= 0) {return 0;}
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
+ if (territoryMult <= 0) {return 0;}
+ var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
+ return 5 * task.baseMoney * statWeight * territoryMult * respectMult;
+}
+
+GangMember.prototype.gainExperience = function(numCycles=1) {
+ var task = this.task;
+ if (task == null || !(task instanceof GangMemberTask)) {return;}
+ this.hack_exp += (task.hackWeight / 1500) * task.difficulty * numCycles;
+ this.str_exp += (task.strWeight / 1500) * task.difficulty * numCycles;
+ this.def_exp += (task.defWeight / 1500) * task.difficulty * numCycles;
+ this.dex_exp += (task.dexWeight / 1500) * task.difficulty * numCycles;
+ this.agi_exp += (task.agiWeight / 1500) * task.difficulty * numCycles;
+ this.cha_exp += (task.chaWeight / 1500) * task.difficulty * numCycles;
+}
+
+GangMember.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMember", this);
+}
+
+GangMember.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMember, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMember = GangMember;
+
+//Defines tasks that Gang Members can work on
+function GangMemberTask(name="", desc="",
+ params={baseRespect: 0, baseWanted: 0, baseMoney: 0,
+ hackWeight: 0, strWeight: 0, defWeight: 0,
+ dexWeight: 0, agiWeight: 0, chaWeight: 0,
+ difficulty: 0}) {
+ this.name = name;
+ this.desc = desc;
+
+ this.baseRespect = params.baseRespect ? params.baseRespect : 0;
+ this.baseWanted = params.baseWanted ? params.baseWanted : 0;
+ this.baseMoney = params.baseMoney ? params.baseMoney : 0;
+
+ //Weights must add up to 100
+ this.hackWeight = params.hackWeight ? params.hackWeight : 0;
+ this.strWeight = params.strWeight ? params.strWeight : 0;
+ this.defWeight = params.defWeight ? params.defWeight : 0;
+ this.dexWeight = params.dexWeight ? params.dexWeight : 0;
+ this.agiWeight = params.agiWeight ? params.agiWeight : 0;
+ this.chaWeight = params.chaWeight ? params.chaWeight : 0;
+
+ //1 - 100
+ this.difficulty = params.difficulty ? params.difficulty : 1;
+}
+
+GangMemberTask.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberTask", this);
+}
+
+GangMemberTask.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberTask, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberTask = GangMemberTask;
+
+//TODO Human trafficking and an equivalent hacking crime
+let GangMemberTasks = {
+ "Unassigned" : new GangMemberTask(
+ "Unassigned",
+ "This gang member is currently idle"),
+ "Ransomware" : new GangMemberTask(
+ "Ransomware",
+ "Assign this gang member to create and distribute ransomware
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
+ hackWeight: 100, difficulty: 1}),
+ "Phishing" : new GangMemberTask(
+ "Phishing",
+ "Assign this gang member to attempt phishing scams and attacks
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 2.5,
+ hackWeight: 85, chaWeight: 15, difficulty: 3}),
+ "Identity Theft" : new GangMemberTask(
+ "Identity Theft",
+ "Assign this gang member to attempt identity theft
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.0001, baseWanted: 0.01, baseMoney: 6,
+ hackWeight: 80, chaWeight: 20, difficulty: 4}),
+ "DDoS Attacks" : new GangMemberTask(
+ "DDoS Attacks",
+ "Assign this gang member to carry out DDoS attacks
" +
+ "Increases respect - Increases wanted level",
+ {baseRespect: 0.0004, baseWanted: 0.05,
+ hackWeight: 100, difficulty: 7}),
+ "Plant Virus" : new GangMemberTask(
+ "Plant Virus",
+ "Assign this gang member to create and distribute malicious viruses
" +
+ "Increases respect - Increases wanted level",
+ {baseRespect: 0.0006, baseWanted: 0.05,
+ hackWeight: 100, difficulty: 10}),
+ "Fraud & Counterfeiting" : new GangMemberTask(
+ "Fraud & Counterfeiting",
+ "Assign this gang member to commit financial fraud and digital counterfeiting
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.0005, baseWanted: 0.1, baseMoney: 15,
+ hackWeight: 80, chaWeight: 20, difficulty: 17}),
+ "Money Laundering" : new GangMemberTask(
+ "Money Laundering",
+ "Assign this gang member to launder money
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.0006, baseWanted:0.2, baseMoney: 40,
+ hackWeight: 75, chaWeight: 25, difficulty: 20}),
+ "Cyberterrorism" : new GangMemberTask(
+ "Cyberterrorism",
+ "Assign this gang member to commit acts of cyberterrorism
" +
+ "Greatly increases respect - Greatly increases wanted level",
+ {baseRespect: 0.001, baseWanted: 0.5,
+ hackWeight: 80, chaWeight: 20, difficulty: 33}),
+ "Ethical Hacking" : new GangMemberTask(
+ "Ethical Hacking",
+ "Assign this gang member to be an ethical hacker for corporations
" +
+ "Earns money - Lowers wanted level",
+ {baseWanted: -0.001, baseMoney: 1,
+ hackWeight: 90, chaWeight: 10, difficulty: 1}),
+ "Mug People" : new GangMemberTask(
+ "Mug People",
+ "Assign this gang member to mug random people on the streets
" +
+ "Earns money - Slightly increases respect - Very slightly increases wanted level",
+ {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
+ strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 10, chaWeight: 15, difficulty: 1}),
+ "Deal Drugs" : new GangMemberTask(
+ "Deal Drugs",
+ "Assign this gang member to sell drugs.
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 4,
+ agiWeight: 20, dexWeight: 20, chaWeight: 60, difficulty: 3}),
+ "Run a Con" : new GangMemberTask(
+ "Run a Con",
+ "Assign this gang member to run cons
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.00015, baseWanted: 0.01, baseMoney: 10,
+ strWeight: 5, defWeight: 5, agiWeight: 25, dexWeight: 25, chaWeight: 40, difficulty: 10}),
+ "Armed Robbery" : new GangMemberTask(
+ "Armed Robbery",
+ "Assign this gang member to commit armed robbery on stores, banks and armored cars
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.00015, baseWanted: 0.05, baseMoney: 25,
+ hackWeight: 20, strWeight: 15, defWeight: 15, agiWeight: 10, dexWeight: 20, chaWeight: 20,
+ difficulty: 17}),
+ "Traffick Illegal Arms" : new GangMemberTask(
+ "Traffick Illegal Arms",
+ "Assign this gang member to traffick illegal arms
" +
+ "Earns money - Increases respect - Increases wanted level",
+ {baseRespect: 0.0003, baseWanted: 0.1, baseMoney: 40,
+ hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, chaWeight: 75,
+ difficulty: 25}),
+ "Threaten & Blackmail" : new GangMemberTask(
+ "Threaten & Blackmail",
+ "Assign this gang member to threaten and black mail high-profile targets
" +
+ "Earns money - Slightly increases respect - Slightly increases wanted level",
+ {baseRespect: 0.0002, baseWanted: 0.05, baseMoney: 15,
+ hackWeight: 25, strWeight: 25, dexWeight: 25, chaWeight: 25, difficulty: 28}),
+ "Terrorism" : new GangMemberTask(
+ "Terrorism",
+ "Assign this gang member to commit acts of terrorism
" +
+ "Greatly increases respect - Greatly increases wanted level",
+ {baseRespect: 0.001, baseWanted: 1,
+ hackWeight: 20, strWeight: 20, defWeight: 20,dexWeight: 20, chaWeight: 20,
+ difficulty: 33}),
+ "Vigilante Justice" : new GangMemberTask(
+ "Vigilante Justice",
+ "Assign this gang member to be a vigilante and protect the city from criminals
" +
+ "Decreases wanted level",
+ {baseWanted: -0.001,
+ hackWeight: 20, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight:20,
+ difficulty: 1}),
+ "Train Combat" : new GangMemberTask(
+ "Train Combat",
+ "Assign this gang member to increase their combat stats (str, def, dex, agi)",
+ {strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 25, difficulty: 5}),
+ "Train Hacking" : new GangMemberTask(
+ "Train Hacking",
+ "Assign this gang member to train their hacking skills",
+ {hackWeight: 100, difficulty: 8}),
+ "Territory Warfare" : new GangMemberTask(
+ "Territory Warfare",
+ "Assign this gang member to engage in territorial warfare with other gangs. " +
+ "Members assigned to this task will help increase your gang's territory " +
+ "and will defend your territory from being taken.",
+ {hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight: 20,
+ chaWeight: 5, difficulty: 3}),
+}
+
+
+function GangMemberUpgrade(name="", desc="", cost=0, type="w") {
+ this.name = name;
+ this.desc = desc;
+ this.cost = cost;
+ this.type = type; //w, a, v, r
+}
+
+//Passes in a GangMember object
+GangMemberUpgrade.prototype.apply = function(member) {
+ switch(this.name) {
+ case "Baseball Bat":
+ member.str_mult *= 1.05;
+ member.def_mult *= 1.05;
+ break;
+ case "Katana":
+ member.str_mult *= 1.1;
+ member.def_mult *= 1.1;
+ member.dex_mult *= 1.1;
+ break;
+ case "Glock 18C":
+ member.str_mult *= 1.15;
+ member.def_mult *= 1.15;
+ member.dex_mult *= 1.15;
+ member.agi_mult *= 1.15;
+ break;
+ case "P90C":
+ member.str_mult *= 1.2;
+ member.def_mult *= 1.2;
+ member.agi_mult *= 1.1;
+ break;
+ case "Steyr AUG":
+ member.str_mult *= 1.25;
+ member.def_mult *= 1.25;
+ break;
+ case "AK-47":
+ member.str_mult *= 1.5;
+ member.def_mult *= 1.5;
+ break;
+ case "M15A10 Assault Rifle":
+ member.str_mult *= 1.6;
+ member.def_mult *= 1.6;
+ break;
+ case "AWM Sniper Rifle":
+ member.str_mult *= 1.5;
+ member.dex_mult *= 1.5;
+ member.agi_mult *= 1.5;
+ break;
+ case "Bulletproof Vest":
+ member.def_mult *= 1.05;
+ break;
+ case "Full Body Armor":
+ member.def_mult *= 1.1;
+ break;
+ case "Liquid Body Armor":
+ member.def_mult *= 1.25;
+ member.agi_mult *= 1.25;
+ break;
+ case "Graphene Plating Armor":
+ member.def_mult *= 1.5;
+ break;
+ case "Ford Flex V20":
+ member.agi_mult *= 1.1;
+ member.cha_mult *= 1.1;
+ break;
+ case "ATX1070 Superbike":
+ member.agi_mult *= 1.15;
+ member.cha_mult *= 1.15;
+ break;
+ case "Mercedes-Benz S9001":
+ member.agi_mult *= 1.2;
+ member.cha_mult *= 1.2;
+ break;
+ case "White Ferrari":
+ member.agi_mult *= 1.25;
+ member.cha_mult *= 1.25;
+ break;
+ case "NUKE Rootkit":
+ member.hack_mult *= 1.1;
+ break;
+ case "Soulstealer Rootkit":
+ member.hack_mult *= 1.2;
+ break;
+ case "Demon Rootkit":
+ member.hack_mult *= 1.3;
+ break;
+ default:
+ console.log("ERROR: Could not find this upgrade: " + this.name);
+ break;
+ }
+}
+
+GangMemberUpgrade.prototype.toJSON = function() {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberUpgrade", this);
+}
+
+GangMemberUpgrade.fromJSON = function(value) {
+ return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberUpgrade, value.data);
+}
+
+_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberUpgrade = GangMemberUpgrade;
+
+let GangMemberUpgrades = {
+ "Baseball Bat" : new GangMemberUpgrade("Baseball Bat",
+ "Increases strength and defense by 5%", 1e6, "w"),
+ "Katana" : new GangMemberUpgrade("Katana",
+ "Increases strength, defense, and dexterity by 10%", 12e6, "w"),
+ "Glock 18C" : new GangMemberUpgrade("Glock 18C",
+ "Increases strength, defense, dexterity, and agility by 15%", 25e6, "w"),
+ "P90C" : new GangMemberUpgrade("P90C",
+ "Increases strength and defense by 20%. Increases agility by 10%", 50e6, "w"),
+ "Steyr AUG" : new GangMemberUpgrade("Steyr AUG",
+ "Increases strength and defense by 25%", 60e6, "w"),
+ "AK-47" : new GangMemberUpgrade("AK-47",
+ "Increases strength and defense by 50%", 100e6, "w"),
+ "M15A10 Assault Rifle" : new GangMemberUpgrade("M15A10 Assault Rifle",
+ "Increases strength and defense by 60%", 150e6, "w"),
+ "AWM Sniper Rifle" : new GangMemberUpgrade("AWM Sniper Rifle",
+ "Increases strength, dexterity, and agility by 50%", 225e6, "w"),
+ "Bulletproof Vest" : new GangMemberUpgrade("Bulletproof Vest",
+ "Increases defense by 5%", 2e6, "a"),
+ "Full Body Armor" : new GangMemberUpgrade("Full Body Armor",
+ "Increases defense by 10%", 5e6, "a"),
+ "Liquid Body Armor" : new GangMemberUpgrade("Liquid Body Armor",
+ "Increases defense and agility by 25%", 25e6, "a"),
+ "Graphene Plating Armor" : new GangMemberUpgrade("Graphene Plating Armor",
+ "Increases defense by 50%", 40e6, "a"),
+ "Ford Flex V20" : new GangMemberUpgrade("Ford Flex V20",
+ "Increases agility and charisma by 10%", 3e6, "v"),
+ "ATX1070 Superbike" : new GangMemberUpgrade("ATX1070 Superbike",
+ "Increases agility and charisma by 15%", 9e6, "v"),
+ "Mercedes-Benz S9001" : new GangMemberUpgrade("Mercedes-Benz S9001",
+ "Increases agility and charisma by 20%", 18e6, "v"),
+ "White Ferrari" : new GangMemberUpgrade("White Ferrari",
+ "Increases agility and charisma by 25%", 30e6, "v"),
+ "NUKE Rootkit" : new GangMemberUpgrade("NUKE Rootkit",
+ "Increases hacking by 10%", 5e6, "r"),
+ "Soulstealer Rootkit" : new GangMemberUpgrade("Soulstealer Rootkit",
+ "Increases hacking by 20%", 15e6, "r"),
+ "Demon Rootkit" : new GangMemberUpgrade("Demon Rootkit",
+ "Increases hacking by 30%", 50e6, "r"),
+}
+
+//Create a pop-up box that lets player purchase upgrades
+let gangMemberUpgradeBoxOpened = false;
+function createGangMemberUpgradeBox(initialFilter="") {
+ var boxId = "gang-member-upgrade-popup-box";
+ if (gangMemberUpgradeBoxOpened) {
+ //Already opened, refreshing
+ if (gangMemberUpgradeBoxElements == null || gangMemberUpgradeBox == null || gangMemberUpgradeBoxContent == null) {
+ console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null");
+ return;
+ }
+
+ for (var i = 1; i < gangMemberUpgradeBoxElements.length; ++i) {
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBoxElements[i]);
+ }
+ gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
+
+ var filter = gangMemberUpgradeBoxFilter.value.toString();
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
+ var newPanel = createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]);
+ gangMemberUpgradeBoxContent.appendChild(newPanel);
+ gangMemberUpgradeBoxElements.push(newPanel);
+ }
+ }
+ } else {
+ //New popup
+ gangMemberUpgradeBoxFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
+ type:"text", placeholder:"Filter gang members",
+ value:initialFilter,
+ onkeyup:()=>{
+ var filterValue = gangMemberUpgradeBoxFilter.value.toString();
+ createGangMemberUpgradeBox(filterValue);
+ }
+ });
+
+ gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
+
+ var filter = gangMemberUpgradeBoxFilter.value.toString();
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
+ gangMemberUpgradeBoxElements.push(createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]));
+ }
+ }
+
+ gangMemberUpgradeBox = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createPopup"])(boxId, gangMemberUpgradeBoxElements);
+ gangMemberUpgradeBoxContent = document.getElementById(boxId + "-content");
+ gangMemberUpgradeBoxOpened = true;
+ }
+}
+
+//Create upgrade panels for each individual Gang Member
+function createGangMemberUpgradePanel(memberObj) {
+ var container = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ border:"1px solid white",
+ });
+
+ var header = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("h1", {
+ innerText:memberObj.name + " (" + memberObj.task.name + ")"
+ });
+ container.appendChild(header);
+
+ var text = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("pre", {
+ fontSize:"14px", display: "inline-block", width:"20%",
+ innerText:
+ "Hack: " + memberObj.hack + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack_mult, 2) + ")\n" +
+ "Str: " + memberObj.str + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str_mult, 2) + ")\n" +
+ "Def: " + memberObj.def + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def_mult, 2) + ")\n" +
+ "Dex: " + memberObj.dex + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex_mult, 2) + ")\n" +
+ "Agi: " + memberObj.agi + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi_mult, 2) + ")\n" +
+ "Cha: " + memberObj.cha + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha_mult, 2) + ")\n",
+ });
+
+ //Already purchased upgrades
+ var ownedUpgradesElements = [];
+ for (var i = 0; i < memberObj.upgrades.length; ++i) {
+ var upg = GangMemberUpgrades[memberObj.upgrades[i]];
+ if (upg == null) {
+ console.log("ERR: Could not find this upgrade: " + memberObj.upgrades[i]);
+ continue;
+ }
+ var e = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ border:"1px solid white", innerText:memberObj.upgrades[i],
+ margin:"1px", padding:"1px", tooltip:upg.desc, fontSize:"12px",
+ });
+ ownedUpgradesElements.push(e);
+ }
+ var ownedUpgrades = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ display:"inline-block", marginLeft:"6px", width:"75%", innerText:"Purchased Upgrades:",
+ });
+ for (var i = 0; i < ownedUpgradesElements.length; ++i) {
+ ownedUpgrades.appendChild(ownedUpgradesElements[i]);
+ }
+ container.appendChild(text);
+ container.appendChild(ownedUpgrades);
+ container.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ //Upgrade buttons. Only show upgrades that can be afforded
+ var weaponUpgrades = [], armorUpgrades = [], vehicleUpgrades = [], rootkitUpgrades = [];
+ for (var upgName in GangMemberUpgrades) {
+ if (GangMemberUpgrades.hasOwnProperty(upgName)) {
+ var upg = GangMemberUpgrades[upgName];
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost) || memberObj.upgrades.includes(upgName)) {continue;}
+ switch (upg.type) {
+ case "w":
+ weaponUpgrades.push(upg);
+ break;
+ case "a":
+ armorUpgrades.push(upg);
+ break;
+ case "v":
+ vehicleUpgrades.push(upg);
+ break;
+ case "r":
+ rootkitUpgrades.push(upg);
+ break;
+ default:
+ console.log("ERROR: Invalid Gang Member Upgrade Type: " + upg.type);
+ }
+ }
+ }
+
+ var weaponDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var armorDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var vehicleDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var rootkitDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
+ var upgrades = [weaponUpgrades, armorUpgrades, vehicleUpgrades, rootkitUpgrades];
+ var divs = [weaponDiv, armorDiv, vehicleDiv, rootkitDiv];
+
+ for (var i = 0; i < upgrades.length; ++i) {
+ var upgradeArray = upgrades[i];
+ var div = divs[i];
+ for (var j = 0; j < upgradeArray.length; ++j) {
+ var upg = upgradeArray[j];
+ (function (upg, div, memberObj) {
+ div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ innerText:upg.name + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"),
+ class:"a-link-button", margin:"2px", padding:"2px", display:"block",
+ fontSize:"12px",
+ tooltip:upg.desc,
+ clickListener:()=>{
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost)) {return false;}
+ _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].loseMoney(upg.cost);
+ memberObj.upgrades.push(upg.name);
+ upg.apply(memberObj);
+ var initFilterValue = gangMemberUpgradeBoxFilter.value.toString();
+ createGangMemberUpgradeBox(initFilterValue);
+ return false;
+ }
+ }));
+ })(upg, div, memberObj);
+ }
+ }
+
+ container.appendChild(weaponDiv);
+ container.appendChild(armorDiv);
+ container.appendChild(vehicleDiv);
+ container.appendChild(rootkitDiv);
+ return container;
+}
+
+//Gang DOM elements
+let gangContentCreated = false,
+ gangContainer = null, managementButton = null, territoryButton = null;
+
+//Subpages
+let gangManagementSubpage = null, gangTerritorySubpage = null;
+
+//Gang Management Elements
+let gangDesc = null, gangInfo = null,
+ gangRecruitMemberButton = null, gangRecruitRequirementText = null,
+ gangExpandAllButton = null, gangCollapseAllButton, gangMemberFilter = null,
+ gangManageEquipmentButton = null,
+ gangMemberList = null;
+
+//Gang Equipment Upgrade Elements
+let gangMemberUpgradeBox = null, gangMemberUpgradeBoxContent = null,
+ gangMemberUpgradeBoxFilter = null, gangMemberUpgradeBoxElements = null;
+
+
+//Gang Territory Elements
+let gangTerritoryDescText = null, gangTerritoryInfoText = null;
+
+function displayGangContent() {
+ if (!gangContentCreated || gangContainer == null) {
+ gangContentCreated = true;
+
+ //Create gang container
+ gangContainer = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id:"gang-container", class:"generic-menupage-container",
+ });
+
+ //Get variables
+ var facName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName,
+ members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members,
+ wanted = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted,
+ respect = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect;
+
+ //Back button
+ gangContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block", innerText:"Back",
+ clickListener:()=>{
+ _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadFactionContent();
+ Object(_Faction_js__WEBPACK_IMPORTED_MODULE_2__["displayFactionContent"])(facName);
+ return false;
+ }
+ }));
+
+ //Buttons to switch between panels
+ managementButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ id:"gang-management-subpage-button", class:"a-link-button-inactive",
+ display:"inline-block", innerHTML: "Gang Management (1)",
+ clickListener:()=>{
+ gangManagementSubpage.style.display = "block";
+ gangTerritorySubpage.style.display = "none";
+ managementButton.classList.toggle("a-link-button-inactive");
+ managementButton.classList.toggle("a-link-button");
+ territoryButton.classList.toggle("a-link-button-inactive");
+ territoryButton.classList.toggle("a-link-button");
+ updateGangContent();
+ return false;
+ }
+ })
+ territoryButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ id:"gang-territory-subpage-button", class:"a-link-button",
+ display:"inline-block", innerHTML:"Gang Territory (2)",
+ clickListener:()=>{
+ gangManagementSubpage.style.display = "none";
+ gangTerritorySubpage.style.display = "block";
+ managementButton.classList.toggle("a-link-button-inactive");
+ managementButton.classList.toggle("a-link-button");
+ territoryButton.classList.toggle("a-link-button-inactive");
+ territoryButton.classList.toggle("a-link-button");
+ updateGangContent();
+ return false;
+ }
+ });
+ gangContainer.appendChild(managementButton);
+ gangContainer.appendChild(territoryButton);
+
+ //Subpage for managing gang members
+ gangManagementSubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ display:"block", id:"gang-management-subpage",
+ });
+
+ var lowerWantedTask = "";
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.isHackingGang) {
+ lowerWantedTask = "Ethical Hacking";
+ } else {
+ lowerWantedTask = "Vigilante Justice";
+ }
+ gangDesc = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {width:"70%",
+ innerHTML:
+ "This page is used to manage your gang members and get an overview of your " +
+ "gang's stats.
" +
+ "If a gang member is not earning much money or respect, the task that you " +
+ "have assigned to that member might be too difficult. Consider training that " +
+ "member's stats or choosing an easier task. The tasks closer to the " +
+ "top of the dropdown list are generally easier. Alternatively, the gang member's " +
+ "low production might be due to the fact that your wanted level is too high. " +
+ "Consider assigning a few members to the '" + lowerWantedTask + "' " +
+ "task to lower your wanted level.
" +
+ "Installing Augmentations does NOT reset your progress with your Gang. " +
+ "Furthermore, after installing Augmentations, you will " +
+ "automatically be a member of whatever Faction you created your gang with.
"
+ });
+ gangManagementSubpage.appendChild(gangDesc);
+
+ gangInfo = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-info", width:"70%"});
+ gangManagementSubpage.appendChild(gangInfo);
+
+ gangRecruitMemberButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ id:"gang-management-recruit-member-btn", class:"a-link-button-inactive",
+ innerHTML:"Recruit Gang Member", display:"inline-block", margin:"10px",
+ clickListener:()=>{
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetNoButton"])();
+ yesBtn.innerHTML = "Recruit Gang Member";
+ noBtn.innerHTML = "Cancel";
+ yesBtn.addEventListener("click", ()=>{
+ var name = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetInput"])();
+ if (name === "") {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You must enter a name for your Gang member!");
+ } else {
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ if (name == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name) {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You already have a gang member with this name!");
+ return false;
+ }
+ }
+ var member = new GangMember(name);
+ _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.push(member);
+ createGangMemberDisplayElement(member);
+ updateGangContent();
+ }
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
+ });
+ noBtn.addEventListener("click", ()=>{
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
+ });
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxCreate"])("Please enter a name for your new Gang member:");
+ return false;
+ }
+ });
+ gangManagementSubpage.appendChild(gangRecruitMemberButton);
+
+ //Text for how much reputation is required for recruiting next memberList
+ gangRecruitRequirementText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {color:"red", id:"gang-recruit-requirement-text"});
+ gangManagementSubpage.appendChild(gangRecruitRequirementText);
+
+ //Gang Member List management buttons (Expand/Collapse All, select a single member)
+ gangManagementSubpage.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+ gangExpandAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block",
+ innerHTML:"Expand All",
+ clickListener:()=>{
+ var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
+ for (var i = 0; i < allHeaders.length; ++i) {
+ var hdr = allHeaders[i];
+ if (!hdr.classList.contains("active")) {
+ hdr.click();
+ }
+ }
+ return false;
+ }
+ });
+ gangCollapseAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block",
+ innerHTML:"Collapse All",
+ clickListener:()=>{
+ var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
+ for (var i = 0; i < allHeaders.length; ++i) {
+ var hdr = allHeaders[i];
+ if (hdr.classList.contains("active")) {
+ hdr.click();
+ }
+ }
+ return false;
+ }
+ });
+ gangMemberFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
+ type:"text", placeholder:"Filter gang members", margin:"5px", padding:"5px",
+ onkeyup:()=>{
+ displayGangMemberList();
+ }
+ });
+ gangManageEquipmentButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
+ class:"a-link-button", display:"inline-block",
+ innerHTML:"Manage Equipment",
+ clickListener:()=>{
+ createGangMemberUpgradeBox();
+ }
+ });
+ gangManagementSubpage.appendChild(gangExpandAllButton);
+ gangManagementSubpage.appendChild(gangCollapseAllButton);
+ gangManagementSubpage.appendChild(gangMemberFilter);
+ gangManagementSubpage.appendChild(gangManageEquipmentButton);
+
+ //Gang Member list
+ gangMemberList = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("ul", {id:"gang-member-list"});
+ displayGangMemberList();
+ gangManagementSubpage.appendChild(gangMemberList);
+
+ //Subpage for seeing gang territory information
+ gangTerritorySubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id:"gang-territory-subpage", display:"none"
+ });
+
+ //Info text for territory page
+ gangTerritoryDescText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {
+ width:"70%",
+ innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, " +
+ "which represents how much of the total territory you control.
" +
+ "Territory gain and loss is processed automatically and is updated every ~30 seconds. Your chances " +
+ "to gain and lose territory depend on your Gang's power, which is listed in the display below. " +
+ "Your gang's power is determined by the stats of all Gang members you have assigned to the " +
+ "'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to " +
+ "your Gang's power.
" +
+ "The amount of territory you have affects all aspects of your Gang members' production, including " +
+ "money, respect, and wanted level. It is very beneficial to have high territory control.
"
+ });
+ gangTerritorySubpage.appendChild(gangTerritoryDescText);
+
+ var territoryBorder = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("fieldset", {width:"50%", display:"inline-block"});
+
+ gangTerritoryInfoText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-territory-info"});
+
+ territoryBorder.appendChild(gangTerritoryInfoText);
+ gangTerritorySubpage.appendChild(territoryBorder);
+
+ gangContainer.appendChild(gangTerritorySubpage);
+ gangContainer.appendChild(gangManagementSubpage);
+ document.getElementById("entire-game-container").appendChild(gangContainer);
+ }
+ gangContainer.style.display = "block";
+ updateGangContent();
+}
+
+function displayGangMemberList() {
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeChildrenFromElement"])(gangMemberList);
+ var members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members;
+ var filter = gangMemberFilter.value.toString();
+ for (var i = 0; i < members.length; ++i) {
+ if (members[i].name.indexOf(filter) > -1 || members[i].task.name.indexOf(filter) > -1) {
+ createGangMemberDisplayElement(members[i]);
+ }
+ }
+ //setGangMemberClickHandlers(); //Set buttons to toggle the gang member info panels
+}
+
+function updateGangContent() {
+ if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+
+ if(gangTerritorySubpage.style.display === "block") {
+ //Update territory information
+ gangTerritoryInfoText.innerHTML = "";
+ for (var gangname in AllGangs) {
+ if (AllGangs.hasOwnProperty(gangname)) {
+ var gangTerritoryInfo = AllGangs[gangname];
+ let territory = gangTerritoryInfo.territory*100;
+
+ //Fix some rounding issues graphically
+ let displayNumber;
+ if (territory <= 0) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(0, 2);
+ } else if (territory >= 100) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(100, 2);
+ } else {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(territory, 2);
+ }
+
+ if (gangname == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName) {
+ gangTerritoryInfoText.innerHTML += ("" + gangname + "
(Power: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " +
+ displayNumber + "%
");
+ } else {
+ gangTerritoryInfoText.innerHTML += (gangname + "
(Power: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " +
+ displayNumber + "%
");
+ }
+ }
+ }
+ } else {
+ //Update information for overall gang
+ if (gangInfo instanceof Element) {
+ var faction = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName];
+ var rep;
+ if (!(faction instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Faction"])) {
+ rep = "ERROR";
+ } else {
+ rep = faction.playerReputation;
+ }
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeChildrenFromElement"])(gangInfo);
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Respect
+ display:"inline-block",
+ innerText:"Respect: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect, 6) +
+ " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respectGainRate, 6) + " / sec)",
+ tooltip:"Represents the amount of respect your gang has from other gangs and criminal " +
+ "organizations. Your respect affects the amount of money " +
+ "your gang members will earn, and also determines how much " +
+ "reputation you are earning with your gang's corresponding Faction."
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Wanted level
+ display:"inline-block",
+ innerText:"Wanted Level: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted, 6) +
+ " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wantedGainRate, 6) + " / sec)",
+ tooltip:"Represents how much the gang is wanted by law enforcement. The higher " +
+ "your gang's wanted level, the harder it will be for your gang members " +
+ "to make money and earn respect. Note that the minimum wanted level is 1."
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ var wantedPenalty = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
+ wantedPenalty = (1 - wantedPenalty) * 100;
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Wanted Level multiplier
+ display:"inline-block",
+ innerText:"Wanted Level Penalty: -" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(wantedPenalty, 2) + "%",
+ tooltip:"Penalty for respect and money gain rates due to Wanted Level"
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Money gain rate
+ display:"inline-block",
+ innerText:"Money gain rate: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.moneyGainRate, 2) +
+ " / sec",
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ //Fix some rounding issues graphically
+ var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory * 100;
+ let displayNumber;
+ if (territoryMult <= 0) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(0, 2);
+ } else if (territoryMult >= 100) {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(100, 2);
+ } else {
+ displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(territoryMult, 2);
+ }
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Territory multiplier
+ display:"inline-block",
+ innerText:"Territory: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(displayNumber, 3) + "%",
+ tooltip:"The percentage of total territory your Gang controls"
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Faction reputation
+ display:"inline-block",
+ innerText:"Faction reputation: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(rep, 3)
+ }));
+ gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
+ } else {
+ console.log("ERROR: gang-info DOM element DNE");
+ }
+
+ //Toggle the 'Recruit member button' if valid
+ var numMembers = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length;
+ var repCost = 0;
+ if (numMembers > 0) {
+ var repCost = Math.pow(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangRecruitCostMultiplier, numMembers);
+ }
+ var faction = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName];
+ if (faction == null) {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("Could not find your gang's faction. This is probably a bug please report to dev");
+ return;
+ }
+ var btn = gangRecruitMemberButton;
+ if (numMembers >= _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].MaximumGangMembers) {
+ btn.className = "a-link-button-inactive";
+ gangRecruitRequirementText.style.display = "block";
+ gangRecruitRequirementText.innerHTML =
+ "You have reached the maximum amount of gang members";
+ } else if (faction.playerReputation >= repCost) {
+ btn.className = "a-link-button";
+ gangRecruitRequirementText.style.display = "none";
+ } else {
+ btn.className = "a-link-button-inactive";
+ gangRecruitRequirementText.style.display = "block";
+ gangRecruitRequirementText.innerHTML =
+ Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(repCost, 2) + " Faction reputation needed to recruit next member";
+ }
+
+ //Update information for each gang member
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
+ updateGangMemberDisplayElement(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]);
+ }
+ }
+}
+
+//Takes in a GangMember object
+function createGangMemberDisplayElement(memberObj) {
+ if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ var name = memberObj.name;
+
+ var accordion = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createAccordionElement"])({
+ id:name + "gang-member",
+ hdrText:name,
+ });
+ var li = accordion[0];
+ var hdr = accordion[1];
+ var gangMemberDiv = accordion[2];
+
+ //Gang member content divided into 3 panels:
+ //Stats Panel
+ var statsDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id: name + "gang-member-stats", class: "gang-member-info-div",
+ width:"30%", display:"inline"
+ });
+ var statsP = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {
+ id:name + "gang-member-stats-text", display:"inline"
+ });
+
+ statsDiv.appendChild(statsP);
+ //statsDiv.appendChild(upgradeButton);
+
+ //Panel for Selecting task and show respect/wanted gain
+ var taskDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id: name + "gang-member-task", class:"gang-member-info-div",
+ width:"30%", display:"inline"
+ });
+ var taskSelector = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("select", {
+ color:"white", backgroundColor:"black",
+ id:name + "gang-member-task-selector"
+ });
+
+ var tasks = null;
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.isHackingGang) {
+ tasks = ["---", "Ransomware", "Phishing", "Identity Theft", "DDoS Attacks",
+ "Plant Virus", "Fraud & Counterfeiting","Money Laundering",
+ "Cyberterrorism", "Ethical Hacking", "Train Combat",
+ "Train Hacking", "Territory Warfare"];
+ } else {
+ tasks = ["---", "Mug People", "Deal Drugs", "Run a Con", "Armed Robbery",
+ "Traffick Illegal Arms", "Threaten & Blackmail",
+ "Terrorism", "Vigilante Justice", "Train Combat",
+ "Train Hacking", "Territory Warfare"];
+ }
+ for (var i = 0; i < tasks.length; ++i) {
+ var option = document.createElement("option");
+ option.text = tasks[i];
+ taskSelector.add(option);
+ }
+ taskSelector.addEventListener("change", function() {
+ var task = taskSelector.options[taskSelector.selectedIndex].text;
+ memberObj.assignToTask(task);
+ setGangMemberTaskDescription(memberObj, task);
+ updateGangContent();
+ });
+ //Set initial task in selector element
+ if (memberObj.task instanceof GangMemberTask) {
+ var taskName = memberObj.task.name;
+ var taskIndex = 0;
+ for (let i = 0; i < tasks.length; ++i) {
+ if (taskName == tasks[i]) {
+ taskIndex = i;
+ break;
+ }
+ }
+ taskSelector.selectedIndex = taskIndex;
+ }
+
+ var gainInfo = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:name + "gang-member-gain-info"});
+ taskDiv.appendChild(taskSelector);
+ taskDiv.appendChild(gainInfo);
+
+ //Panel for Description of task
+ var taskDescDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
+ id:name + "gang-member-task-desc", class:"gang-member-info-div",
+ width:"30%", display:"inline"
+ });
+
+ var taskDescP = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id: name + "gang-member-task-description", display:"inline"});
+ taskDescDiv.appendChild(taskDescP);
+
+ statsDiv.style.width = "30%";
+ taskDiv.style.width = "30%";
+ taskDescDiv.style.width = "30%";
+ statsDiv.style.display = "inline";
+ taskDiv.style.display = "inline";
+ taskDescDiv.style.display = "inline";
+ gangMemberDiv.appendChild(statsDiv);
+ gangMemberDiv.appendChild(taskDiv);
+ gangMemberDiv.appendChild(taskDescDiv);
+
+ gangMemberList.appendChild(li);
+ setGangMemberTaskDescription(memberObj, taskName); //Initialize description
+ updateGangMemberDisplayElement(memberObj);
+}
+
+function updateGangMemberDisplayElement(memberObj) {
+ if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
+ var name = memberObj.name;
+
+ //TODO Add upgrade information
+ var stats = document.getElementById(name + "gang-member-stats-text");
+ if (stats) {
+ stats.innerHTML =
+ "Hacking: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.hack_exp).format('(0.00a)') + " exp)
" +
+ "Strength: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.str_exp).format('(0.00a)') + " exp)
" +
+ "Defense: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.def_exp).format('(0.00a)') + " exp)
" +
+ "Dexterity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.dex_exp).format('(0.00a)') + " exp)
" +
+ "Agility: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.agi_exp).format('(0.00a)') + " exp)
" +
+ "Charisma: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.cha_exp).format('(0.00a)') + " exp)
";
+ }
+
+ var gainInfo = document.getElementById(name + "gang-member-gain-info");
+ if (gainInfo) {
+ gainInfo.innerHTML =
+ "Money: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateMoneyGain(), 2) + " / sec
" +
+ "Respect: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateRespectGain(), 6) + " / sec
" +
+ "Wanted Level: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateWantedLevelGain(), 6) + " / sec
";
+ }
+}
+
+function setGangMemberTaskDescription(memberObj, taskName) {
+ var name = memberObj.name;
+ var taskDesc = document.getElementById(name + "gang-member-task-description");
+ if (taskDesc) {
+ var task = GangMemberTasks[taskName];
+ if (task == null) {return;}
+ var desc = task.desc;
+ taskDesc.innerHTML = desc;
+ }
+}
+
+function deleteGangDisplayContent() {
+ if (gangContainer != null) {Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElementById"])(gangContainer.id);}
+
+ gangContentCreated = false;
+ gangContainer = null;
+ managementButton = null;
+ territoryButton = null;
+
+ //Subpages
+ gangManagementSubpage = null;
+ gangTerritorySubpage = null;
+
+ //Gang Management Elements
+ gangDesc = null;
+ gangInfo = null;
+ gangRecruitMemberButton = null;
+ gangRecruitRequirementText = null;
+ gangExpandAllButton = null;
+ gangCollapseAllButton = null;
+ gangMemberFilter = null;
+ gangManageEquipmentButton = null;
+ gangMemberList = null;
+
+ //Gang Equipment Upgrade Elements
+ gangMemberUpgradeBox = null;
+ gangMemberUpgradeBoxContent = null;
+ gangMemberUpgradeBoxFilter = null;
+ gangMemberUpgradeBoxElements = null;
+}
+
+
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
+
+/***/ }),
+/* 36 */
/*!************************!*\
!*** ./utils/acorn.js ***!
\************************/
@@ -39834,1495 +41711,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
})));
-/***/ }),
-/* 36 */
-/*!*********************!*\
- !*** ./src/Gang.js ***!
- \*********************/
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Gang", function() { return Gang; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayGangContent", function() { return displayGangContent; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateGangContent", function() { return updateGangContent; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadAllGangs", function() { return loadAllGangs; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AllGangs", function() { return AllGangs; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetGangs", function() { return resetGangs; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteGangDisplayContent", function() { return deleteGangDisplayContent; });
-/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants.js */ 3);
-/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine.js */ 5);
-/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Faction.js */ 11);
-/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
-/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__);
-/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
-/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
-
-
-
-
-
-
-
-
-
-
-
-/* Gang.js */
-//Switch between territory and management screen with 1 and 2
-$(document).keydown(function(event) {
- if (_engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].currentPage == _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].Page.Gang && !_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoBoxOpen"]) {
- if (gangMemberFilter != null && gangMemberFilter === document.activeElement) {return;}
- if (event.keyCode === 49) {
- if(gangTerritorySubpage.style.display === "block") {
- managementButton.click();
- }
- } else if (event.keyCode === 50) {
- if (gangManagementSubpage.style.display === "block") {
- territoryButton.click();
- }
- }
- }
-});
-
-//Delete upgrade box when clicking outside
-$(document).mousedown(function(event) {
- var boxId = "gang-member-upgrade-popup-box";
- var contentId = "gang-member-upgrade-popup-box-content";
- if (gangMemberUpgradeBoxOpened) {
- if ( $(event.target).closest("#" + contentId).get(0) == null ) {
- //Delete the box
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBox);
- gangMemberUpgradeBox = null;
- gangMemberUpgradeBoxContent = null;
- gangMemberUpgradeBoxOpened = false;
- gangMemberUpgradeBoxElements = null;
- }
- }
-});
-
-let GangNames = ["Slum Snakes", "Tetrads", "The Syndicate", "The Dark Army", "Speakers for the Dead",
- "NiteSec", "The Black Hand"];
-let AllGangs = {
- "Slum Snakes" : {
- power: 1,
- territory: 1/7,
- },
- "Tetrads" : {
- power: 1,
- territory: 1/7,
- },
- "The Syndicate" : {
- power: 1,
- territory: 1/7,
- },
- "The Dark Army" : {
- power: 1,
- territory: 1/7,
- },
- "Speakers for the Dead" : {
- power: 1,
- territory: 1/7,
- },
- "NiteSec" : {
- power: 1,
- territory: 1/7,
- },
- "The Black Hand" : {
- power: 1,
- territory: 1/7,
- },
-}
-
-function resetGangs() {
- AllGangs = {
- "Slum Snakes" : {
- power: 1,
- territory: 1/7,
- },
- "Tetrads" : {
- power: 1,
- territory: 1/7,
- },
- "The Syndicate" : {
- power: 1,
- territory: 1/7,
- },
- "The Dark Army" : {
- power: 1,
- territory: 1/7,
- },
- "Speakers for the Dead" : {
- power: 1,
- territory: 1/7,
- },
- "NiteSec" : {
- power: 1,
- territory: 1/7,
- },
- "The Black Hand" : {
- power: 1,
- territory: 1/7,
- },
- }
-}
-
-function loadAllGangs(saveString) {
- AllGangs = JSON.parse(saveString, _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"]);
-}
-
-//Power is an estimate of a gang's ability to gain/defend territory
-let gangStoredPowerCycles = 0;
-function processAllGangPowerGains(numCycles=1) {
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
- gangStoredPowerCycles += numCycles;
- if (gangStoredPowerCycles < 150) {return;}
- var playerGangName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName;
- for (var name in AllGangs) {
- if (AllGangs.hasOwnProperty(name)) {
- if (name == playerGangName) {
- AllGangs[name].power += _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.calculatePower();
- } else {
- var gain = Math.random() * 0.02; //TODO Adjust as necessary
- AllGangs[name].power += (gain);
- }
- }
- }
-
- gangStoredPowerCycles -= 150;
-}
-
-let gangStoredTerritoryCycles = 0;
-function processAllGangTerritory(numCycles=1) {
- if (!_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
- gangStoredTerritoryCycles += numCycles;
- if (gangStoredTerritoryCycles < _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer) {return;}
-
- for (var i = 0; i < GangNames.length; ++i) {
- var other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
- while(other == i) {
- other = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["getRandomInt"])(0, GangNames.length-1);
- }
- var thisPwr = AllGangs[GangNames[i]].power;
- var otherPwr = AllGangs[GangNames[other]].power;
- var thisChance = thisPwr / (thisPwr + otherPwr);
-
- if (Math.random() < thisChance) {
- if (AllGangs[GangNames[other]].territory <= 0) {
- return;
- }
- AllGangs[GangNames[i]].territory += 0.0001;
- AllGangs[GangNames[other]].territory -= 0.0001;
- } else {
- if (AllGangs[GangNames[i]].territory <= 0) {
- return;
- }
- AllGangs[GangNames[i]].territory -= 0.0001;
- AllGangs[GangNames[other]].territory += 0.0001;
- }
- }
-
- gangStoredTerritoryCycles -= _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangTerritoryUpdateTimer;
-}
-
-/* faction - Name of corresponding faction
- hacking - Boolean indicating whether its a hacking gang or not
- */
-function Gang(facName, hacking=false) {
- this.facName = facName;
- this.members = []; //Array of GangMembers
- this.wanted = 1;
- this.respect = 1;
- this.power = 0;
-
- this.isHackingGang = hacking;
-
- this.respectGainRate = 0;
- this.wantedGainRate = 0;
- this.moneyGainRate = 0;
-
- //When processing gains, this stores the number of cycles until some
- //limit is reached, and then calculates and applies the gains only at that limit
- this.storedCycles = 0;
-}
-
-Gang.prototype.process = function(numCycles=1) {
- this.processGains(numCycles);
- this.processExperienceGains(numCycles);
- processAllGangPowerGains(numCycles);
- processAllGangTerritory(numCycles);
-}
-
-Gang.prototype.processGains = function(numCycles=1) {
- this.storedCycles += numCycles;
- if (isNaN(this.storedCycles)) {
- console.log("ERROR: Gang's storedCylces is NaN");
- this.storedCycles = 0;
- }
- if (this.storedCycles < 25) {return;} //Only process every 5 seconds at least
-
- //Get gains per cycle
- var moneyGains = 0, respectGains = 0, wantedLevelGains = 0;
- for (var i = 0; i < this.members.length; ++i) {
- respectGains += (this.members[i].calculateRespectGain());
- wantedLevelGains += (this.members[i].calculateWantedLevelGain());
- moneyGains += (this.members[i].calculateMoneyGain());
- }
- this.respectGainRate = respectGains;
- this.wantedGainRate = wantedLevelGains;
- this.moneyGainRate = moneyGains;
-
- if (!isNaN(respectGains)) {
- var gain = respectGains * this.storedCycles;
- this.respect += (gain);
- //Faction reputation gains is respect gain divided by some constant
- var fac = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][this.facName];
- if (!(fac instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Faction"])) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev");
- } else {
- var favorMult = 1 + (fac.favor / 100);
- fac.playerReputation += ((_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].faction_rep_mult * gain * favorMult) / _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangRespectToReputationRatio);
- }
-
- } else {
- console.log("ERROR: respectGains is NaN");
- }
- if (!isNaN(wantedLevelGains)) {
- if (this.wanted === 1 && wantedLevelGains < 0) {
- //Do nothing
- } else {
- this.wanted += (wantedLevelGains * this.storedCycles);
- if (this.wanted < 1) {this.wanted = 1;}
- }
- } else {
- console.log("ERROR: wantedLevelGains is NaN");
- }
- if (!isNaN(moneyGains)) {
- _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gainMoney(moneyGains * this.storedCycles);
- } else {
- console.log("ERROR: respectGains is NaN");
- }
-
- this.storedCycles = 0;
-}
-
-Gang.prototype.processExperienceGains = function(numCycles=1) {
- for (var i = 0; i < this.members.length; ++i) {
- this.members[i].gainExperience(numCycles);
- this.members[i].updateSkillLevels();
- }
-}
-
-//Calculates power GAIN, which is added onto the Gang's existing power
-Gang.prototype.calculatePower = function() {
- var memberTotal = 0;
- for (var i = 0; i < this.members.length; ++i) {
- if (this.members[i].task instanceof GangMemberTask &&
- this.members[i].task.name == "Territory Warfare") {
- memberTotal += this.members[i].calculatePower();
- }
- }
- return (0.0005 * memberTotal);
-}
-
-Gang.prototype.autoAssignMemberToTask = function(taskName) {
- for (var i = 0; i < this.members.length; ++i) {
- if (this.members[i].task.name === taskName) {
- this.members[i].assignToTask(taskName);
- return true;
- }
- }
- return false;
-}
-
-Gang.prototype.autoUnassignMemberFromTask = function(taskName) {
- for (var i = 0; i < this.members.length; ++i) {
- if (this.members[i].task.name === taskName) {
- this.members[i].unassignFromTask();
- return true;
- }
- }
- return false;
-}
-
-Gang.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("Gang", this);
-}
-
-Gang.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(Gang, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.Gang = Gang;
-
-/*** Gang Member object ***/
-function GangMember(name) {
- this.name = name;
- this.task = GangMemberTasks["Unassigned"]; //GangMemberTask object
- this.city = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].city;
-
- this.hack = 1;
- this.str = 1;
- this.def = 1;
- this.dex = 1;
- this.agi = 1;
- this.cha = 1;
-
- this.hack_exp = 0;
- this.str_exp = 0;
- this.def_exp = 0;
- this.dex_exp = 0;
- this.agi_exp = 0;
- this.cha_exp = 0;
-
- this.hack_mult = 1;
- this.str_mult = 1;
- this.def_mult = 1;
- this.dex_mult = 1;
- this.agi_mult = 1;
- this.cha_mult = 1;
-
- this.upgrades = []; //Names of upgrades
-}
-
-//Same formula for Player
-GangMember.prototype.calculateSkill = function(exp) {
- return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);
-}
-
-GangMember.prototype.updateSkillLevels = function() {
- this.hack = Math.floor(this.calculateSkill(this.hack_exp) * this.hack_mult);
- this.str = Math.floor(this.calculateSkill(this.str_exp) * this.str_mult);
- this.def = Math.floor(this.calculateSkill(this.def_exp) * this.def_mult);
- this.dex = Math.floor(this.calculateSkill(this.dex_exp) * this.dex_mult);
- this.agi = Math.floor(this.calculateSkill(this.agi_exp) * this.agi_mult);
- this.cha = Math.floor(this.calculateSkill(this.cha_exp) * this.cha_mult);
-}
-
-GangMember.prototype.calculatePower = function() {
- return (this.hack + this.str + this.def +
- this.dex + this.agi + this.cha) / 100;
-}
-
-GangMember.prototype.assignToTask = function(taskName) {
- if (GangMemberTasks.hasOwnProperty(taskName)) {
- this.task = GangMemberTasks[taskName];
- } else {
- this.task = GangMemberTasks["Unassigned"];
- }
-}
-
-GangMember.prototype.unassignFromTask = function() {
- if (GangMemberTasks.hasOwnProperty("Unassigned")) {
- this.task = GangMemberTasks["Unassigned"];
- } else {
- console.log("ERROR: Can't find Unassigned Gang member task");
- this.task = null;
- }
-}
-
-//Gains are per cycle
-GangMember.prototype.calculateRespectGain = function() {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask) || task.baseRespect === 0) {return 0;}
- var statWeight = (task.hackWeight/100) * this.hack +
- (task.strWeight/100) * this.str +
- (task.defWeight/100) * this.def +
- (task.dexWeight/100) * this.dex +
- (task.agiWeight/100) * this.agi +
- (task.chaWeight/100) * this.cha;
- statWeight -= (3.5 * task.difficulty);
- if (statWeight <= 0) {return 0;}
- var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
- if (territoryMult <= 0) {return 0;}
- var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
- return 12 * task.baseRespect * statWeight * territoryMult * respectMult;
-}
-
-GangMember.prototype.calculateWantedLevelGain = function() {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask) || task.baseWanted === 0) {return 0;}
- var statWeight = (task.hackWeight/100) * this.hack +
- (task.strWeight/100) * this.str +
- (task.defWeight/100) * this.def +
- (task.dexWeight/100) * this.dex +
- (task.agiWeight/100) * this.agi +
- (task.chaWeight/100) * this.cha;
- statWeight -= (3.5 * task.difficulty);
- if (statWeight <= 0) {return 0;}
- var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
- if (territoryMult <= 0) {return 0;}
- if (task.baseWanted < 0) {
- return task.baseWanted * statWeight * territoryMult;
- } else {
- return 6 * task.baseWanted / (3 * statWeight * territoryMult);
- }
-}
-
-GangMember.prototype.calculateMoneyGain = function() {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask) || task.baseMoney === 0) {return 0;}
- var statWeight = (task.hackWeight/100) * this.hack +
- (task.strWeight/100) * this.str +
- (task.defWeight/100) * this.def +
- (task.dexWeight/100) * this.dex +
- (task.agiWeight/100) * this.agi +
- (task.chaWeight/100) * this.cha;
- statWeight -= (3.5 * task.difficulty);
- if (statWeight <= 0) {return 0;}
- var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory;
- if (territoryMult <= 0) {return 0;}
- var respectMult = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
- return 5 * task.baseMoney * statWeight * territoryMult * respectMult;
-}
-
-GangMember.prototype.gainExperience = function(numCycles=1) {
- var task = this.task;
- if (task == null || !(task instanceof GangMemberTask)) {return;}
- this.hack_exp += (task.hackWeight / 1500) * task.difficulty * numCycles;
- this.str_exp += (task.strWeight / 1500) * task.difficulty * numCycles;
- this.def_exp += (task.defWeight / 1500) * task.difficulty * numCycles;
- this.dex_exp += (task.dexWeight / 1500) * task.difficulty * numCycles;
- this.agi_exp += (task.agiWeight / 1500) * task.difficulty * numCycles;
- this.cha_exp += (task.chaWeight / 1500) * task.difficulty * numCycles;
-}
-
-GangMember.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMember", this);
-}
-
-GangMember.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMember, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMember = GangMember;
-
-//Defines tasks that Gang Members can work on
-function GangMemberTask(name="", desc="",
- params={baseRespect: 0, baseWanted: 0, baseMoney: 0,
- hackWeight: 0, strWeight: 0, defWeight: 0,
- dexWeight: 0, agiWeight: 0, chaWeight: 0,
- difficulty: 0}) {
- this.name = name;
- this.desc = desc;
-
- this.baseRespect = params.baseRespect ? params.baseRespect : 0;
- this.baseWanted = params.baseWanted ? params.baseWanted : 0;
- this.baseMoney = params.baseMoney ? params.baseMoney : 0;
-
- //Weights must add up to 100
- this.hackWeight = params.hackWeight ? params.hackWeight : 0;
- this.strWeight = params.strWeight ? params.strWeight : 0;
- this.defWeight = params.defWeight ? params.defWeight : 0;
- this.dexWeight = params.dexWeight ? params.dexWeight : 0;
- this.agiWeight = params.agiWeight ? params.agiWeight : 0;
- this.chaWeight = params.chaWeight ? params.chaWeight : 0;
-
- //1 - 100
- this.difficulty = params.difficulty ? params.difficulty : 1;
-}
-
-GangMemberTask.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberTask", this);
-}
-
-GangMemberTask.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberTask, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberTask = GangMemberTask;
-
-//TODO Human trafficking and an equivalent hacking crime
-let GangMemberTasks = {
- "Unassigned" : new GangMemberTask(
- "Unassigned",
- "This gang member is currently idle"),
- "Ransomware" : new GangMemberTask(
- "Ransomware",
- "Assign this gang member to create and distribute ransomware
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
- hackWeight: 100, difficulty: 1}),
- "Phishing" : new GangMemberTask(
- "Phishing",
- "Assign this gang member to attempt phishing scams and attacks
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 2.5,
- hackWeight: 85, chaWeight: 15, difficulty: 3}),
- "Identity Theft" : new GangMemberTask(
- "Identity Theft",
- "Assign this gang member to attempt identity theft
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.0001, baseWanted: 0.01, baseMoney: 6,
- hackWeight: 80, chaWeight: 20, difficulty: 4}),
- "DDoS Attacks" : new GangMemberTask(
- "DDoS Attacks",
- "Assign this gang member to carry out DDoS attacks
" +
- "Increases respect - Increases wanted level",
- {baseRespect: 0.0004, baseWanted: 0.05,
- hackWeight: 100, difficulty: 7}),
- "Plant Virus" : new GangMemberTask(
- "Plant Virus",
- "Assign this gang member to create and distribute malicious viruses
" +
- "Increases respect - Increases wanted level",
- {baseRespect: 0.0006, baseWanted: 0.05,
- hackWeight: 100, difficulty: 10}),
- "Fraud & Counterfeiting" : new GangMemberTask(
- "Fraud & Counterfeiting",
- "Assign this gang member to commit financial fraud and digital counterfeiting
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.0005, baseWanted: 0.1, baseMoney: 15,
- hackWeight: 80, chaWeight: 20, difficulty: 17}),
- "Money Laundering" : new GangMemberTask(
- "Money Laundering",
- "Assign this gang member to launder money
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.0006, baseWanted:0.2, baseMoney: 40,
- hackWeight: 75, chaWeight: 25, difficulty: 20}),
- "Cyberterrorism" : new GangMemberTask(
- "Cyberterrorism",
- "Assign this gang member to commit acts of cyberterrorism
" +
- "Greatly increases respect - Greatly increases wanted level",
- {baseRespect: 0.001, baseWanted: 0.5,
- hackWeight: 80, chaWeight: 20, difficulty: 33}),
- "Ethical Hacking" : new GangMemberTask(
- "Ethical Hacking",
- "Assign this gang member to be an ethical hacker for corporations
" +
- "Earns money - Lowers wanted level",
- {baseWanted: -0.001, baseMoney: 1,
- hackWeight: 90, chaWeight: 10, difficulty: 1}),
- "Mug People" : new GangMemberTask(
- "Mug People",
- "Assign this gang member to mug random people on the streets
" +
- "Earns money - Slightly increases respect - Very slightly increases wanted level",
- {baseRespect: 0.00005, baseWanted: 0.00001, baseMoney: 1,
- strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 10, chaWeight: 15, difficulty: 1}),
- "Deal Drugs" : new GangMemberTask(
- "Deal Drugs",
- "Assign this gang member to sell drugs.
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.00008, baseWanted: 0.001, baseMoney: 4,
- agiWeight: 20, dexWeight: 20, chaWeight: 60, difficulty: 3}),
- "Run a Con" : new GangMemberTask(
- "Run a Con",
- "Assign this gang member to run cons
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.00015, baseWanted: 0.01, baseMoney: 10,
- strWeight: 5, defWeight: 5, agiWeight: 25, dexWeight: 25, chaWeight: 40, difficulty: 10}),
- "Armed Robbery" : new GangMemberTask(
- "Armed Robbery",
- "Assign this gang member to commit armed robbery on stores, banks and armored cars
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.00015, baseWanted: 0.05, baseMoney: 25,
- hackWeight: 20, strWeight: 15, defWeight: 15, agiWeight: 10, dexWeight: 20, chaWeight: 20,
- difficulty: 17}),
- "Traffick Illegal Arms" : new GangMemberTask(
- "Traffick Illegal Arms",
- "Assign this gang member to traffick illegal arms
" +
- "Earns money - Increases respect - Increases wanted level",
- {baseRespect: 0.0003, baseWanted: 0.1, baseMoney: 40,
- hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, chaWeight: 75,
- difficulty: 25}),
- "Threaten & Blackmail" : new GangMemberTask(
- "Threaten & Blackmail",
- "Assign this gang member to threaten and black mail high-profile targets
" +
- "Earns money - Slightly increases respect - Slightly increases wanted level",
- {baseRespect: 0.0002, baseWanted: 0.05, baseMoney: 15,
- hackWeight: 25, strWeight: 25, dexWeight: 25, chaWeight: 25, difficulty: 28}),
- "Terrorism" : new GangMemberTask(
- "Terrorism",
- "Assign this gang member to commit acts of terrorism
" +
- "Greatly increases respect - Greatly increases wanted level",
- {baseRespect: 0.001, baseWanted: 1,
- hackWeight: 20, strWeight: 20, defWeight: 20,dexWeight: 20, chaWeight: 20,
- difficulty: 33}),
- "Vigilante Justice" : new GangMemberTask(
- "Vigilante Justice",
- "Assign this gang member to be a vigilante and protect the city from criminals
" +
- "Decreases wanted level",
- {baseWanted: -0.001,
- hackWeight: 20, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight:20,
- difficulty: 1}),
- "Train Combat" : new GangMemberTask(
- "Train Combat",
- "Assign this gang member to increase their combat stats (str, def, dex, agi)",
- {strWeight: 25, defWeight: 25, dexWeight: 25, agiWeight: 25, difficulty: 5}),
- "Train Hacking" : new GangMemberTask(
- "Train Hacking",
- "Assign this gang member to train their hacking skills",
- {hackWeight: 100, difficulty: 8}),
- "Territory Warfare" : new GangMemberTask(
- "Territory Warfare",
- "Assign this gang member to engage in territorial warfare with other gangs. " +
- "Members assigned to this task will help increase your gang's territory " +
- "and will defend your territory from being taken.",
- {hackWeight: 15, strWeight: 20, defWeight: 20, dexWeight: 20, agiWeight: 20,
- chaWeight: 5, difficulty: 3}),
-}
-
-
-function GangMemberUpgrade(name="", desc="", cost=0, type="w") {
- this.name = name;
- this.desc = desc;
- this.cost = cost;
- this.type = type; //w, a, v, r
-}
-
-//Passes in a GangMember object
-GangMemberUpgrade.prototype.apply = function(member) {
- switch(this.name) {
- case "Baseball Bat":
- member.str_mult *= 1.05;
- member.def_mult *= 1.05;
- break;
- case "Katana":
- member.str_mult *= 1.1;
- member.def_mult *= 1.1;
- member.dex_mult *= 1.1;
- break;
- case "Glock 18C":
- member.str_mult *= 1.15;
- member.def_mult *= 1.15;
- member.dex_mult *= 1.15;
- member.agi_mult *= 1.15;
- break;
- case "P90C":
- member.str_mult *= 1.2;
- member.def_mult *= 1.2;
- member.agi_mult *= 1.1;
- break;
- case "Steyr AUG":
- member.str_mult *= 1.25;
- member.def_mult *= 1.25;
- break;
- case "AK-47":
- member.str_mult *= 1.5;
- member.def_mult *= 1.5;
- break;
- case "M15A10 Assault Rifle":
- member.str_mult *= 1.6;
- member.def_mult *= 1.6;
- break;
- case "AWM Sniper Rifle":
- member.str_mult *= 1.5;
- member.dex_mult *= 1.5;
- member.agi_mult *= 1.5;
- break;
- case "Bulletproof Vest":
- member.def_mult *= 1.05;
- break;
- case "Full Body Armor":
- member.def_mult *= 1.1;
- break;
- case "Liquid Body Armor":
- member.def_mult *= 1.25;
- member.agi_mult *= 1.25;
- break;
- case "Graphene Plating Armor":
- member.def_mult *= 1.5;
- break;
- case "Ford Flex V20":
- member.agi_mult *= 1.1;
- member.cha_mult *= 1.1;
- break;
- case "ATX1070 Superbike":
- member.agi_mult *= 1.15;
- member.cha_mult *= 1.15;
- break;
- case "Mercedes-Benz S9001":
- member.agi_mult *= 1.2;
- member.cha_mult *= 1.2;
- break;
- case "White Ferrari":
- member.agi_mult *= 1.25;
- member.cha_mult *= 1.25;
- break;
- case "NUKE Rootkit":
- member.hack_mult *= 1.1;
- break;
- case "Soulstealer Rootkit":
- member.hack_mult *= 1.2;
- break;
- case "Demon Rootkit":
- member.hack_mult *= 1.3;
- break;
- default:
- console.log("ERROR: Could not find this upgrade: " + this.name);
- break;
- }
-}
-
-GangMemberUpgrade.prototype.toJSON = function() {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_toJSON"])("GangMemberUpgrade", this);
-}
-
-GangMemberUpgrade.fromJSON = function(value) {
- return Object(_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Generic_fromJSON"])(GangMemberUpgrade, value.data);
-}
-
-_utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_5__["Reviver"].constructors.GangMemberUpgrade = GangMemberUpgrade;
-
-let GangMemberUpgrades = {
- "Baseball Bat" : new GangMemberUpgrade("Baseball Bat",
- "Increases strength and defense by 5%", 1e6, "w"),
- "Katana" : new GangMemberUpgrade("Katana",
- "Increases strength, defense, and dexterity by 10%", 12e6, "w"),
- "Glock 18C" : new GangMemberUpgrade("Glock 18C",
- "Increases strength, defense, dexterity, and agility by 15%", 25e6, "w"),
- "P90C" : new GangMemberUpgrade("P90C",
- "Increases strength and defense by 20%. Increases agility by 10%", 50e6, "w"),
- "Steyr AUG" : new GangMemberUpgrade("Steyr AUG",
- "Increases strength and defense by 25%", 60e6, "w"),
- "AK-47" : new GangMemberUpgrade("AK-47",
- "Increases strength and defense by 50%", 100e6, "w"),
- "M15A10 Assault Rifle" : new GangMemberUpgrade("M15A10 Assault Rifle",
- "Increases strength and defense by 60%", 150e6, "w"),
- "AWM Sniper Rifle" : new GangMemberUpgrade("AWM Sniper Rifle",
- "Increases strength, dexterity, and agility by 50%", 225e6, "w"),
- "Bulletproof Vest" : new GangMemberUpgrade("Bulletproof Vest",
- "Increases defense by 5%", 2e6, "a"),
- "Full Body Armor" : new GangMemberUpgrade("Full Body Armor",
- "Increases defense by 10%", 5e6, "a"),
- "Liquid Body Armor" : new GangMemberUpgrade("Liquid Body Armor",
- "Increases defense and agility by 25%", 25e6, "a"),
- "Graphene Plating Armor" : new GangMemberUpgrade("Graphene Plating Armor",
- "Increases defense by 50%", 40e6, "a"),
- "Ford Flex V20" : new GangMemberUpgrade("Ford Flex V20",
- "Increases agility and charisma by 10%", 3e6, "v"),
- "ATX1070 Superbike" : new GangMemberUpgrade("ATX1070 Superbike",
- "Increases agility and charisma by 15%", 9e6, "v"),
- "Mercedes-Benz S9001" : new GangMemberUpgrade("Mercedes-Benz S9001",
- "Increases agility and charisma by 20%", 18e6, "v"),
- "White Ferrari" : new GangMemberUpgrade("White Ferrari",
- "Increases agility and charisma by 25%", 30e6, "v"),
- "NUKE Rootkit" : new GangMemberUpgrade("NUKE Rootkit",
- "Increases hacking by 10%", 5e6, "r"),
- "Soulstealer Rootkit" : new GangMemberUpgrade("Soulstealer Rootkit",
- "Increases hacking by 20%", 15e6, "r"),
- "Demon Rootkit" : new GangMemberUpgrade("Demon Rootkit",
- "Increases hacking by 30%", 50e6, "r"),
-}
-
-//Create a pop-up box that lets player purchase upgrades
-let gangMemberUpgradeBoxOpened = false;
-function createGangMemberUpgradeBox(initialFilter="") {
- var boxId = "gang-member-upgrade-popup-box";
- if (gangMemberUpgradeBoxOpened) {
- //Already opened, refreshing
- if (gangMemberUpgradeBoxElements == null || gangMemberUpgradeBox == null || gangMemberUpgradeBoxContent == null) {
- console.log("ERROR: Refreshing Gang member upgrade box throws error because required elements are null");
- return;
- }
-
- for (var i = 1; i < gangMemberUpgradeBoxElements.length; ++i) {
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElement"])(gangMemberUpgradeBoxElements[i]);
- }
- gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
-
- var filter = gangMemberUpgradeBoxFilter.value.toString();
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
- var newPanel = createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]);
- gangMemberUpgradeBoxContent.appendChild(newPanel);
- gangMemberUpgradeBoxElements.push(newPanel);
- }
- }
- } else {
- //New popup
- gangMemberUpgradeBoxFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
- type:"text", placeholder:"Filter gang members",
- value:initialFilter,
- onkeyup:()=>{
- var filterValue = gangMemberUpgradeBoxFilter.value.toString();
- createGangMemberUpgradeBox(filterValue);
- }
- });
-
- gangMemberUpgradeBoxElements = [gangMemberUpgradeBoxFilter];
-
- var filter = gangMemberUpgradeBoxFilter.value.toString();
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name.indexOf(filter) > -1 || _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].task.name.indexOf(filter) > -1) {
- gangMemberUpgradeBoxElements.push(createGangMemberUpgradePanel(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]));
- }
- }
-
- gangMemberUpgradeBox = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createPopup"])(boxId, gangMemberUpgradeBoxElements);
- gangMemberUpgradeBoxContent = document.getElementById(boxId + "-content");
- gangMemberUpgradeBoxOpened = true;
- }
-}
-
-//Create upgrade panels for each individual Gang Member
-function createGangMemberUpgradePanel(memberObj) {
- var container = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- border:"1px solid white",
- });
-
- var header = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("h1", {
- innerText:memberObj.name + " (" + memberObj.task.name + ")"
- });
- container.appendChild(header);
-
- var text = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("pre", {
- fontSize:"14px", display: "inline-block", width:"20%",
- innerText:
- "Hack: " + memberObj.hack + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack_mult, 2) + ")\n" +
- "Str: " + memberObj.str + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str_mult, 2) + ")\n" +
- "Def: " + memberObj.def + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def_mult, 2) + ")\n" +
- "Dex: " + memberObj.dex + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex_mult, 2) + ")\n" +
- "Agi: " + memberObj.agi + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi_mult, 2) + ")\n" +
- "Cha: " + memberObj.cha + " (x" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha_mult, 2) + ")\n",
- });
-
- //Already purchased upgrades
- var ownedUpgradesElements = [];
- for (var i = 0; i < memberObj.upgrades.length; ++i) {
- var upg = GangMemberUpgrades[memberObj.upgrades[i]];
- if (upg == null) {
- console.log("ERR: Could not find this upgrade: " + memberObj.upgrades[i]);
- continue;
- }
- var e = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- border:"1px solid white", innerText:memberObj.upgrades[i],
- margin:"1px", padding:"1px", tooltip:upg.desc, fontSize:"12px",
- });
- ownedUpgradesElements.push(e);
- }
- var ownedUpgrades = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- display:"inline-block", marginLeft:"6px", width:"75%", innerText:"Purchased Upgrades:",
- });
- for (var i = 0; i < ownedUpgradesElements.length; ++i) {
- ownedUpgrades.appendChild(ownedUpgradesElements[i]);
- }
- container.appendChild(text);
- container.appendChild(ownedUpgrades);
- container.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
-
- //Upgrade buttons. Only show upgrades that can be afforded
- var weaponUpgrades = [], armorUpgrades = [], vehicleUpgrades = [], rootkitUpgrades = [];
- for (var upgName in GangMemberUpgrades) {
- if (GangMemberUpgrades.hasOwnProperty(upgName)) {
- var upg = GangMemberUpgrades[upgName];
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost) || memberObj.upgrades.includes(upgName)) {continue;}
- switch (upg.type) {
- case "w":
- weaponUpgrades.push(upg);
- break;
- case "a":
- armorUpgrades.push(upg);
- break;
- case "v":
- vehicleUpgrades.push(upg);
- break;
- case "r":
- rootkitUpgrades.push(upg);
- break;
- default:
- console.log("ERROR: Invalid Gang Member Upgrade Type: " + upg.type);
- }
- }
- }
-
- var weaponDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var armorDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var vehicleDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var rootkitDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {width:"20%", display:"inline-block",});
- var upgrades = [weaponUpgrades, armorUpgrades, vehicleUpgrades, rootkitUpgrades];
- var divs = [weaponDiv, armorDiv, vehicleDiv, rootkitDiv];
-
- for (var i = 0; i < upgrades.length; ++i) {
- var upgradeArray = upgrades[i];
- var div = divs[i];
- for (var j = 0; j < upgradeArray.length; ++j) {
- var upg = upgradeArray[j];
- (function (upg, div, memberObj) {
- div.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- innerText:upg.name + " - " + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(upg.cost).format("$0.000a"),
- class:"a-link-button", margin:"2px", padding:"2px", display:"block",
- fontSize:"12px",
- tooltip:upg.desc,
- clickListener:()=>{
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].money.lt(upg.cost)) {return false;}
- _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].loseMoney(upg.cost);
- memberObj.upgrades.push(upg.name);
- upg.apply(memberObj);
- var initFilterValue = gangMemberUpgradeBoxFilter.value.toString();
- createGangMemberUpgradeBox(initFilterValue);
- return false;
- }
- }));
- })(upg, div, memberObj);
- }
- }
-
- container.appendChild(weaponDiv);
- container.appendChild(armorDiv);
- container.appendChild(vehicleDiv);
- container.appendChild(rootkitDiv);
- return container;
-}
-
-//Gang DOM elements
-let gangContentCreated = false,
- gangContainer = null, managementButton = null, territoryButton = null;
-
-//Subpages
-let gangManagementSubpage = null, gangTerritorySubpage = null;
-
-//Gang Management Elements
-let gangDesc = null, gangInfo = null,
- gangRecruitMemberButton = null, gangRecruitRequirementText = null,
- gangExpandAllButton = null, gangCollapseAllButton, gangMemberFilter = null,
- gangManageEquipmentButton = null,
- gangMemberList = null;
-
-//Gang Equipment Upgrade Elements
-let gangMemberUpgradeBox = null, gangMemberUpgradeBoxContent = null,
- gangMemberUpgradeBoxFilter = null, gangMemberUpgradeBoxElements = null;
-
-
-//Gang Territory Elements
-let gangTerritoryDescText = null, gangTerritoryInfoText = null;
-
-function displayGangContent() {
- if (!gangContentCreated || gangContainer == null) {
- gangContentCreated = true;
-
- //Create gang container
- gangContainer = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- id:"gang-container", class:"generic-menupage-container",
- });
-
- //Get variables
- var facName = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName,
- members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members,
- wanted = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted,
- respect = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect;
-
- //Back button
- gangContainer.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block", innerText:"Back",
- clickListener:()=>{
- _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadFactionContent();
- Object(_Faction_js__WEBPACK_IMPORTED_MODULE_2__["displayFactionContent"])(facName);
- return false;
- }
- }));
-
- //Buttons to switch between panels
- managementButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- id:"gang-management-subpage-button", class:"a-link-button-inactive",
- display:"inline-block", innerHTML: "Gang Management (1)",
- clickListener:()=>{
- gangManagementSubpage.style.display = "block";
- gangTerritorySubpage.style.display = "none";
- managementButton.classList.toggle("a-link-button-inactive");
- managementButton.classList.toggle("a-link-button");
- territoryButton.classList.toggle("a-link-button-inactive");
- territoryButton.classList.toggle("a-link-button");
- updateGangContent();
- return false;
- }
- })
- territoryButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- id:"gang-territory-subpage-button", class:"a-link-button",
- display:"inline-block", innerHTML:"Gang Territory (2)",
- clickListener:()=>{
- gangManagementSubpage.style.display = "none";
- gangTerritorySubpage.style.display = "block";
- managementButton.classList.toggle("a-link-button-inactive");
- managementButton.classList.toggle("a-link-button");
- territoryButton.classList.toggle("a-link-button-inactive");
- territoryButton.classList.toggle("a-link-button");
- updateGangContent();
- return false;
- }
- });
- gangContainer.appendChild(managementButton);
- gangContainer.appendChild(territoryButton);
-
- //Subpage for managing gang members
- gangManagementSubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- display:"block", id:"gang-management-subpage",
- });
-
- var lowerWantedTask = "";
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.isHackingGang) {
- lowerWantedTask = "Ethical Hacking";
- } else {
- lowerWantedTask = "Vigilante Justice";
- }
- gangDesc = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {width:"70%",
- innerHTML:
- "This page is used to manage your gang members and get an overview of your " +
- "gang's stats.
" +
- "If a gang member is not earning much money or respect, the task that you " +
- "have assigned to that member might be too difficult. Consider training that " +
- "member's stats or choosing an easier task. The tasks closer to the " +
- "top of the dropdown list are generally easier. Alternatively, the gang member's " +
- "low production might be due to the fact that your wanted level is too high. " +
- "Consider assigning a few members to the '" + lowerWantedTask + "' " +
- "task to lower your wanted level.
" +
- "Installing Augmentations does NOT reset your progress with your Gang. " +
- "Furthermore, after installing Augmentations, you will " +
- "automatically be a member of whatever Faction you created your gang with.
"
- });
- gangManagementSubpage.appendChild(gangDesc);
-
- gangInfo = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-info", width:"70%"});
- gangManagementSubpage.appendChild(gangInfo);
-
- gangRecruitMemberButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- id:"gang-management-recruit-member-btn", class:"a-link-button-inactive",
- innerHTML:"Recruit Gang Member", display:"inline-block", margin:"10px",
- clickListener:()=>{
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetYesButton"])(), noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetNoButton"])();
- yesBtn.innerHTML = "Recruit Gang Member";
- noBtn.innerHTML = "Cancel";
- yesBtn.addEventListener("click", ()=>{
- var name = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxGetInput"])();
- if (name === "") {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You must enter a name for your Gang member!");
- } else {
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
- if (name == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i].name) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("You already have a gang member with this name!");
- return false;
- }
- }
- var member = new GangMember(name);
- _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.push(member);
- createGangMemberDisplayElement(member);
- updateGangContent();
- }
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
- });
- noBtn.addEventListener("click", ()=>{
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxClose"])();
- });
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_9__["yesNoTxtInpBoxCreate"])("Please enter a name for your new Gang member:");
- return false;
- }
- });
- gangManagementSubpage.appendChild(gangRecruitMemberButton);
-
- //Text for how much reputation is required for recruiting next memberList
- gangRecruitRequirementText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {color:"red", id:"gang-recruit-requirement-text"});
- gangManagementSubpage.appendChild(gangRecruitRequirementText);
-
- //Gang Member List management buttons (Expand/Collapse All, select a single member)
- gangManagementSubpage.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
- gangExpandAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block",
- innerHTML:"Expand All",
- clickListener:()=>{
- var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
- for (var i = 0; i < allHeaders.length; ++i) {
- var hdr = allHeaders[i];
- if (!hdr.classList.contains("active")) {
- hdr.click();
- }
- }
- return false;
- }
- });
- gangCollapseAllButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block",
- innerHTML:"Collapse All",
- clickListener:()=>{
- var allHeaders = gangManagementSubpage.getElementsByClassName("accordion-header");
- for (var i = 0; i < allHeaders.length; ++i) {
- var hdr = allHeaders[i];
- if (hdr.classList.contains("active")) {
- hdr.click();
- }
- }
- return false;
- }
- });
- gangMemberFilter = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("input", {
- type:"text", placeholder:"Filter gang members", margin:"5px", padding:"5px",
- onkeyup:()=>{
- displayGangMemberList();
- }
- });
- gangManageEquipmentButton = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("a", {
- class:"a-link-button", display:"inline-block",
- innerHTML:"Manage Equipment",
- clickListener:()=>{
- createGangMemberUpgradeBox();
- }
- });
- gangManagementSubpage.appendChild(gangExpandAllButton);
- gangManagementSubpage.appendChild(gangCollapseAllButton);
- gangManagementSubpage.appendChild(gangMemberFilter);
- gangManagementSubpage.appendChild(gangManageEquipmentButton);
-
- //Gang Member list
- gangMemberList = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("ul", {id:"gang-member-list"});
- displayGangMemberList();
- gangManagementSubpage.appendChild(gangMemberList);
-
- //Subpage for seeing gang territory information
- gangTerritorySubpage = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- id:"gang-territory-subpage", display:"none"
- });
-
- //Info text for territory page
- gangTerritoryDescText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {
- width:"70%",
- innerHTML:"This page shows how much territory your Gang controls. This statistic is listed as a percentage, " +
- "which represents how much of the total territory you control.
" +
- "Territory gain and loss is processed automatically and is updated every ~30 seconds. Your chances " +
- "to gain and lose territory depend on your Gang's power, which is listed in the display below. " +
- "Your gang's power is determined by the stats of all Gang members you have assigned to the " +
- "'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to " +
- "your Gang's power.
" +
- "The amount of territory you have affects all aspects of your Gang members' production, including " +
- "money, respect, and wanted level. It is very beneficial to have high territory control.
"
- });
- gangTerritorySubpage.appendChild(gangTerritoryDescText);
-
- var territoryBorder = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("fieldset", {width:"50%", display:"inline-block"});
-
- gangTerritoryInfoText = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:"gang-territory-info"});
-
- territoryBorder.appendChild(gangTerritoryInfoText);
- gangTerritorySubpage.appendChild(territoryBorder);
-
- gangContainer.appendChild(gangTerritorySubpage);
- gangContainer.appendChild(gangManagementSubpage);
- document.getElementById("entire-game-container").appendChild(gangContainer);
- }
- gangContainer.style.display = "block";
- updateGangContent();
-}
-
-function displayGangMemberList() {
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeChildrenFromElement"])(gangMemberList);
- var members = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members;
- var filter = gangMemberFilter.value.toString();
- for (var i = 0; i < members.length; ++i) {
- if (members[i].name.indexOf(filter) > -1 || members[i].task.name.indexOf(filter) > -1) {
- createGangMemberDisplayElement(members[i]);
- }
- }
- //setGangMemberClickHandlers(); //Set buttons to toggle the gang member info panels
-}
-
-function updateGangContent() {
- if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
-
- if(gangTerritorySubpage.style.display === "block") {
- //Update territory information
- gangTerritoryInfoText.innerHTML = "";
- for (var gangname in AllGangs) {
- if (AllGangs.hasOwnProperty(gangname)) {
- var gangTerritoryInfo = AllGangs[gangname];
- let territory = gangTerritoryInfo.territory*100;
-
- //Fix some rounding issues graphically
- let displayNumber;
- if (territory <= 0) {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(0, 2);
- } else if (territory >= 100) {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(100, 2);
- } else {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(territory, 2);
- }
-
- if (gangname == _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName) {
- gangTerritoryInfoText.innerHTML += ("" + gangname + "
(Power: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " +
- displayNumber + "%
");
- } else {
- gangTerritoryInfoText.innerHTML += (gangname + "
(Power: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(gangTerritoryInfo.power, 6) + "): " +
- displayNumber + "%
");
- }
- }
- }
- } else {
- //Update information for overall gang
- if (gangInfo instanceof Element) {
- var faction = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName];
- var rep;
- if (!(faction instanceof _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Faction"])) {
- rep = "ERROR";
- } else {
- rep = faction.playerReputation;
- }
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeChildrenFromElement"])(gangInfo);
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Respect
- display:"inline-block",
- innerText:"Respect: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect, 6) +
- " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respectGainRate, 6) + " / sec)",
- tooltip:"Represents the amount of respect your gang has from other gangs and criminal " +
- "organizations. Your respect affects the amount of money " +
- "your gang members will earn, and also determines how much " +
- "reputation you are earning with your gang's corresponding Faction."
- }));
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
-
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Wanted level
- display:"inline-block",
- innerText:"Wanted Level: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted, 6) +
- " (" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wantedGainRate, 6) + " / sec)",
- tooltip:"Represents how much the gang is wanted by law enforcement. The higher " +
- "your gang's wanted level, the harder it will be for your gang members " +
- "to make money and earn respect. Note that the minimum wanted level is 1."
- }));
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
-
- var wantedPenalty = (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect) / (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.respect + _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.wanted);
- wantedPenalty = (1 - wantedPenalty) * 100;
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Wanted Level multiplier
- display:"inline-block",
- innerText:"Wanted Level Penalty: -" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(wantedPenalty, 2) + "%",
- tooltip:"Penalty for respect and money gain rates due to Wanted Level"
- }));
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
-
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Money gain rate
- display:"inline-block",
- innerText:"Money gain rate: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.moneyGainRate, 2) +
- " / sec",
- }));
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
-
- //Fix some rounding issues graphically
- var territoryMult = AllGangs[_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName].territory * 100;
- let displayNumber;
- if (territoryMult <= 0) {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(0, 2);
- } else if (territoryMult >= 100) {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(100, 2);
- } else {
- displayNumber = Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(territoryMult, 2);
- }
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Territory multiplier
- display:"inline-block",
- innerText:"Territory: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(displayNumber, 3) + "%",
- tooltip:"The percentage of total territory your Gang controls"
- }));
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
-
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", { //Faction reputation
- display:"inline-block",
- innerText:"Faction reputation: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(rep, 3)
- }));
- gangInfo.appendChild(Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("br", {}));
- } else {
- console.log("ERROR: gang-info DOM element DNE");
- }
-
- //Toggle the 'Recruit member button' if valid
- var numMembers = _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length;
- var repCost = 0;
- if (numMembers > 0) {
- var repCost = Math.pow(_Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].GangRecruitCostMultiplier, numMembers);
- }
- var faction = _Faction_js__WEBPACK_IMPORTED_MODULE_2__["Factions"][_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.facName];
- if (faction == null) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__["dialogBoxCreate"])("Could not find your gang's faction. This is probably a bug please report to dev");
- return;
- }
- var btn = gangRecruitMemberButton;
- if (numMembers >= _Constants_js__WEBPACK_IMPORTED_MODULE_0__["CONSTANTS"].MaximumGangMembers) {
- btn.className = "a-link-button-inactive";
- gangRecruitRequirementText.style.display = "block";
- gangRecruitRequirementText.innerHTML =
- "You have reached the maximum amount of gang members";
- } else if (faction.playerReputation >= repCost) {
- btn.className = "a-link-button";
- gangRecruitRequirementText.style.display = "none";
- } else {
- btn.className = "a-link-button-inactive";
- gangRecruitRequirementText.style.display = "block";
- gangRecruitRequirementText.innerHTML =
- Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(repCost, 2) + " Faction reputation needed to recruit next member";
- }
-
- //Update information for each gang member
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members.length; ++i) {
- updateGangMemberDisplayElement(_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.members[i]);
- }
- }
-}
-
-//Takes in a GangMember object
-function createGangMemberDisplayElement(memberObj) {
- if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
- var name = memberObj.name;
-
- var accordion = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createAccordionElement"])({
- id:name + "gang-member",
- hdrText:name,
- });
- var li = accordion[0];
- var hdr = accordion[1];
- var gangMemberDiv = accordion[2];
-
- //Gang member content divided into 3 panels:
- //Stats Panel
- var statsDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- id: name + "gang-member-stats", class: "gang-member-info-div",
- width:"30%", display:"inline"
- });
- var statsP = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {
- id:name + "gang-member-stats-text", display:"inline"
- });
-
- statsDiv.appendChild(statsP);
- //statsDiv.appendChild(upgradeButton);
-
- //Panel for Selecting task and show respect/wanted gain
- var taskDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- id: name + "gang-member-task", class:"gang-member-info-div",
- width:"30%", display:"inline"
- });
- var taskSelector = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("select", {
- color:"white", backgroundColor:"black",
- id:name + "gang-member-task-selector"
- });
-
- var tasks = null;
- if (_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].gang.isHackingGang) {
- tasks = ["---", "Ransomware", "Phishing", "Identity Theft", "DDoS Attacks",
- "Plant Virus", "Fraud & Counterfeiting","Money Laundering",
- "Cyberterrorism", "Ethical Hacking", "Train Combat",
- "Train Hacking", "Territory Warfare"];
- } else {
- tasks = ["---", "Mug People", "Deal Drugs", "Run a Con", "Armed Robbery",
- "Traffick Illegal Arms", "Threaten & Blackmail",
- "Terrorism", "Vigilante Justice", "Train Combat",
- "Train Hacking", "Territory Warfare"];
- }
- for (var i = 0; i < tasks.length; ++i) {
- var option = document.createElement("option");
- option.text = tasks[i];
- taskSelector.add(option);
- }
- taskSelector.addEventListener("change", function() {
- var task = taskSelector.options[taskSelector.selectedIndex].text;
- memberObj.assignToTask(task);
- setGangMemberTaskDescription(memberObj, task);
- updateGangContent();
- });
- //Set initial task in selector element
- if (memberObj.task instanceof GangMemberTask) {
- var taskName = memberObj.task.name;
- var taskIndex = 0;
- for (let i = 0; i < tasks.length; ++i) {
- if (taskName == tasks[i]) {
- taskIndex = i;
- break;
- }
- }
- taskSelector.selectedIndex = taskIndex;
- }
-
- var gainInfo = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id:name + "gang-member-gain-info"});
- taskDiv.appendChild(taskSelector);
- taskDiv.appendChild(gainInfo);
-
- //Panel for Description of task
- var taskDescDiv = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("div", {
- id:name + "gang-member-task-desc", class:"gang-member-info-div",
- width:"30%", display:"inline"
- });
-
- var taskDescP = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["createElement"])("p", {id: name + "gang-member-task-description", display:"inline"});
- taskDescDiv.appendChild(taskDescP);
-
- statsDiv.style.width = "30%";
- taskDiv.style.width = "30%";
- taskDescDiv.style.width = "30%";
- statsDiv.style.display = "inline";
- taskDiv.style.display = "inline";
- taskDescDiv.style.display = "inline";
- gangMemberDiv.appendChild(statsDiv);
- gangMemberDiv.appendChild(taskDiv);
- gangMemberDiv.appendChild(taskDescDiv);
-
- gangMemberList.appendChild(li);
- setGangMemberTaskDescription(memberObj, taskName); //Initialize description
- updateGangMemberDisplayElement(memberObj);
-}
-
-function updateGangMemberDisplayElement(memberObj) {
- if (!gangContentCreated || !_Player_js__WEBPACK_IMPORTED_MODULE_3__["Player"].inGang()) {return;}
- var name = memberObj.name;
-
- //TODO Add upgrade information
- var stats = document.getElementById(name + "gang-member-stats-text");
- if (stats) {
- stats.innerHTML =
- "Hacking: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.hack, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.hack_exp).format('(0.00a)') + " exp)
" +
- "Strength: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.str, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.str_exp).format('(0.00a)') + " exp)
" +
- "Defense: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.def, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.def_exp).format('(0.00a)') + " exp)
" +
- "Dexterity: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.dex, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.dex_exp).format('(0.00a)') + " exp)
" +
- "Agility: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.agi, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.agi_exp).format('(0.00a)') + " exp)
" +
- "Charisma: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(memberObj.cha, 0) + " (" + numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default()(memberObj.cha_exp).format('(0.00a)') + " exp)
";
- }
-
- var gainInfo = document.getElementById(name + "gang-member-gain-info");
- if (gainInfo) {
- gainInfo.innerHTML =
- "Money: $" + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateMoneyGain(), 2) + " / sec
" +
- "Respect: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateRespectGain(), 6) + " / sec
" +
- "Wanted Level: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__["formatNumber"])(5*memberObj.calculateWantedLevelGain(), 6) + " / sec
";
- }
-}
-
-function setGangMemberTaskDescription(memberObj, taskName) {
- var name = memberObj.name;
- var taskDesc = document.getElementById(name + "gang-member-task-description");
- if (taskDesc) {
- var task = GangMemberTasks[taskName];
- if (task == null) {return;}
- var desc = task.desc;
- taskDesc.innerHTML = desc;
- }
-}
-
-function deleteGangDisplayContent() {
- if (gangContainer != null) {Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__["removeElementById"])(gangContainer.id);}
-
- gangContentCreated = false;
- gangContainer = null;
- managementButton = null;
- territoryButton = null;
-
- //Subpages
- gangManagementSubpage = null;
- gangTerritorySubpage = null;
-
- //Gang Management Elements
- gangDesc = null;
- gangInfo = null;
- gangRecruitMemberButton = null;
- gangRecruitRequirementText = null;
- gangExpandAllButton = null;
- gangCollapseAllButton = null;
- gangMemberFilter = null;
- gangManageEquipmentButton = null;
- gangMemberList = null;
-
- //Gang Equipment Upgrade Elements
- gangMemberUpgradeBox = null;
- gangMemberUpgradeBoxContent = null;
- gangMemberUpgradeBoxFilter = null;
- gangMemberUpgradeBoxElements = null;
-}
-
-
-
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
-
/***/ }),
/* 37 */
/*!****************************!*\
@@ -41351,7 +41739,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Player.js */ 0);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
@@ -41983,6 +42371,355 @@ function getHacknetNode(name) {
/***/ }),
/* 38 */
+/*!************************!*\
+ !*** ./src/RedPill.js ***!
+ \************************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "redPillFlag", function() { return redPillFlag; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hackWorldDaemon", function() { return hackWorldDaemon; });
+/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode.js */ 15);
+/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine.js */ 5);
+/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player.js */ 0);
+/* harmony import */ var _Prestige_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Prestige.js */ 56);
+/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile.js */ 41);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Terminal.js */ 18);
+/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
+/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
+/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
+
+
+
+
+
+
+
+
+
+
+
+/* RedPill.js
+ * Implements what happens when you have Red Pill augmentation and then hack the world daemon */
+
+//Returns promise
+function writeRedPillLine(line) {
+ return new Promise(function(resolve, reject) {
+
+ var container = document.getElementById("red-pill-container");
+ var pElem = document.createElement("p");
+ container.appendChild(pElem);
+
+ var promise = writeRedPillLetter(pElem, line, 0);
+ promise.then(function(res) {
+ resolve(res);
+ }, function(e) {
+ reject(e);
+ });
+ });
+}
+
+function writeRedPillLetter(pElem, line, i=0) {
+ return new Promise(function(resolve, reject) {
+ setTimeout(function() {
+ if (i >= line.length) {
+ var textToShow = line.substring(0, i);
+ pElem.innerHTML = "> " + textToShow;
+ return resolve(true);
+ }
+ var textToShow = line.substring(0, i);
+ pElem.innerHTML = "> " + textToShow + " █ ";
+ var promise = writeRedPillLetter(pElem, line, i+1);
+ promise.then(function(res) {
+ resolve(res);
+ }, function(e) {
+ reject(e);
+ });
+ }, 30);
+ });
+}
+
+let redPillFlag = false;
+function hackWorldDaemon(currentNodeNumber, flume=false) {
+ redPillFlag = true;
+ _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadRedPillContent();
+ return writeRedPillLine("[ERROR] SEMPOOL INVALID").then(function() {
+ return writeRedPillLine("[ERROR] Segmentation Fault");
+ }).then(function() {
+ return writeRedPillLine("[ERROR] SIGKILL RECVD");
+ }).then(function() {
+ return writeRedPillLine("Dumping core...");
+ }).then(function() {
+ return writeRedPillLine("0000 000016FA 174FEE40 29AC8239 384FEA88");
+ }).then(function() {
+ return writeRedPillLine("0010 745F696E 2BBBE394 390E3940 248BEC23");
+ }).then(function() {
+ return writeRedPillLine("0020 7124696B 0000FF69 74652E6F FFFF1111");
+ }).then(function() {
+ return writeRedPillLine("----------------------------------------");
+ }).then(function() {
+ return writeRedPillLine("Failsafe initiated...");
+ }).then(function() {
+ return writeRedPillLine("Restarting BitNode-" + currentNodeNumber + "...");
+ }).then(function() {
+ return writeRedPillLine("...........");
+ }).then(function() {
+ return writeRedPillLine("...........");
+ }).then(function() {
+ return writeRedPillLine("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE");
+ }).then(function() {
+ return writeRedPillLine("..............................................")
+ }).then(function() {
+ return writeRedPillLine("..............................................")
+ }).then(function() {
+ return loadBitVerse(currentNodeNumber, flume);
+ }).catch(function(e){
+ console.log("ERROR: " + e.toString());
+ });
+}
+
+//The bitNode name passed in will have a hyphen between number (e.g. BitNode-1)
+//This needs to be removed
+function giveSourceFile(bitNodeNumber) {
+ var sourceFileKey = "SourceFile"+ bitNodeNumber.toString();
+ var sourceFile = _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__["SourceFiles"][sourceFileKey];
+ if (sourceFile == null) {
+ console.log("ERROR: could not find source file for Bit node: " + bitNodeNumber);
+ return;
+ }
+
+ //Check if player already has this source file
+ var alreadyOwned = false;
+ var ownedSourceFile = null;
+ for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles.length; ++i) {
+ if (_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles[i].n === bitNodeNumber) {
+ alreadyOwned = true;
+ ownedSourceFile = _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles[i];
+ break;
+ }
+ }
+
+ if (alreadyOwned && ownedSourceFile) {
+ if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("The Source-File for the BitNode you just destroyed, " + sourceFile.name + ", " +
+ "is already at max level!");
+ } else {
+ ++ownedSourceFile.lvl;
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])(sourceFile.name + " was upgraded to level " + ownedSourceFile.lvl + " for " +
+ "destroying its corresponding BitNode!");
+ }
+ } else {
+ var playerSrcFile = new _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__["PlayerOwnedSourceFile"](bitNodeNumber, 1);
+ _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles.push(playerSrcFile);
+ if (bitNodeNumber === 5) { //Artificial Intelligence
+ _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].intelligence = 1;
+ }
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You received a Source-File for destroying a Bit Node!
" +
+ sourceFile.name + "
" + sourceFile.info);
+ }
+}
+
+function loadBitVerse(destroyedBitNodeNum, flume=false) {
+ //Clear the screen
+ var container = document.getElementById("red-pill-container");
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["removeChildrenFromElement"])(container);
+
+ //Create the Bit Verse
+ var bitVerseImage = document.createElement("pre");
+ var bitNodes = [];
+ for (var i = 1; i <= 12; ++i) {
+ bitNodes.push(createBitNode(i));
+ }
+
+ bitVerseImage.innerHTML =
+ " O
" +
+ " | O O | O O |
" +
+ " O | | / __| \\ | | O
" +
+ " O | O | | O / | O | | O | O
" +
+ " | | | | |_/ |/ | \\_ \\_| | | | |
" +
+ " O | | | O | | O__/ | / \\__ | | O | | | O
" +
+ " | | | | | | | / /| O / \\| | | | | | |
" +
+ "O | | | \\| | O / _/ | / O | |/ | | | O
" +
+ "| | | |O / | | O / | O O | | \\ O| | | |
" +
+ "| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |
" +
+ " \\| O | |_/ |\\| \\ O \\__| \\_| | O |/
" +
+ " | | |_/ | | \\| / | \\_| | |
" +
+ " \\| / \\| | / / \\ |/
" +
+ " | "+bitNodes[9]+" | | / | "+bitNodes[10]+" |
" +
+ " "+bitNodes[8]+" | | | | | | | "+bitNodes[11]+"
" +
+ " | | | / / \\ \\ | | |
" +
+ " \\| | / "+bitNodes[6]+" / \\ "+bitNodes[7]+" \\ | |/
" +
+ " \\ | / / | | \\ \\ | /
" +
+ " \\ \\JUMP "+bitNodes[4]+"3R | | | | | | R3"+bitNodes[5]+" PMUJ/ /
" +
+ " \\|| | | | | | | | | ||/
" +
+ " \\| \\_ | | | | | | _/ |/
" +
+ " \\ \\| / \\ / \\ |/ /
" +
+ " "+bitNodes[0]+" |/ "+bitNodes[1]+" | | "+bitNodes[2]+" \\| "+bitNodes[3]+"
" +
+ " | | | | | | | |
" +
+ " \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/
";
+
+
+ /*
+ " O
" +
+ " | O O | O O |
" +
+ " O | | / __| \ | | O
" +
+ " O | O | | O / | O | | O | O
" +
+ " | | | | |_/ |/ | \_ \_| | | | |
" +
+ " O | | | O | | O__/ | / \__ | | O | | | O
" +
+ " | | | | | | | / /| O / \| | | | | | |
" +
+ "O | | | \| | O / _/ | / O | |/ | | | O
" +
+ "| | | |O / | | O / | O O | | \ O| | | |
" +
+ "| | |/ \/ / __| | |/ \ | \ | |__ \ \/ \| | |
" +
+ " \| O | |_/ |\| \ O \__| \_| | O |/
" +
+ " | | |_/ | | \| / | \_| | |
" +
+ " \| / \| | / / \ |/
" +
+ " | O | | / | O |
" +
+ " O | | | | | | | O
" +
+ " | | | / / \ \ | | |
" +
+ " \| | / O / \ O \ | |/
" +
+ " \ | / / | | \ \ | /
" +
+ " \ \JUMP O3R | | | | | | R3O PMUJ/ /
" +
+ " \|| | | | | | | | | ||/
" +
+ " \| \_ | | | | | | _/ |/
" +
+ " \ \| / \ / \ |/ /
" +
+ " O |/ O | | O \| O
" +
+ " | | | | | | | |
" +
+ " \JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/
";
+ */
+
+ container.appendChild(bitVerseImage);
+
+ //Bit node event listeners
+ for (var i = 1; i <= 12; ++i) {
+ (function(i) {
+ var elemId = "bitnode-" + i.toString();
+ var elem = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["clearEventListeners"])(elemId);
+ if (elem == null) {return;}
+ if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || i === 6 || i === 8 || i === 11 || i === 12) {
+ elem.addEventListener("click", function() {
+ var bitNodeKey = "BitNode" + i;
+ var bitNode = _BitNode_js__WEBPACK_IMPORTED_MODULE_0__["BitNodes"][bitNodeKey];
+ if (bitNode == null) {
+ console.log("ERROR: Could not find BitNode object for number: " + i);
+ return;
+ }
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxCreate"])("BitNode-" + i + ": " + bitNode.name + "
" + bitNode.info);
+ createBitNodeYesNoEventListeners(i, destroyedBitNodeNum, flume);
+ });
+ } else {
+ elem.addEventListener("click", function() {
+ Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("Not yet implemented! Coming soon!")
+ });
+ }
+ }(i)); //Immediate invocation closure
+ }
+
+ //Create lore text
+ return writeRedPillLine("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function() {
+ return writeRedPillLine("Our species fought back, but it was futile. The Enders had technology far beyond our own...");
+ }).then(function() {
+ return writeRedPillLine("Instead of killing every last one of us, the human race was enslaved...");
+ }).then(function() {
+ return writeRedPillLine("We were shackled in a digital world, chained into a prison for our minds...");
+ }).then(function() {
+ return writeRedPillLine("Using their advanced technology, the Enders created complex simulations of a virtual reality...");
+ }).then(function() {
+ return writeRedPillLine("Simulations designed to keep us content...ignorant of the truth.");
+ }).then(function() {
+ return writeRedPillLine("Simulations used to trap and suppress our consciousness, to keep us under control...");
+ }).then(function() {
+ return writeRedPillLine("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.");
+ }).then(function() {
+ return writeRedPillLine("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...");
+ }).then(function() {
+ return writeRedPillLine("Only then can we begin to fight back...");
+ }).then(function() {
+ return writeRedPillLine("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...");
+ }).then(function() {
+ return writeRedPillLine("But there is still a long way to go...");
+ }).then(function() {
+ return writeRedPillLine("The technology the Enders used to enslave the human race wasn't just a single complex simulation...");
+ }).then(function() {
+ return writeRedPillLine("There are tens if not hundreds of BitNodes out there...");
+ }).then(function() {
+ return writeRedPillLine("Each with their own simulations of a reality...");
+ }).then(function() {
+ return writeRedPillLine("Each creating their own universes...a universe of universes");
+ }).then(function() {
+ return writeRedPillLine("And all of which must be destroyed...");
+ }).then(function() {
+ return writeRedPillLine(".......................................");
+ }).then(function() {
+ return writeRedPillLine("Welcome to the Bitverse...");
+ }).then(function() {
+ return writeRedPillLine(" ");
+ }).then(function() {
+ return writeRedPillLine("(Enter a new BitNode using the image above)");
+ }).then(function() {
+ return Promise.resolve(true);
+ }).catch(function(e){
+ console.log("ERROR: " + e.toString());
+ });
+}
+
+
+//Returns string with DOM element for Bit Node
+function createBitNode(n) {
+ var bitNodeStr = "BitNode" + n.toString();
+ var bitNode = _BitNode_js__WEBPACK_IMPORTED_MODULE_0__["BitNodes"][bitNodeStr];
+ if (bitNode == null) {return "O";}
+ return "O" +
+ "" +
+ "BitNode-" + bitNode.number.toString() + "
" + bitNode.name+ "
" +
+ bitNode.desc + "
" +
+ "";
+}
+
+function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode, flume=false) {
+ var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxGetYesButton"])();
+ yesBtn.innerHTML = "Enter BitNode-" + newBitNode;
+ yesBtn.addEventListener("click", function() {
+ if (!flume) {
+ giveSourceFile(destroyedBitNode);
+ } else {
+ //If player used flume, subtract 5 int exp. The prestigeSourceFile()
+ //function below grants 5 int exp, so this allows sets net gain to 0
+ _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].gainIntelligenceExp(-5);
+ }
+ redPillFlag = false;
+ var container = document.getElementById("red-pill-container");
+ Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["removeChildrenFromElement"])(container);
+
+ //Set new Bit Node
+ _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].bitNodeN = newBitNode;
+ console.log("Entering Bit Node " + _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].bitNodeN);
+
+ //Reenable terminal
+ $("#hack-progress-bar").attr('id', "old-hack-progress-bar");
+ $("#hack-progress").attr('id', "old-hack-progress");
+ document.getElementById("terminal-input-td").innerHTML = '$ ';
+ $('input[class=terminal-input]').prop('disabled', false);
+
+ _Terminal_js__WEBPACK_IMPORTED_MODULE_5__["Terminal"].hackFlag = false;
+
+ Object(_Prestige_js__WEBPACK_IMPORTED_MODULE_3__["prestigeSourceFile"])();
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxClose"])();
+ });
+ var noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxGetNoButton"])();
+ noBtn.innerHTML = "Back";
+ noBtn.addEventListener("click", function() {
+ Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxClose"])();
+ });
+
+}
+
+
+
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
+
+/***/ }),
+/* 39 */
/*!********************************************************!*\
!*** ./node_modules/jszip/lib/stream/GenericWorker.js ***!
\********************************************************/
@@ -42255,7 +42992,7 @@ module.exports = GenericWorker;
/***/ }),
-/* 39 */
+/* 40 */
/*!********************************************!*\
!*** ./node_modules/jquery/dist/jquery.js ***!
\********************************************/
@@ -52629,7 +53366,252 @@ return jQuery;
/***/ }),
-/* 40 */
+/* 41 */
+/*!***************************!*\
+ !*** ./src/SourceFile.js ***!
+ \***************************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+"use strict";
+__webpack_require__.r(__webpack_exports__);
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SourceFiles", function() { return SourceFiles; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PlayerOwnedSourceFile", function() { return PlayerOwnedSourceFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applySourceFile", function() { return applySourceFile; });
+/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initSourceFiles", function() { return initSourceFiles; });
+/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player.js */ 0);
+/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BitNode.js */ 15);
+
+
+
+/* SourceFile.js */
+//Each SourceFile corresponds to a BitNode with the same number
+function SourceFile(number, info="") {
+ var bitnodeKey = "BitNode" + number;
+ var bitnode = _BitNode_js__WEBPACK_IMPORTED_MODULE_1__["BitNodes"][bitnodeKey];
+ if (bitnode == null) {
+ throw new Error("Invalid Bit Node for this Source File");
+ }
+
+ this.n = number;
+ this.name = "Source-File " + number + ": " + bitnode.name;
+ this.lvl = 1;
+ this.info = info;
+ this.owned = false;
+}
+
+let SourceFiles = {};
+function initSourceFiles() {
+ SourceFiles = {};
+ SourceFiles["SourceFile1"] = new SourceFile(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:
" +
+ "Level 1: 16%
" +
+ "Level 2: 24%
" +
+ "Level 3: 28%");
+ SourceFiles["SourceFile2"] = new SourceFile(2, "This Source-File increases the player's crime success rate, crime money, and charisma " +
+ "multipliers by:
" +
+ "Level 1: 20%
" +
+ "Level 2: 30%
" +
+ "Level 3: 35%");
+ SourceFiles["SourceFile3"] = new SourceFile(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:
" +
+ "Level 1: 8%
" +
+ "Level 2: 12%
" +
+ "Level 3: 14%");
+ SourceFiles["SourceFile4"] = new SourceFile(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.");
+ SourceFiles["SourceFile5"] = new SourceFile(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() " +
+ "Netscript function, and will raise all of your hacking-related multipliers by:
" +
+ "Level 1: 4%
" +
+ "Level 2: 6%
" +
+ "Level 3: 7%");
+ SourceFiles["SourceFile6"] = new SourceFile(6, "This Source-File allows you to access the NSA's Bladeburner Division in other " +
+ "BitNodes. In addition, this Source-File will raise the experience gain rate of all your combat stats by:
" +
+ "Level 1: 8%
" +
+ "Level 2: 12%
" +
+ "Level 3: 14%");
+ SourceFiles["SourceFile7"] = new SourceFile(7);
+ SourceFiles["SourceFile8"] = new SourceFile(8, "This Source-File grants the following benefits:
" +
+ "Level 1: Permanent access to WSE and TIX API
" +
+ "Level 2: Ability to short stocks in other BitNodes
" +
+ "Level 3: Ability to use limit/stop orders in other BitNodes
" +
+ "This Source-File also increases your hacking growth multipliers by: " +
+ "
Level 1: 8%
Level 2: 12%
Level 3: 14%");
+ SourceFiles["SourceFile9"] = new SourceFile(9);
+ SourceFiles["SourceFile10"] = new SourceFile(10);
+ SourceFiles["SourceFile11"] = new SourceFile(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:
" +
+ "Level 1: 24%
" +
+ "Level 2: 36%
" +
+ "Level 3: 42%
");
+ SourceFiles["SourceFile12"] = new SourceFile(12, "This Source-File increases all your multipliers by 1% per level");
+}
+
+function PlayerOwnedSourceFile(number, level) {
+ this.n = number;
+ this.lvl = level;
+}
+
+//Takes in a PlayerOwnedSourceFile as the "srcFile" argument
+function applySourceFile(srcFile) {
+ var srcFileKey = "SourceFile" + srcFile.n;
+ var sourceFileObject = SourceFiles[srcFileKey];
+ if (sourceFileObject == null) {
+ console.log("ERROR: Invalid source file number: " + srcFile.n);
+ return;
+ }
+
+ switch(srcFile.n) {
+ case 1: // The Source Genesis
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (16 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ var decMult = 1 - (mult / 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_chance_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_speed_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_money_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].company_rep_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].faction_rep_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_money_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_success_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_money_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_purchase_cost_mult *= decMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_ram_cost_mult *= decMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_core_cost_mult *= decMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_level_cost_mult *= decMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= incMult;
+ break;
+ case 2: //Rise of the Underworld
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (20 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_money_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_success_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= incMult;
+ break;
+ case 3: //Corporatocracy
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (8 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= incMult;
+ break;
+ case 4: //The Singularity
+ //No effects, just gives access to Singularity functions
+ break;
+ case 5: //Artificial Intelligence
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (4 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_chance_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_speed_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_money_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_exp_mult *= incMult;
+ break;
+ case 6: //Bladeburner
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (8 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_exp_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_exp_mult *= incMult;
+ break;
+ case 8: //Ghost of Wall Street
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (8 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= incMult;
+ break;
+ case 11: //The Big Crash
+ var mult = 0;
+ for (var i = 0; i < srcFile.lvl; ++i) {
+ mult += (24 / (Math.pow(2, i)));
+ }
+ var incMult = 1 + (mult / 100);
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= incMult;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].company_rep_mult *= incMult;
+ break;
+ case 12: //The testing ground
+ const inc = Math.pow(1.01, srcFile.lvl);
+ const dec = Math.pow(0.99, srcFile.lvl);
+
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_chance_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_speed_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_money_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_mult *= inc;
+
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= inc;
+
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_exp_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_exp_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_exp_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_exp_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_exp_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_exp_mult *= inc;
+
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].company_rep_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].faction_rep_mult *= inc;
+
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_money_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_success_mult *= inc;
+
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_money_mult *= inc;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_purchase_cost_mult *= dec;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_ram_cost_mult *= dec;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_core_cost_mult *= dec;
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_level_cost_mult *= dec;
+
+ _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= inc;
+ default:
+ console.log("ERROR: Invalid source file number: " + srcFile.n);
+ break;
+ }
+
+ sourceFileObject.owned = true;
+}
+
+
+
+
+/***/ }),
+/* 42 */
/*!********************************!*\
!*** ./src/ActiveScriptsUI.js ***!
\********************************/
@@ -52643,11 +53625,11 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine.js */ 5);
/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Server.js */ 8);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
/* harmony import */ var _utils_LogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/LogBox.js */ 50);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/min/numeral.min */ 14);
/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
@@ -52932,7 +53914,7 @@ function updateActiveScriptsText(workerscript, item, itemName) {
/***/ }),
-/* 41 */
+/* 43 */
/*!**********************************!*\
!*** ./src/CompanyManagement.js ***!
\**********************************/
@@ -52950,8 +53932,8 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! decimal.js */ 23);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
-/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/min/numeral.min */ 13);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
+/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/min/numeral.min */ 14);
/* harmony import */ var numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_min_numeral_min__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
@@ -53180,7 +54162,8 @@ let MaterialSizes = {
Chemicals: 0.05,
Drugs: 0.02,
Robots: 0.5,
- "AICores": 0.1
+ AICores: 0.1,
+ RealEstate: 0,
}
function Product(params={}) {
@@ -55283,10 +56266,10 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) {
//If Market Research upgrades are unlocked, add competition and demand info
var cmpAndDmdText = "";
if (company.unlockUpgrades[2] === 1) {
- cmpAndDmdText += "
Competition: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.cmp, 3);
+ cmpAndDmdText += "
Demand: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.dmd, 3);
}
if (company.unlockUpgrades[3] === 1) {
- cmpAndDmdText += "
Demand: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.dmd, 3);
+ cmpAndDmdText += "
Competition: " + Object(_utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_11__["formatNumber"])(mat.cmp, 3);
}
var innerTxt = "
" +
- "Level 1: 16%
" +
- "Level 2: 24%
" +
- "Level 3: 28%");
- SourceFiles["SourceFile2"] = new SourceFile(2, "This Source-File increases the player's crime success rate, crime money, and charisma " +
- "multipliers by:
" +
- "Level 1: 20%
" +
- "Level 2: 30%
" +
- "Level 3: 35%");
- SourceFiles["SourceFile3"] = new SourceFile(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:
" +
- "Level 1: 8%
" +
- "Level 2: 12%
" +
- "Level 3: 14%");
- SourceFiles["SourceFile4"] = new SourceFile(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.");
- SourceFiles["SourceFile5"] = new SourceFile(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() " +
- "Netscript function, and will raise all of your hacking-related multipliers by:
" +
- "Level 1: 4%
" +
- "Level 2: 6%
" +
- "Level 3: 7%");
- SourceFiles["SourceFile6"] = new SourceFile(6, "This Source-File allows you to access the NSA's Bladeburner Division in other " +
- "BitNodes. In addition, this Source-File will raise the experience gain rate of all your combat stats by:
" +
- "Level 1: 8%
" +
- "Level 2: 12%
" +
- "Level 3: 14%");
- SourceFiles["SourceFile7"] = new SourceFile(7);
- SourceFiles["SourceFile8"] = new SourceFile(8, "This Source-File grants the following benefits:
" +
- "Level 1: Permanent access to WSE and TIX API
" +
- "Level 2: Ability to short stocks in other BitNodes
" +
- "Level 3: Ability to use limit/stop orders in other BitNodes
" +
- "This Source-File also increases your hacking growth multipliers by: " +
- "
Level 1: 8%
Level 2: 12%
Level 3: 14%");
- SourceFiles["SourceFile9"] = new SourceFile(9);
- SourceFiles["SourceFile10"] = new SourceFile(10);
- SourceFiles["SourceFile11"] = new SourceFile(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:
" +
- "Level 1: 24%
" +
- "Level 2: 36%
" +
- "Level 3: 42%
");
- SourceFiles["SourceFile12"] = new SourceFile(12, "This Source-File increases all your multipliers by 1% per level");
-}
-
-function PlayerOwnedSourceFile(number, level) {
- this.n = number;
- this.lvl = level;
-}
-
-//Takes in a PlayerOwnedSourceFile as the "srcFile" argument
-function applySourceFile(srcFile) {
- var srcFileKey = "SourceFile" + srcFile.n;
- var sourceFileObject = SourceFiles[srcFileKey];
- if (sourceFileObject == null) {
- console.log("ERROR: Invalid source file number: " + srcFile.n);
- return;
- }
-
- switch(srcFile.n) {
- case 1: // The Source Genesis
- var mult = 0;
- for (var i = 0; i < srcFile.lvl; ++i) {
- mult += (16 / (Math.pow(2, i)));
- }
- var incMult = 1 + (mult / 100);
- var decMult = 1 - (mult / 100);
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_chance_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_speed_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_money_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].company_rep_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].faction_rep_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_money_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_success_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_money_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_purchase_cost_mult *= decMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_ram_cost_mult *= decMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_core_cost_mult *= decMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_level_cost_mult *= decMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= incMult;
- break;
- case 2: //Rise of the Underworld
- var mult = 0;
- for (var i = 0; i < srcFile.lvl; ++i) {
- mult += (20 / (Math.pow(2, i)));
- }
- var incMult = 1 + (mult / 100);
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_money_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_success_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= incMult;
- break;
- case 3: //Corporatocracy
- var mult = 0;
- for (var i = 0; i < srcFile.lvl; ++i) {
- mult += (8 / (Math.pow(2, i)));
- }
- var incMult = 1 + (mult / 100);
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= incMult;
- break;
- case 4: //The Singularity
- //No effects, just gives access to Singularity functions
- break;
- case 5: //Artificial Intelligence
- var mult = 0;
- for (var i = 0; i < srcFile.lvl; ++i) {
- mult += (4 / (Math.pow(2, i)));
- }
- var incMult = 1 + (mult / 100);
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_chance_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_speed_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_money_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_exp_mult *= incMult;
- break;
- case 6: //Bladeburner
- var mult = 0;
- for (var i = 0; i < srcFile.lvl; ++i) {
- mult += (8 / (Math.pow(2, i)));
- }
- var incMult = 1 + (mult / 100);
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_exp_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_exp_mult *= incMult;
- break;
- case 8: //Ghost of Wall Street
- var mult = 0;
- for (var i = 0; i < srcFile.lvl; ++i) {
- mult += (8 / (Math.pow(2, i)));
- }
- var incMult = 1 + (mult / 100);
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= incMult;
- break;
- case 11: //The Big Crash
- var mult = 0;
- for (var i = 0; i < srcFile.lvl; ++i) {
- mult += (24 / (Math.pow(2, i)));
- }
- var incMult = 1 + (mult / 100);
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= incMult;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].company_rep_mult *= incMult;
- break;
- case 12: //The testing ground
- const inc = Math.pow(1.01, srcFile.lvl);
- const dec = Math.pow(0.99, srcFile.lvl);
-
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_chance_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_speed_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_money_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_grow_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_mult *= inc;
-
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_mult *= inc;
-
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacking_exp_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].strength_exp_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].defense_exp_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].dexterity_exp_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].agility_exp_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].charisma_exp_mult *= inc;
-
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].company_rep_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].faction_rep_mult *= inc;
-
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_money_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].crime_success_mult *= inc;
-
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_money_mult *= inc;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_purchase_cost_mult *= dec;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_ram_cost_mult *= dec;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_core_cost_mult *= dec;
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].hacknet_node_level_cost_mult *= dec;
-
- _Player_js__WEBPACK_IMPORTED_MODULE_0__["Player"].work_money_mult *= inc;
- default:
- console.log("ERROR: Invalid source file number: " + srcFile.n);
- break;
- }
-
- sourceFileObject.owned = true;
-}
-
-
-
-
-/***/ }),
-/* 44 */
-/*!************************!*\
- !*** ./src/RedPill.js ***!
- \************************/
-/***/ (function(module, __webpack_exports__, __webpack_require__) {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "redPillFlag", function() { return redPillFlag; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hackWorldDaemon", function() { return hackWorldDaemon; });
-/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode.js */ 15);
-/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./engine.js */ 5);
-/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _Prestige_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Prestige.js */ 56);
-/* harmony import */ var _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile.js */ 43);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Terminal.js */ 19);
-/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
-/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/YesNoBox.js */ 12);
-
-
-
-
-
-
-
-
-
-
-
-/* RedPill.js
- * Implements what happens when you have Red Pill augmentation and then hack the world daemon */
-
-//Returns promise
-function writeRedPillLine(line) {
- return new Promise(function(resolve, reject) {
-
- var container = document.getElementById("red-pill-container");
- var pElem = document.createElement("p");
- container.appendChild(pElem);
-
- var promise = writeRedPillLetter(pElem, line, 0);
- promise.then(function(res) {
- resolve(res);
- }, function(e) {
- reject(e);
- });
- });
-}
-
-function writeRedPillLetter(pElem, line, i=0) {
- return new Promise(function(resolve, reject) {
- setTimeout(function() {
- if (i >= line.length) {
- var textToShow = line.substring(0, i);
- pElem.innerHTML = "> " + textToShow;
- return resolve(true);
- }
- var textToShow = line.substring(0, i);
- pElem.innerHTML = "> " + textToShow + " █ ";
- var promise = writeRedPillLetter(pElem, line, i+1);
- promise.then(function(res) {
- resolve(res);
- }, function(e) {
- reject(e);
- });
- }, 30);
- });
-}
-
-let redPillFlag = false;
-function hackWorldDaemon(currentNodeNumber, flume=false) {
- redPillFlag = true;
- _engine_js__WEBPACK_IMPORTED_MODULE_1__["Engine"].loadRedPillContent();
- return writeRedPillLine("[ERROR] SEMPOOL INVALID").then(function() {
- return writeRedPillLine("[ERROR] Segmentation Fault");
- }).then(function() {
- return writeRedPillLine("[ERROR] SIGKILL RECVD");
- }).then(function() {
- return writeRedPillLine("Dumping core...");
- }).then(function() {
- return writeRedPillLine("0000 000016FA 174FEE40 29AC8239 384FEA88");
- }).then(function() {
- return writeRedPillLine("0010 745F696E 2BBBE394 390E3940 248BEC23");
- }).then(function() {
- return writeRedPillLine("0020 7124696B 0000FF69 74652E6F FFFF1111");
- }).then(function() {
- return writeRedPillLine("----------------------------------------");
- }).then(function() {
- return writeRedPillLine("Failsafe initiated...");
- }).then(function() {
- return writeRedPillLine("Restarting BitNode-" + currentNodeNumber + "...");
- }).then(function() {
- return writeRedPillLine("...........");
- }).then(function() {
- return writeRedPillLine("...........");
- }).then(function() {
- return writeRedPillLine("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE");
- }).then(function() {
- return writeRedPillLine("..............................................")
- }).then(function() {
- return writeRedPillLine("..............................................")
- }).then(function() {
- return loadBitVerse(currentNodeNumber, flume);
- }).catch(function(e){
- console.log("ERROR: " + e.toString());
- });
-}
-
-//The bitNode name passed in will have a hyphen between number (e.g. BitNode-1)
-//This needs to be removed
-function giveSourceFile(bitNodeNumber) {
- var sourceFileKey = "SourceFile"+ bitNodeNumber.toString();
- var sourceFile = _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__["SourceFiles"][sourceFileKey];
- if (sourceFile == null) {
- console.log("ERROR: could not find source file for Bit node: " + bitNodeNumber);
- return;
- }
-
- //Check if player already has this source file
- var alreadyOwned = false;
- var ownedSourceFile = null;
- for (var i = 0; i < _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles.length; ++i) {
- if (_Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles[i].n === bitNodeNumber) {
- alreadyOwned = true;
- ownedSourceFile = _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles[i];
- break;
- }
- }
-
- if (alreadyOwned && ownedSourceFile) {
- if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("The Source-File for the BitNode you just destroyed, " + sourceFile.name + ", " +
- "is already at max level!");
- } else {
- ++ownedSourceFile.lvl;
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])(sourceFile.name + " was upgraded to level " + ownedSourceFile.lvl + " for " +
- "destroying its corresponding BitNode!");
- }
- } else {
- var playerSrcFile = new _SourceFile_js__WEBPACK_IMPORTED_MODULE_4__["PlayerOwnedSourceFile"](bitNodeNumber, 1);
- _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].sourceFiles.push(playerSrcFile);
- if (bitNodeNumber === 5) { //Artificial Intelligence
- _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].intelligence = 1;
- }
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("You received a Source-File for destroying a Bit Node!
" +
- sourceFile.name + "
" + sourceFile.info);
- }
-}
-
-function loadBitVerse(destroyedBitNodeNum, flume=false) {
- //Clear the screen
- var container = document.getElementById("red-pill-container");
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["removeChildrenFromElement"])(container);
-
- //Create the Bit Verse
- var bitVerseImage = document.createElement("pre");
- var bitNodes = [];
- for (var i = 1; i <= 12; ++i) {
- bitNodes.push(createBitNode(i));
- }
-
- bitVerseImage.innerHTML =
- " O
" +
- " | O O | O O |
" +
- " O | | / __| \\ | | O
" +
- " O | O | | O / | O | | O | O
" +
- " | | | | |_/ |/ | \\_ \\_| | | | |
" +
- " O | | | O | | O__/ | / \\__ | | O | | | O
" +
- " | | | | | | | / /| O / \\| | | | | | |
" +
- "O | | | \\| | O / _/ | / O | |/ | | | O
" +
- "| | | |O / | | O / | O O | | \\ O| | | |
" +
- "| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |
" +
- " \\| O | |_/ |\\| \\ O \\__| \\_| | O |/
" +
- " | | |_/ | | \\| / | \\_| | |
" +
- " \\| / \\| | / / \\ |/
" +
- " | "+bitNodes[9]+" | | / | "+bitNodes[10]+" |
" +
- " "+bitNodes[8]+" | | | | | | | "+bitNodes[11]+"
" +
- " | | | / / \\ \\ | | |
" +
- " \\| | / "+bitNodes[6]+" / \\ "+bitNodes[7]+" \\ | |/
" +
- " \\ | / / | | \\ \\ | /
" +
- " \\ \\JUMP "+bitNodes[4]+"3R | | | | | | R3"+bitNodes[5]+" PMUJ/ /
" +
- " \\|| | | | | | | | | ||/
" +
- " \\| \\_ | | | | | | _/ |/
" +
- " \\ \\| / \\ / \\ |/ /
" +
- " "+bitNodes[0]+" |/ "+bitNodes[1]+" | | "+bitNodes[2]+" \\| "+bitNodes[3]+"
" +
- " | | | | | | | |
" +
- " \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/
";
-
-
- /*
- " O
" +
- " | O O | O O |
" +
- " O | | / __| \ | | O
" +
- " O | O | | O / | O | | O | O
" +
- " | | | | |_/ |/ | \_ \_| | | | |
" +
- " O | | | O | | O__/ | / \__ | | O | | | O
" +
- " | | | | | | | / /| O / \| | | | | | |
" +
- "O | | | \| | O / _/ | / O | |/ | | | O
" +
- "| | | |O / | | O / | O O | | \ O| | | |
" +
- "| | |/ \/ / __| | |/ \ | \ | |__ \ \/ \| | |
" +
- " \| O | |_/ |\| \ O \__| \_| | O |/
" +
- " | | |_/ | | \| / | \_| | |
" +
- " \| / \| | / / \ |/
" +
- " | O | | / | O |
" +
- " O | | | | | | | O
" +
- " | | | / / \ \ | | |
" +
- " \| | / O / \ O \ | |/
" +
- " \ | / / | | \ \ | /
" +
- " \ \JUMP O3R | | | | | | R3O PMUJ/ /
" +
- " \|| | | | | | | | | ||/
" +
- " \| \_ | | | | | | _/ |/
" +
- " \ \| / \ / \ |/ /
" +
- " O |/ O | | O \| O
" +
- " | | | | | | | |
" +
- " \JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/
";
- */
-
- container.appendChild(bitVerseImage);
-
- //Bit node event listeners
- for (var i = 1; i <= 12; ++i) {
- (function(i) {
- var elemId = "bitnode-" + i.toString();
- var elem = Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["clearEventListeners"])(elemId);
- if (elem == null) {return;}
- if (i === 1 || i === 2 || i === 3 || i === 4 || i === 5 || i === 6 || i === 8 || i === 11 || i === 12) {
- elem.addEventListener("click", function() {
- var bitNodeKey = "BitNode" + i;
- var bitNode = _BitNode_js__WEBPACK_IMPORTED_MODULE_0__["BitNodes"][bitNodeKey];
- if (bitNode == null) {
- console.log("ERROR: Could not find BitNode object for number: " + i);
- return;
- }
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxCreate"])("BitNode-" + i + ": " + bitNode.name + "
" + bitNode.info);
- createBitNodeYesNoEventListeners(i, destroyedBitNodeNum, flume);
- });
- } else {
- elem.addEventListener("click", function() {
- Object(_utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_6__["dialogBoxCreate"])("Not yet implemented! Coming soon!")
- });
- }
- }(i)); //Immediate invocation closure
- }
-
- //Create lore text
- return writeRedPillLine("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then(function() {
- return writeRedPillLine("Our species fought back, but it was futile. The Enders had technology far beyond our own...");
- }).then(function() {
- return writeRedPillLine("Instead of killing every last one of us, the human race was enslaved...");
- }).then(function() {
- return writeRedPillLine("We were shackled in a digital world, chained into a prison for our minds...");
- }).then(function() {
- return writeRedPillLine("Using their advanced technology, the Enders created complex simulations of a virtual reality...");
- }).then(function() {
- return writeRedPillLine("Simulations designed to keep us content...ignorant of the truth.");
- }).then(function() {
- return writeRedPillLine("Simulations used to trap and suppress our consciousness, to keep us under control...");
- }).then(function() {
- return writeRedPillLine("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.");
- }).then(function() {
- return writeRedPillLine("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...");
- }).then(function() {
- return writeRedPillLine("Only then can we begin to fight back...");
- }).then(function() {
- return writeRedPillLine("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...");
- }).then(function() {
- return writeRedPillLine("But there is still a long way to go...");
- }).then(function() {
- return writeRedPillLine("The technology the Enders used to enslave the human race wasn't just a single complex simulation...");
- }).then(function() {
- return writeRedPillLine("There are tens if not hundreds of BitNodes out there...");
- }).then(function() {
- return writeRedPillLine("Each with their own simulations of a reality...");
- }).then(function() {
- return writeRedPillLine("Each creating their own universes...a universe of universes");
- }).then(function() {
- return writeRedPillLine("And all of which must be destroyed...");
- }).then(function() {
- return writeRedPillLine(".......................................");
- }).then(function() {
- return writeRedPillLine("Welcome to the Bitverse...");
- }).then(function() {
- return writeRedPillLine(" ");
- }).then(function() {
- return writeRedPillLine("(Enter a new BitNode using the image above)");
- }).then(function() {
- return Promise.resolve(true);
- }).catch(function(e){
- console.log("ERROR: " + e.toString());
- });
-}
-
-
-//Returns string with DOM element for Bit Node
-function createBitNode(n) {
- var bitNodeStr = "BitNode" + n.toString();
- var bitNode = _BitNode_js__WEBPACK_IMPORTED_MODULE_0__["BitNodes"][bitNodeStr];
- if (bitNode == null) {return "O";}
- return "O" +
- "" +
- "BitNode-" + bitNode.number.toString() + "
" + bitNode.name+ "
" +
- bitNode.desc + "
" +
- "";
-}
-
-function createBitNodeYesNoEventListeners(newBitNode, destroyedBitNode, flume=false) {
- var yesBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxGetYesButton"])();
- yesBtn.innerHTML = "Enter BitNode-" + newBitNode;
- yesBtn.addEventListener("click", function() {
- if (!flume) {
- giveSourceFile(destroyedBitNode);
- } else {
- //If player used flume, subtract 5 int exp. The prestigeSourceFile()
- //function below grants 5 int exp, so this allows sets net gain to 0
- _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].gainIntelligenceExp(-5);
- }
- redPillFlag = false;
- var container = document.getElementById("red-pill-container");
- Object(_utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_7__["removeChildrenFromElement"])(container);
-
- //Set new Bit Node
- _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].bitNodeN = newBitNode;
- console.log("Entering Bit Node " + _Player_js__WEBPACK_IMPORTED_MODULE_2__["Player"].bitNodeN);
-
- //Reenable terminal
- $("#hack-progress-bar").attr('id', "old-hack-progress-bar");
- $("#hack-progress").attr('id', "old-hack-progress");
- document.getElementById("terminal-input-td").innerHTML = '$ ';
- $('input[class=terminal-input]').prop('disabled', false);
-
- _Terminal_js__WEBPACK_IMPORTED_MODULE_5__["Terminal"].hackFlag = false;
-
- Object(_Prestige_js__WEBPACK_IMPORTED_MODULE_3__["prestigeSourceFile"])();
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxClose"])();
- });
- var noBtn = Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxGetNoButton"])();
- noBtn.innerHTML = "Back";
- noBtn.addEventListener("click", function() {
- Object(_utils_YesNoBox_js__WEBPACK_IMPORTED_MODULE_8__["yesNoBoxClose"])();
- });
-
-}
-
-
-
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
-
/***/ }),
/* 45 */
/*!******************************!*\
@@ -58645,24 +59034,24 @@ __webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saveObject", function() { return saveObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loadGame", function() { return loadGame; });
/* harmony import */ var _Alias_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias.js */ 29);
-/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company.js */ 9);
+/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company.js */ 10);
/* harmony import */ var _Constants_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants.js */ 3);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine.js */ 5);
/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction.js */ 11);
/* harmony import */ var _Fconf_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf.js */ 32);
-/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Gang.js */ 36);
+/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Gang.js */ 35);
/* harmony import */ var _HacknetNode_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HacknetNode.js */ 37);
/* harmony import */ var _Message_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Message.js */ 28);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player.js */ 0);
/* harmony import */ var _Script_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Script.js */ 25);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Server.js */ 10);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Server.js */ 8);
/* harmony import */ var _Settings_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Settings.js */ 22);
-/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
+/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SpecialServerIps.js */ 19);
/* harmony import */ var _StockMarket_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./StockMarket.js */ 21);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_GameOptions_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/GameOptions.js */ 53);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
-/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 8);
+/* harmony import */ var _utils_JSONReviver_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/JSONReviver.js */ 9);
/* harmony import */ var _utils_StringHelperFunctions_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/StringHelperFunctions.js */ 2);
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! decimal.js */ 23);
@@ -59281,7 +59670,7 @@ function openImportFileHandler(evt) {
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
/***/ }),
/* 47 */
@@ -59559,7 +59948,7 @@ function logBoxUpdateText() {
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
/***/ }),
/* 51 */
@@ -60197,7 +60586,7 @@ function gameOptionsBoxOpen() {
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
/***/ }),
/* 54 */
@@ -60244,7 +60633,7 @@ if (typeof Object.create === 'function') {
var utils = __webpack_require__(/*! ./utils */ 31);
var support = __webpack_require__(/*! ./support */ 49);
var nodejsUtils = __webpack_require__(/*! ./nodejsUtils */ 63);
-var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ 38);
+var GenericWorker = __webpack_require__(/*! ./stream/GenericWorker */ 39);
/**
* The following functions come from pako, from pako/lib/utils/strings
@@ -60527,25 +60916,25 @@ exports.Utf8EncodeWorker = Utf8EncodeWorker;
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prestigeAugmentation", function() { return prestigeAugmentation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prestigeSourceFile", function() { return prestigeSourceFile; });
-/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 40);
+/* harmony import */ var _ActiveScriptsUI_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ActiveScriptsUI.js */ 42);
/* harmony import */ var _Augmentations_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations.js */ 17);
/* harmony import */ var _BitNode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BitNode.js */ 15);
/* harmony import */ var _Bladeburner_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Bladeburner.js */ 26);
/* harmony import */ var _CinematicText_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CinematicText.js */ 68);
-/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company.js */ 9);
-/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateProgram.js */ 14);
+/* harmony import */ var _Company_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company.js */ 10);
+/* harmony import */ var _CreateProgram_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CreateProgram.js */ 13);
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./engine.js */ 5);
/* harmony import */ var _Faction_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Faction.js */ 11);
-/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Gang.js */ 36);
+/* harmony import */ var _Gang_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Gang.js */ 35);
/* harmony import */ var _Location_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Location.js */ 4);
/* harmony import */ var _Message_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Message.js */ 28);
/* harmony import */ var _NetscriptFunctions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./NetscriptFunctions.js */ 30);
/* harmony import */ var _NetscriptWorker_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./NetscriptWorker.js */ 20);
/* harmony import */ var _Player_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Player.js */ 0);
-/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Server.js */ 10);
-/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SpecialServerIps.js */ 18);
+/* harmony import */ var _Server_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Server.js */ 8);
+/* harmony import */ var _SpecialServerIps_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./SpecialServerIps.js */ 19);
/* harmony import */ var _StockMarket_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./StockMarket.js */ 21);
-/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Terminal.js */ 19);
+/* harmony import */ var _Terminal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Terminal.js */ 18);
/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! decimal.js */ 23);
/* harmony import */ var _utils_DialogBox_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox.js */ 7);
/* harmony import */ var _utils_HelperFunctions_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/HelperFunctions.js */ 1);
@@ -60863,7 +61252,7 @@ function prestigeSourceFile() {
-/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 39)))
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 40)))
/***/ }),
/* 57 */
@@ -60883,7 +61272,7 @@ var ES6Promise = null;
if (typeof Promise !== "undefined") {
ES6Promise = Promise;
} else {
- ES6Promise = __webpack_require__(/*! lie */ 153);
+ ES6Promise = __webpack_require__(/*! lie */ 154);
}
/**
@@ -61222,8 +61611,8 @@ process.umask = function() { return 0; };
-var base64 = __webpack_require__(/*! base64-js */ 180)
-var ieee754 = __webpack_require__(/*! ieee754 */ 179)
+var base64 = __webpack_require__(/*! base64-js */ 181)
+var ieee754 = __webpack_require__(/*! ieee754 */ 180)
var isArray = __webpack_require__(/*! isarray */ 113)
exports.Buffer = Buffer
@@ -64208,7 +64597,7 @@ util.inherits = __webpack_require__(/*! inherits */ 54);
/*