fileExists() now works on text files. Starting redoing Company mgmt employee UI

This commit is contained in:
danielyxie 2018-01-21 14:53:16 -06:00
parent 8ad28908e8
commit 8d72dd0f4e
4 changed files with 37 additions and 35 deletions

39
dist/bundle.js vendored

@ -3843,20 +3843,8 @@ let CONSTANTS = {
"World Stock Exchange account and TIX API Access<br>",
LatestUpdate:
"v0.34.1<br>" +
"-Updates to Corporation Management:<br>" +
"---Added a number of upgrades to various aspects of your Corporation<br>" +
"---Rebalanced the properties of Materials and the formula for determining the valuation of the Corporation<br>" +
"---Fixed a number of bugs<br>" +
"-'Stats' page now shows information about current BitNode<br>" +
"-You should now be able to create Corporations in other BitNodes if you have Source-File 3<br>" +
"-Added a new create-able program called b1t_flum3.exe. This program can be used to reset and switch BitNodes<br>" +
"-Added an option to adjust autosave interval<br>" +
"-Line feeds, newlines, and tabs will now work with the tprint() Netscript function<br>" +
"-Bug fix: 'check' Terminal command was broken<br>" +
"-Bug fix: 'theme' Terminal command was broken when manually specifying hex codes<br>" +
"-Bug fix: Incorrect promotion requirement for 'Business'-type jobs<br>" +
"-Bug fix: Settings input bars were incorrectly formatted when loading game<br>"
"v0.34.2<br>" +
"-The fileExists() Netscript function now works on text files (.txt). Thanks to Github user devoidfury for this<br>"
}
@ -26122,6 +26110,10 @@ function NetscriptFunctions(workerScript) {
return true;
}
}
var txtFile = Object(__WEBPACK_IMPORTED_MODULE_21__TextFile_js__["b" /* getTextFile */])(filename, server);
if (txtFile != null) {
return true;
}
return false;
},
isRunning : function(filename,ip){
@ -39032,6 +39024,7 @@ var ProductRatingWeights = {
}
}
var empManualAssignmentModeActive = false;
function Industry(params={}) {
this.offices = { //Maps locations to offices. 0 if no office at that location
[__WEBPACK_IMPORTED_MODULE_1__Location_js__["a" /* Locations */].Aevum]: 0,
@ -39862,7 +39855,8 @@ var EmployeePositions = {
Engineer: "Engineer",
Business: "Business",
Management: "Management",
RandD: "Research & Development"
RandD: "Research & Development",
Unassigned:"Unassigned"
}
function Employee(params={}) {
@ -39946,7 +39940,7 @@ Employee.prototype.calculateProductivity = function(corporation) {
(0.5 * effEff);
break;
default:
console.log("Invalid employee position: " + this.pos);
console.log("ERROR: Invalid employee position: " + this.pos);
break;
}
return prodBase * prodMult;
@ -42159,15 +42153,16 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
}
}));
/*
//Employee list
var industryEmployeeList = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["f" /* createElement */])("ul", {
var industryEmployeeList = createElement("ul", {
id:"cmpy-mgmt-employee-ul"
});
industryEmployeePanel.appendChild(industryEmployeeList);
for (var i = 0; i < office.employees.length; ++i) {
(function(corp) {
var emp = office.employees[i];
var li = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createAccordionElement */])({
var li = createAccordionElement({
id:"cmpy-mgmt-employee-" + emp.name,
hdrText:emp.name,
});
@ -42180,6 +42175,14 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
industryEmployeeList.appendChild(li);
})(this);
}
*/
if (empManualAssignmentModeActive) {
//Employees manually assigned
} else {
//Player only manages the number of each occupation, not who gets what job
}
//Warehouse Panel
var warehouse = division.warehouses[currentCityUi];

@ -529,6 +529,7 @@ var ProductRatingWeights = {
}
}
var empManualAssignmentModeActive = false;
function Industry(params={}) {
this.offices = { //Maps locations to offices. 0 if no office at that location
[Locations.Aevum]: 0,
@ -1359,7 +1360,8 @@ var EmployeePositions = {
Engineer: "Engineer",
Business: "Business",
Management: "Management",
RandD: "Research & Development"
RandD: "Research & Development",
Unassigned:"Unassigned"
}
function Employee(params={}) {
@ -1443,7 +1445,7 @@ Employee.prototype.calculateProductivity = function(corporation) {
(0.5 * effEff);
break;
default:
console.log("Invalid employee position: " + this.pos);
console.log("ERROR: Invalid employee position: " + this.pos);
break;
}
return prodBase * prodMult;
@ -3656,6 +3658,7 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
}
}));
/*
//Employee list
var industryEmployeeList = createElement("ul", {
id:"cmpy-mgmt-employee-ul"
@ -3677,6 +3680,14 @@ Corporation.prototype.displayDivisionContent = function(division, city) {
industryEmployeeList.appendChild(li);
})(this);
}
*/
if (empManualAssignmentModeActive) {
//Employees manually assigned
} else {
//Player only manages the number of each occupation, not who gets what job
}
//Warehouse Panel
var warehouse = division.warehouses[currentCityUi];

@ -1117,20 +1117,8 @@ let CONSTANTS = {
"World Stock Exchange account and TIX API Access<br>",
LatestUpdate:
"v0.34.1<br>" +
"-Updates to Corporation Management:<br>" +
"---Added a number of upgrades to various aspects of your Corporation<br>" +
"---Rebalanced the properties of Materials and the formula for determining the valuation of the Corporation<br>" +
"---Fixed a number of bugs<br>" +
"-'Stats' page now shows information about current BitNode<br>" +
"-You should now be able to create Corporations in other BitNodes if you have Source-File 3<br>" +
"-Added a new create-able program called b1t_flum3.exe. This program can be used to reset and switch BitNodes<br>" +
"-Added an option to adjust autosave interval<br>" +
"-Line feeds, newlines, and tabs will now work with the tprint() Netscript function<br>" +
"-Bug fix: 'check' Terminal command was broken<br>" +
"-Bug fix: 'theme' Terminal command was broken when manually specifying hex codes<br>" +
"-Bug fix: Incorrect promotion requirement for 'Business'-type jobs<br>" +
"-Bug fix: Settings input bars were incorrectly formatted when loading game<br>"
"v0.34.2<br>" +
"-The fileExists() Netscript function now works on text files (.txt). Thanks to Github user devoidfury for this<br>"
}
export {CONSTANTS};

@ -837,7 +837,7 @@ function NetscriptFunctions(workerScript) {
}
}
var txtFile = getTextFile(filename, server);
if (txtFile !== null) {
if (txtFile != null) {
return true;
}
return false;