diff --git a/index.html b/index.html index 58eafe9b0..739a6081d 100644 --- a/index.html +++ b/index.html @@ -43,6 +43,7 @@ + @@ -302,6 +303,7 @@
+
diff --git a/src/Company.js b/src/Company.js index d9df7caf7..9a0a07a6d 100644 --- a/src/Company.js +++ b/src/Company.js @@ -166,7 +166,7 @@ CompanyPosition.prototype.isBusinessJob = function() { this.positionName == "Chief Executive Officer") { return true; } - return true; + return false; } CompanyPosition.prototype.isSecurityJob = function() { diff --git a/src/CreateProgram.js b/src/CreateProgram.js new file mode 100644 index 000000000..67cb95812 --- /dev/null +++ b/src/CreateProgram.js @@ -0,0 +1,4 @@ +/* Create programs */ +function displayCreateProgramContent() { + +} \ No newline at end of file diff --git a/src/Location.js b/src/Location.js index 16a8fd6e4..5aa9e3bca 100644 --- a/src/Location.js +++ b/src/Location.js @@ -196,8 +196,9 @@ displayLocationContent = function() { return false; }); - //Change the text for the corresponding position from "Apply for X Job" to "Apply for promotion" var currPos = Player.companyPosition; + + //Change the text for the corresponding position from "Apply for X Job" to "Apply for promotion" if (currPos.isSoftwareJob()) { softwareJob.innerHTML = "Apply for a promotion (Software)"; } else if (currPos.isITJob()) { @@ -212,10 +213,6 @@ displayLocationContent = function() { securityJob.innerHTML = "Apply for a promotion (Security)"; } else if (currPos.isAgentJob()) { agentJob.innerHTML = "Apply for a promotion (Agent)"; - } else if (currPos.positionName == CompanyPositions.Employee) { - employeeJob.style.display = "none"; - } else if (currPos.positionName == CompanyPositions.Waiter) { - waiterJob.style.display = "none"; } } else { jobTitle.style.display = "none"; @@ -727,8 +724,22 @@ displayLocationContent = function() { gymTrainDex.style.display = "block"; gymTrainAgi.style.display = "block"; break; + + default: + console.log("ERROR: INVALID LOCATION"); } + + //Make the "Apply to be Employee and Waiter" texts disappear if you already hold the job + if (loc == Player.companyName) { + var currPos = Player.companyPosition; + + if (currPos.positionName == CompanyPositions.Employee.positionName) { + employeeJob.style.display = "none"; + } else if (currPos.positionName == CompanyPositions.Waiter.positionName) { + waiterJob.style.display = "none"; + } + } } initLocationButtons = function() { diff --git a/src/engine.js b/src/engine.js index d5f805647..4e03691e8 100644 --- a/src/engine.js +++ b/src/engine.js @@ -202,6 +202,7 @@ var Engine = { loadCreateProgramContent: function() { Engine.hideAllContent(); Engine.Display.createProgramContent.style.visibility = "visible"; + displayCreateProgramContent(); Engine.currentPage = Engine.Page.CreateProgram; }, @@ -296,7 +297,7 @@ var Engine = { 'Dexterity: ' + (Player.dexterity).toLocaleString() + '

' + 'Agility: ' + (Player.agility).toLocaleString() + '

' + 'Charisma: ' + (Player.charisma).toLocaleString() + '

' + - 'Servers owned: ' + Player.purchasedServers.length + '

'; + 'Servers owned: ' + Player.purchasedServers.length + '

' + 'Hacking experience: ' + (Player.hacking_exp.toFixed(4)).toLocaleString() + '

' + 'Strength experience: ' + (Player.strength_exp.toFixed(4)).toLocaleString() + '

' + 'Defense experience: ' + (Player.defense_exp.toFixed(4)).toLocaleString() + '

' +