From 5f817c8016c47c6f64a0ab70688b2192cd9e9895 Mon Sep 17 00:00:00 2001
From: danielyxie
Returns a boolean denoting whether or not the specified server exists. The argument " +
"must be a string with the hostname or IP of the target server.
" +
"fileExists(filename, [hostname/ip])
Returns a boolean (true or false) indicating whether the specified file exists on a server. " +
- "The first argument must be a string with the name of the file. A file can either be a script, program, or literature file. A script name is case-sensitive, but a " +
- "program/literature file is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe.
" +
+ "The first argument must be a string with the filename. A file can either be a script, program, literature file, or a text file. The filename for a script is case-sensitive, but " +
+ "for the other files it is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe.
" +
"The second argument is a string with the hostname or IP of the server on which to search for the program. This second argument is optional. " +
"If it is omitted, then the function will search through the current server (the server running the script that calls this function) for the file.
" +
"Example: fileExists('foo.script', 'foodnstuff');
" +
@@ -3393,6 +3390,8 @@ let CONSTANTS = {
"clear(port/fn)
This function is used to clear a Netscript Port or a text file.
" +
"It takes a single argument. If this argument is a number between 1 and 10, then it specifies a port and will clear it (deleting all data from it). " +
"If the argument is a string, then it specifies the name of a text file (.txt) and will clear the text file so that it is empty.
" +
+ "rm(fn)
This function is used to remove a file. It takes a string with the filename as the argument. Returns " +
+ "true if it successfully deletes the given file, and false otherwise. This function works for every file type except message files (.msg).
" +
"scriptRunning(scriptname, hostname/ip)
Returns a boolean indicating whether any instance of the specified script is running " +
"on a server, regardless of its arguments. This is different than the isRunning() function because it does not " +
"try to identify a specific instance of a running script by its arguments.
" +
@@ -3844,6 +3843,30 @@ let CONSTANTS = {
LatestUpdate:
"v0.34.2
" +
+ "-Corporation Management Changes:
" +
+ "---Added advertising mechanics
" +
+ "---Added Industry-specific purchases
" +
+ "---Re-designed employee management UI
" +
+ "---Rebalancing: Made many upgrades/purchases cheaper. Receive more money from investors in early stage. Company valuation is higher after going public
" +
+ "---Multiple bug fixes
" +
+ "-Added rm() Netscript function
" +
+ "-Updated the way script RAM usage is calculated. Now, a function only increases RAM usage the " +
+ "first time it is called. i.e. even if you call hack() multiple times in a script, it only counts " +
+ "against RAM usage once. The same change applies for while/for loops and if conditionals.
" +
+ "-The RAM cost of the following were increased:
" +
+ "---If statements: increased by 0.05GB
" +
+ "---run() and exec(): increased by 0.2GB
" +
+ "---scp(): increased by 0.1GB
" +
+ "---purchaseServer(): increased by 0.25GB
" +
+ "-Note: You may need to re-save all of your scripts in order to re-calculate their RAM usages. Otherwise, " +
+ "it should automatically be re-calculated when you reset/prestige
" +
+ "-The cost to upgrade your home computer's RAM has been increased (both the base cost and the exponential upgrade multiplier)
" +
+ "-The cost of purchasing a server was increased by 10% (it is now $55k per RAM)
" +
+ "-Bug fix: (Hopefully) removed an exploit where you could avoid RAM usage for Netscript function calls " +
+ "by assigning functions to a variable (foo = hack(); foo('helios');)
" +
+ "-Bug fix: (Hopefully) removed an exploit where you could run arbitrary Javascript code using the constructor() " +
+ "method
" +
+ "-Thanks to Github user mateon1 and Reddit users havoc_mayhem and spaceglace for notifying me of the above exploits
" +
"-The fileExists() Netscript function now works on text files (.txt). Thanks to Github user devoidfury for this
"
}
@@ -3862,7 +3885,7 @@ let CONSTANTS = {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isPositiveNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return containsAllStrings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return formatNumber; });
-/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return numOccurrences; });
+/* unused harmony export numOccurrences */
/* unused harmony export numNetscriptOperators */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isHTML; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__DialogBox_js__ = __webpack_require__(1);
@@ -4525,7 +4548,7 @@ let Engine = {
/* Display character info */
displayCharacterInfo: function() {
- Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(Engine.Display.characterInfo);
+ Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["j" /* removeChildrenFromElement */])(Engine.Display.characterInfo);
var companyPosition = "";
if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].companyPosition != "") {
@@ -4537,7 +4560,7 @@ let Engine = {
intText = 'Intelligence: ' + (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].intelligence).toLocaleString() + "
";
}
- Engine.Display.characterInfo.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("pre", {
+ Engine.Display.characterInfo.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("pre", {
innerHTML:
'General
' +
'Current City: ' + __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].city + '
' +
@@ -4596,13 +4619,13 @@ let Engine = {
if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].sourceFiles.length !== 0) {
var index = "BitNode" + __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].bitNodeN;
- Engine.Display.characterInfo.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ Engine.Display.characterInfo.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("p", {
width:"60%",
innerHTML:
"
Current BitNode: " + __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].bitNodeN + " (" + __WEBPACK_IMPORTED_MODULE_8__BitNode_js__["b" /* BitNodes */][index].name + ")
",
}));
- Engine.Display.characterInfo.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ Engine.Display.characterInfo.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("p", {
width:"60%", fontSize: "13px", marginLeft:"4%",
innerHTML:__WEBPACK_IMPORTED_MODULE_8__BitNode_js__["b" /* BitNodes */][index].info,
}))
@@ -4661,8 +4684,8 @@ let Engine = {
var genericLocationsList = document.getElementById("generic-locations-list");
genericLocationsList.style.display = "inline";
if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].corporation instanceof __WEBPACK_IMPORTED_MODULE_10__CompanyManagement_js__["a" /* Corporation */] && document.getElementById("location-corporation-button") == null) {
- var li = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("li", {});
- li.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var li = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("li", {});
+ li.appendChild(Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
innerText:__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].corporation.name, id:"location-corporation-button",
class:"a-link-button",
clickListener:()=>{
@@ -4970,7 +4993,6 @@ let Engine = {
messages: 150,
stockTick: 30, //Update stock prices
sCr: 1500,
- updateScriptEditorDisplay: 5,
},
decrementAllCounters: function(numCycles = 1) {
@@ -5030,6 +5052,8 @@ let Engine = {
if (Engine.Counters.updateDisplaysLong <= 0) {
if (Engine.currentPage === Engine.Page.Gang) {
Object(__WEBPACK_IMPORTED_MODULE_15__Gang_js__["f" /* updateGangContent */])();
+ } else if (Engine.currentPage === Engine.Page.ScriptEditor) {
+ Object(__WEBPACK_IMPORTED_MODULE_27__Script_js__["f" /* updateScriptEditorContent */])();
}
Engine.Counters.updateDisplaysLong = 15;
}
@@ -5091,13 +5115,6 @@ let Engine = {
}
Engine.Counters.sCr = 1500;
}
-
- if (Engine.Counters.updateScriptEditorDisplay <= 0) {
- if (Engine.currentPage == Engine.Page.ScriptEditor) {
- Object(__WEBPACK_IMPORTED_MODULE_27__Script_js__["f" /* updateScriptEditorContent */])();
- }
- Engine.Counters.updateScriptEditorDisplay = 5;
- }
},
/* Calculates the hack progress for a manual (non-scripted) hack and updates the progress bar/time accordingly */
@@ -6000,210 +6017,210 @@ __WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].construct
function initForeignServers() {
//MegaCorporations
var ECorpServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "ecorp", "ECorp", false, false, false, 0);
- ECorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1150, 1300), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(30000000000, 70000000000), 99, 99);
+ ECorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1150, 1300), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(30000000000, 70000000000), 99, 99);
ECorpServer.setPortProperties(5);
AddToAllServers(ECorpServer);
var MegaCorpServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "megacorp", "MegaCorp", false, false, false, 0);
- MegaCorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1150, 1300), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(40000000000, 60000000000), 99, 99);
+ MegaCorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1150, 1300), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(40000000000, 60000000000), 99, 99);
MegaCorpServer.setPortProperties(5);
AddToAllServers(MegaCorpServer);
var BachmanAndAssociatesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "b-and-a", "Bachman & Associates", false, false, false, 0);
- BachmanAndAssociatesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000, 1050), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(20000000000, 25000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(75, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(65, 75));
+ BachmanAndAssociatesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000, 1050), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(20000000000, 25000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(75, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(65, 75));
BachmanAndAssociatesServer.setPortProperties(5);
AddToAllServers(BachmanAndAssociatesServer);
var BladeIndustriesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "blade", "Blade Industries", false, false, false, 2);
- BladeIndustriesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000, 1100), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(12000000000, 20000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(90, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 75));
+ BladeIndustriesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000, 1100), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(12000000000, 20000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(90, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 75));
BladeIndustriesServer.setPortProperties(5);
BladeIndustriesServer.messages.push("beyond-man.lit");
AddToAllServers(BladeIndustriesServer);
var NWOServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "nwo", "New World Order", false, false, false, 2);
- NWOServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(25000000000, 35000000000), 99, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(75, 85));
+ NWOServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(25000000000, 35000000000), 99, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(75, 85));
NWOServer.setPortProperties(5);
NWOServer.messages.push("the-hidden-world.lit");
AddToAllServers(NWOServer);
var ClarkeIncorporatedServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "clarkeinc", "Clarke Incorporated", false, false, false, 2);
- ClarkeIncorporatedServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(15000000000, 25000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 60), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 70));
+ ClarkeIncorporatedServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(15000000000, 25000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 60), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 70));
ClarkeIncorporatedServer.setPortProperties(5);
ClarkeIncorporatedServer.messages.push("beyond-man.lit");
ClarkeIncorporatedServer.messages.push("cost-of-immortality.lit");
AddToAllServers(ClarkeIncorporatedServer);
var OmniTekIncorporatedServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "omnitek", "OmniTek Incorporated", false, false, false, 2);
- OmniTekIncorporatedServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(900, 1100), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(15000000000, 20000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(90, 99), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(95, 99));
+ OmniTekIncorporatedServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(900, 1100), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(15000000000, 20000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(90, 99), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(95, 99));
OmniTekIncorporatedServer.setPortProperties(5);
OmniTekIncorporatedServer.messages.push("coded-intelligence.lit");
AddToAllServers(OmniTekIncorporatedServer);
var FourSigmaServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "4sigma", "FourSigma", false, false, false, 0);
- FourSigmaServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(950, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(15000000000, 25000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 70), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(75, 99));
+ FourSigmaServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(950, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(15000000000, 25000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 70), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(75, 99));
FourSigmaServer.setPortProperties(5);
AddToAllServers(FourSigmaServer);
var KuaiGongInternationalServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "kuai-gong", "KuaiGong International", false, false, false, 0);
- KuaiGongInternationalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000, 1250), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(20000000000, 30000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(95, 99), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(90, 99));
+ KuaiGongInternationalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000, 1250), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(20000000000, 30000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(95, 99), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(90, 99));
KuaiGongInternationalServer.setPortProperties(5);
AddToAllServers(KuaiGongInternationalServer);
//Technology and communications companies (large targets)
var FulcrumTechnologiesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "fulcrumtech", "Fulcrum Technologies", false, false, false, 64);
- FulcrumTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1400000000, 1800000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 99));
+ FulcrumTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000, 1200), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1400000000, 1800000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 99));
FulcrumTechnologiesServer.setPortProperties(5);
FulcrumTechnologiesServer.messages.push("simulated-reality.lit");
AddToAllServers(FulcrumTechnologiesServer);
var FulcrumSecretTechnologiesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "fulcrumassets", "Fulcrum Technologies Assets", false, false, false, 0);
- FulcrumSecretTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1200, 1500), 1000000, 99, 1);
+ FulcrumSecretTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1200, 1500), 1000000, 99, 1);
FulcrumSecretTechnologiesServer.setPortProperties(5);
AddToAllServers(FulcrumSecretTechnologiesServer);
__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["a" /* SpecialServerIps */].addIp(__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["b" /* SpecialServerNames */].FulcrumSecretTechnologies, FulcrumSecretTechnologiesServer.ip);
var StormTechnologiesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "stormtech", "Storm Technologies", false, false, false, 0);
- StormTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(900, 1050), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000000000, 1200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 90));
+ StormTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(900, 1050), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000000000, 1200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 90));
StormTechnologiesServer.setPortProperties(5);
AddToAllServers(StormTechnologiesServer);
var DefCommServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "defcomm", "DefComm", false, false, false, 0);
- DefCommServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(900, 1000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800000000, 950000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 70));
+ DefCommServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(900, 1000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800000000, 950000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 70));
DefCommServer.setPortProperties(5);
AddToAllServers(DefCommServer);
var InfoCommServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "infocomm", "InfoComm", false, false, false, 0);
- InfoCommServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(875, 950), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(600000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(35, 75));
+ InfoCommServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(875, 950), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(600000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(35, 75));
InfoCommServer.setPortProperties(5);
AddToAllServers(InfoCommServer);
var HeliosLabsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "helios", "Helios Labs", false, false, false, 2);
- HeliosLabsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(550000000, 750000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80));
+ HeliosLabsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(550000000, 750000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80));
HeliosLabsServer.setPortProperties(5);
HeliosLabsServer.messages.push("beyond-man.lit");
AddToAllServers(HeliosLabsServer);
var VitaLifeServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "vitalife", "VitaLife", false, false, false, 32);
- VitaLifeServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(775, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(700000000, 800000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 80));
+ VitaLifeServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(775, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(700000000, 800000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 80));
VitaLifeServer.setPortProperties(5);
VitaLifeServer.messages.push("A-Green-Tomorrow.lit");
AddToAllServers(VitaLifeServer);
var IcarusMicrosystemsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "icarus", "Icarus Microsystems", false, false, false, 0);
- IcarusMicrosystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(850, 925), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(900000000, 1000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(85, 95));
+ IcarusMicrosystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(850, 925), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(900000000, 1000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(85, 95));
IcarusMicrosystemsServer.setPortProperties(5);
AddToAllServers(IcarusMicrosystemsServer);
var UniversalEnergyServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "univ-energy", "Universal Energy", false, false, false, 32);
- UniversalEnergyServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1100000000, 1200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 90));
+ UniversalEnergyServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1100000000, 1200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 90));
UniversalEnergyServer.setPortProperties(4);
AddToAllServers(UniversalEnergyServer);
var TitanLabsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "titan-labs", "Titan Laboratories", false, false, false, 32);
- TitanLabsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800, 875), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(750000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 80));
+ TitanLabsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800, 875), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(750000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 80));
TitanLabsServer.setPortProperties(5);
TitanLabsServer.messages.push("coded-intelligence.lit");
AddToAllServers(TitanLabsServer);
var MicrodyneTechnologiesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "microdyne", "Microdyne Technologies", false, false, false, 16);
- MicrodyneTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800, 875), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(500000000, 700000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(65, 75), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 90));
+ MicrodyneTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800, 875), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(500000000, 700000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(65, 75), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 90));
MicrodyneTechnologiesServer.setPortProperties(5);
MicrodyneTechnologiesServer.messages.push("synthetic-muscles.lit");
AddToAllServers(MicrodyneTechnologiesServer);
var TaiYangDigitalServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "taiyang-digital", "Taiyang Digital", false, false, false, 2);
- TaiYangDigitalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(850, 950), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80));
+ TaiYangDigitalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(850, 950), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80));
TaiYangDigitalServer.setPortProperties(5);
TaiYangDigitalServer.messages.push("A-Green-Tomorrow.lit");
TaiYangDigitalServer.messages.push("brighter-than-the-sun.lit");
AddToAllServers(TaiYangDigitalServer);
var GalacticCyberSystemsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "galactic-cyber", "Galactic Cybersystems", false, false, false, 0);
- GalacticCyberSystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(825, 875), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(750000000, 850000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 90));
+ GalacticCyberSystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(825, 875), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(750000000, 850000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 90));
GalacticCyberSystemsServer.setPortProperties(5);
AddToAllServers(GalacticCyberSystemsServer);
//Defense Companies ("Large" Companies)
var AeroCorpServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "aerocorp", "AeroCorp", false, false, false, 2);
- AeroCorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(850, 925), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000000000, 1200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(55, 65));
+ AeroCorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(850, 925), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000000000, 1200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(55, 65));
AeroCorpServer.setPortProperties(5);
AeroCorpServer.messages.push("man-and-machine.lit");
AddToAllServers(AeroCorpServer);
var OmniaCybersystemsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "omnia", "Omnia Cybersystems", false, false, false, 0);
- OmniaCybersystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(850, 950), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(900000000, 1000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 70));
+ OmniaCybersystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(850, 950), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(900000000, 1000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(85, 95), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 70));
OmniaCybersystemsServer.setPortProperties(5);
AddToAllServers(OmniaCybersystemsServer);
var ZBDefenseServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "zb-def", "ZB Defense Industries", false, false, false, 2);
- ZBDefenseServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(775, 825), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(900000000, 1100000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(65, 75));
+ ZBDefenseServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(775, 825), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(900000000, 1100000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(65, 75));
ZBDefenseServer.setPortProperties(4);
ZBDefenseServer.messages.push("synthetic-muscles.lit");
AddToAllServers(ZBDefenseServer);
var AppliedEnergeticsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "applied-energetics", "Applied Energetics", false, false, false, 0);
- AppliedEnergeticsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(775, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(700000000, 1000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 75));
+ AppliedEnergeticsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(775, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(700000000, 1000000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 75));
AppliedEnergeticsServer.setPortProperties(4);
AddToAllServers(AppliedEnergeticsServer);
var SolarisSpaceSystemsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "solaris", "Solaris Space Systems", false, false, false, 2);
- SolarisSpaceSystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(750, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(700000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80));
+ SolarisSpaceSystemsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(750, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(700000000, 900000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80));
SolarisSpaceSystemsServer.setPortProperties(5);
SolarisSpaceSystemsServer.messages.push("A-Green-Tomorrow.lit");
SolarisSpaceSystemsServer.messages.push("the-failed-frontier.lit");
AddToAllServers(SolarisSpaceSystemsServer);
var DeltaOneServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "deltaone", "Delta One", false, false, false, 0);
- DeltaOneServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1300000000, 1700000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(75, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 70));
+ DeltaOneServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800, 900), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1300000000, 1700000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(75, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 70));
DeltaOneServer.setPortProperties(5);
AddToAllServers(DeltaOneServer);
//Health, medicine, pharmaceutical companies ("Large" targets)
var GlobalPharmaceuticalsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "global-pharm", "Global Pharmaceuticals", false, false, false, 16);
- GlobalPharmaceuticalsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(750, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1500000000, 1750000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(75, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 90));
+ GlobalPharmaceuticalsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(750, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1500000000, 1750000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(75, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 90));
GlobalPharmaceuticalsServer.setPortProperties(4);
GlobalPharmaceuticalsServer.messages.push("A-Green-Tomorrow.lit");
AddToAllServers(GlobalPharmaceuticalsServer);
var NovaMedicalServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "nova-med", "Nova Medical", false, false, false, 0);
- NovaMedicalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(775, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1100000000, 1250000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(65, 85));
+ NovaMedicalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(775, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1100000000, 1250000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(65, 85));
NovaMedicalServer.setPortProperties(4);
AddToAllServers(NovaMedicalServer);
var ZeusMedicalServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "zeus-med", "Zeus Medical", false, false, false, 0);
- ZeusMedicalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1300000000, 1500000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80));
+ ZeusMedicalServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800, 850), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1300000000, 1500000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 90), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80));
ZeusMedicalServer.setPortProperties(5);
AddToAllServers(ZeusMedicalServer);
var UnitaLifeGroupServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "unitalife", "UnitaLife Group", false, false, false, 32);
- UnitaLifeGroupServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(775, 825), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000000000, 1100000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80));
+ UnitaLifeGroupServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(775, 825), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000000000, 1100000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80));
UnitaLifeGroupServer.setPortProperties(4);
AddToAllServers(UnitaLifeGroupServer);
//"Medium level" targets
var LexoCorpServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "lexo-corp", "Lexo Corporation", false, false, false, 16);
- LexoCorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(650, 750), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(700000000, 800000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(55, 65));
+ LexoCorpServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(650, 750), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(700000000, 800000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(55, 65));
LexoCorpServer.setPortProperties(4);
AddToAllServers(LexoCorpServer);
var RhoConstructionServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "rho-construction", "Rho Construction", false, false, false, 0);
- RhoConstructionServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(475, 525), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(500000000, 700000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(40, 60), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(40, 60));
+ RhoConstructionServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(475, 525), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(500000000, 700000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(40, 60), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(40, 60));
RhoConstructionServer.setPortProperties(3);
AddToAllServers(RhoConstructionServer);
var AlphaEnterprisesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "alpha-ent", "Alpha Enterprises", false, false, false, 2);
- AlphaEnterprisesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(500, 600), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(600000000, 750000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 70), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 60));
+ AlphaEnterprisesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(500, 600), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(600000000, 750000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 70), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 60));
AlphaEnterprisesServer.setPortProperties(4);
AlphaEnterprisesServer.messages.push("sector-12-crime.lit");
AddToAllServers(AlphaEnterprisesServer);
var AevumPoliceServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "aevum-police", "Aevum Police Network", false, false, false, 0);
- AevumPoliceServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(400, 450), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(200000000, 400000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(30, 50));
+ AevumPoliceServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(400, 450), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(200000000, 400000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(30, 50));
AevumPoliceServer.setPortProperties(4);
AddToAllServers(AevumPoliceServer);
var RothmanUniversityServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "rothman-uni", "Rothman University Network", false, false, false, 4);
- RothmanUniversityServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(370, 430), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(175000000, 250000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(45, 55), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(35, 45));
+ RothmanUniversityServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(370, 430), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(175000000, 250000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(45, 55), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(35, 45));
RothmanUniversityServer.setPortProperties(3);
RothmanUniversityServer.messages.push("secret-societies.lit");
RothmanUniversityServer.messages.push("the-failed-frontier.lit");
@@ -6211,12 +6228,12 @@ function initForeignServers() {
AddToAllServers(RothmanUniversityServer);
var ZBInstituteOfTechnologyServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "zb-institute", "ZB Institute of Technology Network", false, false, false, 4);
- ZBInstituteOfTechnologyServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(725, 775), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(800000000, 1100000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(65, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(75, 85));
+ ZBInstituteOfTechnologyServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(725, 775), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(800000000, 1100000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(65, 85), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(75, 85));
ZBInstituteOfTechnologyServer.setPortProperties(5);
AddToAllServers(ZBInstituteOfTechnologyServer);
var SummitUniversityServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "summit-uni", "Summit University Network", false, false, false, 4);
- SummitUniversityServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(425, 475), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(200000000, 350000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(45, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(40, 60));
+ SummitUniversityServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(425, 475), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(200000000, 350000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(45, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(40, 60));
SummitUniversityServer.setPortProperties(3);
SummitUniversityServer.messages.push("secret-societies.lit");
SummitUniversityServer.messages.push("the-failed-frontier.lit");
@@ -6224,35 +6241,35 @@ function initForeignServers() {
AddToAllServers(SummitUniversityServer);
var SysCoreSecuritiesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "syscore", "SysCore Securities", false, false, false, 0);
- SysCoreSecuritiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(550, 650), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(400000000, 600000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 70));
+ SysCoreSecuritiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(550, 650), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(400000000, 600000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 70));
SysCoreSecuritiesServer.setPortProperties(4);
AddToAllServers(SysCoreSecuritiesServer);
var CatalystVenturesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "catalyst", "Catalyst Ventures", false, false, false, 2);
- CatalystVenturesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(400, 450), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(300000000, 550000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 70), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(25, 55));
+ CatalystVenturesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(400, 450), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(300000000, 550000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 70), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(25, 55));
CatalystVenturesServer.setPortProperties(3);
CatalystVenturesServer.messages.push("tensions-in-tech-race.lit");
AddToAllServers(CatalystVenturesServer);
var TheHubServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "the-hub", "The Hub", false, false, false, 0);
- TheHubServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(275, 325), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(150000000, 200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(35, 45), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(45, 55));
+ TheHubServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(275, 325), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(150000000, 200000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(35, 45), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(45, 55));
TheHubServer.setPortProperties(2);
AddToAllServers(TheHubServer);
var CompuTekServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "comptek", "CompuTek", false, false, false, 8);
- CompuTekServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(300, 400), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(220000000, 250000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(45, 65));
+ CompuTekServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(300, 400), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(220000000, 250000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(45, 65));
CompuTekServer.setPortProperties(3);
CompuTekServer.messages.push("man-and-machine.lit");
AddToAllServers(CompuTekServer);
var NetLinkTechnologiesServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "netlink", "NetLink Technologies", false, false, false, 2);
- NetLinkTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(375, 425), 275000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(45, 75));
+ NetLinkTechnologiesServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(375, 425), 275000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60, 80), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(45, 75));
NetLinkTechnologiesServer.setPortProperties(3);
NetLinkTechnologiesServer.messages.push("simulated-reality.lit");
AddToAllServers(NetLinkTechnologiesServer);
var JohnsonOrthopedicsServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "johnson-ortho", "Johnson Orthopedics", false, false, false, 4);
- JohnsonOrthopedicsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(250, 300), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(70000000, 85000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(35, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(35, 65));
+ JohnsonOrthopedicsServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(250, 300), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(70000000, 85000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(35, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(35, 65));
JohnsonOrthopedicsServer.setPortProperties(2);
AddToAllServers(JohnsonOrthopedicsServer);
@@ -6317,14 +6334,14 @@ function initForeignServers() {
AddToAllServers(MaxHardwareServer);
var OmegaSoftwareServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "omega-net", "Omega Software", false, false, false, 32);
- OmegaSoftwareServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(180, 220), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(60000000, 70000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(25, 35), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(30, 40));
+ OmegaSoftwareServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(180, 220), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(60000000, 70000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(25, 35), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(30, 40));
OmegaSoftwareServer.setPortProperties(2);
OmegaSoftwareServer.messages.push("the-new-god.lit");
AddToAllServers(OmegaSoftwareServer);
//Gyms
var CrushFitnessGymServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "crush-fitness", "Crush Fitness", false, false, false, 0);
- CrushFitnessGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(225, 275), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(40000000, 60000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(35, 45), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(27, 33));
+ CrushFitnessGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(225, 275), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(40000000, 60000000), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(35, 45), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(27, 33));
CrushFitnessGymServer.setPortProperties(2);
AddToAllServers(CrushFitnessGymServer);
@@ -6334,23 +6351,23 @@ function initForeignServers() {
AddToAllServers(IronGymServer);
var MilleniumFitnessGymServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "millenium-fitness", "Millenium Fitness Network", false, false, false, 0);
- MilleniumFitnessGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(475, 525), 250000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(45, 55), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(25, 45));
+ MilleniumFitnessGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(475, 525), 250000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(45, 55), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(25, 45));
MilleniumFitnessGymServer.setPortProperties(3);
AddToAllServers(MilleniumFitnessGymServer);
var PowerhouseGymServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "powerhouse-fitness", "Powerhouse Fitness", false, false, false, 0);
- PowerhouseGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(950, 1100), 900000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 60));
+ PowerhouseGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(950, 1100), 900000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(55, 65), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 60));
PowerhouseGymServer.setPortProperties(5);
AddToAllServers(PowerhouseGymServer);
var SnapFitnessGymServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "snap-fitness", "Snap Fitness", false, false, false, 0);
- SnapFitnessGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(675, 800), 450000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(40, 60), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(40, 60));
+ SnapFitnessGymServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(675, 800), 450000000, Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(40, 60), Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(40, 60));
SnapFitnessGymServer.setPortProperties(4);
AddToAllServers(SnapFitnessGymServer);
//Faction servers, cannot hack money from these
var BitRunnersServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "run4theh111z", "The Runners", false, false, false, 2);
- BitRunnersServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(505, 550), 0, 0, 0);
+ BitRunnersServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(505, 550), 0, 0, 0);
BitRunnersServer.setPortProperties(4);
BitRunnersServer.messages.push("simulated-reality.lit");
BitRunnersServer.messages.push("the-new-god.lit");
@@ -6358,27 +6375,27 @@ function initForeignServers() {
__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["a" /* SpecialServerIps */].addIp(__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["b" /* SpecialServerNames */].BitRunnersServer, BitRunnersServer.ip);
var TheBlackHandServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "I.I.I.I", "I.I.I.I", false, false, false, 2);
- TheBlackHandServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(340, 365), 0, 0, 0);
+ TheBlackHandServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(340, 365), 0, 0, 0);
TheBlackHandServer.setPortProperties(3);
TheBlackHandServer.messages.push("democracy-is-dead.lit");
AddToAllServers(TheBlackHandServer);
__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["a" /* SpecialServerIps */].addIp(__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["b" /* SpecialServerNames */].TheBlackHandServer, TheBlackHandServer.ip);
var NiteSecServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "avmnite-02h", "NiteSec", false, false, false, 2);
- NiteSecServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(202, 220), 0, 0, 0);
+ NiteSecServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(202, 220), 0, 0, 0);
NiteSecServer.setPortProperties(2);
NiteSecServer.messages.push("democracy-is-dead.lit");
AddToAllServers(NiteSecServer);
__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["a" /* SpecialServerIps */].addIp(__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["b" /* SpecialServerNames */].NiteSecServer, NiteSecServer.ip);
var DarkArmyServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), ".", ".", false, false, false, 0);
- DarkArmyServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(505, 550), 0, 0, 0);
+ DarkArmyServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(505, 550), 0, 0, 0);
DarkArmyServer.setPortProperties(4);
AddToAllServers(DarkArmyServer);
__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["a" /* SpecialServerIps */].addIp(__WEBPACK_IMPORTED_MODULE_5__SpecialServerIps_js__["b" /* SpecialServerNames */].TheDarkArmyServer, DarkArmyServer.ip);
var CyberSecServer = new Server(Object(__WEBPACK_IMPORTED_MODULE_7__utils_IPAddress_js__["a" /* createRandomIp */])(), "CSEC", "CyberSec", false, false, false, 2);
- CyberSecServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["h" /* getRandomInt */])(51, 60), 0, 0, 0);
+ CyberSecServer.setHackingParameters(Object(__WEBPACK_IMPORTED_MODULE_6__utils_HelperFunctions_js__["g" /* getRandomInt */])(51, 60), 0, 0, 0);
CyberSecServer.setPortProperties(1);
CyberSecServer.messages.push("democracy-is-dead.lit");
AddToAllServers(CyberSecServer);
@@ -17338,9 +17355,10 @@ function WorkerScript(runningScriptObj) {
this.scriptRef = runningScriptObj;
this.errorMessage = "";
this.args = runningScriptObj.args;
- //this.killTrigger = function() {}; //CB func used to clear any delays (netscriptDelay())
this.delay = null;
this.fnWorker = null; //Workerscript for a function call
+ this.checkingRam = false;
+ this.loadedFns = {}; //Stores names of fns that are "loaded" by this script, thus using RAM
}
//Returns the server on which the workerScript is running
@@ -17378,7 +17396,6 @@ function runScriptsLoop() {
//items fucks up the indexing
for (var i = workerScripts.length - 1; i >= 0; i--) {
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == true) {
- console.log("Deleting script: " + workerScripts[i].name);
//Delete script from the runningScripts array on its host serverIp
var ip = workerScripts[i].serverIp;
var name = workerScripts[i].name;
@@ -17408,7 +17425,7 @@ function runScriptsLoop() {
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == false) {
try {
var ast = Object(__WEBPACK_IMPORTED_MODULE_7__utils_acorn_js__["parse"])(workerScripts[i].code);
- //console.log(ast);
+ console.log(ast);
} catch (e) {
console.log("Error parsing script: " + workerScripts[i].name);
Object(__WEBPACK_IMPORTED_MODULE_8__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Syntax ERROR in " + workerScripts[i].name + ":
" + e);
@@ -17426,7 +17443,6 @@ function runScriptsLoop() {
w.env.stopFlag = true;
w.scriptRef.log("Script finished running");
}).catch(function(w) {
- console.log(w);
if (w instanceof Error) {
Object(__WEBPACK_IMPORTED_MODULE_8__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Script runtime unknown error. This is a bug please contact game developer");
console.log("ERROR: Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: " + w.toString());
@@ -17450,7 +17466,7 @@ function runScriptsLoop() {
Object(__WEBPACK_IMPORTED_MODULE_8__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Script runtime error:
Server Ip: " + serverIp +
"
Script name: " + scriptName +
- "
Args:" + Object(__WEBPACK_IMPORTED_MODULE_9__utils_HelperFunctions_js__["j" /* printArray */])(w.args) + "
" + errorMsg);
+ "
Args:" + Object(__WEBPACK_IMPORTED_MODULE_9__utils_HelperFunctions_js__["i" /* printArray */])(w.args) + "
" + errorMsg);
w.scriptRef.log("Script crashed with runtime error");
} else {
w.scriptRef.log("Script killed");
@@ -17507,7 +17523,7 @@ function addWorkerScript(runningScriptObj, server) {
var ramAvailable = server.maxRam - server.ramUsed;
if (ramUsage > ramAvailable) {
Object(__WEBPACK_IMPORTED_MODULE_8__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Not enough RAM to run script " + runningScriptObj.filename + " with args " +
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_HelperFunctions_js__["j" /* printArray */])(runningScriptObj.args) + ". This likely occurred because you re-loaded " +
+ Object(__WEBPACK_IMPORTED_MODULE_9__utils_HelperFunctions_js__["i" /* printArray */])(runningScriptObj.args) + ". This likely occurred because you re-loaded " +
"the game and the script's RAM usage increased (either because of an update to the game or " +
"your changes to the script.)");
return;
@@ -20393,7 +20409,7 @@ function initLocationButtons() {
//Calculate cost
//Have cost increase by some percentage each time RAM has been upgraded
var cost = currentRam * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamHome;
- var mult = Math.pow(1.55, numUpgrades);
+ var mult = Math.pow(1.58, numUpgrades);
cost = cost * mult;
var yesBtn = Object(__WEBPACK_IMPORTED_MODULE_15__utils_YesNoBox_js__["d" /* yesNoBoxGetYesButton */])(), noBtn = Object(__WEBPACK_IMPORTED_MODULE_15__utils_YesNoBox_js__["c" /* yesNoBoxGetNoButton */])();
@@ -21117,67 +21133,67 @@ function getNumAvailableCreateProgram() {
function initCreateProgramButtons() {
var createProgramList = document.getElementById("create-program-list");
- nukeALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ nukeALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-nuke", innerText:Programs.NukeProgram,
tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",
});
createProgramList.appendChild(nukeALink);
- bruteSshALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ bruteSshALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-brutessh", innerText:Programs.BruteSSHProgram,
tooltip:"This program executes a brute force attack that opens SSH ports"
});
createProgramList.appendChild(bruteSshALink);
- ftpCrackALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ ftpCrackALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-ftpcrack", innerText:Programs.FTPCrackProgram,
tooltip:"This program cracks open FTP ports"
});
createProgramList.appendChild(ftpCrackALink);
- relaySmtpALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ relaySmtpALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-relaysmtp", innerText:Programs.RelaySMTPProgram,
tooltip:"This program opens SMTP ports by redirecting data"
}) ;
createProgramList.appendChild(relaySmtpALink);
- httpWormALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ httpWormALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-httpworm", innerText:Programs.HTTPWormProgram,
tooltip:"This virus opens up HTTP ports"
});
createProgramList.appendChild(httpWormALink);
- sqlInjectALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ sqlInjectALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-sqlinject", innerText:Programs.SQLInjectProgram,
tooltip:"This virus opens SQL ports"
});
createProgramList.appendChild(sqlInjectALink);
- deepscanv1ALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ deepscanv1ALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-deepscanv1", innerText:Programs.DeepscanV1,
tooltip:"This program allows you to use the scan-analyze command with a depth up to 5"
});
createProgramList.appendChild(deepscanv1ALink);
- deepscanv2ALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ deepscanv2ALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-deepscanv2", innerText:Programs.DeepscanV2,
tooltip:"This program allows you to use the scan-analyze command with a depth up to 10"
});
createProgramList.appendChild(deepscanv2ALink);
- servProfilerALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ servProfilerALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-serverprofiler", innerText:Programs.ServerProfiler,
tooltip:"This program is used to display hacking and Netscript-related information about servers"
});
createProgramList.appendChild(servProfilerALink);
- bitFlumeALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ bitFlumeALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-bitflume", innerText:Programs.BitFlume,
tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)"
});
createProgramList.appendChild(bitFlumeALink);
- autolinkALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ autolinkALink = Object(__WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button", id:"create-program-autolink", innerText:"AutoLink.exe",
tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command"
});
@@ -21367,10 +21383,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @preserve
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Server_js__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Settings_js__ = __webpack_require__(16);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Terminal_js__ = __webpack_require__(23);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_DialogBox_js__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__ = __webpack_require__(7);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__ = __webpack_require__(2);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__ = __webpack_require__(4);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_acorn_js__ = __webpack_require__(48);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_acorn_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__utils_acorn_js__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_DialogBox_js__ = __webpack_require__(1);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__ = __webpack_require__(7);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_HelperFunctions_js__ = __webpack_require__(2);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__utils_StringHelperFunctions_js__ = __webpack_require__(4);
var ace = __webpack_require__(54);
__webpack_require__(56);
__webpack_require__(57);
@@ -21401,21 +21419,60 @@ __webpack_require__(68);
+
var keybindings = {
ace: null,
vim: "ace/keyboard/vim",
emacs: "ace/keyboard/emacs",
};
+var scriptEditorRamCheck = null, scriptEditorRamText = null;
function scriptEditorInit() {
- //Initialize save and close button
- var closeButton = document.getElementById("script-editor-save-and-close-button");
-
- closeButton.addEventListener("click", function() {
- saveAndCloseScriptEditor();
- return false;
+ //Create buttons at the bottom of script editor
+ var wrapper = document.getElementById("script-editor-buttons-wrapper");
+ if (wrapper == null) {
+ console.log("Error finding 'script-editor-buttons-wrapper'");
+ return;
+ }
+ var closeButton = Object(__WEBPACK_IMPORTED_MODULE_12__utils_HelperFunctions_js__["e" /* createElement */])("a", {
+ class:"a-link-button", display:"inline-block",
+ innerText:"Save & Close (Ctrl + b)",
+ clickListener:()=>{
+ saveAndCloseScriptEditor();
+ return false;
+ }
});
+ scriptEditorRamText = Object(__WEBPACK_IMPORTED_MODULE_12__utils_HelperFunctions_js__["e" /* createElement */])("p", {
+ display:"inline-block", margin:"10px", id:"script-editor-status-text"
+ });
+
+ var checkboxLabel = Object(__WEBPACK_IMPORTED_MODULE_12__utils_HelperFunctions_js__["e" /* createElement */])("label", {
+ for:"script-editor-ram-check", margin:"4px", marginTop: "8px",
+ innerText:"Dynamic RAM Usage Checker", color:"white",
+ tooltip:"Enable/Disable the dynamic RAM Usage display. You may " +
+ "want to disable it for very long scripts because there may be " +
+ "performance issues"
+ });
+
+ scriptEditorRamCheck = Object(__WEBPACK_IMPORTED_MODULE_12__utils_HelperFunctions_js__["e" /* createElement */])("input", {
+ type:"checkbox", name:"script-editor-ram-check", id:"script-editor-ram-check",
+ margin:"4px", marginTop: "8px",
+ });
+ scriptEditorRamCheck.checked = true;
+
+ var documentationButton = Object(__WEBPACK_IMPORTED_MODULE_12__utils_HelperFunctions_js__["e" /* createElement */])("a", {
+ display:"inline-block", class:"a-link-button", innerText:"Netscript Documentation",
+ href:"https://bitburner.wikia.com/wiki/Netscript",
+ target:"_blank"
+ });
+
+ wrapper.appendChild(closeButton);
+ wrapper.appendChild(scriptEditorRamText);
+ wrapper.appendChild(scriptEditorRamCheck);
+ wrapper.appendChild(checkboxLabel);
+ wrapper.appendChild(documentationButton);
+
//Initialize ACE Script editor
var editor = ace.edit('javascript-editor');
editor.getSession().setMode('ace/mode/netscript');
@@ -21497,14 +21554,19 @@ function scriptEditorInit() {
}
document.addEventListener("DOMContentLoaded", scriptEditorInit, false);
-//Updates line number and RAM usage in script
+//Updates RAM usage in script
function updateScriptEditorContent() {
+ if (scriptEditorRamCheck == null || !scriptEditorRamCheck.checked) {
+ scriptEditorRamText.innerText = "N/A";
+ return;
+ }
var editor = ace.edit('javascript-editor');
var code = editor.getValue();
var codeCopy = code.repeat(1);
var ramUsage = calculateRamUsage(codeCopy);
- document.getElementById("script-editor-status-text").innerText =
- "RAM: " + Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["c" /* formatNumber */])(ramUsage, 2).toString() + "GB";
+ if (ramUsage !== -1) {
+ scriptEditorRamText.innerText = "RAM: " + Object(__WEBPACK_IMPORTED_MODULE_13__utils_StringHelperFunctions_js__["c" /* formatNumber */])(ramUsage, 2).toString() + "GB";
+ }
}
//Define key commands in script editor (ctrl o to save + close, etc.)
@@ -21522,26 +21584,26 @@ function saveAndCloseScriptEditor() {
var filename = document.getElementById("script-editor-filename").value;
if (__WEBPACK_IMPORTED_MODULE_2__InteractiveTutorial_js__["b" /* iTutorialIsRunning */] && __WEBPACK_IMPORTED_MODULE_2__InteractiveTutorial_js__["a" /* currITutorialStep */] == __WEBPACK_IMPORTED_MODULE_2__InteractiveTutorial_js__["e" /* iTutorialSteps */].TerminalTypeScript) {
if (filename != "foodnstuff") {
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Leave the script name as 'foodnstuff'!");
+ Object(__WEBPACK_IMPORTED_MODULE_10__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Leave the script name as 'foodnstuff'!");
return;
}
var editor = ace.edit('javascript-editor');
var code = editor.getValue();
code = code.replace(/\s/g, "");
if (code.indexOf("while(true){hack('foodnstuff');}") == -1) {
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Please copy and paste the code from the tutorial!");
+ Object(__WEBPACK_IMPORTED_MODULE_10__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Please copy and paste the code from the tutorial!");
return;
}
Object(__WEBPACK_IMPORTED_MODULE_2__InteractiveTutorial_js__["c" /* iTutorialNextStep */])();
}
if (filename == "") {
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You must specify a filename!");
+ Object(__WEBPACK_IMPORTED_MODULE_10__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You must specify a filename!");
return;
}
if (checkValidFilename(filename) == false) {
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Script filename can contain only alphanumerics, hyphens, and underscores");
+ Object(__WEBPACK_IMPORTED_MODULE_10__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Script filename can contain only alphanumerics, hyphens, and underscores");
return;
}
@@ -21603,166 +21665,99 @@ Script.prototype.saveScript = function() {
//Updates how much RAM the script uses when it is running.
Script.prototype.updateRamUsage = function() {
var codeCopy = this.code.repeat(1);
- this.ramUsage = calculateRamUsage(codeCopy);
- console.log("ram usage: " + this.ramUsage);
- if (isNaN(this.ramUsage)) {
- Object(__WEBPACK_IMPORTED_MODULE_9__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR in calculating ram usage. This is a bug, please report to game develoepr");
+ var res = calculateRamUsage(codeCopy);
+ if (res !== -1) {
+ this.ramUsage = res;
}
}
function calculateRamUsage(codeCopy) {
- codeCopy = codeCopy.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm, '$1'); //Delete comments
- codeCopy = codeCopy.replace(/\s/g,''); //Remove all whitespace
- var baseRam = 1.4;
- var whileCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "while(");
- var forCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "for(");
- var ifCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "if(");
- var hackCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "hack(");
- var growCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "grow(");
- var weakenCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "weaken(");
- var scanCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scan(");
- var nukeCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "nuke(");
- var brutesshCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "brutessh(");
- var ftpcrackCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "ftpcrack(");
- var relaysmtpCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "relaysmtp(");
- var httpwormCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "httpworm(");
- var sqlinjectCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sqlinject(");
- var runCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "run(");
- var execCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "exec(");
- var killCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "kill(") + Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "killall(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "exit(");
- var scpCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scp(");
- var hasRootAccessCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "hasRootAccess(");
- var getHostnameCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getHostname(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getIp(");
- var getHackingLevelCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getHackingLevel(");
- var getMultipliersCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getHackingMultipliers(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getBitNodeMultipliers(");
- var getServerCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerMoneyAvailable(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerMaxMoney(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerSecurityLevel(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerBaseSecurityLevel(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerMinSecurityLevel(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerGrowth(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerRequiredHackingLevel(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerNumPortsRequired(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getServerRam(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "serverExists(");
- var fileExistsCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "fileExists(");
- var isRunningCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "isRunning(");
- var purchaseHacknetCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseHacknetNode(");
- var hacknetnodesArrayCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "hacknetnodes[");
- var hnUpgLevelCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, ".upgradeLevel(");
- var hnUpgRamCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, ".upgradeRam()");
- var hnUpgCoreCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, ".upgradeCore()");
- var scriptGetStockCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStockPrice(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStockPosition(");
- var scriptBuySellStockCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "buyStock(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sellStock(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "shortStock(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "sellShort(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "placeOrder(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "cancelOrder(");
- var scriptPurchaseServerCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseServer(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "deleteServer(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getPurchasedServers(");
- var scriptRoundCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "round(");
- var scriptWriteCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "write(") + Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "clear(");
- var scriptReadCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "read(");
- var arbScriptCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scriptRunning(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "scriptKill(");
- var getScriptCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getScriptRam(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getScriptIncome(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getScriptExpGain(");
- var getHackTimeCount = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getHackTime(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getGrowTime(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getWeakenTime(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getTimeSinceLastAug(");
- var singFn1Count = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "universityCourse(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "gymWorkout(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "travelToCity(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseTor(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseProgram(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getStats(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "isBusy(");
- var singFn2Count = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "upgradeHomeRam(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getUpgradeHomeRamCost(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "workForCompany(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "applyToCompany(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getCompanyRep(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "checkFactionInvitations(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "joinFaction(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "workForFaction(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getFactionRep(");
- var singFn3Count = Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "createProgram(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "commitCrime(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getCrimeChance(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getOwnedAugmentations(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getAugmentationsFromFaction(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "getAugmentationCost(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "purchaseAugmentation(") +
- Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["h" /* numOccurrences */])(codeCopy, "installAugmentations(");
+ //Create a temporary/mock WorkerScript and an AST from the code
+ var workerScript = new __WEBPACK_IMPORTED_MODULE_4__NetscriptWorker_js__["b" /* WorkerScript */]({
+ filename:"foo",
+ scriptRef: {code:""},
+ args:[]
+ });
+ workerScript.checkingRam = true; //Netscript functions will return RAM usage
- if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].bitNodeN != 4) {
- singFn1Count *= 10;
- singFn2Count *= 10;
- singFn3Count *= 10;
+ try {
+ var ast = Object(__WEBPACK_IMPORTED_MODULE_9__utils_acorn_js__["parse"])(codeCopy);
+ } catch(e) {
+ console.log("returning -1 bc parsing error: " + e.toString());
+ return -1;
}
- return baseRam +
- ((whileCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptWhileRamCost) +
- (forCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptForRamCost) +
- (ifCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptIfRamCost) +
- (hackCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptHackRamCost) +
- (growCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGrowRamCost) +
- (weakenCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptWeakenRamCost) +
- (scanCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptScanRamCost) +
- (nukeCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptNukeRamCost) +
- (brutesshCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptBrutesshRamCost) +
- (ftpcrackCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptFtpcrackRamCost) +
- (relaysmtpCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptRelaysmtpRamCost) +
- (httpwormCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptHttpwormRamCost) +
- (sqlinjectCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptSqlinjectRamCost) +
- (runCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptRunRamCost) +
- (execCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptExecRamCost) +
- (killCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptKillRamCost) +
- (scpCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptScpRamCost) +
- (hasRootAccessCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptHasRootAccessRamCost) +
- (getHostnameCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGetHostnameRamCost) +
- (getHackingLevelCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGetHackingLevelRamCost) +
- (getMultipliersCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGetMultipliersRamCost) +
- (getServerCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGetServerCost) +
- (fileExistsCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptFileExistsRamCost) +
- (isRunningCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptIsRunningRamCost) +
- (purchaseHacknetCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseHacknetRamCost) +
- (hacknetnodesArrayCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptHacknetNodesRamCost) +
- (hnUpgLevelCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptHNUpgLevelRamCost) +
- (hnUpgRamCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptHNUpgRamRamCost) +
- (hnUpgCoreCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptHNUpgCoreRamCost) +
- (scriptGetStockCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGetStockRamCost) +
- (scriptBuySellStockCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost) +
- (scriptPurchaseServerCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseServerRamCost) +
- (scriptRoundCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptRoundRamCost) +
- (scriptWriteCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost) +
- (scriptReadCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost) +
- (arbScriptCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptArbScriptRamCost) +
- (getScriptCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGetScriptRamCost) +
- (getHackTimeCount * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost) +
- (singFn1Count * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost) +
- (singFn2Count * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost) +
- (singFn3Count * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost));
+ //Search through AST, scanning for any 'Identifier' nodes for functions, or While/For/If nodes
+ var queue = [], ramUsage = 1.4;
+ var whileUsed = false, forUsed = false, ifUsed = false;
+ queue.push(ast);
+ while (queue.length != 0) {
+ var exp = queue.shift();
+ switch (exp.type) {
+ case "BlockStatement":
+ case "Program":
+ for (var i = 0; i < exp.body.length; ++i) {
+ if (exp.body[i] instanceof __WEBPACK_IMPORTED_MODULE_9__utils_acorn_js__["Node"]) {
+ queue.push(exp.body[i]);
+ }
+ }
+ break;
+ case "WhileStatement":
+ if (!whileUsed) {
+ ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptWhileRamCost;
+ whileUsed = true;
+ }
+ break;
+ case "ForStatement":
+ if (!forUsed) {
+ ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptForRamCost;
+ forUsed = true;
+ }
+ break;
+ case "IfStatement":
+ if (!ifUsed) {
+ ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptIfRamCost;
+ ifUsed = true;
+ }
+ break;
+ case "Identifier":
+ if (exp.name in workerScript.env.vars) {
+ var func = workerScript.env.get(exp.name);
+ if (typeof func === "function") {
+ try {
+ var res = func.apply(null, []);
+ if (!isNaN(res)) {ramUsage += res;}
+ } catch(e) {
+ console.log("ERROR applying function: " + e);
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ for (var prop in exp) {
+ if (exp.hasOwnProperty(prop)) {
+ if (exp[prop] instanceof __WEBPACK_IMPORTED_MODULE_9__utils_acorn_js__["Node"]) {
+ queue.push(exp[prop]);
+ }
+ }
+ }
+ }
+ return ramUsage;
}
Script.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Script", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Script", this);
}
Script.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Script, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Script, value.data);
}
-__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["c" /* Reviver */].constructors.Script = Script;
+__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["c" /* Reviver */].constructors.Script = Script;
//Called when the game is loaded. Loads all running scripts (from all servers)
//into worker scripts so that they will start running
@@ -21814,7 +21809,7 @@ function scriptCalculateOfflineProduction(runningScriptObj) {
console.log(runningScriptObj.filename + " called grow() on " + serv.hostname + " " + timesGrown + " times while offline");
runningScriptObj.log("Called grow() on " + serv.hostname + " " + timesGrown + " times while offline");
var growth = Object(__WEBPACK_IMPORTED_MODULE_6__Server_js__["j" /* processSingleServerGrowth */])(serv, timesGrown * 450);
- runningScriptObj.log(serv.hostname + " grown by " + Object(__WEBPACK_IMPORTED_MODULE_12__utils_StringHelperFunctions_js__["c" /* formatNumber */])(growth * 100 - 100, 6) + "% from grow() calls made while offline");
+ runningScriptObj.log(serv.hostname + " grown by " + Object(__WEBPACK_IMPORTED_MODULE_13__utils_StringHelperFunctions_js__["c" /* formatNumber */])(growth * 100 - 100, 6) + "% from grow() calls made while offline");
}
}
@@ -21885,7 +21880,7 @@ function scriptCalculateOfflineProduction(runningScriptObj) {
function findRunningScript(filename, args, server) {
for (var i = 0; i < server.runningScripts.length; ++i) {
if (server.runningScripts[i].filename == filename &&
- Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["d" /* compareArrays */])(server.runningScripts[i].args, args)) {
+ Object(__WEBPACK_IMPORTED_MODULE_12__utils_HelperFunctions_js__["d" /* compareArrays */])(server.runningScripts[i].args, args)) {
return server.runningScripts[i];
}
}
@@ -21966,15 +21961,15 @@ RunningScript.prototype.recordWeaken = function(serverIp, n=1) {
}
RunningScript.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["b" /* Generic_toJSON */])("RunningScript", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["b" /* Generic_toJSON */])("RunningScript", this);
}
RunningScript.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(RunningScript, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(RunningScript, value.data);
}
-__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["c" /* Reviver */].constructors.RunningScript = RunningScript;
+__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["c" /* Reviver */].constructors.RunningScript = RunningScript;
//Creates an object that creates a map/dictionary with the IP of each existing server as
//a key. Initializes every key with a specified value that can either by a number or an array
@@ -22006,15 +22001,15 @@ AllServersMap.prototype.printConsole = function() {
}
AllServersMap.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["b" /* Generic_toJSON */])("AllServersMap", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["b" /* Generic_toJSON */])("AllServersMap", this);
}
AllServersMap.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(AllServersMap, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(AllServersMap, value.data);
}
-__WEBPACK_IMPORTED_MODULE_10__utils_JSONReviver_js__["c" /* Reviver */].constructors.AllServersMap = AllServersMap;
+__WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["c" /* Reviver */].constructors.AllServersMap = AllServersMap;
@@ -24465,7 +24460,7 @@ let CompanyPositions = {
CompanyPositions.VicePresident.setPerformanceParameters(70, 0, 0, 0, 0, 30, 1.75);
CompanyPositions.VicePresident.setExperienceGains(1.2, 0, 0, 0, 0, .6);
CompanyPositions.CTO.setPerformanceParameters(65, 0, 0, 0, 0, 35, 2);
- CompanyPositions.CTO.setExperienceGains(1.5, 0, 0, 0, 1);
+ CompanyPositions.CTO.setExperienceGains(1.5, 0, 0, 0, 0, 1);
//Business
CompanyPositions.BusinessIntern.setPerformanceParameters(10, 0, 0, 0, 0, 90, 0.9);
@@ -25377,6 +25372,14 @@ function NetscriptFunctions(workerScript) {
sprintf : sprintf,
vsprintf: vsprintf,
scan : function(ip=workerScript.serverIp, hostnames=true){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.scan) {
+ return 0;
+ } else {
+ workerScript.loadedFns.scan = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptScanRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, 'Invalid IP or hostname passed into scan() command');
@@ -25398,6 +25401,14 @@ function NetscriptFunctions(workerScript) {
return out;
},
hack : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.hack) {
+ return 0;
+ } else {
+ workerScript.loadedFns.hack = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptHackRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Hack() call has incorrect number of arguments. Takes 1 argument");
}
@@ -25465,6 +25476,7 @@ function NetscriptFunctions(workerScript) {
});
},
sleep : function(time,log=true){
+ if (workerScript.checkingRam) {return 0;}
if (time === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "sleep() call has incorrect number of arguments. Takes 1 argument");
}
@@ -25476,6 +25488,14 @@ function NetscriptFunctions(workerScript) {
});
},
grow : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.grow) {
+ return 0;
+ } else {
+ workerScript.loadedFns.grow = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGrowRamCost;
+ }
+ }
var threads = workerScript.scriptRef.threads;
if (isNaN(threads) || threads < 1) {threads = 1;}
if (ip === undefined) {
@@ -25514,6 +25534,14 @@ function NetscriptFunctions(workerScript) {
});
},
weaken : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.weaken) {
+ return 0;
+ } else {
+ workerScript.loadedFns.weaken = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptWeakenRamCost;
+ }
+ }
var threads = workerScript.scriptRef.threads;
if (isNaN(threads) || threads < 1) {threads = 1;}
if (ip === undefined) {
@@ -25547,12 +25575,14 @@ function NetscriptFunctions(workerScript) {
});
},
print : function(args){
+ if (workerScript.checkingRam) {return 0;}
if (args === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* 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(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "tprint() call has incorrect number of arguments. Takes 1 argument");
}
@@ -25567,9 +25597,18 @@ function NetscriptFunctions(workerScript) {
Object(__WEBPACK_IMPORTED_MODULE_20__Terminal_js__["b" /* post */])(workerScript.scriptRef.filename + ": " + args.toString());
},
clearLog : function() {
+ if (workerScript.checkingRam) {return 0;}
workerScript.scriptRef.clearLog();
},
nuke : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.nuke) {
+ return 0;
+ } else {
+ workerScript.loadedFns.nuke = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
@@ -25593,6 +25632,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
brutessh : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.brutessh) {
+ return 0;
+ } else {
+ workerScript.loadedFns.brutessh = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
@@ -25615,6 +25662,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
ftpcrack : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.ftpcrack) {
+ return 0;
+ } else {
+ workerScript.loadedFns.ftpcrack = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
@@ -25636,6 +25691,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
relaysmtp : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.relaysmtp) {
+ return 0;
+ } else {
+ workerScript.loadedFns.relaysmtp = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
@@ -25657,6 +25720,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
httpworm : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.httpworm) {
+ return 0;
+ } else {
+ workerScript.loadedFns.httpworm = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
@@ -25678,6 +25749,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
sqlinject : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.sqlinject) {
+ return 0;
+ } else {
+ workerScript.loadedFns.sqlinject = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Program call has incorrect number of arguments. Takes 1 argument");
}
@@ -25699,6 +25778,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
run : function(scriptname,threads = 1){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.run) {
+ return 0;
+ } else {
+ workerScript.loadedFns.run = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptRunRamCost;
+ }
+ }
if (scriptname === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");
}
@@ -25716,7 +25803,15 @@ function NetscriptFunctions(workerScript) {
return Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["f" /* runScriptFromScript */])(scriptServer, scriptname, argsForNewScript, workerScript, threads);
},
- exec : function(scriptname,ip,threads = 1){
+ exec : function(scriptname,ip,threads = 1) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.exec) {
+ return 0;
+ } else {
+ workerScript.loadedFns.exec = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptExecRamCost;
+ }
+ }
if (scriptname === undefined || ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
}
@@ -25733,7 +25828,16 @@ function NetscriptFunctions(workerScript) {
}
return Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["f" /* runScriptFromScript */])(server, scriptname, argsForNewScript, workerScript, threads);
},
- kill : function(filename,ip){
+ kill : function(filename,ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.kill) {
+ return 0;
+ } else {
+ workerScript.loadedFns.kill = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptKillRamCost;
+ }
+ }
+
if (filename === undefined || ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "kill() call has incorrect number of arguments. Usage: kill(scriptname, server, [arg1], [arg2]...)");
}
@@ -25748,19 +25852,28 @@ function NetscriptFunctions(workerScript) {
}
var runningScriptObj = Object(__WEBPACK_IMPORTED_MODULE_15__Script_js__["d" /* findRunningScript */])(filename, argsForKillTarget, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["j" /* printArray */])(argsForKillTarget));
+ workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["i" /* printArray */])(argsForKillTarget));
return false;
}
var res = Object(__WEBPACK_IMPORTED_MODULE_22__NetscriptWorker_js__["d" /* killWorkerScript */])(runningScriptObj, server.ip);
if (res) {
- workerScript.scriptRef.log("Killing " + filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["j" /* printArray */])(argsForKillTarget) + ". May take up to a few minutes for the scripts to die...");
+ workerScript.scriptRef.log("Killing " + filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["i" /* printArray */])(argsForKillTarget) + ". May take up to a few minutes for the scripts to die...");
return true;
} else {
- workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["j" /* printArray */])(argsForKillTarget));
+ workerScript.scriptRef.log("kill() failed. No such script "+ filename + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["i" /* printArray */])(argsForKillTarget));
return false;
}
},
killall : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.killall) {
+ return 0;
+ } else {
+ workerScript.loadedFns.killall = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptKillRamCost;
+ }
+ }
+
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "killall() call has incorrect number of arguments. Takes 1 argument");
}
@@ -25776,6 +25889,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
exit : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.exit) {
+ return 0;
+ } else {
+ workerScript.loadedFns.exit = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptKillRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp);
if (server == null) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Error getting Server for this script in exit(). This is a bug please contact game dev");
@@ -25786,7 +25907,15 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("Exit failed(). This is a bug please contact game developer");
}
},
- scp : function(scriptname, ip1, ip2){
+ scp : function(scriptname, ip1, ip2) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.scp) {
+ return 0;
+ } else {
+ workerScript.loadedFns.scp = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptScpRamCost;
+ }
+ }
if (arguments.length !== 2 && arguments.length !== 3) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Error: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");
}
@@ -25895,6 +26024,14 @@ function NetscriptFunctions(workerScript) {
return true;
},
ls : function(ip, grep) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.ls) {
+ return 0;
+ } else {
+ workerScript.loadedFns.ls = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptScanRamCost;
+ }
+ }
if (ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "ls() failed because of invalid arguments. Usage: ls(ip/hostname, [grep filter])");
}
@@ -25952,7 +26089,15 @@ function NetscriptFunctions(workerScript) {
allFiles.sort();
return allFiles;
},
- hasRootAccess : function(ip){
+ hasRootAccess : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.hasRootAccess) {
+ return 0;
+ } else {
+ workerScript.loadedFns.hasRootAccess = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptHasRootAccessRamCost;
+ }
+ }
if (ip===undefined){
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "hasRootAccess() call has incorrect number of arguments. Takes 1 argument");
}
@@ -25964,6 +26109,14 @@ function NetscriptFunctions(workerScript) {
return server.hasAdminRights;
},
getIp : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getIp) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getIp = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHostnameRamCost;
+ }
+ }
var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp);
if (scriptServer == null) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
@@ -25971,6 +26124,14 @@ function NetscriptFunctions(workerScript) {
return scriptServer.ip;
},
getHostname : function(){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getHostname) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getHostname = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHostnameRamCost;
+ }
+ }
var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp);
if (scriptServer == null) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Could not find server. This is a bug in the game. Report to game dev");
@@ -25978,11 +26139,27 @@ function NetscriptFunctions(workerScript) {
return scriptServer.hostname;
},
getHackingLevel : function(){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getHackingLevel) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getHackingLevel = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackingLevelRamCost;
+ }
+ }
__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].updateSkillLevels();
workerScript.scriptRef.log("getHackingLevel() returned " + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill);
return __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill;
},
getHackingMultipliers : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getHackingMultipliers) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getHackingMultipliers = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetMultipliersRamCost;
+ }
+ }
return {
chance: __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_chance_mult,
speed: __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_speed_mult,
@@ -25991,12 +26168,28 @@ function NetscriptFunctions(workerScript) {
};
},
getBitNodeMultipliers: function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getBitNodeMultipliers) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getBitNodeMultipliers = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetMultipliersRamCost;
+ }
+ }
if (!hasAISF) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getBitNodeMultipliers(). It requires Source-File 5 to run.");
}
return __WEBPACK_IMPORTED_MODULE_2__BitNode_js__["a" /* BitNodeMultipliers */];
},
getServerMoneyAvailable : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerMoneyAvailable) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerMoneyAvailable = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMoneyAvailable() failed. Invalid IP or hostname passed in: " + ip);
@@ -26011,6 +26204,14 @@ function NetscriptFunctions(workerScript) {
return server.moneyAvailable;
},
getServerSecurityLevel : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerSecurityLevel) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerSecurityLevel = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
@@ -26020,6 +26221,14 @@ function NetscriptFunctions(workerScript) {
return server.hackDifficulty;
},
getServerBaseSecurityLevel : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerBaseSecurityLevel) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerBaseSecurityLevel = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerBaseSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
@@ -26029,6 +26238,14 @@ function NetscriptFunctions(workerScript) {
return server.baseDifficulty;
},
getServerMinSecurityLevel : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerMinSecurityLevel) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerMinSecurityLevel = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMinSecurityLevel() failed. Invalid IP or hostname passed in: " + ip);
@@ -26037,7 +26254,15 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("getServerMinSecurityLevel() returned " + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.minDifficulty, 3) + " for " + server.hostname);
return server.minDifficulty;
},
- getServerRequiredHackingLevel : function(ip){
+ getServerRequiredHackingLevel : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerRequiredHackingLevel) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerRequiredHackingLevel = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerRequiredHackingLevel() failed. Invalid IP or hostname passed in: " + ip);
@@ -26047,6 +26272,14 @@ function NetscriptFunctions(workerScript) {
return server.requiredHackingSkill;
},
getServerMaxMoney : function(ip){
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerMaxMoney) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerMaxMoney = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerMaxMoney() failed. Invalid IP or hostname passed in: " + ip);
@@ -26056,6 +26289,14 @@ function NetscriptFunctions(workerScript) {
return server.moneyMax;
},
getServerGrowth : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerGrowth) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerGrowth = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerGrowth() failed. Invalid IP or hostname passed in: " + ip);
@@ -26064,7 +26305,15 @@ function NetscriptFunctions(workerScript) {
workerScript.scriptRef.log("getServerGrowth() returned " + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(server.serverGrowth, 0) + " for " + server.hostname);
return server.serverGrowth;
},
- getServerNumPortsRequired : function(ip){
+ getServerNumPortsRequired : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerNumPortsRequired) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerNumPortsRequired = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerNumPortsRequired() failed. Invalid IP or hostname passed in: " + ip);
@@ -26074,6 +26323,14 @@ function NetscriptFunctions(workerScript) {
return server.numOpenPortsRequired;
},
getServerRam : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getServerRam) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getServerRam = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getServerRam() failed. Invalid IP or hostname passed in: " + ip);
@@ -26083,9 +26340,25 @@ function NetscriptFunctions(workerScript) {
return [server.maxRam, server.ramUsed];
},
serverExists : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.serverExists) {
+ return 0;
+ } else {
+ workerScript.loadedFns.serverExists = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost;
+ }
+ }
return (Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip) !== null);
},
- fileExists : function(filename,ip=workerScript.serverIp){
+ fileExists : function(filename,ip=workerScript.serverIp) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.fileExists) {
+ return 0;
+ } else {
+ workerScript.loadedFns.fileExists = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptFileExistsRamCost;
+ }
+ }
if (filename === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "fileExists() call has incorrect number of arguments. Usage: fileExists(scriptname, [server])");
}
@@ -26116,7 +26389,15 @@ function NetscriptFunctions(workerScript) {
}
return false;
},
- isRunning : function(filename,ip){
+ isRunning : function(filename,ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.isRunning) {
+ return 0;
+ } else {
+ workerScript.loadedFns.isRunning = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptIsRunningRamCost;
+ }
+ }
if (filename === undefined || ip === undefined) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "isRunning() call has incorrect number of arguments. Usage: isRunning(scriptname, server, [arg1], [arg2]...)");
}
@@ -26131,9 +26412,38 @@ function NetscriptFunctions(workerScript) {
}
return (Object(__WEBPACK_IMPORTED_MODULE_15__Script_js__["d" /* findRunningScript */])(filename, argsForTargetScript, server) != null);
},
- getNextHacknetNodeCost : __WEBPACK_IMPORTED_MODULE_10__HacknetNode_js__["b" /* getCostOfNextHacknetNode */],
- purchaseHacknetNode : __WEBPACK_IMPORTED_MODULE_10__HacknetNode_js__["d" /* purchaseHacknet */],
+ getNextHacknetNodeCost : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getNextHacknetNodeCost) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getNextHacknetNodeCost = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptHacknetNodesRamCost;
+ }
+ }
+ return Object(__WEBPACK_IMPORTED_MODULE_10__HacknetNode_js__["b" /* getCostOfNextHacknetNode */])();
+ },
+
+ purchaseHacknetNode : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.purchaseHacknetNode) {
+ return 0;
+ } else {
+ workerScript.loadedFns.purchaseHacknetNode = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseHacknetRamCost;
+ }
+ }
+ Object(__WEBPACK_IMPORTED_MODULE_10__HacknetNode_js__["d" /* purchaseHacknet */])();
+ },
getStockPrice : function(symbol) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getStockPrice) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getStockPrice = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPrice()");
}
@@ -26144,6 +26454,14 @@ function NetscriptFunctions(workerScript) {
return parseFloat(stock.price.toFixed(3));
},
getStockPosition : function(symbol) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getStockPosition) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getStockPosition = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use getStockPosition()");
}
@@ -26154,6 +26472,14 @@ function NetscriptFunctions(workerScript) {
return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];
},
buyStock : function(symbol, shares) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.buyStock) {
+ return 0;
+ } else {
+ workerScript.loadedFns.buyStock = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use buyStock()");
}
@@ -26189,6 +26515,14 @@ function NetscriptFunctions(workerScript) {
return stock.price;
},
sellStock : function(symbol, shares) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.sellStock) {
+ return 0;
+ } else {
+ workerScript.loadedFns.sellStock = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use sellStock()");
}
@@ -26225,6 +26559,14 @@ function NetscriptFunctions(workerScript) {
return stock.price;
},
shortStock(symbol, shares) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.shortStock) {
+ return 0;
+ } else {
+ workerScript.loadedFns.shortStock = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use shortStock()");
}
@@ -26241,6 +26583,14 @@ function NetscriptFunctions(workerScript) {
return res ? stock.price : 0;
},
sellShort(symbol, shares) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.sellShort) {
+ return 0;
+ } else {
+ workerScript.loadedFns.sellShort = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use sellShort()");
}
@@ -26257,6 +26607,14 @@ function NetscriptFunctions(workerScript) {
return res ? stock.price : 0;
},
placeOrder(symbol, shares, price, type, pos) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.placeOrder) {
+ return 0;
+ } else {
+ workerScript.loadedFns.placeOrder = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use placeOrder()");
}
@@ -26295,6 +26653,14 @@ function NetscriptFunctions(workerScript) {
return Object(__WEBPACK_IMPORTED_MODULE_19__StockMarket_js__["k" /* placeOrder */])(stock, shares, price, orderType, orderPos, workerScript);
},
cancelOrder(symbol, shares, price, type, pos) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.cancelOrder) {
+ return 0;
+ } else {
+ workerScript.loadedFns.cancelOrder = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost;
+ }
+ }
if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "You don't have TIX API Access! Cannot use cancelOrder()");
}
@@ -26342,6 +26708,14 @@ function NetscriptFunctions(workerScript) {
return Object(__WEBPACK_IMPORTED_MODULE_19__StockMarket_js__["e" /* cancelOrder */])(params, workerScript);
},
purchaseServer : function(hostname, ram) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.purchaseServer) {
+ return 0;
+ } else {
+ workerScript.loadedFns.purchaseServer = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseServerRamCost;
+ }
+ }
var hostnameStr = String(hostname);
hostnameStr = hostnameStr.replace(/\s\s+/g, '');
if (hostnameStr == "") {
@@ -26356,7 +26730,7 @@ function NetscriptFunctions(workerScript) {
}
ram = Math.round(ram);
- if (isNaN(ram) || !Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["i" /* powerOfTwo */])(ram)) {
+ if (isNaN(ram) || !Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["h" /* powerOfTwo */])(ram)) {
workerScript.scriptRef.log("Error: Invalid ram argument passed to purchaseServer(). Must be numeric and a power of 2");
return "";
}
@@ -26378,6 +26752,14 @@ function NetscriptFunctions(workerScript) {
return newServ.hostname;
},
deleteServer : function(hostname) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.deleteServer) {
+ return 0;
+ } else {
+ workerScript.loadedFns.deleteServer = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseServerRamCost;
+ }
+ }
var hostnameStr = String(hostname);
hostnameStr = hostnameStr.replace(/\s\s+/g, '');
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["c" /* GetServerByHostname */])(hostnameStr);
@@ -26441,6 +26823,14 @@ function NetscriptFunctions(workerScript) {
return false;
},
getPurchasedServers : function(hostname=true) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getPurchasedServers) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getPurchasedServers = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseServerRamCost;
+ }
+ }
var res = [];
__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].purchasedServers.forEach(function(ip) {
if (hostname) {
@@ -26460,6 +26850,14 @@ function NetscriptFunctions(workerScript) {
return Math.round(n);
},
write : function(port, data="", mode="a") {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.write) {
+ return 0;
+ } else {
+ workerScript.loadedFns.write = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost;
+ }
+ }
if (!isNaN(port)) { //Write to port
//Port 1-10
if (port < 1 || port > 10) {
@@ -26498,6 +26896,14 @@ function NetscriptFunctions(workerScript) {
}
},
read : function(port) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.read) {
+ return 0;
+ } else {
+ workerScript.loadedFns.read = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost;
+ }
+ }
if (!isNaN(port)) { //Read from port
//Port 1-10
if (port < 1 || port > 10) {
@@ -26530,6 +26936,14 @@ function NetscriptFunctions(workerScript) {
}
},
clear : function(port) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.clear) {
+ return 0;
+ } else {
+ workerScript.loadedFns.clear = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost;
+ }
+ }
if (!isNaN(port)) { //Clear port
if (port < 1 || port > 10) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "ERR: Trying to read from invalid port: " + port + ". Only ports 1-10 are valid");
@@ -26555,7 +26969,68 @@ function NetscriptFunctions(workerScript) {
}
return 0;
},
+ rm : function(fn) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.rm) {
+ return 0;
+ } else {
+ workerScript.loadedFns.rm = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost;
+ }
+ }
+ var s = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp);
+ if (s == null) {
+ throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Error getting Server for this script in clear(). This is a bug please contact game dev");
+ }
+
+ if (fn.includes(".exe")) {
+ for (var i = 0; i < s.programs.length; ++i) {
+ if (s.programs[i] === fn) {
+ s.programs.splice(i, 1);
+ return true;
+ }
+ }
+ } else if (fn.endsWith(".script")) {
+ for (var i = 0; i < s.scripts.length; ++i) {
+ if (s.scripts[i].filename === fn) {
+ //Check that the script isnt currently running
+ for (var j = 0; j < s.runningScripts.length; ++j) {
+ if (s.runningScripts[j].filename === fn) {
+ workerScript.scriptRef.log("Cannot delete a script that is currently running!");
+ return false;
+ }
+ }
+ s.scripts.splice(i, 1);
+ return true;
+ }
+ }
+ } else if (fn.endsWith(".lit")) {
+ for (var i = 0; i < s.messages.length; ++i) {
+ var f = s.messages[i];
+ if (!(f instanceof __WEBPACK_IMPORTED_MODULE_12__Message_js__["a" /* Message */]) && Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["f" /* isString */])(f) && f === fn) {
+ s.messages.splice(i, 1);
+ return true;
+ }
+ }
+ } else if (fn.endsWith(".txt")) {
+ for (var i = 0; i < s.textFiles.length; ++i) {
+ if (s.textFiles[i].fn === fn) {
+ s.textFiles.splice(i, 1);
+ return true;
+ }
+ }
+ }
+ return false;
+ },
scriptRunning : function(scriptname, ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.scriptRunning) {
+ return 0;
+ } else {
+ workerScript.loadedFns.scriptRunning = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptArbScriptRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("scriptRunning() failed. Invalid IP or hostname passed in: " + ip);
@@ -26569,6 +27044,14 @@ function NetscriptFunctions(workerScript) {
return false;
},
scriptKill : function(scriptname, ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.scriptKill) {
+ return 0;
+ } else {
+ workerScript.loadedFns.scriptKill = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptArbScriptRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("scriptKill() failed. Invalid IP or hostname passed in: " + ip);
@@ -26584,6 +27067,14 @@ function NetscriptFunctions(workerScript) {
return suc;
},
getScriptRam : function (scriptname, ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getScriptRam) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getScriptRam = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetScriptRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getScriptRam() failed. Invalid IP or hostname passed in: " + ip);
@@ -26597,6 +27088,14 @@ function NetscriptFunctions(workerScript) {
return 0;
},
getHackTime : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getHackTime) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getHackTime = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getHackTime() failed. Invalid IP or hostname passed in: " + ip);
@@ -26605,6 +27104,14 @@ function NetscriptFunctions(workerScript) {
return Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["j" /* scriptCalculateHackingTime */])(server); //Returns seconds
},
getGrowTime : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getGrowTime) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getGrowTime = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getGrowTime() failed. Invalid IP or hostname passed in: " + ip);
@@ -26613,6 +27120,14 @@ function NetscriptFunctions(workerScript) {
return Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["h" /* scriptCalculateGrowTime */])(server) / 1000; //Returns seconds
},
getWeakenTime : function(ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getWeakenTime) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getWeakenTime = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost;
+ }
+ }
var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip);
if (server == null) {
workerScript.scriptRef.log("getWeakenTime() failed. Invalid IP or hostname passed in: " + ip);
@@ -26621,6 +27136,14 @@ function NetscriptFunctions(workerScript) {
return Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["l" /* scriptCalculateWeakenTime */])(server) / 1000; //Returns seconds
},
getScriptIncome : function(scriptname, ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getScriptIncome) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getScriptIncome = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetScriptRamCost;
+ }
+ }
if (arguments.length === 0) {
//Get total script income
var res = [];
@@ -26640,13 +27163,21 @@ function NetscriptFunctions(workerScript) {
}
var runningScriptObj = Object(__WEBPACK_IMPORTED_MODULE_15__Script_js__["d" /* findRunningScript */])(scriptname, argsForScript, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("getScriptIncome() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["j" /* printArray */])(argsForScript));
+ workerScript.scriptRef.log("getScriptIncome() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["i" /* printArray */])(argsForScript));
return -1;
}
return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;
}
},
getScriptExpGain : function(scriptname, ip) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getScriptExpGain) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getScriptExpGain = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetScriptRamCost;
+ }
+ }
if (arguments.length === 0) {
var total = 0;
for (var i = 0; i < __WEBPACK_IMPORTED_MODULE_22__NetscriptWorker_js__["h" /* workerScripts */].length; ++i) {
@@ -26666,16 +27197,25 @@ function NetscriptFunctions(workerScript) {
}
var runningScriptObj = Object(__WEBPACK_IMPORTED_MODULE_15__Script_js__["d" /* findRunningScript */])(scriptname, argsForScript, server);
if (runningScriptObj == null) {
- workerScript.scriptRef.log("getScriptExpGain() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["j" /* printArray */])(argsForScript));
+ workerScript.scriptRef.log("getScriptExpGain() failed. No such script "+ scriptname + " on " + server.hostname + " with args: " + Object(__WEBPACK_IMPORTED_MODULE_27__utils_HelperFunctions_js__["i" /* printArray */])(argsForScript));
return -1;
}
return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;
}
},
getTimeSinceLastAug : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getTimeSinceLastAug) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getTimeSinceLastAug = true;
+ return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost;
+ }
+ }
return __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].playtimeSinceLastAug;
},
prompt : function(txt) {
+ if (workerScript.checkingRam) {return 0;}
if (__WEBPACK_IMPORTED_MODULE_30__utils_YesNoBox_js__["e" /* yesNoBoxOpen */]) {
workerScript.scriptRef.log("ERROR: confirm() failed because a pop-up dialog box is already open");
return false;
@@ -26699,6 +27239,16 @@ function NetscriptFunctions(workerScript) {
/* Singularity Functions */
universityCourse : function(universityName, className) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.universityCourse) {
+ return 0;
+ } else {
+ workerScript.loadedFns.universityCourse = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
@@ -26778,6 +27328,16 @@ function NetscriptFunctions(workerScript) {
},
gymWorkout : function(gymName, stat) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.gymWorkout) {
+ return 0;
+ } else {
+ workerScript.loadedFns.gymWorkout = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
@@ -26870,6 +27430,16 @@ function NetscriptFunctions(workerScript) {
},
travelToCity(cityname) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.travelToCity) {
+ return 0;
+ } else {
+ workerScript.loadedFns.travelToCity = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
@@ -26896,6 +27466,16 @@ function NetscriptFunctions(workerScript) {
},
purchaseTor() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.purchaseTor) {
+ return 0;
+ } else {
+ workerScript.loadedFns.purchaseTor = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
@@ -26927,6 +27507,16 @@ function NetscriptFunctions(workerScript) {
return true;
},
purchaseProgram(programName) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.purchaseProgram) {
+ return 0;
+ } else {
+ workerScript.loadedFns.purchaseProgram = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
@@ -27031,6 +27621,16 @@ function NetscriptFunctions(workerScript) {
return true;
},
getStats : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getStats) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getStats = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
@@ -27049,6 +27649,16 @@ function NetscriptFunctions(workerScript) {
}
},
isBusy : function() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.isBusy) {
+ return 0;
+ } else {
+ workerScript.loadedFns.isBusy = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 1)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");
@@ -27058,6 +27668,16 @@ function NetscriptFunctions(workerScript) {
return __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].isWorking;
},
upgradeHomeRam() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.upgradeHomeRam) {
+ return 0;
+ } else {
+ workerScript.loadedFns.upgradeHomeRam = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27090,6 +27710,16 @@ function NetscriptFunctions(workerScript) {
return true;
},
getUpgradeHomeRamCost() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getUpgradeHomeRamCost) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getUpgradeHomeRamCost = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27108,6 +27738,16 @@ function NetscriptFunctions(workerScript) {
return cost * mult;
},
workForCompany() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.workForCompany) {
+ return 0;
+ } else {
+ workerScript.loadedFns.workForCompany = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27139,6 +27779,16 @@ function NetscriptFunctions(workerScript) {
return true;
},
applyToCompany(companyName, field) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.applyToCompany) {
+ return 0;
+ } else {
+ workerScript.loadedFns.applyToCompany = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27210,6 +27860,16 @@ function NetscriptFunctions(workerScript) {
return res;
},
getCompanyRep(companyName) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getCompanyRep) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getCompanyRep = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27225,6 +27885,16 @@ function NetscriptFunctions(workerScript) {
return company.playerReputation;
},
checkFactionInvitations() {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.checkFactionInvitations) {
+ return 0;
+ } else {
+ workerScript.loadedFns.checkFactionInvitations = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27235,6 +27905,16 @@ function NetscriptFunctions(workerScript) {
return __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].factionInvitations.slice();
},
joinFaction(name) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.joinFaction) {
+ return 0;
+ } else {
+ workerScript.loadedFns.joinFaction = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27266,6 +27946,16 @@ function NetscriptFunctions(workerScript) {
return true;
},
workForFaction(name, type) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.workForFaction) {
+ return 0;
+ } else {
+ workerScript.loadedFns.workForFaction = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27352,6 +28042,16 @@ function NetscriptFunctions(workerScript) {
return true;
},
getFactionRep(name) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getFactionRep) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getFactionRep = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 2)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");
@@ -27367,6 +28067,16 @@ function NetscriptFunctions(workerScript) {
return __WEBPACK_IMPORTED_MODULE_9__Faction_js__["b" /* Factions */][name].playerReputation;
},
createProgram(name) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.createProgram) {
+ return 0;
+ } else {
+ workerScript.loadedFns.createProgram = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27457,6 +28167,16 @@ function NetscriptFunctions(workerScript) {
return true;
},
commitCrime : function(crime) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.commitCrime) {
+ return 0;
+ } else {
+ workerScript.loadedFns.commitCrime = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27538,6 +28258,16 @@ function NetscriptFunctions(workerScript) {
}
},
getCrimeChance(crime) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getCrimeChance) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getCrimeChance = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27575,6 +28305,16 @@ function NetscriptFunctions(workerScript) {
}
},
getOwnedAugmentations(purchased=false) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getOwnedAugmentations) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getOwnedAugmentations = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27593,6 +28333,16 @@ function NetscriptFunctions(workerScript) {
return res;
},
getAugmentationsFromFaction(facname) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getAugmentationsFromFaction) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getAugmentationsFromFaction = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27613,6 +28363,16 @@ function NetscriptFunctions(workerScript) {
return res;
},
getAugmentationCost(name) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.getAugmentationCost) {
+ return 0;
+ } else {
+ workerScript.loadedFns.getAugmentationCost = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27629,6 +28389,16 @@ function NetscriptFunctions(workerScript) {
return [aug.baseRepRequirement, aug.baseCost];
},
purchaseAugmentation(faction, name) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.purchaseAugmentation) {
+ return 0;
+ } else {
+ workerScript.loadedFns.purchaseAugmentation = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27688,6 +28458,16 @@ function NetscriptFunctions(workerScript) {
}
},
installAugmentations(cbScript) {
+ if (workerScript.checkingRam) {
+ if (workerScript.loadedFns.installAugmentations) {
+ return 0;
+ } else {
+ workerScript.loadedFns.installAugmentations = true;
+ var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost;
+ if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;}
+ return ramCost;
+ }
+ }
if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN != 4) {
if (!(hasSingularitySF && singularitySFLvl >= 3)) {
throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");
@@ -27738,6 +28518,8 @@ function NetscriptFunctions(workerScript) {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__utils_StringHelperFunctions_js__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__ = __webpack_require__(2);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__utils_LogBox_js__ = __webpack_require__(30);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__utils_YesNoBox_js__ = __webpack_require__(14);
+
@@ -27762,12 +28544,8 @@ function NetscriptFunctions(workerScript) {
/* Write text to terminal */
//If replace is true then spaces are replaced with " "
-function post(input, replace=true) {
- if (replace) {
- $("#terminal-input").before(' ');
- } else {
- $("#terminal-input").before('' + input.replace( / /g, " " ) + ' ');
- }
+function post(input) {
+ $("#terminal-input").before('' + input + ' ');
updateTerminalScroll();
}
@@ -28471,7 +29249,7 @@ let Terminal = {
if (__WEBPACK_IMPORTED_MODULE_15__SpecialServerIps_js__["a" /* SpecialServerIps */].hasOwnProperty("Darkweb Server")) {
Object(__WEBPACK_IMPORTED_MODULE_3__DarkWeb_js__["c" /* executeDarkwebTerminalCommand */])(commandArray);
} else {
- post("You need to be connected to the Dark Web to use the buy command");
+ post("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");
}
break;
case "cat":
@@ -29363,7 +30141,21 @@ let Terminal = {
post("Agility: " + __WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].agility + " / 1500");
break;
case __WEBPACK_IMPORTED_MODULE_2__CreateProgram_js__["a" /* Programs */].BitFlume:
- Object(__WEBPACK_IMPORTED_MODULE_12__RedPill_js__["a" /* hackWorldDaemon */])(__WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].bitNodeN, true);
+ var yesBtn = Object(__WEBPACK_IMPORTED_MODULE_20__utils_YesNoBox_js__["d" /* yesNoBoxGetYesButton */])(),
+ noBtn = Object(__WEBPACK_IMPORTED_MODULE_20__utils_YesNoBox_js__["c" /* yesNoBoxGetNoButton */])();
+ yesBtn.innerHTML = "Travel to BitNode Nexus";
+ noBtn.innerHTML = "Cancel";
+ yesBtn.addEventListener("click", function() {
+ Object(__WEBPACK_IMPORTED_MODULE_12__RedPill_js__["a" /* hackWorldDaemon */])(__WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].bitNodeN, true);
+ return Object(__WEBPACK_IMPORTED_MODULE_20__utils_YesNoBox_js__["a" /* yesNoBoxClose */])();
+ });
+ noBtn.addEventListener("click", function() {
+ return Object(__WEBPACK_IMPORTED_MODULE_20__utils_YesNoBox_js__["a" /* yesNoBoxClose */])();
+ });
+ Object(__WEBPACK_IMPORTED_MODULE_20__utils_YesNoBox_js__["b" /* yesNoBoxCreate */])("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.' + input + '
" +
+ "Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode " +
+ "and select a new one.");
+
break;
default:
post("Invalid executable. Cannot be run");
@@ -29452,7 +30244,7 @@ let Terminal = {
return;
} else {
//Able to run script
- post("Running script with " + numThreads + " thread(s) and args: " + Object(__WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__["j" /* printArray */])(args) + ".");
+ post("Running script with " + numThreads + " thread(s) and args: " + Object(__WEBPACK_IMPORTED_MODULE_18__utils_HelperFunctions_js__["i" /* printArray */])(args) + ".");
post("May take a few seconds to start up the process...");
var runningScriptObj = new __WEBPACK_IMPORTED_MODULE_13__Script_js__["b" /* RunningScript */](script, args);
runningScriptObj.threads = numThreads;
@@ -34738,7 +35530,7 @@ function createActiveScriptsText(workerscript, item) {
//Server ip/hostname
var threads = "Threads: " + workerscript.scriptRef.threads;
- var args = "Args: " + Object(__WEBPACK_IMPORTED_MODULE_4__utils_HelperFunctions_js__["j" /* printArray */])(workerscript.args);
+ var args = "Args: " + Object(__WEBPACK_IMPORTED_MODULE_4__utils_HelperFunctions_js__["i" /* printArray */])(workerscript.args);
itemTextHeader.innerHTML = threads + "
" + args + "
";
@@ -35732,16 +36524,16 @@ HackingMission.prototype.init = function() {
//Randomly generate enemy nodes (CPU and Firewall) based on difficulty
var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4)));
var numFirewalls = Math.min(20,
- Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(Math.round(this.difficulty/3), Math.round(this.difficulty/3) + 1));
- var numDatabases = Math.min(10, Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(1, Math.round(this.difficulty / 3) + 1));
+ Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(Math.round(this.difficulty/3), Math.round(this.difficulty/3) + 1));
+ var numDatabases = Math.min(10, Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(1, Math.round(this.difficulty / 3) + 1));
var totalNodes = numNodes + numFirewalls + numDatabases;
var xlimit = 7 - Math.floor(totalNodes / 8);
var randMult = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["a" /* addOffset */])(0.8 + (this.difficulty / 5), 10);
for (var i = 0; i < numNodes; ++i) {
var stats = {
- atk: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(80, 86),
- def: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(5, 10),
- hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(210, 230)
+ atk: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(80, 86),
+ def: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(5, 10),
+ hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(210, 230)
}
this.enemyCores.push(new Node(NodeTypes.Core, stats));
this.enemyCores[i].setControlledByEnemy();
@@ -35750,8 +36542,8 @@ HackingMission.prototype.init = function() {
for (var i = 0; i < numFirewalls; ++i) {
var stats = {
atk: 0,
- def: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 20),
- hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(275, 300)
+ def: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(10, 20),
+ hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(275, 300)
}
this.enemyNodes.push(new Node(NodeTypes.Firewall, stats));
this.enemyNodes[i].setControlledByEnemy();
@@ -35760,8 +36552,8 @@ HackingMission.prototype.init = function() {
for (var i = 0; i < numDatabases; ++i) {
var stats = {
atk: 0,
- def: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(30, 55),
- hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(210, 275)
+ def: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(30, 55),
+ hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(210, 275)
}
var node = new Node(NodeTypes.Database, stats);
node.setControlledByEnemy();
@@ -36151,7 +36943,7 @@ HackingMission.prototype.setNodePosition = function(nodeObj, x, y) {
}
HackingMission.prototype.setNodeRandomPosition = function(nodeObj, xlimit=0) {
- var i = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, this.availablePositions.length - 1);
+ var i = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, this.availablePositions.length - 1);
if (this.availablePositions[i][1] < xlimit) {
//Recurse if not within limit
return this.setNodeRandomPosition(nodeObj, xlimit);
@@ -36175,22 +36967,22 @@ HackingMission.prototype.createMap = function() {
for (var x = 0; x < 8; ++x) {
for (var y = 0; y < 8; ++y) {
if (!(this.map[x][y] instanceof Node)) {
- var node, type = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, 2);
+ var node, type = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, 2);
var randMult = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["a" /* addOffset */])(0.85 + (this.difficulty / 2), 15);
switch (type) {
case 0: //Spam
var stats = {
atk: 0,
- def: averageAttack * 1.1 + Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(15, 45),
- hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(200, 225)
+ def: averageAttack * 1.1 + Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(15, 45),
+ hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(200, 225)
}
node = new Node(NodeTypes.Spam, stats);
break;
case 1: //Transfer
var stats = {
atk: 0,
- def: averageAttack * 1.1 + Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(15, 45),
- hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(250, 275)
+ def: averageAttack * 1.1 + Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(15, 45),
+ hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(250, 275)
}
node = new Node(NodeTypes.Transfer, stats);
break;
@@ -36198,8 +36990,8 @@ HackingMission.prototype.createMap = function() {
default:
var stats = {
atk: 0,
- def: averageAttack * 1.1 + Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(30, 70),
- hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(300, 320)
+ def: averageAttack * 1.1 + Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(30, 70),
+ hp: randMult * Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(300, 320)
}
node = new Node(NodeTypes.Shield, stats);
break;
@@ -36872,7 +37664,7 @@ HackingMission.prototype.enemyAISelectAction = function(nodeObj) {
if (nodeObj.conn == null) {
if (this.miscNodes.length === 0) {
//Randomly pick a player node and attack it if its reachable
- var rand = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, this.playerNodes.length-1);
+ var rand = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, this.playerNodes.length-1);
var node;
if (this.playerNodes.length === 0) {
node = null;
@@ -36888,7 +37680,7 @@ HackingMission.prototype.enemyAISelectAction = function(nodeObj) {
++node.targetedCount;
} else {
//Randomly pick a player core and attack it if its reachable
- rand = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, this.playerCores.length-1);
+ rand = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, this.playerCores.length-1);
if (this.playerCores.length === 0) {
return; //No Misc Nodes, no player Nodes, no Player cores. Player lost
} else {
@@ -36906,7 +37698,7 @@ HackingMission.prototype.enemyAISelectAction = function(nodeObj) {
}
} else {
//Randomly pick a misc node and attack it if its reachable
- var rand = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, this.miscNodes.length-1);
+ var rand = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, this.miscNodes.length-1);
var node = this.miscNodes[rand];
if (this.nodeReachableByEnemy(node)) {
nodeObj.conn = this.jsplumbinstance.connect({
@@ -37318,135 +38110,135 @@ function initStockMarket() {
}
var ecorp = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumECorp;
- var ecorpStk = new Stock(ecorp, StockSymbols[ecorp], 0.45, true, 19, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(20000, 25000));
+ var ecorpStk = new Stock(ecorp, StockSymbols[ecorp], 0.45, true, 19, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(20000, 25000));
StockMarket[ecorp] = ecorpStk;
var megacorp = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12MegaCorp;
- var megacorpStk = new Stock(megacorp, StockSymbols[megacorp], 0.45, true, 19, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(25000, 33000));
+ var megacorpStk = new Stock(megacorp, StockSymbols[megacorp], 0.45, true, 19, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(25000, 33000));
StockMarket[megacorp] = megacorpStk;
var blade = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12BladeIndustries;
- var bladeStk = new Stock(blade, StockSymbols[blade], 0.75, true, 13, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(15000, 22000));
+ var bladeStk = new Stock(blade, StockSymbols[blade], 0.75, true, 13, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(15000, 22000));
StockMarket[blade] = bladeStk;
var clarke = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumClarkeIncorporated;
- var clarkeStk = new Stock(clarke, StockSymbols[clarke], 0.7, true, 12, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(15000, 20000));
+ var clarkeStk = new Stock(clarke, StockSymbols[clarke], 0.7, true, 12, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(15000, 20000));
StockMarket[clarke] = clarkeStk;
var omnitek = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenOmniTekIncorporated;
- var omnitekStk = new Stock(omnitek, StockSymbols[omnitek], 0.65, true, 12, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(35000, 40000));
+ var omnitekStk = new Stock(omnitek, StockSymbols[omnitek], 0.65, true, 12, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(35000, 40000));
StockMarket[omnitek] = omnitekStk;
var foursigma = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12FourSigma;
- var foursigmaStk = new Stock(foursigma, StockSymbols[foursigma], 1.05, true, 17, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(60000, 70000));
+ var foursigmaStk = new Stock(foursigma, StockSymbols[foursigma], 1.05, true, 17, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(60000, 70000));
StockMarket[foursigma] = foursigmaStk;
var kuaigong = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].ChongqingKuaiGongInternational;
- var kuaigongStk = new Stock(kuaigong, StockSymbols[kuaigong], 0.8, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(20000, 24000));
+ var kuaigongStk = new Stock(kuaigong, StockSymbols[kuaigong], 0.8, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(20000, 24000));
StockMarket[kuaigong] = kuaigongStk;
var fulcrum = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumFulcrumTechnologies;
- var fulcrumStk = new Stock(fulcrum, StockSymbols[fulcrum], 1.25, true, 16, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(30000, 35000));
+ var fulcrumStk = new Stock(fulcrum, StockSymbols[fulcrum], 1.25, true, 16, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(30000, 35000));
StockMarket[fulcrum] = fulcrumStk;
var storm = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].IshimaStormTechnologies;
- var stormStk = new Stock(storm, StockSymbols[storm], 0.85, true, 7, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(21000, 24000));
+ var stormStk = new Stock(storm, StockSymbols[storm], 0.85, true, 7, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(21000, 24000));
StockMarket[storm] = stormStk;
var defcomm = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].NewTokyoDefComm;
- var defcommStk = new Stock(defcomm, StockSymbols[defcomm], 0.65, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10000, 15000));
+ var defcommStk = new Stock(defcomm, StockSymbols[defcomm], 0.65, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(10000, 15000));
StockMarket[defcomm] = defcommStk;
var helios = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenHeliosLabs;
- var heliosStk = new Stock(helios, StockSymbols[helios], 0.6, true, 9, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(12000, 16000));
+ var heliosStk = new Stock(helios, StockSymbols[helios], 0.6, true, 9, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(12000, 16000));
StockMarket[helios] = heliosStk;
var vitalife = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].NewTokyoVitaLife;
- var vitalifeStk = new Stock(vitalife, StockSymbols[vitalife], 0.75, true, 7, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10000, 12000));
+ var vitalifeStk = new Stock(vitalife, StockSymbols[vitalife], 0.75, true, 7, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(10000, 12000));
StockMarket[vitalife] = vitalifeStk;
var icarus = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12IcarusMicrosystems;
- var icarusStk = new Stock(icarus, StockSymbols[icarus], 0.65, true, 7.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(16000, 20000));
+ var icarusStk = new Stock(icarus, StockSymbols[icarus], 0.65, true, 7.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(16000, 20000));
StockMarket[icarus] = icarusStk;
var universalenergy = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12UniversalEnergy;
- var universalenergyStk = new Stock(universalenergy, StockSymbols[universalenergy], 0.55, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(20000, 25000));
+ var universalenergyStk = new Stock(universalenergy, StockSymbols[universalenergy], 0.55, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(20000, 25000));
StockMarket[universalenergy] = universalenergyStk;
var aerocorp = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumAeroCorp;
- var aerocorpStk = new Stock(aerocorp, StockSymbols[aerocorp], 0.6, true, 6, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10000, 15000));
+ var aerocorpStk = new Stock(aerocorp, StockSymbols[aerocorp], 0.6, true, 6, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(10000, 15000));
StockMarket[aerocorp] = aerocorpStk;
var omnia = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenOmniaCybersystems;
- var omniaStk = new Stock(omnia, StockSymbols[omnia], 0.7, true, 4.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(9000, 12000));
+ var omniaStk = new Stock(omnia, StockSymbols[omnia], 0.7, true, 4.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(9000, 12000));
StockMarket[omnia] = omniaStk;
var solaris = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].ChongqingSolarisSpaceSystems;
- var solarisStk = new Stock(solaris, StockSymbols[solaris], 0.75, true, 8.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(18000, 24000));
+ var solarisStk = new Stock(solaris, StockSymbols[solaris], 0.75, true, 8.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(18000, 24000));
StockMarket[solaris] = solarisStk;
var globalpharm = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].NewTokyoGlobalPharmaceuticals;
- var globalpharmStk = new Stock(globalpharm, StockSymbols[globalpharm], 0.6, true, 10.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(18000, 24000));
+ var globalpharmStk = new Stock(globalpharm, StockSymbols[globalpharm], 0.6, true, 10.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(18000, 24000));
StockMarket[globalpharm] = globalpharmStk;
var nova = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].IshimaNovaMedical;
- var novaStk = new Stock(nova, StockSymbols[nova], 0.75, true, 5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(18000, 24000));
+ var novaStk = new Stock(nova, StockSymbols[nova], 0.75, true, 5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(18000, 24000));
StockMarket[nova] = novaStk;
var watchdog = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumWatchdogSecurity;
- var watchdogStk = new Stock(watchdog, StockSymbols[watchdog], 2.5, true, 1.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(5000, 7500));
+ var watchdogStk = new Stock(watchdog, StockSymbols[watchdog], 2.5, true, 1.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(5000, 7500));
StockMarket[watchdog] = watchdogStk;
var lexocorp = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenLexoCorp;
- var lexocorpStk = new Stock(lexocorp, StockSymbols[lexocorp], 1.25, true, 6, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(5000, 7500));
+ var lexocorpStk = new Stock(lexocorp, StockSymbols[lexocorp], 1.25, true, 6, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(5000, 7500));
StockMarket[lexocorp] = lexocorpStk;
var rho = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumRhoConstruction;
- var rhoStk = new Stock(rho, StockSymbols[rho], 0.6, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(3000, 6000));
+ var rhoStk = new Stock(rho, StockSymbols[rho], 0.6, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(3000, 6000));
StockMarket[rho] = rhoStk;
var alpha = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12AlphaEnterprises;
- var alphaStk = new Stock(alpha, StockSymbols[alpha], 1.9, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(5000, 7500));
+ var alphaStk = new Stock(alpha, StockSymbols[alpha], 1.9, true, 10, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(5000, 7500));
StockMarket[alpha] = alphaStk;
var syscore = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenSysCoreSecurities;
- var syscoreStk = new Stock(syscore, StockSymbols[syscore], 1.6, true, 3, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(4000, 7000))
+ var syscoreStk = new Stock(syscore, StockSymbols[syscore], 1.6, true, 3, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(4000, 7000))
StockMarket[syscore] = syscoreStk;
var computek = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].VolhavenCompuTek;
- var computekStk = new Stock(computek, StockSymbols[computek], 0.9, true, 4, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(2000, 5000));
+ var computekStk = new Stock(computek, StockSymbols[computek], 0.9, true, 4, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(2000, 5000));
StockMarket[computek] = computekStk;
var netlink = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumNetLinkTechnologies;
- var netlinkStk = new Stock(netlink, StockSymbols[netlink], 4.2, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(2000, 4000));
+ var netlinkStk = new Stock(netlink, StockSymbols[netlink], 4.2, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(2000, 4000));
StockMarket[netlink] = netlinkStk;
var omega = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].IshimaOmegaSoftware;
- var omegaStk = new Stock(omega, StockSymbols[omega], 1, true, 0.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(3000, 6000));
+ var omegaStk = new Stock(omega, StockSymbols[omega], 1, true, 0.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(3000, 6000));
StockMarket[omega] = omegaStk;
var fns = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12FoodNStuff;
- var fnsStk = new Stock(fns, StockSymbols[fns], 0.75, false, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(1000, 4000));
+ var fnsStk = new Stock(fns, StockSymbols[fns], 0.75, false, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(1000, 4000));
StockMarket[fns] = fnsStk;
var sigmacosm = "Sigma Cosmetics";
- var sigmacosmStk = new Stock(sigmacosm, StockSymbols[sigmacosm], 2.8, true, 0, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(2000, 3000));
+ var sigmacosmStk = new Stock(sigmacosm, StockSymbols[sigmacosm], 2.8, true, 0, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(2000, 3000));
StockMarket[sigmacosm] = sigmacosmStk;
var joesguns = "Joes Guns";
- var joesgunsStk = new Stock(joesguns, StockSymbols[joesguns], 3.8, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(500, 1000));
+ var joesgunsStk = new Stock(joesguns, StockSymbols[joesguns], 3.8, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(500, 1000));
StockMarket[joesguns] = joesgunsStk;
var catalyst = "Catalyst Ventures";
- var catalystStk = new Stock(catalyst, StockSymbols[catalyst], 1.45, true, 13.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(500, 1000));
+ var catalystStk = new Stock(catalyst, StockSymbols[catalyst], 1.45, true, 13.5, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(500, 1000));
StockMarket[catalyst] = catalystStk;
var microdyne = "Microdyne Technologies";
- var microdyneStk = new Stock(microdyne, StockSymbols[microdyne], 0.75, true, 8, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(20000, 25000));
+ var microdyneStk = new Stock(microdyne, StockSymbols[microdyne], 0.75, true, 8, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(20000, 25000));
StockMarket[microdyne] = microdyneStk;
var titanlabs = "Titan Laboratories";
- var titanlabsStk = new Stock(titanlabs, StockSymbols[titanlabs], 0.6, true, 11, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(15000, 20000));
+ var titanlabsStk = new Stock(titanlabs, StockSymbols[titanlabs], 0.6, true, 11, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(15000, 20000));
StockMarket[titanlabs] = titanlabsStk;
var orders = {};
@@ -38274,8 +39066,8 @@ function updateStockPlayerPosition(stock) {
if (stock.playerShares === 0 && stock.playerShortShares === 0 &&
StockMarket["Orders"] && StockMarket["Orders"][stock.symbol] &&
StockMarket["Orders"][stock.symbol].length === 0) {
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["l" /* removeElementById */])(tickerId + "-hdr");
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["l" /* removeElementById */])(tickerId + "-panel");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["k" /* removeElementById */])(tickerId + "-hdr");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["k" /* removeElementById */])(tickerId + "-panel");
return;
} else {
//If the ticker hasn't been created, create it (handles updating)
@@ -38355,8 +39147,8 @@ function updateStockOrderList(stock) {
if (stock.playerShares === 0 && stock.playerShortShares === 0 &&
StockMarket["Orders"] && StockMarket["Orders"][stock.symbol] &&
StockMarket["Orders"][stock.symbol].length === 0) {
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["l" /* removeElementById */])(tickerId + "-hdr");
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["l" /* removeElementById */])(tickerId + "-panel");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["k" /* removeElementById */])(tickerId + "-hdr");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["k" /* removeElementById */])(tickerId + "-panel");
return;
} else {
//If the ticker hasn't been created, create it (handles updating)
@@ -38462,7 +39254,7 @@ function logBoxCreate(script) {
document.getElementById('log-box-kill-script').style.display = "inline-block";
logBoxOpen();
document.getElementById("log-box-text-header").innerHTML =
- logBoxCurrentScript.filename + " " + Object(__WEBPACK_IMPORTED_MODULE_1__HelperFunctions_js__["j" /* printArray */])(logBoxCurrentScript.args) + ":
";
+ logBoxCurrentScript.filename + " " + Object(__WEBPACK_IMPORTED_MODULE_1__HelperFunctions_js__["i" /* printArray */])(logBoxCurrentScript.args) + ":
";
logBoxCurrentScript.logUpd = true;
logBoxUpdateText();
}
@@ -38554,12 +39346,10 @@ var WarehouseInitialCost = 5e9; //Initial purchase cost of warehouse
var WarehouseInitialSize = 100;
var WarehouseUpgradeBaseCost = 1e9;
-var OfficeInitialCost = 5e9;
+var OfficeInitialCost = 4e9;
var OfficeInitialSize = 3;
var OfficeUpgradeBaseCost = 1e9;
-
-
function Material(params={}) {
this.name = params.name ? params.name : "";
this.qty = 0; //Quantity
@@ -38851,7 +39641,7 @@ Product.prototype.finishProduct = function(employeeProd, industry) {
console.log("advMult: " + advMult);
this.mku = 100 / (advMult * this.qlt * (busRatio + mgmtRatio));
this.dmd = industry.awareness === 0 ? 100 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));
- this.cmp = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, 70);
+ this.cmp = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, 70);
//Calculate the product's required materials
//For now, just set it to be the same as the requirements to make materials
@@ -39024,6 +39814,20 @@ var ProductRatingWeights = {
}
}
+//Industry upgrades
+//The structure is:
+// [index in array, base price, price mult, benefit mult (if applicable), name, desc]
+var IndustryUpgrades = {
+ "0": [0, 500e3, 1, 1.05,
+ "Coffee", "Provide your employees with coffee, increasing their energy by 5%."],
+ "1": [1, 1e9, 1.02, 1.01,
+ "AdVert.Inc", "Hire AdVert.Inc to advertise your company. Each level of " +
+ "this upgrade grants your company a static increase of 5 and 1 to its awareness and " +
+ "popularity, respectively. It will then increase your company's awareness by 1%, and its popularity " +
+ "by a random percentage between 5% and 15%. These effects are increased by other upgrades " +
+ "that increase the power of your advertising."]
+}
+
var empManualAssignmentModeActive = false;
function Industry(params={}) {
this.offices = { //Maps locations to offices. 0 if no office at that location
@@ -39089,6 +39893,10 @@ function Industry(params={}) {
this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0);
this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0);
+ //Upgrades
+ var numUpgrades = Object.keys(IndustryUpgrades).length;
+ this.upgrades = Array(numUpgrades).fill(0);
+
this.state = "START";
this.init();
@@ -39245,6 +40053,10 @@ Industry.prototype.init = function() {
case Industries.Software:
this.sciFac = 0.7;
this.advFac = 0.5;
+ this.hwFac = 0.25;
+ this.reFac = 0.1;
+ this.aiFac = 0.1;
+ this.robFac = 0.05;
this.reqMats = {
"Hardware": 0.5,
"Energy": 1,
@@ -39373,6 +40185,18 @@ Industry.prototype.process = function(marketCycles=1, state, company) {
//Process change in demand/competition of materials/products
this.processMaterialMarket(marketCycles);
this.processProductMarket(marketCycles);
+
+ //Process loss of popularity
+ this.popularity -= (marketCycles * .0001);
+ this.popularity = Math.max(0, this.popularity);
+
+ //Process Dreamsense gains
+ var popularityGain = company.getDreamSenseGain(), awarenessGain = popularityGain * 4;
+ if (popularityGain > 0) {
+ this.popularity += (popularityGain * marketCycles);
+ this.awareness += (awarenessGain * marketCycles);
+ }
+
return;
}
@@ -39424,7 +40248,7 @@ Industry.prototype.processProductMarket = function(marketCycles=1) {
for (var name in this.products) {
if (this.products.hasOwnProperty(name)) {
var product = this.products[name];
- var change = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(1, 5) * 0.001;
+ var change = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(1, 5) * 0.001;
if (this.type === Industries.Pharmaceutical || this.type === Industries.Software ||
this.type === Industries.Robotics) {
change *= 2.5;
@@ -39543,9 +40367,6 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) {
Math.pow(this.sciResearch.qty, this.sciFac) +
Math.pow(warehouse.materials["AICores"].qty, this.aiFac) / 10e3);
}
- } else {
- console.log("Production of materials failed because producableFrac <= 0 or prod <= 0.");
- console.log("prod: " + prod);
}
//Per second
var fooProd = prod * producableFrac / (SecsPerMarketCycle * marketCycles);
@@ -39560,7 +40381,10 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) {
for (var matName in warehouse.materials) {
if (warehouse.materials.hasOwnProperty(matName)) {
var mat = warehouse.materials[matName];
- if (mat.sCost < 0 || mat.sllman[0] === false) {continue;}
+ if (mat.sCost < 0 || mat.sllman[0] === false) {
+ mat.sll = 0;
+ continue;
+ }
var mat = warehouse.materials[matName];
var sCost;
@@ -39588,7 +40412,8 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) {
}
var businessFactor = 1 + (office.employeeProd[EmployeePositions.Business] / office.employeeProd["total"]);
var maxSell = (mat.qlt + .001) * mat.dmd * (100 - mat.cmp)/100 * markup * businessFactor *
- (this.awareness === 0 ? 0.01 : (this.popularity + .001) / this.awareness);
+ Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) *
+ (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01));
var sellAmt;
if (mat.sllman[1] !== -1) {
//Sell amount is manually limited
@@ -39796,7 +40621,8 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio
}
}
var maxSell = Math.pow(product.rat, 0.95) * product.dmd * (1-(product.cmp/100)) *
- (this.awareness === 0 ? 0.01 : (this.popularity+0.001) / this.awareness) * markup;
+ markup * businessFactor * Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) *
+ (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01));
var sellAmt;
if (product.sllman[city][0] && product.sllman[city][1] > 0) {
//Sell amount is manually limited
@@ -39840,6 +40666,33 @@ Industry.prototype.discontinueProduct = function(product, parentRefs) {
}
}
+Industry.prototype.upgrade = function(upgrade, refs) {
+ var corporation = refs.corporation, division = refs.division,
+ office = refs.office;
+ var upgN = upgrade[0], basePrice = upgrade[1], priceMult = upgrade[2],
+ upgradeBenefit = upgrade[3];
+ while (this.upgrades.length <= upgN) {this.upgrades.push(0);}
+ ++this.upgrades[upgN];
+
+ switch (upgN) {
+ case 0: //Coffee, 5% energy per employee
+ for (var i = 0; i < office.employees.length; ++i) {
+ office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, 100);
+ }
+ break;
+ case 1: //AdVert.Inc,
+ var advMult = corporation.getAdvertisingMultiplier();
+ this.awareness += (5 * advMult);
+ this.popularity += (1 * advMult);
+ this.awareness *= (1.01 * advMult);
+ this.popularity *= ((1 + Math.random(5, 15) / 100) * advMult);
+ break;
+ default:
+ console.log("ERROR: Un-implemented function index: " + upgN);
+ break;
+ }
+}
+
Industry.prototype.toJSON = function() {
return Object(__WEBPACK_IMPORTED_MODULE_6__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Industry", this);
}
@@ -39866,21 +40719,21 @@ function Employee(params={}) {
this.name = params.name ? params.name : "Bobby";
//Morale, happiness, and energy are 0-100
- this.mor = params.morale ? params.morale : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
- this.hap = params.happiness ? params.happiness : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
- this.ene = params.energy ? params.energy : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
+ this.mor = params.morale ? params.morale : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100);
+ this.hap = params.happiness ? params.happiness : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100);
+ this.ene = params.energy ? params.energy : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100);
- this.age = params.age ? params.age : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(20, 50);
- this.int = params.intelligence ? params.intelligence : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.cha = params.charisma ? params.charisma : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.exp = params.experience ? params.experience : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.cre = params.creativity ? params.creativity : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.eff = params.efficiency ? params.efficiency : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.sal = params.salary ? params.salary : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(0.1, 5);
+ this.age = params.age ? params.age : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(20, 50);
+ this.int = params.intelligence ? params.intelligence : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(10, 50);
+ this.cha = params.charisma ? params.charisma : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(10, 50);
+ this.exp = params.experience ? params.experience : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(10, 50);
+ this.cre = params.creativity ? params.creativity : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(10, 50);
+ this.eff = params.efficiency ? params.efficiency : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(10, 50);
+ this.sal = params.salary ? params.salary : Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0.1, 5);
this.pro = 0; //Productivity, This is calculated
this.loc = params.loc ? params.loc : "";
- this.pos = params.position ? params.position : EmployeePositions.Operations;
+ this.pos = EmployeePositions.Unassigned;
}
//Returns the amount the employee needs to be paid
@@ -39939,6 +40792,9 @@ Employee.prototype.calculateProductivity = function(corporation) {
prodMult = (1.5 * effInt) + (0.8 * this.exp) + (effCre) +
(0.5 * effEff);
break;
+ case EmployeePositions.Unassigned:
+ prodMult = 0;
+ break;
default:
console.log("ERROR: Invalid employee position: " + this.pos);
break;
@@ -39963,7 +40819,7 @@ Employee.prototype.createUI = function(panel, corporation) {
effInt = this.int * corporation.getEmployeeIntMultiplier(),
effEff = this.eff * corporation.getEmployeeEffMultiplier();
panel.style.color = "white";
- panel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ panel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("p", {
id:"cmpy-mgmt-employee-" + this.name + "-panel-text",
innerHTML:"Morale: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.mor, 3) + "
" +
"Happiness: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.hap, 3) + "
" +
@@ -39978,10 +40834,10 @@ Employee.prototype.createUI = function(panel, corporation) {
}));
//Selector for employee position
- var selector = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("select", {});
+ var selector = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("select", {});
for (var key in EmployeePositions) {
if (EmployeePositions.hasOwnProperty(key)) {
- selector.add(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("option", {
+ selector.add(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("option", {
text: EmployeePositions[key],
value: EmployeePositions[key],
}));
@@ -40107,18 +40963,19 @@ OfficeSpace.prototype.calculateEmployeeProductivity = function(marketCycles=1, c
}
//Takes care of UI as well
-OfficeSpace.prototype.findEmployees = function(company) {
+OfficeSpace.prototype.findEmployees = function(parentRefs) {
+ var company = parentRefs.corporation, division = parentRefs.division;
if (document.getElementById("cmpy-mgmt-hire-employee-popup") != null) {return;}
//Generate three random employees (meh, decent, amazing)
- var mult1 = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(25, 50)/100,
- mult2 = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(51, 75)/100,
- mult3 = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(76, 100)/100;
- var int = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- cha = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- exp = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- cre = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- eff = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ var mult1 = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(25, 50)/100,
+ mult2 = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(51, 75)/100,
+ mult3 = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(76, 100)/100;
+ var int = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100),
+ cha = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100),
+ exp = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100),
+ cre = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100),
+ eff = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(50, 100),
sal = 2.2 * (int + cha + exp + cre + eff);
var emp1 = new Employee({
@@ -40148,12 +41005,12 @@ OfficeSpace.prototype.findEmployees = function(company) {
salary: sal * mult3,
});
- var text = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("h1", {
+ var text = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("h1", {
innerHTML: "Select one of the following candidates for hire:",
});
var createEmpDiv = function(employee, office) {
- var div = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ var div = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("div", {
class:"cmpy-mgmt-find-employee-option",
innerHTML: "Intelligence: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.int, 1) + "
" +
"Charisma: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.cha, 1) + "
" +
@@ -40162,20 +41019,20 @@ OfficeSpace.prototype.findEmployees = function(company) {
"Efficiency: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.eff, 1) + "
" +
"Salary: " + __WEBPACK_IMPORTED_MODULE_7__utils_numeral_min_js___default()(employee.sal).format('$0.000a') + " \ s
",
clickListener:()=>{
- office.hireEmployee(employee, company);
- Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["l" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
+ office.hireEmployee(employee, parentRefs);
+ Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["k" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
return false;
}
});
return div;
};
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("a", {
class:"a-link-button",
innerText:"Cancel",
float:"right",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["l" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
+ Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["k" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
return false;
}
});
@@ -40186,10 +41043,11 @@ OfficeSpace.prototype.findEmployees = function(company) {
createEmpDiv(emp3, this),
cancelBtn];
- Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* createPopup */])("cmpy-mgmt-hire-employee-popup", elems);
+ Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createPopup */])("cmpy-mgmt-hire-employee-popup", elems);
}
-OfficeSpace.prototype.hireEmployee = function(employee, company) {
+OfficeSpace.prototype.hireEmployee = function(employee, parentRefs) {
+ var company = parentRefs.corporation, division = parentRefs.division;
var yesBtn = Object(__WEBPACK_IMPORTED_MODULE_9__utils_YesNoBox_js__["j" /* yesNoTxtInpBoxGetYesButton */])(),
noBtn = Object(__WEBPACK_IMPORTED_MODULE_9__utils_YesNoBox_js__["i" /* yesNoTxtInpBoxGetNoButton */])();
yesBtn.innerHTML = "Hire";
@@ -40204,7 +41062,7 @@ OfficeSpace.prototype.hireEmployee = function(employee, company) {
}
employee.name = name;
this.employees.push(employee);
- company.updateUIContent();
+ company.displayDivisionContent(division, currentCityUi);
return Object(__WEBPACK_IMPORTED_MODULE_9__utils_YesNoBox_js__["f" /* yesNoTxtInpBoxClose */])();
});
noBtn.addEventListener("click", ()=>{
@@ -40213,6 +41071,28 @@ OfficeSpace.prototype.hireEmployee = function(employee, company) {
Object(__WEBPACK_IMPORTED_MODULE_9__utils_YesNoBox_js__["g" /* yesNoTxtInpBoxCreate */])("Give your employee a nickname!");
}
+//Finds the first unassigned employee and assigns its to the specified job
+OfficeSpace.prototype.assignEmployeeToJob = function(job) {
+ for (var i = 0; i < this.employees.length; ++i) {
+ if (this.employees[i].pos === EmployeePositions.Unassigned) {
+ this.employees[i].pos = job;
+ return true;
+ }
+ }
+ return false;
+}
+
+//Finds the first employee with the given job and unassigns it
+OfficeSpace.prototype.unassignEmployeeFromJob = function(job) {
+ for (var i = 0; i < this.employees.length; ++i) {
+ if (this.employees[i].pos === job) {
+ this.employees[i].pos = EmployeePositions.Unassigned;
+ return true;
+ }
+ }
+ return false;
+}
+
OfficeSpace.prototype.toJSON = function() {
return Object(__WEBPACK_IMPORTED_MODULE_6__utils_JSONReviver_js__["b" /* Generic_toJSON */])("OfficeSpace", this);
}
@@ -40275,11 +41155,11 @@ Warehouse.prototype.createUI = function(parentRefs) {
return;
}
var company = parentRefs.company, industry = parentRefs.industry;
- Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(industryWarehousePanel);
+ Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["j" /* removeChildrenFromElement */])(industryWarehousePanel);
var storageText = "Storage: " +
(this.sizedUsed >= this.size ? Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sizeUsed, 3) : Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sizeUsed, 3)) +
"/" + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.size, 3);
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("p", {
innerHTML: storageText,
display:"inline-block",
color: this.sizeUsed >= this.size ? "red" : "white",
@@ -40287,7 +41167,7 @@ Warehouse.prototype.createUI = function(parentRefs) {
//Upgrade warehouse size button
var upgradeCost = WarehouseUpgradeBaseCost * Math.pow(1.07, Math.round(this.size / 100) - 1);
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("a", {
innerText:"Upgrade Warehouse Size - " + __WEBPACK_IMPORTED_MODULE_7__utils_numeral_min_js___default()(upgradeCost).format('$0.000a'),
display:"inline-block",
class: company.funds.lt(upgradeCost) ? "a-link-button-inactive" : "a-link-button",
@@ -40339,12 +41219,12 @@ Warehouse.prototype.createUI = function(parentRefs) {
console.log("ERROR: Invalid state: " + industry.state);
break;
}
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("p", {
innerHTML:reqText,
}));
//Materials
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("p", {
innerHTML: "
Materials:
",
}));
for (var matName in this.materials) {
@@ -40359,7 +41239,7 @@ Warehouse.prototype.createUI = function(parentRefs) {
//Products
if (!(industry.makesProducts && Object.keys(industry.products).length > 0)) {return;}
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("p", {
innerHTML: "
Products:
",
}));
for (var productName in industry.products) {
@@ -40377,7 +41257,7 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) {
var company = parentRefs.company, industry = parentRefs.industry;
var purchasePopupId = "cmpy-mgmt-material-purchase-popup",
sellPopupid = "cmpy-mgmt-material-sell-popup";
- var div = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ var div = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("div", {
class:"cmpy-mgmt-warehouse-material-div",
});
@@ -40409,28 +41289,28 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) {
"The quality of your material. Higher quality " +
"will lead to more sales
" + product.name + ": " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][0], 3) + //Quantity
"(" + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalGain, 3) + "/s)" +
"Prod: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][1], 3) + "/s
" +
@@ -40723,7 +41609,7 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) {
"product is, the higher you can mark up its price.