diff --git a/dist/bundle.js b/dist/bundle.js
index c03ce816f..1a2baa38a 100644
--- a/dist/bundle.js
+++ b/dist/bundle.js
@@ -41546,18 +41546,20 @@ function logBoxUpdateText() {
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Corporation; });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(7);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(4);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Literature_js__ = __webpack_require__(34);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Location_js__ = __webpack_require__(13);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Player_js__ = __webpack_require__(0);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js__ = __webpack_require__(24);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__utils_decimal_js__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__ = __webpack_require__(1);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__ = __webpack_require__(2);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__ = __webpack_require__(8);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js__ = __webpack_require__(16);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js__);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__ = __webpack_require__(5);
-/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__ = __webpack_require__(14);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Faction_js__ = __webpack_require__(11);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Literature_js__ = __webpack_require__(34);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Location_js__ = __webpack_require__(13);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Player_js__ = __webpack_require__(0);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js__ = __webpack_require__(24);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__utils_decimal_js__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__ = __webpack_require__(1);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__ = __webpack_require__(2);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__ = __webpack_require__(8);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js__ = __webpack_require__(16);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js__);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__ = __webpack_require__(5);
+/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__ = __webpack_require__(14);
+
@@ -41594,14 +41596,14 @@ CorporationState.prototype.getState = function() {
}
CorporationState.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["b" /* Generic_toJSON */])("CorporationState", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["b" /* Generic_toJSON */])("CorporationState", this);
}
CorporationState.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(CorporationState, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(CorporationState, value.data);
}
-__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].constructors.CorporationState = CorporationState;
+__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["c" /* Reviver */].constructors.CorporationState = CorporationState;
/* Constants */
var TOTALSHARES = 1e9; //Total number of shares you have at your company
@@ -41759,14 +41761,14 @@ Material.prototype.processMarket = function() {
}
Material.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Material", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Material", this);
}
Material.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Material, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Material, value.data);
}
-__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].constructors.Material = Material;
+__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["c" /* Reviver */].constructors.Material = Material;
//Map of material (by name) to their sizes (how much space it takes in warehouse)
let MaterialSizes = {
@@ -41813,12 +41815,12 @@ function Product(params={}) {
//These values are specific to a city
//The data is [qty, prod, sell]
this.data = {
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Aevum]: [0, 0, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Chongqing]: [0, 0, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12]: [0, 0, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].NewTokyo]: [0, 0, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Ishima]: [0, 0, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Volhaven]: [0, 0, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Aevum]: [0, 0, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Chongqing]: [0, 0, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12]: [0, 0, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].NewTokyo]: [0, 0, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Ishima]: [0, 0, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Volhaven]: [0, 0, 0],
}
//Only applies for location-based products like restaurants/hospitals
@@ -41833,21 +41835,21 @@ function Product(params={}) {
//[Whether production/sale is limited, limit amount]
this.prdman = {
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Aevum]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Chongqing]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].NewTokyo]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Ishima]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Volhaven]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Aevum]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Chongqing]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].NewTokyo]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Ishima]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Volhaven]: [false, 0],
}
this.sllman = {
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Aevum]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Chongqing]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].NewTokyo]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Ishima]: [false, 0],
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Volhaven]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Aevum]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Chongqing]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].NewTokyo]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Ishima]: [false, 0],
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Volhaven]: [false, 0],
}
}
@@ -41910,7 +41912,7 @@ Product.prototype.finishProduct = function(employeeProd, industry) {
var advMult = 1 + (Math.pow(this.advCost, 0.1) / 100);
this.mku = 100 / (advMult * Math.pow((this.qlt + 0.001), 0.75) * (busRatio + mgmtRatio));
this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));
- this.cmp = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, 70);
+ this.cmp = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(0, 70);
//Calculate the product's required materials
//For now, just set it to be the same as the requirements to make materials
@@ -41951,14 +41953,14 @@ Product.prototype.calculateRating = function(industry) {
}
Product.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Product", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Product", this);
}
Product.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Product, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Product, value.data);
}
-__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].constructors.Product = Product;
+__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["c" /* Reviver */].constructors.Product = Product;
var Industries = {
Energy: "Energy",
@@ -41996,46 +41998,46 @@ var IndustryStartingCosts = {
var IndustryDescriptions = {
Energy: "Engage in the production and distribution of energy.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Energy).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Energy).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Utilities: "Distributes water and provides wastewater services.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Utilities).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Utilities).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Agriculture: "Cultive crops and breed livestock to produce food.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Agriculture).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Agriculture).format("$0.000a") + "
" +
"Recommended starting Industry: YES",
Fishing: "Produce food through the breeding and processing of fish and fish products
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Fishing).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Fishing).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Mining: "Extract and process metals from the earth.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Mining).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Mining).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Food: "Create your own restaurants all around the world.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Food).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Food).format("$0.000a") + "
" +
"Recommended starting Industry: YES",
Tobacco: "Create and distribute tobacco and tobacco-related products.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Tobacco).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Tobacco).format("$0.000a") + "
" +
"Recommended starting Industry: YES",
Chemical: "Product industrial chemicals
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Chemical).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Chemical).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Pharmaceutical: "Discover, develop, and create new pharmaceutical drugs.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Pharmaceutical).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Pharmaceutical).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Computer: "Develop and manufacture new computer hardware and networking infrastructures.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Computer).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Computer).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Robotics: "Develop and create robots.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Robotics).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Robotics).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
Software: "Develop computer software and create AI Cores.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Software).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Software).format("$0.000a") + "
" +
"Recommended starting Industry: YES",
Healthcare: "Create and manage hospitals.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.Healthcare).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.Healthcare).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
RealEstate: "Develop and manuage real estate properties.
" +
- "Starting cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(IndustryStartingCosts.RealEstate).format("$0.000a") + "
" +
+ "Starting cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(IndustryStartingCosts.RealEstate).format("$0.000a") + "
" +
"Recommended starting Industry: NO",
}
@@ -42114,27 +42116,27 @@ var IndustryUpgrades = {
var empManualAssignmentModeActive = false;
function Industry(params={}) {
this.offices = { //Maps locations to offices. 0 if no office at that location
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Aevum]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Chongqing]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12]: new OfficeSpace({
- loc:__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Aevum]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Chongqing]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12]: new OfficeSpace({
+ loc:__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12,
size:OfficeInitialSize,
}),
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].NewTokyo]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Ishima]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Volhaven]: 0
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].NewTokyo]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Ishima]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Volhaven]: 0
};
this.warehouses = { //Maps locations to warehouses. 0 if no warehouse at that location
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Aevum]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Chonqing]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12]: new Warehouse({
- loc:__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Aevum]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Chonqing]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12]: new Warehouse({
+ loc:__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12,
size: WarehouseInitialSize,
}),
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].NewTokyo]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Ishima]: 0,
- [__WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Volhaven]: 0
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].NewTokyo]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Ishima]: 0,
+ [__WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Volhaven]: 0
};
this.name = params.name ? params.name : 0;
@@ -42171,10 +42173,10 @@ function Industry(params={}) {
this.prodMult = 0; //Production multiplier
//Financials
- this.lastCycleRevenue = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
- this.lastCycleExpenses = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
- this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
- this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
+ this.lastCycleRevenue = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
+ this.lastCycleExpenses = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
+ this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
+ this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
//Upgrades
var numUpgrades = Object.keys(IndustryUpgrades).length;
@@ -42462,14 +42464,14 @@ Industry.prototype.process = function(marketCycles=1, state, company) {
console.log("ERROR: NaN in Corporation's computed revenue/expenses");
console.log(this.thisCycleRevenue.toString());
console.log(this.thisCycleExpenses.toString());
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer");
- this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
- this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer");
+ this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
+ this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
}
this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * SecsPerMarketCycle);
this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * SecsPerMarketCycle);
- this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
- this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
+ this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
+ this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
//Once you start making revenue, the player should no longer be
//considered new, and therefore no longer needs the 'tutorial' UI elements
@@ -42552,7 +42554,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_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(1, 3) * 0.0004;
+ var change = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(1, 3) * 0.0004;
if (this.type === Industries.Pharmaceutical || this.type === Industries.Software ||
this.type === Industries.Robotics) {
change *= 3;
@@ -42700,7 +42702,7 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) {
var mat = warehouse.materials[matName];
var sCost;
- if (Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* isString */])(mat.sCost)) {
+ if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["g" /* isString */])(mat.sCost)) {
sCost = mat.sCost.replace(/MP/g, mat.bCost);
sCost = eval(sCost);
} else {
@@ -42826,7 +42828,8 @@ Industry.prototype.processProducts = function(marketCycles=1, corporation) {
office.employeeProd[EmployeePositions.Operations] / total +
office.employeeProd[EmployeePositions.Management] / total;
}
- prod.createProduct(marketCycles, ratio * Math.pow(total, 0.3));
+ prod.createProduct(marketCycles, ratio * Math.pow(total, 1));
+ //prod.createProduct(marketCycles, ratio * Math.pow(total, 0.3));
if (prod.prog >= 100) {
prod.finishProduct(office.employeeProd, this);
}
@@ -42999,7 +43002,7 @@ Industry.prototype.upgrade = function(upgrade, refs) {
this.awareness += (4 * advMult);
this.popularity += (1 * advMult);
this.awareness *= (1.01 * advMult);
- this.popularity *= ((1 + Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(3, 6) / 100) * advMult);
+ this.popularity *= ((1 + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(3, 6) / 100) * advMult);
break;
default:
console.log("ERROR: Un-implemented function index: " + upgN);
@@ -43053,14 +43056,14 @@ Industry.prototype.getMarketFactor = function(mat) {
}
Industry.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Industry", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Industry", this);
}
Industry.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Industry, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Industry, value.data);
}
-__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].constructors.Industry = Industry;
+__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["c" /* Reviver */].constructors.Industry = Industry;
var EmployeePositions = {
Operations: "Operations",
@@ -43079,17 +43082,17 @@ 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_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
- this.hap = params.happiness ? params.happiness : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
- this.ene = params.energy ? params.energy : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
+ this.mor = params.morale ? params.morale : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
+ this.hap = params.happiness ? params.happiness : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
+ this.ene = params.energy ? params.energy : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100);
- this.age = params.age ? params.age : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(20, 50);
- this.int = params.intelligence ? params.intelligence : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.cha = params.charisma ? params.charisma : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.exp = params.experience ? params.experience : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.cre = params.creativity ? params.creativity : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.eff = params.efficiency ? params.efficiency : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
- this.sal = params.salary ? params.salary : Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(0.1, 5);
+ this.age = params.age ? params.age : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(20, 50);
+ this.int = params.intelligence ? params.intelligence : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
+ this.cha = params.charisma ? params.charisma : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
+ this.exp = params.experience ? params.experience : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
+ this.cre = params.creativity ? params.creativity : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
+ this.eff = params.efficiency ? params.efficiency : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(10, 50);
+ this.sal = params.salary ? params.salary : Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(0.1, 5);
this.pro = 0; //Productivity, This is calculated
this.loc = params.loc ? params.loc : "";
@@ -43189,25 +43192,25 @@ 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_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ panel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
id:"cmpy-mgmt-employee-" + this.name + "-panel-text",
- innerHTML:"Morale: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.mor, 3) + "
" +
- "Happiness: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.hap, 3) + "
" +
- "Energy: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.ene, 3) + "
" +
- "Age: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.age, 3) + "
" +
- "Intelligence: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effInt, 3) + "
" +
- "Charisma: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCha, 3) + "
" +
- "Experience: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.exp, 3) + "
" +
- "Creativity: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCre, 3) + "
" +
- "Efficiency: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effEff, 3) + "
" +
- "Salary: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(this.sal).format("$0.000a") + "/ s
",
+ innerHTML:"Morale: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.mor, 3) + "
" +
+ "Happiness: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.hap, 3) + "
" +
+ "Energy: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.ene, 3) + "
" +
+ "Age: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.age, 3) + "
" +
+ "Intelligence: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effInt, 3) + "
" +
+ "Charisma: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCha, 3) + "
" +
+ "Experience: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.exp, 3) + "
" +
+ "Creativity: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCre, 3) + "
" +
+ "Efficiency: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effEff, 3) + "
" +
+ "Salary: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(this.sal).format("$0.000a") + "/ s
",
}));
//Selector for employee position
- var selector = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {});
+ var selector = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {});
for (var key in EmployeePositions) {
if (EmployeePositions.hasOwnProperty(key)) {
- selector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", {
+ selector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", {
text: EmployeePositions[key],
value: EmployeePositions[key],
}));
@@ -43241,27 +43244,27 @@ Employee.prototype.updateUI = function(panel, corporation) {
if (text == null) {
return this.createUI(panel);
}
- text.innerHTML = "Morale: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.mor, 3) + "
" +
- "Happiness: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.hap, 3) + "
" +
- "Energy: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.ene, 3) + "
" +
- "Age: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.age, 3) + "
" +
- "Intelligence: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effInt, 3) + "
" +
- "Charisma: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCha, 3) + "
" +
- "Experience: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.exp, 3) + "
" +
- "Creativity: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCre, 3) + "
" +
- "Efficiency: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effEff, 3) + "
" +
- "Salary: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(this.sal).format("$0.000a") + "/ s
";
+ text.innerHTML = "Morale: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.mor, 3) + "
" +
+ "Happiness: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.hap, 3) + "
" +
+ "Energy: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.ene, 3) + "
" +
+ "Age: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.age, 3) + "
" +
+ "Intelligence: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effInt, 3) + "
" +
+ "Charisma: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCha, 3) + "
" +
+ "Experience: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.exp, 3) + "
" +
+ "Creativity: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effCre, 3) + "
" +
+ "Efficiency: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(effEff, 3) + "
" +
+ "Salary: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(this.sal).format("$0.000a") + "/ s
";
}
Employee.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Employee", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Employee", this);
}
Employee.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Employee, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Employee, value.data);
}
-__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].constructors.Employee = Employee;
+__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["c" /* Reviver */].constructors.Employee = Employee;
var OfficeSpaceTiers = {
Basic: "Basic",
@@ -43338,14 +43341,14 @@ OfficeSpace.prototype.findEmployees = function(parentRefs) {
if (document.getElementById("cmpy-mgmt-hire-employee-popup") != null) {return;}
//Generate three random employees (meh, decent, amazing)
- var mult1 = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(25, 50)/100,
- mult2 = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(51, 75)/100,
- mult3 = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(76, 100)/100;
- var int = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- cha = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- exp = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- cre = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- eff = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ var mult1 = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(25, 50)/100,
+ mult2 = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(51, 75)/100,
+ mult3 = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(76, 100)/100;
+ var int = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ cha = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ exp = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ cre = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ eff = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
sal = 2.2 * (int + cha + exp + cre + eff);
var emp1 = new Employee({
@@ -43375,34 +43378,34 @@ OfficeSpace.prototype.findEmployees = function(parentRefs) {
salary: sal * mult3,
});
- var text = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("h1", {
+ var text = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("h1", {
innerHTML: "Select one of the following candidates for hire:",
});
var createEmpDiv = function(employee, office) {
- var div = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ var div = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
class:"cmpy-mgmt-find-employee-option",
- innerHTML: "Intelligence: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.int, 1) + "
" +
- "Charisma: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.cha, 1) + "
" +
- "Experience: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.exp, 1) + "
" +
- "Creativity: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.cre, 1) + "
" +
- "Efficiency: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.eff, 1) + "
" +
- "Salary: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(employee.sal).format('$0.000a') + " \ s
",
+ innerHTML: "Intelligence: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.int, 1) + "
" +
+ "Charisma: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.cha, 1) + "
" +
+ "Experience: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.exp, 1) + "
" +
+ "Creativity: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.cre, 1) + "
" +
+ "Efficiency: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(employee.eff, 1) + "
" +
+ "Salary: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(employee.sal).format('$0.000a') + " \ s
",
clickListener:()=>{
office.hireEmployee(employee, parentRefs);
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
return false;
}
});
return div;
};
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
innerText:"Cancel",
float:"right",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-hire-employee-popup");
return false;
}
});
@@ -43413,32 +43416,32 @@ OfficeSpace.prototype.findEmployees = function(parentRefs) {
createEmpDiv(emp3, this),
cancelBtn];
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])("cmpy-mgmt-hire-employee-popup", elems);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])("cmpy-mgmt-hire-employee-popup", elems);
}
OfficeSpace.prototype.hireEmployee = function(employee, parentRefs) {
var company = parentRefs.corporation, division = parentRefs.division;
- var yesBtn = Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["j" /* yesNoTxtInpBoxGetYesButton */])(),
- noBtn = Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["i" /* yesNoTxtInpBoxGetNoButton */])();
+ var yesBtn = Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["j" /* yesNoTxtInpBoxGetYesButton */])(),
+ noBtn = Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["i" /* yesNoTxtInpBoxGetNoButton */])();
yesBtn.innerHTML = "Hire";
noBtn.innerHTML = "Cancel";
yesBtn.addEventListener("click", ()=>{
- var name = Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["h" /* yesNoTxtInpBoxGetInput */])();
+ var name = Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["h" /* yesNoTxtInpBoxGetInput */])();
for (var i = 0; i < this.employees.length; ++i) {
if (this.employees[i].name === name) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You already have an employee with this nickname! Please give every employee a unique nickname.");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You already have an employee with this nickname! Please give every employee a unique nickname.");
return false;
}
}
employee.name = name;
this.employees.push(employee);
company.displayDivisionContent(division, currentCityUi);
- return Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["f" /* yesNoTxtInpBoxClose */])();
+ return Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["f" /* yesNoTxtInpBoxClose */])();
});
noBtn.addEventListener("click", ()=>{
- return Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["f" /* yesNoTxtInpBoxClose */])();
+ return Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["f" /* yesNoTxtInpBoxClose */])();
});
- Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["g" /* yesNoTxtInpBoxCreate */])("Give your employee a nickname!");
+ Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["g" /* yesNoTxtInpBoxCreate */])("Give your employee a nickname!");
}
OfficeSpace.prototype.hireRandomEmployee = function(parentRefs) {
@@ -43446,12 +43449,12 @@ OfficeSpace.prototype.hireRandomEmployee = function(parentRefs) {
if (document.getElementById("cmpy-mgmt-hire-employee-popup") != null) {return;}
//Generate three random employees (meh, decent, amazing)
- var mult = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(76, 100)/100;
- var int = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- cha = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- exp = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- cre = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
- eff = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ var mult = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(76, 100)/100;
+ var int = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ cha = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ exp = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ cre = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
+ eff = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["h" /* getRandomInt */])(50, 100),
sal = 2.2 * (int + cha + exp + cre + eff);
var emp = new Employee({
@@ -43463,7 +43466,7 @@ OfficeSpace.prototype.hireRandomEmployee = function(parentRefs) {
salary: sal * mult,
});
- var name = Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["d" /* generateRandomString */])(7);
+ var name = Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["d" /* generateRandomString */])(7);
for (var i = 0; i < this.employees.length; ++i) {
if (this.employees[i].name === name) {
@@ -43498,14 +43501,14 @@ OfficeSpace.prototype.unassignEmployeeFromJob = function(job) {
}
OfficeSpace.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["b" /* Generic_toJSON */])("OfficeSpace", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["b" /* Generic_toJSON */])("OfficeSpace", this);
}
OfficeSpace.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(OfficeSpace, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(OfficeSpace, value.data);
}
-__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].constructors.OfficeSpace = OfficeSpace;
+__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["c" /* Reviver */].constructors.OfficeSpace = OfficeSpace;
function Warehouse(params={}) {
this.loc = params.loc ? params.loc : "";
@@ -43559,11 +43562,11 @@ Warehouse.prototype.createUI = function(parentRefs) {
return;
}
var company = parentRefs.company, industry = parentRefs.industry;
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(industryWarehousePanel);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(industryWarehousePanel);
var storageText = "Storage: " +
- (this.sizedUsed >= this.size ? Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sizeUsed, 3) : Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sizeUsed, 3)) +
- "/" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.size, 3);
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ (this.sizedUsed >= this.size ? Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sizeUsed, 3) : Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sizeUsed, 3)) +
+ "/" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.size, 3);
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML: storageText,
display:"inline-block",
color: this.sizeUsed >= this.size ? "red" : "white",
@@ -43571,8 +43574,8 @@ 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_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
- innerText:"Upgrade Warehouse Size - " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(upgradeCost).format('$0.000a'),
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ innerText:"Upgrade Warehouse Size - " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(upgradeCost).format('$0.000a'),
display:"inline-block",
class: company.funds.lt(upgradeCost) ? "a-link-button-inactive" : "a-link-button",
clickListener:()=>{
@@ -43641,12 +43644,12 @@ Warehouse.prototype.createUI = function(parentRefs) {
reqRatioText += "one of its Products";
}
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML:reqText, tooltipleft:reqRatioText
}));
//Materials
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML: "
Materials:
",
}));
for (var matName in this.materials) {
@@ -43661,7 +43664,7 @@ Warehouse.prototype.createUI = function(parentRefs) {
//Products
if (!(industry.makesProducts && Object.keys(industry.products).length > 0)) {return;}
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML: "
Products:
",
}));
for (var productName in industry.products) {
@@ -43679,7 +43682,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_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ var div = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
class:"cmpy-mgmt-warehouse-material-div",
});
@@ -43692,30 +43695,30 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) {
//If Market Research upgrades are unlocked, add competition and demand info
var cmpAndDmdText = "";
if (company.unlockUpgrades[2] === 1) {
- cmpAndDmdText += "
Competition: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.cmp, 3);
+ cmpAndDmdText += "
Competition: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.cmp, 3);
}
if (company.unlockUpgrades[3] === 1) {
- cmpAndDmdText += "
Demand: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.dmd, 3);
+ cmpAndDmdText += "
Demand: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.dmd, 3);
}
- var innerTxt = "
" + mat.name + ": " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.qty, 3) +
- "(" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalGain, 3) + "/s)" +
- "Buy: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.buy, 3) +
- "/s
Prod: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.prd, 3) + "/s
Sell: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.sll, 3) +
- "/s
Export: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalExport, 3) + "/s
Import: " +
- Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.imp, 3) + "/s" + cmpAndDmdText + "
MP: $" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.bCost, 2) + + var innerTxt = "
" + mat.name + ": " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.qty, 3) +
+ "(" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalGain, 3) + "/s)" +
+ "Buy: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.buy, 3) +
+ "/s
Prod: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.prd, 3) + "/s
Sell: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.sll, 3) +
+ "/s
Export: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalExport, 3) + "/s
Import: " +
+ Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.imp, 3) + "/s" + cmpAndDmdText + "
MP: $" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.bCost, 2) + "Market Price: The price you would pay if " + "you were to buy this material on the market
Quality: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.qlt, 2) + + "
Quality: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.qlt, 2) + "The quality of your material. Higher quality " + "will lead to more sales
"; - div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", { + div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", { innerHTML: innerTxt, id: "cmpy-mgmt-warehouse-" + matName + "-text", display:"inline-block", })); - var buttonPanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", { + var buttonPanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", { display:"inline-block", }); div.appendChild(buttonPanel); @@ -43724,15 +43727,15 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) { var tutorial = industry.newInd && Object.keys(industry.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0; var buyButtonParams = { - innerText: "Buy (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.buy, 3) + ")", display:"inline-block", + innerText: "Buy (" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(mat.buy, 3) + ")", display:"inline-block", class: tutorial ? "a-link-button flashing-button" : "a-link-button", clickListener:()=>{ - var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", { + var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", { innerHTML: "Enter the amount of " + mat.name + " you would like " + "to purchase per second. This material's cost changes constantly" }); var confirmBtn; - var input = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", { + var input = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", { type:"number", value:mat.buy ? mat.buy : null, placeholder: "Purchase amount", onkeyup:(e)=>{ e.preventDefault(); @@ -43741,69 +43744,69 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) { } } }); - confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", { + confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", { innerText:"Confirm", class:"a-link-button", clickListener:()=>{ if (isNaN(input.value)) { - Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid amount"); + Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid amount"); } else { mat.buy = parseFloat(input.value); if (isNaN(mat.buy)) {mat.buy = 0;} - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(purchasePopupId); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(purchasePopupId); this.createUI(parentRefs); return false; } } }); - var clearButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", { + var clearButton = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", { innerText:"Clear Purchase", class:"a-link-button", clickListener:()=>{ mat.buy = 0; - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(purchasePopupId); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(purchasePopupId); this.createUI(parentRefs); return false; } }); - var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", { + var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", { innerText:"Cancel", class:"a-link-button", clickListener:()=>{ - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(purchasePopupId); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(purchasePopupId); } }); - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(purchasePopupId, [txt, input, confirmBtn, clearButton, cancelBtn]); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(purchasePopupId, [txt, input, confirmBtn, clearButton, cancelBtn]); input.focus(); } }; if (tutorial) { buyButtonParams.tooltip = "Purchase your required materials to get production started!"; } - buttonPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", buyButtonParams)); + buttonPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", buyButtonParams)); //Button to manage exports if (company.unlockUpgrades[0] === 1) { //Export unlock upgrade function createExportPopup() { var popupId = "cmpy-mgmt-export-popup"; - var exportTxt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", { + var exportTxt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", { innerText:"Select the industry and city to export this material to, as well as " + "how much of this material to export per second. You can set the export " + "amount to 'MAX' to export all of the materials in this warehouse." }); //Select industry and city to export to - var industrySelector = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {}), - citySelector = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {}); + var industrySelector = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {}), + citySelector = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {}); for (var i = 0; i < company.divisions.length; ++i) { - industrySelector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", { + industrySelector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", { text:company.divisions[i].name, value:company.divisions[i].name, changeListener:()=>{ var industryName = industrySelector.options[industrySelector.selectedIndex].value; for (var foo = 0; foo < company.divisions.length; ++foo) { if (company.divisions[foo].name == industryName) { - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["c" /* clearSelector */])(citySelector); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["c" /* clearSelector */])(citySelector); var selectedIndustry = company.divisions[foo]; for (var cityName in company.divisions[foo].warehouses) { if (company.divisions[foo].warehouses[cityName] instanceof Warehouse) { - citySelector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", { + citySelector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", { value:cityName, text:cityName, })); } @@ -43821,7 +43824,7 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) { for (var cityName in company.divisions[i].warehouses) { if (company.divisions[i].warehouses.hasOwnProperty(cityName) && company.divisions[i].warehouses[cityName] instanceof Warehouse) { - citySelector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", { + citySelector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", { value:cityName, text:cityName, })); } @@ -43831,18 +43834,18 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) { } //Select amount to export - var exportAmount = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", { + var exportAmount = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", { type:"number", placeholder:"Export amount / s" }); - var exportBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", { + var exportBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", { class:"a-link-button", display:"inline-block", innerText:"Export", clickListener:()=>{ var industryName = industrySelector.options[industrySelector.selectedIndex].text, cityName = citySelector.options[citySelector.selectedIndex].text, amt = parseFloat(exportAmount.value); if (isNaN(amt)) { - Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid amount entered for export"); + Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid amount entered for export"); return; } var exportObj = {ind:industryName, city:cityName, amt:amt}; @@ -43854,7 +43857,7 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) { var warehouse = company.divisions[i].warehouses[cityName]; if (warehouse instanceof Warehouse) { warehouse.materials[matName].imp += amt; - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId); return false; } else { console.log("ERROR: Target city for export does not have warehouse in specified city"); @@ -43862,27 +43865,27 @@ Warehouse.prototype.createMaterialUI = function(mat, matName, parentRefs) { } } console.log("ERROR: Could not find target industry/city for export"); - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId); return false; } }); - var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", { + var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", { class:"a-link-button", display:"inline-block", innerText:"Cancel", clickListener:()=>{ - Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId); + Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId); return false; } }); - var currExportsText = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", { + var currExportsText = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", { innerText:"Below is a list of all current exports of this material from this warehouse. " + "Clicking on one of the exports below will REMOVE that export." }); var currExports = []; for (var i = 0; i < mat.exp.length; ++i) { (function(i, mat, currExports){ - currExports.push(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", { + currExports.push(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", { class:"cmpy-mgmt-existing-export", innerHTML: "Industry: " + mat.exp[i].ind + "" + product.name + ": " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][0], 3) + //Quantity
- "(" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalGain, 3) + "/s)" +
- "Prod: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][1], 3) + "/s
" +
- "Sell: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][2], 3) + "/s
Rating: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.rat, 3) +
- "Quality: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.qlt, 3) + " " + product.name + ": " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][0], 3) + //Quantity
+ "(" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalGain, 3) + "/s)" +
+ "Prod: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][1], 3) + "/s Rating: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.rat, 3) +
+ "Quality: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.qlt, 3) + " Est. Production Cost: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(product.pCost).format("$0.000a") +
+ " Est. Production Cost: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(product.pCost).format("$0.000a") +
"An estimate of how much it costs to produce one unit of this product. " +
"If your sell price exceeds this by too much, people won't buy your product. The better your " +
"product is, the higher you can mark up its price. Advertising Multiplier: x" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalAdvertisingFac, 3) +
+ " Advertising Multiplier: x" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalAdvertisingFac, 3) +
"Total multiplier for this industry's sales due to its awareness and popularity
" +
- "Performance: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.per, 3) + "
" +
- "Durability: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.dur, 3) + "
" +
- "Reliability: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.rel, 3) + "
" +
- "Aesthetics: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.aes, 3) + "
" +
- "Features: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.fea, 3) +
+ div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ innerHTML: "
" +
+ "Sell: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][2], 3) + "/s
" +
+ "
" +
+ "Performance: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.per, 3) + "
" +
+ "Durability: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.dur, 3) + "
" +
+ "Reliability: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.rel, 3) + "
" +
+ "Aesthetics: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.aes, 3) + "
" +
+ "Features: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.fea, 3) +
cmpAndDmdText + "
" +
- "
" +
- "Size: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.siz, 3),
+ "Size: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.siz, 3),
}));
- var buttonPanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ var buttonPanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
display:"inline-block",
});
div.appendChild(buttonPanel);
//Sell button
- var sellInnerTextString = (product.sllman[city][1] === -1 ? "Sell (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][2], 3) + "/MAX)" :
- "Sell (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][2], 3) + "/" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.sllman[city][1], 3) + ")");
+ var sellInnerTextString = (product.sllman[city][1] === -1 ? "Sell (" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][2], 3) + "/MAX)" :
+ "Sell (" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][2], 3) + "/" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.sllman[city][1], 3) + ")");
if (product.sCost) {
- sellInnerTextString += (" @ " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(product.sCost).format("$0.000a"));
+ sellInnerTextString += (" @ " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(product.sCost).format("$0.000a"));
}
- div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
innerText:sellInnerTextString, class:"a-link-button", display:"inline-block",margin:"6px",
clickListener:()=>{
var popupId = "cmpy-mgmt-sell-product-popup";
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML:"Enter the maximum amount of " + product.name + " you would like " +
"to sell per second, as well as the price at which you would like to " +
"sell it at.
" +
@@ -44095,27 +44098,27 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) {
"maximum possible amount of the material.
",
});
var confirmBtn;
- var inputQty = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var inputQty = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"text", value:product.sllman[city][1] ? product.sllman[city][1] : null, placeholder: "Sell amount",
onkeyup:(e)=>{
e.preventDefault();
if (e.keyCode === 13) {confirmBtn.click();}
}
});
- var inputPx = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var inputPx = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"text", value: product.sCost ? product.sCost : null, placeholder: "Sell price",
onkeyup:(e)=>{
e.preventDefault();
if (e.keyCode === 13) {confirmBtn.click();}
}
});
- confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Confirm",
clickListener:()=>{
//Parse price
var cost = parseFloat(inputPx.value);
if (isNaN(cost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for sell price field");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for sell price field");
return false;
}
product.sCost = cost;
@@ -44125,7 +44128,7 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) {
product.sllman[city][0] = true;
product.sllman[city][1] = -1;
} else if (isNaN(inputQty.value)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for sell quantity field! Must be numeric");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for sell quantity field! Must be numeric");
return false;
} else {
var qty = parseFloat(inputQty.value);
@@ -44138,55 +44141,55 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) {
}
}
this.createUI(parentRefs);
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Cancel",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, inputQty, inputPx, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, inputQty, inputPx, confirmBtn, cancelBtn]);
inputQty.focus();
}
}));
- div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br",{})); //force line break
+ div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br",{})); //force line break
//Limit production button
var limitProductionInnerText = "Limit Production";
if (product.prdman[city][0]) {
- limitProductionInnerText += " (" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.prdman[city][1], 3) + ")";
+ limitProductionInnerText += " (" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.prdman[city][1], 3) + ")";
}
- div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:limitProductionInnerText,display:"inline-block",
clickListener:()=>{
var popupId = "cmpy-mgmt-limit-product-production-popup";
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerText:"Enter a limit to the amount of this product you would " +
"like to product per second. Leave the box empty to set no limit."
});
var confirmBtn;
- var input = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var input = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number", placeholder:"Limit",
onkeyup:(e)=>{
e.preventDefault();
if (e.keyCode === 13) {confirmBtn.click();}
}
});
- confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", display:"inline-block", innerText:"Limit production", margin:'6px',
clickListener:()=>{
if (input.value === "") {
product.prdman[city][0] = false;
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
var qty = parseFloat(input.value);
if (isNaN(qty)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value entered");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value entered");
return false;
}
if (qty < 0) {
@@ -44195,62 +44198,62 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) {
product.prdman[city][0] = true;
product.prdman[city][1] = qty;
}
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", display:"inline-block", innerText:"Cancel", margin:"6px",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, input, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, input, confirmBtn, cancelBtn]);
}
}));
//Discontinue button
- div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:'a-link-button', display:"inline-block",innerText:"Discontinue",
clickListener:()=>{
var popupId = "cmpy-mgmt-discontinue-product-popup";
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerText:"Are you sure you want to do this? Discontinuing a product " +
"removes it completely and permanently. You will no longer " +
"produce this product and all of its existing stock will be " +
"removed and left unsold",
});
- var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",innerText:"Discontinue",
clickListener:()=>{
industry.discontinueProduct(product, parentRefs);
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Cancel",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, confirmBtn, cancelBtn]);
}
}));
industryWarehousePanel.appendChild(div);
}
Warehouse.prototype.toJSON = function() {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Warehouse", this);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["b" /* Generic_toJSON */])("Warehouse", this);
}
Warehouse.fromJSON = function(value) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Warehouse, value.data);
+ return Object(__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["a" /* Generic_fromJSON */])(Warehouse, value.data);
}
-__WEBPACK_IMPORTED_MODULE_8__utils_JSONReviver_js__["c" /* Reviver */].constructors.Warehouse = Warehouse;
+__WEBPACK_IMPORTED_MODULE_9__utils_JSONReviver_js__["c" /* Reviver */].constructors.Warehouse = Warehouse;
//Corporation Unlock Upgrades
//Upgrades for entire corporation, unlocks features, either you have it or you dont
@@ -44352,9 +44355,9 @@ function Corporation(params={}) {
this.divisions = [];
//Financial stats
- this.funds = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(150e9);
- this.revenue = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
- this.expenses = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
+ this.funds = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(150e9);
+ this.revenue = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
+ this.expenses = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
this.fundingRound = 0;
this.public = false; //Publicly traded
this.numShares = TOTALSHARES;
@@ -44385,8 +44388,8 @@ Corporation.prototype.process = function(numCycles=1) {
//At the start of a new cycle, calculate profits from previous cycle
if (state === "START") {
- this.revenue = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
- this.expenses = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
+ this.revenue = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
+ this.expenses = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
this.divisions.forEach((ind)=>{
this.revenue = this.revenue.plus(ind.lastCycleRevenue);
this.expenses = this.expenses.plus(ind.lastCycleExpenses);
@@ -44394,10 +44397,10 @@ Corporation.prototype.process = function(numCycles=1) {
var profit = this.revenue.minus(this.expenses);
var cycleProfit = profit.times(numMarketCyclesPersist * SecsPerMarketCycle);
if (isNaN(this.funds)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("There was an error calculating your Corporations funds and they got reset to 0. " +
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("There was an error calculating your Corporations funds and they got reset to 0. " +
"This is a bug. Please report to game developer.
" +
"(Your funds have been set to $150b for the inconvenience)");
- this.funds = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(150e9);
+ this.funds = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(150e9);
}
this.funds = this.funds.plus(cycleProfit);
this.updateSharePrice();
@@ -44466,8 +44469,8 @@ Corporation.prototype.getInvestment = function() {
}
var funding = val * percShares * 4,
investShares = Math.floor(TOTALSHARES * percShares),
- yesBtn = Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["d" /* yesNoBoxGetYesButton */])(),
- noBtn = Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["c" /* yesNoBoxGetNoButton */])();
+ yesBtn = Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["d" /* yesNoBoxGetYesButton */])(),
+ noBtn = Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["c" /* yesNoBoxGetNoButton */])();
yesBtn.innerHTML = "Accept";
noBtn.innerHML = "Reject";
yesBtn.addEventListener("click", ()=>{
@@ -44475,47 +44478,47 @@ Corporation.prototype.getInvestment = function() {
this.funds = this.funds.plus(funding);
this.numShares -= investShares;
this.displayCorporationOverviewContent();
- return Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["a" /* yesNoBoxClose */])();
+ return Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["a" /* yesNoBoxClose */])();
});
noBtn.addEventListener("click", ()=>{
- return Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["a" /* yesNoBoxClose */])();
+ return Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["a" /* yesNoBoxClose */])();
});
- Object(__WEBPACK_IMPORTED_MODULE_11__utils_YesNoBox_js__["b" /* yesNoBoxCreate */])("An investment firm has offered you " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(funding).format('$0.000a') +
- " in funding in exchange for a " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(percShares*100).format("0.000a") +
- "% stake in the company (" + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(investShares).format('0.000a') + " shares).
" +
+ Object(__WEBPACK_IMPORTED_MODULE_12__utils_YesNoBox_js__["b" /* yesNoBoxCreate */])("An investment firm has offered you " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(funding).format('$0.000a') +
+ " in funding in exchange for a " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(percShares*100).format("0.000a") +
+ "% stake in the company (" + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(investShares).format('0.000a') + " shares).
" +
"Do you accept or reject this offer?");
}
Corporation.prototype.goPublic = function() {
var goPublicPopupId = "cmpy-mgmt-go-public-popup";
var initialSharePrice = this.determineValuation() / (TOTALSHARES);
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML: "Enter the number of shares you would like to issue " +
"for your IPO. These shares will be publicly sold " +
"and you will no longer own them. Your Corporation will receive " +
- __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(initialSharePrice).format('$0.000a') + " per share " +
+ __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(initialSharePrice).format('$0.000a') + " per share " +
"(the IPO money will be deposited directly into your Corporation's funds).
" +
"Furthermore, issuing more shares now will help drive up " +
"your company's stock price in the future.
" +
- "You have a total of " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(this.numShares).format("0.000a") + " of shares that you can issue.",
+ "You have a total of " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(this.numShares).format("0.000a") + " of shares that you can issue.",
});
- var input = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var input = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number",
placeholder: "Shares to issue",
});
- var br = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {});
- var yesBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var br = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {});
+ var yesBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
innerText:"Go Public",
clickListener:()=>{
var numShares = Math.round(input.value);
var initialSharePrice = this.determineValuation() / (TOTALSHARES);
if (isNaN(numShares)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for number of issued shares");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for number of issued shares");
return false;
}
if (numShares > this.numShares) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Error: You don't have that many shares to issue!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Error: You don't have that many shares to issue!");
return false;
}
this.public = true;
@@ -44524,19 +44527,19 @@ Corporation.prototype.goPublic = function() {
this.numShares -= numShares;
this.funds = this.funds.plus(numShares * initialSharePrice);
this.displayCorporationOverviewContent();
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(goPublicPopupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(goPublicPopupId);
return false;
}
});
- var noBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var noBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
innerText:"Cancel",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(goPublicPopupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(goPublicPopupId);
return false;
}
});
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(goPublicPopupId, [txt, br, input, yesBtn, noBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(goPublicPopupId, [txt, br, input, yesBtn, noBtn]);
}
Corporation.prototype.updateSharePrice = function() {
@@ -44556,7 +44559,7 @@ Corporation.prototype.unlock = function(upgrade) {
this.unlockUpgrades.push(0);
}
if (this.funds.lt(price)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough funds to unlock this!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough funds to unlock this!");
return;
}
this.unlockUpgrades[upgN] = 1;
@@ -44571,7 +44574,7 @@ Corporation.prototype.upgrade = function(upgrade) {
while (this.upgradeMultipliers.length <= upgN) {this.upgradeMultipliers.push(1);}
var totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);
if (this.funds.lt(totalCost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough funds to purchase this!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough funds to purchase this!");
return;
}
++this.upgrades[upgN];
@@ -44657,19 +44660,19 @@ var companyManagementDiv, companyManagementHeaderTabs, companyManagementPanel,
industryWarehousePanel,
headerTabs, cityTabs;
Corporation.prototype.createUI = function() {
- companyManagementDiv = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ companyManagementDiv = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
id:"cmpy-mgmt-container",
position:"fixed",
class:"generic-menupage-container"
});
- companyManagementHeaderTabs = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {id:"cmpy-mgmt-header-tabs"});
+ companyManagementHeaderTabs = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {id:"cmpy-mgmt-header-tabs"});
companyManagementDiv.appendChild(companyManagementHeaderTabs);
//Create division/industry tabs at the top
this.updateUIHeaderTabs();
//Create the 'panel' that will have the actual content in the UI
- companyManagementPanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {id:"cmpy-mgmt-panel"});
+ companyManagementPanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {id:"cmpy-mgmt-panel"});
companyManagementDiv.appendChild(companyManagementPanel);
document.getElementById("entire-game-container").appendChild(companyManagementDiv);
@@ -44678,14 +44681,14 @@ Corporation.prototype.createUI = function() {
Corporation.prototype.updateUIHeaderTabs = function() {
if (companyManagementHeaderTabs) {
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(companyManagementHeaderTabs);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(companyManagementHeaderTabs);
} else {
console.log("ERROR: Header tabs div has not yet been created when Corporation.updateUIHeaderTabs() is called");
return;
}
//Corporation overview tabs
- var cmpyOverviewHdrTab = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("button", {
+ var cmpyOverviewHdrTab = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("button", {
id:"cmpy-mgmt-company-tab",
class:"cmpy-mgmt-header-tab",
innerText:this.name,
@@ -44704,26 +44707,26 @@ Corporation.prototype.updateUIHeaderTabs = function() {
}
//Create a tab to expand into a new industry
- companyManagementHeaderTabs.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("button", {
+ companyManagementHeaderTabs.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("button", {
id:'cmpy-mgmt-expand-industry-tab',
class:"cmpy-mgmt-header-tab",
innerText:"Expand into new Industry",
clickListener: ()=>{
if (document.getElementById("cmpy-mgmt-expand-industry-popup") != null) {return;}
- var container = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ var container = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
class:"popup-box-container",
id:"cmpy-mgmt-expand-industry-popup",
}),
- content = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {class:"popup-box-content"}),
- txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ content = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {class:"popup-box-content"}),
+ txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML: "Create a new division to expand into a new industry:",
}),
- selector = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {
+ selector = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {
class:"cmpy-mgmt-industry-select"
}),
- industryDescription = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {}),
- nameInput = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ industryDescription = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {}),
+ nameInput = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"text",
id:"cmpy-mgmt-expand-industry-name-input",
color:"white",
@@ -44732,11 +44735,11 @@ Corporation.prototype.updateUIHeaderTabs = function() {
maxLength: 30,
pattern:"[a-zA-Z0-9-_]"
}),
- nameLabel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("label", {
+ nameLabel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("label", {
for:"cmpy-mgmt-expand-industry-name-input",
innerText:"Division name: "
}),
- yesBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("span", {
+ yesBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("span", {
class:"popup-box-button",
innerText:"Create Division",
clickListener: ()=>{
@@ -44745,14 +44748,14 @@ Corporation.prototype.updateUIHeaderTabs = function() {
for (var i = 0; i < this.divisions.length; ++i) {
if (this.divisions[i].name === newDivisionName) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("This name is already in use!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("This name is already in use!");
return false;
}
}
if (this.funds.lt(IndustryStartingCosts[ind])) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Not enough money to create a new division in this industry");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Not enough money to create a new division in this industry");
} else if (newDivisionName === "") {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("New division must have a name!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("New division must have a name!");
} else {
this.funds = this.funds.minus(IndustryStartingCosts[ind]);
var newInd = new Industry({
@@ -44762,17 +44765,17 @@ Corporation.prototype.updateUIHeaderTabs = function() {
this.divisions.push(newInd);
this.updateUIHeaderTabs();
this.selectHeaderTab(headerTabs[headerTabs.length-2]);
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-expand-industry-popup");
- this.displayDivisionContent(newInd, __WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-expand-industry-popup");
+ this.displayDivisionContent(newInd, __WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12);
}
return false;
}
}),
- noBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("span", {
+ noBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("span", {
class:"popup-box-button",
innerText:"Cancel",
clickListener: function() {
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-expand-industry-popup");
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])("cmpy-mgmt-expand-industry-popup");
return false;
}
});
@@ -44786,7 +44789,7 @@ Corporation.prototype.updateUIHeaderTabs = function() {
//Add industry types to selector
//Have Agriculture be first as recommended option
if (!ownedIndustries["Agriculture"]) {
- selector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", {
+ selector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", {
text:Industries["Agriculture"], value:"Agriculture"
}));
}
@@ -44794,7 +44797,7 @@ Corporation.prototype.updateUIHeaderTabs = function() {
for (var key in Industries) {
if (key !== "Agriculture" && Industries.hasOwnProperty(key) && !ownedIndustries[key]) {
var ind = Industries[key];
- selector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", {
+ selector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", {
text: ind,value:key,
}));
}
@@ -44839,13 +44842,13 @@ Corporation.prototype.selectHeaderTab = function(currentTab) {
Corporation.prototype.createDivisionUIHeaderTab = function(division) {
var tabId = "cmpy-mgmt-" + division.name + "-tab";
- var tab = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("button", {
+ var tab = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("button", {
id:tabId,
class:"cmpy-mgmt-header-tab",
innerText:division.name,
clickListener:()=>{
this.selectHeaderTab(tab);
- this.displayDivisionContent(division, __WEBPACK_IMPORTED_MODULE_3__Location_js__["a" /* Locations */].Sector12);
+ this.displayDivisionContent(division, __WEBPACK_IMPORTED_MODULE_4__Location_js__["a" /* Locations */].Sector12);
return false;
}
});
@@ -44880,7 +44883,7 @@ Corporation.prototype.updateUIContent = function() {
Corporation.prototype.displayCorporationOverviewContent = function() {
this.clearUIPanel();
- companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
id:"cmpy-mgmt-overview-text",
}));
if (headerTabs && headerTabs.length >= 1) {
@@ -44888,23 +44891,23 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
}
//Check if player has Corporation Handbook
- var homeComp = __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].getHomeComputer(), hasHandbook = false,
+ var homeComp = __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].getHomeComputer(), hasHandbook = false,
handbookFn = "corporation-management-handbook.lit";
for (var i = 0; i < homeComp.messages.length; ++i) {
- if (Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["g" /* isString */])(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {
+ if (Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["g" /* isString */])(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {
hasHandbook = true;
break;
}
}
- companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Getting Started Guide", display:"inline-block",
tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' " +
"This is a .lit file that guides you through the beginning of setting up a Corporation and " +
"provides some tips/pointers for helping you get started with managing it.",
clickListener:()=>{
if (!hasHandbook) {homeComp.messages.push(handbookFn);}
- Object(__WEBPACK_IMPORTED_MODULE_2__Literature_js__["b" /* showLiterature */])(handbookFn);
+ Object(__WEBPACK_IMPORTED_MODULE_3__Literature_js__["b" /* showLiterature */])(handbookFn);
return false;
}
}));
@@ -44912,21 +44915,21 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
//Investors
if (this.public) {
//Sell share buttons
- var sellShares = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var sellShares = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Sell Shares", display:"inline-block",
tooltip:"Sell your shares in the company. This is the only way to " +
"profit from your business venture.",
clickListener:()=>{
var popupId = "cmpy-mgmt-sell-shares-popup";
var currentStockPrice = this.sharePrice;
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML: "Enter the number of shares you would like to sell. The money from " +
"selling your shares will go directly to you (NOT your Corporation). " +
"The current price of your " +
- "company's stock is " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(currentStockPrice).format("$0.000a"),
+ "company's stock is " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(currentStockPrice).format("$0.000a"),
});
- var profitIndicator = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {});
- var input = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var profitIndicator = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {});
+ var input = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number", placeholder:"Shares to sell", margin:"5px",
inputListener: ()=> {
var numShares = Math.round(input.value);
@@ -44936,18 +44939,18 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
profitIndicator.innerText = "You don't have this many shares to sell!";
} else {
profitIndicator.innerText = "Sell " + numShares + " shares for a total of " +
- __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(numShares * currentStockPrice).format('$0.000a');
+ __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(numShares * currentStockPrice).format('$0.000a');
}
}
});
- var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Sell shares", display:"inline-block",
clickListener:()=>{
var shares = Math.round(input.value);
if (isNaN(shares) || shares <= 0) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid value for number of shares");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid value for number of shares");
} else if (shares > this.numShares) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You don't have this many shares to sell");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You don't have this many shares to sell");
} else {
this.numShares -= shares;
if (isNaN(this.issuedShares)) {
@@ -44961,40 +44964,40 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
}
}
this.issuedShares += shares;
- __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].gainMoney(shares * this.sharePrice);
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].gainMoney(shares * this.sharePrice);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Cancel", display:"inline-block",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, profitIndicator, input, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, profitIndicator, input, confirmBtn, cancelBtn]);
}
});
//Buyback shares button
- var buybackShares = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var buybackShares = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Buyback shares", display:"inline-block",
tooltip:"Buy back shares you that previously issued or sold at market price.",
clickListener:()=>{
var popupId = "cmpy-mgmt-buyback-shares-popup";
var currentStockPrice = this.sharePrice;
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML: "Enter the number of shares you would like to buy back at market price. To purchase " +
"these shares, you must use your own money (NOT your Corporation's funds). " +
"The current price of your " +
- "company's stock is " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(currentStockPrice).format("$0.000a") +
- ". Your company currently has " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.issuedShares, 3) + " outstanding stock shares",
+ "company's stock is " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(currentStockPrice).format("$0.000a") +
+ ". Your company currently has " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.issuedShares, 3) + " outstanding stock shares",
});
- var costIndicator = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {});
- var input = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var costIndicator = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {});
+ var input = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number", placeholder:"Shares to buyback", margin:"5px",
inputListener: ()=> {
var numShares = Math.round(input.value);
@@ -45007,22 +45010,22 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
} else {
console.log("here");
costIndicator.innerText = "Purchase " + numShares + " shares for a total of " +
- __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(numShares * currentStockPrice).format('$0.000a');
+ __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(numShares * currentStockPrice).format('$0.000a');
}
}
});
- var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Buy shares", display:"inline-block",
clickListener:()=>{
var shares = Math.round(input.value);
var tempStockPrice = this.sharePrice;
if (isNaN(shares) || shares <= 0) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid value for number of shares");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid value for number of shares");
} else if (shares > this.issuedShares) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: There are not this many oustanding shares to buy back");
- } else if (shares * tempStockPrice > __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You do not have enough money to purchase this many shares (you need " +
- __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(shares * tempStockPrice).format("$0.000a") + ")");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: There are not this many oustanding shares to buy back");
+ } else if (shares * tempStockPrice > __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money) {
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You do not have enough money to purchase this many shares (you need " +
+ __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(shares * tempStockPrice).format("$0.000a") + ")");
} else {
this.numShares += shares;
if (isNaN(this.issuedShares)) {
@@ -45036,24 +45039,24 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
}
}
this.issuedShares -= shares;
- __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].loseMoney(shares * tempStockPrice);
+ __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(shares * tempStockPrice);
//TODO REMOVE from Player money
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
}
return false;
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
innerText:"Cancel",
display:"inline-block",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, costIndicator, input, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, costIndicator, input, confirmBtn, cancelBtn]);
}
});
@@ -45062,7 +45065,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
//If your Corporation is big enough, buy faction influence through bribes
var canBribe = this.determineValuation() >= BribeThreshold;
- var bribeFactions = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var bribeFactions = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class: canBribe ? "a-link-button" : "a-link-button-inactive",
innerText:"Bribe Factions", display:"inline-block",
tooltip:canBribe
@@ -45070,25 +45073,24 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
: "Your Corporation is not powerful enough to bribe Faction leaders",
clickListener:()=>{
var popupId = "cmpy-mgmt-bribe-factions-popup";
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerText:"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation"
});
- var factionSelector = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {margin:"3px"});
- for (var facName in __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].factions) {
- if (__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].factions.hasOwnProperty(facName)) {
- factionSelector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option"), {
- text:facName, value:facName
- });
- }
+ var factionSelector = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {margin:"3px"});
+ for (var i = 0; i < __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].factions.length; ++i) {
+ var facName = __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].factions[i];
+ factionSelector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", {
+ text:facName, value:facName
+ }));
}
- var repGainText = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p");
+ var repGainText = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p");
var stockSharesInput;
- var moneyInput = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var moneyInput = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number", placeholder:"Corporation funds", margin:"5px",
inputListener:()=>{
- var money = moneyInput.value == null ? 0 : moneyInput.value;
+ var money = moneyInput.value == null || moneyInput.value == "" ? 0 : parseFloat(moneyInput.value);
var stockPrice = this.sharePrice;
- var stockShares = stockSharesInput.value == null ? 0 : Math.round(stockSharesInput.value);
+ var stockShares = stockSharesInput.value == null || stockSharesInput.value == "" ? 0 : Math.round(parseFloat(stockSharesInput.value));
if (isNaN(money) || isNaN(stockShares) || money < 0 || stockShares < 0) {
repGainText.innerText = "ERROR: Invalid value(s) entered";
} else if (this.funds.lt(money)) {
@@ -45096,21 +45098,22 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
} else if (this.stockShares > this.numShares) {
repGainText.innerText = "ERROR: You do not have this many shares to bribe with";
} else {
- var totalAmount = money + (stockShares * stockPrice);
+
+ var totalAmount = Number(money) + (stockShares * stockPrice);
var repGain = totalAmount / BribeToRepRatio;
- repGainText.innerText = "You will gain " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(repGain, 0) +
+ repGainText.innerText = "You will gain " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(repGain, 0) +
" reputation with " +
factionSelector.options[factionSelector.selectedIndex].value +
" with this bribe";
}
}
});
- stockSharesInput = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ stockSharesInput = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number", placeholder:"Stock Shares", margin: "5px",
inputListener:()=>{
- var money = moneyInput.value == null ? 0 : moneyInput.value;
+ var money = moneyInput.value == null || moneyInput.value == "" ? 0 : moneyInput.value;
var stockPrice = this.sharePrice;
- var stockShares = stockSharesInput.value == null ? 0 : Math.round(stockSharesInput.value);
+ var stockShares = stockSharesInput.value == null || stockSharesInput.value == "" ? 0 : Math.round(stockSharesInput.value);
if (isNaN(money) || isNaN(stockShares) || money < 0 || stockShares < 0) {
repGainText.innerText = "ERROR: Invalid value(s) entered";
} else if (this.funds.lt(money)) {
@@ -45120,55 +45123,59 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
} else {
var totalAmount = money + (stockShares * stockPrice);
var repGain = totalAmount / BribeToRepRatio;
- repGainText.innerText = "You will gain " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(repGain, 0) +
+ console.log("repGain: " + repGain);
+ repGainText.innerText = "You will gain " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(repGain, 0) +
" reputation with " +
factionSelector.options[factionSelector.selectedIndex].value +
" with this bribe";
}
}
});
- var confirmButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmButton = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Bribe", display:"inline-block",
clickListener:()=>{
- var money = moneyInput.value == null ? 0 : moneyInput.value;
+ var money = moneyInput.value == null || moneyInput.value == "" ? 0 : parseFloat(moneyInput.value);
var stockPrice = this.sharePrice;
- var stockShares = stockSharesInput.value == null ? 0 : Math.round(stockSharesInput.value);
- var fac = Factions[factionSelector.options[factionSelector.selectedIndex].value];
+ var stockShares = stockSharesInput.value == null || stockSharesInput.value == ""? 0 : Math.round(parseFloat(stockSharesInput.value));
+ var fac = __WEBPACK_IMPORTED_MODULE_2__Faction_js__["b" /* Factions */][factionSelector.options[factionSelector.selectedIndex].value];
if (fac == null) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You must select a faction to bribe");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You must select a faction to bribe");
return false;
}
if (isNaN(money) || isNaN(stockShares) || money < 0 || stockShares < 0) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid value(s) entered");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Invalid value(s) entered");
} else if (this.funds.lt(money)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You do not have this much money to bribe with");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You do not have this much money to bribe with");
} else if (this.stockShares > this.numShares) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You do not have this many shares to bribe with");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: You do not have this many shares to bribe with");
} else {
var totalAmount = money + (stockShares * stockPrice);
var repGain = totalAmount / BribeToRepRatio;
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You gained " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(repGain, 0) +
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You gained " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(repGain, 0) +
" reputation with " + fac.name + " by bribing them.");
fac.playerReputation += repGain;
- this.funds = this.funds.lt(money);
+ this.funds = this.funds.minus(money);
this.numShares -= stockShares;
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
}
});
- var cancelButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelButton = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Cancel", display:"inline-block",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
+
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, factionSelector, repGainText,
+ moneyInput, stockSharesInput, confirmButton, cancelButton]);
}
});
companyManagementPanel.appendChild(bribeFactions);
} else {
- var findInvestors = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var findInvestors = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class: this.fundingRound >= 4 ? "a-link-button-inactive" : "a-link-button tooltip",
innerText: "Find Investors",
display:"inline-block",
@@ -45177,7 +45184,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
}
});
if (this.fundingRound < 4) {
- var findInvestorsTooltip = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("span", {
+ var findInvestorsTooltip = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("span", {
class:"tooltiptext",
innerText:"Search for private investors who will give you startup funding in exchange " +
"for equity (stock shares) in your company"
@@ -45185,7 +45192,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
findInvestors.appendChild(findInvestorsTooltip);
}
- var goPublic = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var goPublic = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button tooltip",
innerText:"Go Public",
display:"inline-block",
@@ -45194,7 +45201,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
return false;
}
});
- var goPublicTooltip = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("span", {
+ var goPublicTooltip = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("span", {
class:"tooltiptext",
innerText: "Become a publicly traded and owned entity. Going public involves " +
"issuing shares for an IPO. Once you are a public company, " +
@@ -45212,10 +45219,10 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
//Don't show upgrades if player hasn't opened any divisions
if (this.divisions.length <= 0) {return; }
//Corporation Upgrades
- var upgradeContainer = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ var upgradeContainer = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
class:"cmpy-mgmt-upgrade-container",
});
- upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("h1", {
+ upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("h1", {
innerText:"Unlocks", margin:"6px", padding:"6px",
}));
@@ -45240,13 +45247,13 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
return;
}
- upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
class:"cmpy-mgmt-upgrade-div", width:"45%",
- innerHTML:upgrade[2] + " - " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(upgrade[1]).format("$0.000a"),
+ innerHTML:upgrade[2] + " - " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(upgrade[1]).format("$0.000a"),
tooltip: upgrade[3],
clickListener:()=>{
if (corp.funds.lt(upgrade[1])) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Insufficient funds");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Insufficient funds");
} else {
corp.unlock(upgrade);
corp.displayCorporationOverviewContent();
@@ -45258,7 +45265,7 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
}
//Levelable upgrades
- upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("h1", {
+ upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("h1", {
innerText:"Upgrades", margin:"6px", padding:"6px",
}));
@@ -45272,13 +45279,13 @@ Corporation.prototype.displayCorporationOverviewContent = function() {
var baseCost = upgrade[1], priceMult = upgrade[2];
var cost = baseCost * Math.pow(priceMult, corp.upgrades[i]);
- upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ upgradeContainer.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
class:"cmpy-mgmt-upgrade-div", width:"45%",
- innerHTML:upgrade[4] + " - " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(cost).format("$0.000a"),
+ innerHTML:upgrade[4] + " - " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(cost).format("$0.000a"),
tooltip:upgrade[5],
clickListener:()=>{
if (corp.funds.lt(cost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Insufficient funds");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Insufficient funds");
} else {
corp.upgrade(upgrade);
corp.displayCorporationOverviewContent();
@@ -45298,19 +45305,19 @@ Corporation.prototype.updateCorporationOverviewContent = function() {
return;
}
var totalFunds = this.funds,
- totalRevenue = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0),
- totalExpenses = new __WEBPACK_IMPORTED_MODULE_5__utils_decimal_js___default.a(0);
+ totalRevenue = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0),
+ totalExpenses = new __WEBPACK_IMPORTED_MODULE_6__utils_decimal_js___default.a(0);
var profit = this.revenue.minus(this.expenses).toNumber(),
- profitStr = profit >= 0 ? __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(profit).format("$0.000a") : "-" + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(-1 * profit).format("$0.000a");
+ profitStr = profit >= 0 ? __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(profit).format("$0.000a") : "-" + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(-1 * profit).format("$0.000a");
- var txt = "Total Funds: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(totalFunds.toNumber()).format('$0.000a') + "
" +
- "Total Revenue: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(this.revenue.toNumber()).format("$0.000a") + " / s
" +
- "Total Expenses: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(this.expenses.toNumber()).format("$0.000a") + "/ s
" +
+ var txt = "Total Funds: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(totalFunds.toNumber()).format('$0.000a') + "
" +
+ "Total Revenue: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(this.revenue.toNumber()).format("$0.000a") + " / s
" +
+ "Total Expenses: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(this.expenses.toNumber()).format("$0.000a") + "/ s
" +
"Total Profits: " + profitStr + " / s
" +
"Publicly Traded: " + (this.public ? "Yes" : "No") + "
" +
- "Owned Stock Shares: " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(this.numShares).format('0.000a') + "
" +
- "Stock Price: " + (this.public ? "$" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sharePrice, 2) : "N/A") + "
";
+ "Owned Stock Shares: " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(this.numShares).format('0.000a') + "
" +
+ "Stock Price: " + (this.public ? "$" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.sharePrice, 2) : "N/A") + "
";
var prodMult = this.getProductionMultiplier(),
storageMult = this.getStorageMultiplier(),
@@ -45321,15 +45328,15 @@ Corporation.prototype.updateCorporationOverviewContent = function() {
empEffMult = this.getEmployeeEffMultiplier(),
salesMult = this.getSalesMultiplier(),
sciResMult = this.getScientificResearchMultiplier();
- if (prodMult > 1) {txt += "Production Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(prodMult, 3) + "
";}
- if (storageMult > 1) {txt += "Storage Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(storageMult, 3) + "
";}
- if (advMult > 1) {txt += "Advertising Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(advMult, 3) + "
";}
- if (empCreMult > 1) {txt += "Empl. Creativity Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empCreMult, 3) + "
";}
- if (empChaMult > 1) {txt += "Empl. Charisma Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empChaMult, 3) + "
";}
- if (empIntMult > 1) {txt += "Empl. Intelligence Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empIntMult, 3) + "
";}
- if (empEffMult > 1) {txt += "Empl. Efficiency Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empEffMult, 3) + "
";}
- if (salesMult > 1) {txt += "Sales Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(salesMult, 3) + "
";}
- if (sciResMult > 1) {txt += "Scientific Research Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(sciResMult, 3) + "
";}
+ if (prodMult > 1) {txt += "Production Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(prodMult, 3) + "
";}
+ if (storageMult > 1) {txt += "Storage Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(storageMult, 3) + "
";}
+ if (advMult > 1) {txt += "Advertising Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(advMult, 3) + "
";}
+ if (empCreMult > 1) {txt += "Empl. Creativity Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empCreMult, 3) + "
";}
+ if (empChaMult > 1) {txt += "Empl. Charisma Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empChaMult, 3) + "
";}
+ if (empIntMult > 1) {txt += "Empl. Intelligence Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empIntMult, 3) + "
";}
+ if (empEffMult > 1) {txt += "Empl. Efficiency Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(empEffMult, 3) + "
";}
+ if (salesMult > 1) {txt += "Sales Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(salesMult, 3) + "
";}
+ if (sciResMult > 1) {txt += "Scientific Research Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(sciResMult, 3) + "
";}
p.innerHTML = txt;
}
@@ -45349,19 +45356,19 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
}
//Expand into new City button
- companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("button", {
+ companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("button", {
class:"cmpy-mgmt-city-tab", innerText:"Expand into new City", display:"inline-block",
clickListener:()=>{
var popupId = "cmpy-mgmt-expand-city-popup";
- var text = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var text = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerText: "Would you like to expand into a new city by opening an office? " +
- "This would cost " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(OfficeInitialCost).format('$0.000a'),
+ "This would cost " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(OfficeInitialCost).format('$0.000a'),
});
- var citySelector = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {margin:"5px"});
+ var citySelector = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {margin:"5px"});
for (var cityName in division.offices) {
if (division.offices.hasOwnProperty(cityName)) {
if (!(division.offices[cityName] instanceof OfficeSpace)) {
- citySelector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", {
+ citySelector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", {
text: cityName,
value: cityName
}));
@@ -45369,37 +45376,37 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
}
}
- var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
innerText:"Confirm", class:"a-link-button", display:"inline-block", margin:"3px",
clickListener:()=>{
var city = citySelector.options[citySelector.selectedIndex].value;
if (this.funds.lt(OfficeInitialCost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to open a new office!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to open a new office!");
} else {
this.funds = this.funds.minus(OfficeInitialCost);
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Opened a new office in " + city + "!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Opened a new office in " + city + "!");
division.offices[city] = new OfficeSpace({
loc:city,
size:OfficeInitialSize,
});
this.displayDivisionContent(division, city);
}
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
innerText:"Cancel", class:"a-link-button", display:"inline-block", margin:"3px",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
})
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [text, citySelector, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [text, citySelector, confirmBtn, cancelBtn]);
return false;
}
}));
- companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {})); // Force line break
+ companyManagementPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {})); // Force line break
//Get office object
var office = division.offices[currentCityUi];
@@ -45409,42 +45416,42 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
}
//Left and right panels
- var leftPanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {class:"cmpy-mgmt-industry-left-panel"});
- var rightPanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {class:"cmpy-mgmt-industry-right-panel"});
+ var leftPanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {class:"cmpy-mgmt-industry-left-panel"});
+ var rightPanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {class:"cmpy-mgmt-industry-right-panel"});
companyManagementPanel.appendChild(leftPanel);
companyManagementPanel.appendChild(rightPanel);
//Different sections (Overview, Employee/Office, and Warehouse)
- industryOverviewPanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ industryOverviewPanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
id:"cmpy-mgmt-industry-overview-panel", class:"cmpy-mgmt-industry-overview-panel"
});
leftPanel.appendChild(industryOverviewPanel);
- industryEmployeePanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ industryEmployeePanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
id:"cmpy-mgmt-employee-panel", class:"cmpy-mgmt-employee-panel"
});
leftPanel.appendChild(industryEmployeePanel);
- industryWarehousePanel = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ industryWarehousePanel = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
id:"cmpy-mgmt-warehouse-panel", class:"cmpy-mgmt-warehouse-panel"
});
rightPanel.appendChild(industryWarehousePanel);
//Industry overview text
- industryOverviewText = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {});
+ industryOverviewText = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {});
industryOverviewPanel.appendChild(industryOverviewText);
- industryOverviewPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryOverviewPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
//Industry overview Purchases & Upgrades
var numUpgrades = Object.keys(IndustryUpgrades).length;
while (division.upgrades.length < numUpgrades) {division.upgrades.push(0);} //Backwards compatibility
- var industryOverviewUpgrades = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {});
- industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("u", {
+ var industryOverviewUpgrades = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {});
+ industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("u", {
innerText:"Purchases & Upgrades", margin:"2px", padding:"2px",
fontSize:"14px",
}));
- industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
for (var i = 0; i < numUpgrades; ++i) {
(function(i, corp, division, office) {
var upgrade = IndustryUpgrades[i.toString()];
@@ -45462,13 +45469,13 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
cost = baseCost * Math.pow(priceMult, division.upgrades[i]);
break;
}
- industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {
+ industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {
class:"cmpy-mgmt-upgrade-div", display:"inline-block",
- innerHTML:upgrade[4] + ' - ' + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(cost).format("$0.000a"),
+ innerHTML:upgrade[4] + ' - ' + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(cost).format("$0.000a"),
tooltip:upgrade[5],
clickListener:()=>{
if (corp.funds.lt(cost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Insufficient funds");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Insufficient funds");
} else {
corp.funds = corp.funds.minus(cost);
division.upgrade(upgrade, {
@@ -45479,7 +45486,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
}
}
}));
- industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryOverviewUpgrades.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
})(i, this, division, office);
}
@@ -45538,17 +45545,17 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
"Investing money in marketing the product will help the product's sales.";
//Create the button
- industryOverviewPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryOverviewPanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:createProductButtonText, margin:"6px", display:"inline-block",
clickListener:()=>{
var popupId = "cmpy-mgmt-create-product-popup";
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML:createProductPopupText,
});
- var designCity = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {});
+ var designCity = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {});
for (var cityName in division.offices) {
if (division.offices[cityName] instanceof OfficeSpace) {
- designCity.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", {
+ designCity.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", {
value:cityName,
text:cityName
}));
@@ -45562,19 +45569,19 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
} else if (division.type === Industries.RealEstate) {
foo = "Property Name";
}
- var productNameInput = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var productNameInput = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
placeholder:foo,
});
- var lineBreak1 = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br",{});
- var designInvestInput = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var lineBreak1 = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br",{});
+ var designInvestInput = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number",
placeholder:"Design investment"
});
- var marketingInvestInput = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var marketingInvestInput = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number",
placeholder:"Marketing investment"
});
- var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
innerText:"Develop Product",
clickListener:()=>{
@@ -45583,13 +45590,13 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
var designInvest = parseFloat(designInvestInput.value),
marketingInvest = parseFloat(marketingInvestInput.value);
if (productNameInput.value == null || productNameInput.value === "") {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You must specify a name for your product!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You must specify a name for your product!");
} else if (isNaN(designInvest)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for design investment");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for design investment");
} else if (isNaN(marketingInvest)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for marketing investment");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value for marketing investment");
} else if (this.funds.lt(designInvest + marketingInvest)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to make this large of an investment");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to make this large of an investment");
} else {
var product = new Product({
name:productNameInput.value.replace(/[<>]/g, ''), //Sanitize for HTMl elements
@@ -45599,28 +45606,28 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
});
this.funds = this.funds.minus(designInvest + marketingInvest);
division.products[product.name] = product;
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
}
this.updateUIContent();
return false;
}
})
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
innerText:"Cancel",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
})
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, designCity, productNameInput, lineBreak1,
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, designCity, productNameInput, lineBreak1,
designInvestInput, marketingInvestInput, confirmBtn, cancelBtn]);
}
}));
}
//Employee and Office Panel
- industryEmployeeText = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryEmployeeText = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
id: "cmpy-mgmt-employee-p",
display:"block",
innerHTML: "Office Space
" +
@@ -45633,7 +45640,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
//Hire Employee button
if (office.employees.length === 0) {
- industryEmployeeHireButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryEmployeeHireButton = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",display:"inline-block",
innerText:"Hire Employee", fontSize:"13px",
tooltip:"You'll need to hire some employees to get your operations started! " +
@@ -45645,7 +45652,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
});
//industryEmployeeHireButton.classList.add("flashing-button");
} else {
- industryEmployeeHireButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryEmployeeHireButton = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",display:"inline-block",
innerText:"Hire Employee", fontSize:"13px",
clickListener:()=>{
@@ -45657,7 +45664,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
industryEmployeePanel.appendChild(industryEmployeeHireButton);
//Autohire Employee button
- industryEmployeeAutohireButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryEmployeeAutohireButton = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", display:"inline-block",
innerText:"Autohire Employee", fontSize:"13px",
tooltip:"Automatically hires an employee and gives him/her a random name",
@@ -45669,120 +45676,120 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
industryEmployeePanel.appendChild(industryEmployeeAutohireButton);
//Upgrade Office Size button
- industryEmployeePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
- industryOfficeUpgradeSizeButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryEmployeePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryOfficeUpgradeSizeButton = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", innerText:"Upgrade size",
display:"inline-block", margin:"6px", fontSize:"13px",
tooltip:"Upgrade the office's size so that it can hold more employees!",
clickListener:()=>{
var popupId = "cmpy-mgmt-upgrade-office-size-popup";
var upgradeCost = OfficeInitialCost * Math.pow(1.07, Math.round(office.size / OfficeInitialSize));
- var text = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var text = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerHTML:"Increase the size of your office space to fit " + OfficeInitialSize +
- " more employees. This will cost " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(upgradeCost).format('$0.000a'),
+ " more employees. This will cost " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(upgradeCost).format('$0.000a'),
});
- var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
display:"inline-block",
margin:"8px",
innerText:"Upgrade Office Size",
clickListener:()=>{
if (this.funds.lt(upgradeCost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to purchase this upgrade!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to purchase this upgrade!");
} else {
office.size += OfficeInitialSize;
this.funds = this.funds.minus(upgradeCost);
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Office space increased! It can now hold " + office.size + " employees");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Office space increased! It can now hold " + office.size + " employees");
this.updateUIContent();
}
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
innerText:"Cancel",
display:"inline-block",
margin:"8px",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
})
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [text, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [text, confirmBtn, cancelBtn]);
return false;
}
});
industryEmployeePanel.appendChild(industryOfficeUpgradeSizeButton);
//Throw Office Party
- industryEmployeePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryEmployeePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", display:"inline-block", innerText:"Throw Party",
fontSize:"13px",
tooltip:"Throw an office party to increase your employee's morale and happiness",
clickListener:()=>{
var popupId = "cmpy-mgmt-throw-office-party-popup";
- var txt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var txt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerText:"Enter the amount of money you would like to spend PER EMPLOYEE " +
"on this office party"
});
- var totalCostTxt = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ var totalCostTxt = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
innerText:"Throwing this party will cost a total of $0"
});
- var input = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("input", {
+ var input = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("input", {
type:"number", margin:"5px", placeholder:"$ / employee",
inputListener:()=>{
if (isNaN(input.value) || input.value < 0) {
totalCostTxt.innerText = "Invalid value entered!"
} else {
var totalCost = input.value * office.employees.length;
- totalCostTxt.innerText = "Throwing this party will cost a total of " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(totalCost).format('$0.000a');
+ totalCostTxt.innerText = "Throwing this party will cost a total of " + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(totalCost).format('$0.000a');
}
}
});
- var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var confirmBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
display:"inline-block",
innerText:"Throw Party",
clickListener:()=>{
if (isNaN(input.value) || input.value < 0) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value entered");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Invalid value entered");
} else {
var totalCost = input.value * office.employees.length;
if (this.funds.lt(totalCost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to throw this party!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You don't have enough company funds to throw this party!");
} else {
this.funds = this.funds.minus(totalCost);
var mult;
for (var fooit = 0; fooit < office.employees.length; ++fooit) {
mult = office.employees[fooit].throwParty(input.value);
}
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You threw a party for the office! The morale and happiness " +
- "of each employee increased by " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])((mult-1) * 100, 2) + "%.");
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You threw a party for the office! The morale and happiness " +
+ "of each employee increased by " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])((mult-1) * 100, 2) + "%.");
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
}
}
return false;
}
});
- var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var cancelBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button",
display:"inline-block",
innerText:"Cancel",
clickListener:()=>{
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["m" /* removeElementById */])(popupId);
return false;
}
});
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, totalCostTxt, input, confirmBtn, cancelBtn]);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["g" /* createPopup */])(popupId, [txt, totalCostTxt, input, confirmBtn, cancelBtn]);
}
}));
- industryEmployeeManagementUI = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {});
- industryEmployeeInfo = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {margin:"4px", padding:"4px"});
+ industryEmployeeManagementUI = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {});
+ industryEmployeeInfo = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {margin:"4px", padding:"4px"});
if (empManualAssignmentModeActive) {
//Employees manually assigned
- industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", display:"inline-block", margin:"4px",
innerText:"Switch to Auto Mode",
tooltip:"Switch to Automatic Assignment Mode, which will automatically " +
@@ -45793,16 +45800,16 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
this.displayDivisionContent(division, city);
}
}));
- industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
- industryIndividualEmployeeInfo = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("div", {margin:"4px", padding:"4px"});
- var selector = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("select", {
+ industryIndividualEmployeeInfo = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("div", {margin:"4px", padding:"4px"});
+ var selector = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("select", {
color: "white", backgroundColor:"black", margin:"4px", padding:"4px",
changeListener:()=>{
var name = selector.options[selector.selectedIndex].text;
for (var i = 0; i < office.employees.length; ++i) {
if (office.employees[i].name === name) {
- Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(industryIndividualEmployeeInfo);
+ Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["k" /* removeChildrenFromElement */])(industryIndividualEmployeeInfo);
office.employees[i].createUI(industryIndividualEmployeeInfo, this);
return;
}
@@ -45812,7 +45819,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
});
for (var i = 0; i < office.employees.length; ++i) {
- selector.add(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("option", {text:office.employees[i].name}));
+ selector.add(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("option", {text:office.employees[i].name}));
}
selector.selectedIndex = -1;
@@ -45822,7 +45829,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
industryEmployeeManagementUI.appendChild(industryIndividualEmployeeInfo);
} else {
//Player only manages the number of each occupation, not who gets what job
- industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class:"a-link-button", display:"inline-block", margin:"4px",
innerText:"Switch to Manual Mode",
tooltip:"Switch to Manual Assignment Mode, which allows you to " +
@@ -45832,7 +45839,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
this.displayDivisionContent(division, city);
}
}));
- industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
var opCount = 0, engCount = 0, busCount = 0,
mgmtCount = 0, rndCount = 0, unassignedCount = 0,
@@ -45860,15 +45867,15 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
}
//Unassigned employee count display
- industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("p", {
+ industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("p", {
display:"inline-block",
innerText:"Unassigned Employees: " + unassignedCount,
}));
- industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
//General display of employee information (avg morale, avg energy, etc.)
industryEmployeeManagementUI.appendChild(industryEmployeeInfo);
- industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
+ industryEmployeeManagementUI.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {}));
var positions = [EmployeePositions.Operations, EmployeePositions.Engineer,
EmployeePositions.Business, EmployeePositions.Management,
@@ -45882,12 +45889,12 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
var counts = [opCount, engCount, busCount, mgmtCount, rndCount, trainingCount];
for (var i = 0; i < positions.length; ++i) {
(function(corp, i) {
- var info = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("h2", {
+ var info = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("h2", {
display:"inline-block", width:"40%", fontSize:"15px",
innerText: positions[i] + "(" + counts[i] + ")",
tooltipleft: descriptions[i]
});
- var plusBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var plusBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class: unassignedCount > 0 ? "a-link-button" : "a-link-button-inactive",
display:"inline-block", innerText:"+",
clickListener:()=>{
@@ -45895,7 +45902,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
corp.displayDivisionContent(division, city);
}
});
- var minusBtn = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ var minusBtn = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
class: counts[i] > 0 ? "a-link-button" : "a-link-button-inactive",
display:"inline-block", innerText:"-",
clickListener:()=>{
@@ -45903,7 +45910,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
corp.displayDivisionContent(division, city);
}
});
- var newline = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("br", {});
+ var newline = Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("br", {});
industryEmployeeManagementUI.appendChild(info);
industryEmployeeManagementUI.appendChild(plusBtn);
industryEmployeeManagementUI.appendChild(minusBtn);
@@ -45918,12 +45925,12 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
if (warehouse instanceof Warehouse) {
warehouse.createUI({industry:division, company: this});
} else {
- industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["f" /* createElement */])("a", {
+ industryWarehousePanel.appendChild(Object(__WEBPACK_IMPORTED_MODULE_8__utils_HelperFunctions_js__["f" /* createElement */])("a", {
innerText:"Purchase Warehouse ($5b)",
class: "a-link-button",
clickListener:()=>{
if (this.funds.lt(WarehouseInitialCost)) {
- Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You do not have enough funds to do this!");
+ Object(__WEBPACK_IMPORTED_MODULE_7__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You do not have enough funds to do this!");
} else {
division.warehouses[currentCityUi] = new Warehouse({
loc:currentCityUi,
@@ -45947,7 +45954,7 @@ Corporation.prototype.updateDivisionContent = function(division) {
var vechain = (this.unlockUpgrades[4] === 1);
//Industry Overview Text
var profit = division.lastCycleRevenue.minus(division.lastCycleExpenses).toNumber(),
- profitStr = profit >= 0 ? __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(profit).format("$0.000a") : "-" + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(-1 * profit).format("$0.000a");
+ profitStr = profit >= 0 ? __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(profit).format("$0.000a") : "-" + __WEBPACK_IMPORTED_MODULE_10__utils_numeral_min_js___default()(-1 * profit).format("$0.000a");
var advertisingInfo = "";
if (vechain) {
var advertisingFactors = division.getAdvertisingFactors();
@@ -45956,25 +45963,25 @@ Corporation.prototype.updateDivisionContent = function(division) {
var ratioFac = advertisingFactors[3];
var totalAdvertisingFac = advertisingFactors[0];
advertisingInfo =
- "
" +
- "Awareness Bonus: x" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(awarenessFac, 3) + "
" +
- "Popularity Bonus: x" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(popularityFac, 3) + "
" +
- "Ratio Multiplier: x" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(ratioFac, 3) + "
"
+ "Awareness Bonus: x" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(awarenessFac, 3) + "
" +
+ "Popularity Bonus: x" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(popularityFac, 3) + "
" +
+ "Ratio Multiplier: x" + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(ratioFac, 3) + "
Production Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(division.prodMult, 2) + + "
Production Multiplier: " + Object(__WEBPACK_IMPORTED_MODULE_11__utils_StringHelperFunctions_js__["c" /* formatNumber */])(division.prodMult, 2) + "Production gain from owning production-boosting materials " + "such as hardware, Robots, AI Cores, and Real Estate
getStats
()¶
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function.
Returns an object with the Player's stats. The object has the following properties:
-Player.hacking
-Player.strength
-Player.defense
-Player.dexterity
-Player.agility
-Player.charisma
-Player.intelligence
+{
+ hacking
+ strength
+ defense
+ dexterity
+ agility
+ charisma
+ intelligence
+}
Example:
@@ -239,6 +241,35 @@ Terminal buy command.
+If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this function.
+Returns an object with various information about your character. The object has the following properties:
+++{ + bitnode: Current BitNode number + company: Name of company + jobTitle: Name of job + city: Name of city you are currently in + factions: Array of factions you are currently a member of + tor: Boolean indicating whether or not you have a tor router + + //The following apply to when the character is performing + //some type of working action, such as working for a company/faction + timeWorked: Timed worked in ms + workHackExpGain: Hacking experience earned so far from work + workStrExpGain: Str experience earned so far from work + workDefExpGain: Def experience earned so far from work + workDexExpGain: Dex experience earned so far from work + workAgiExpGain: Agi experience earned so far from work + workChaExpGain: Cha experience earned so far from work + workRepGain: Reputation earned so far from work, if applicable + workMoneyGain: Money earned so far from work, if applicable +} +
getCompanyFavor
(companyName)¶Arguments: |
|
+
---|
If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.
+This function will return the amount of favor you have at the specified company. +If the company passed in as an argument is invalid, -1 will be returned.
+This function returns the amount of reputation you have for the specified faction.
+getFactionFavor
(factionName)¶Arguments: |
|
+
---|
If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.
+This function returns the amount of favor you have for the specified faction.
+