mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 13:43:49 +01:00
Playtest - Bug fixing
This commit is contained in:
parent
c1c37f008e
commit
edb329325c
@ -287,6 +287,7 @@ PlayerObject.prototype.gainCharismaExp = function(exp) {
|
||||
|
||||
/* Working for Company */
|
||||
PlayerObject.prototype.finishWork = function(cancelled) {
|
||||
console.log("HERE");
|
||||
//Since the work was cancelled early, player only gains half of what they've earned so far
|
||||
var cancMult = 1;
|
||||
if (cancelled) {cancMult = 2;}
|
||||
@ -438,6 +439,7 @@ PlayerObject.prototype.work = function(numCycles) {
|
||||
|
||||
/* Working for Faction */
|
||||
PlayerObject.prototype.finishFactionWork = function(cancelled, faction) {
|
||||
console.log("HERE");
|
||||
this.gainHackingExp(this.workHackExpGained);
|
||||
this.gainStrengthExp(this.workStrExpGained);
|
||||
this.gainDefenseExp(this.workDefExpGained);
|
||||
@ -455,7 +457,7 @@ PlayerObject.prototype.finishFactionWork = function(cancelled, faction) {
|
||||
var txt = "You worked for your faction " + faction.name + " for a total of " + convertTimeMsToTimeElapsedString(this.timeWorked) + " <br><br> " +
|
||||
"You earned a total of: <br>" +
|
||||
"$" + (this.workMoneyGained).toFixed(2) + "<br>" +
|
||||
(this.workRepGained).toFixed(3) + " reputation for the company <br>" +
|
||||
(this.workRepGained).toFixed(3) + " reputation for the faction <br>" +
|
||||
(this.workHackExpGained).toFixed(3) + " hacking exp <br>" +
|
||||
(this.workStrExpGained).toFixed(3) + " strength exp <br>" +
|
||||
(this.workDefExpGained).toFixed(3) + " defense exp <br>" +
|
||||
@ -467,7 +469,7 @@ PlayerObject.prototype.finishFactionWork = function(cancelled, faction) {
|
||||
var mainMenu = document.getElementById("mainmenu-container");
|
||||
mainMenu.style.visibility = "visible";
|
||||
|
||||
Player.isWorking = false;
|
||||
this.isWorking = false;
|
||||
|
||||
Engine.loadTerminalContent();
|
||||
}
|
||||
|
@ -508,9 +508,7 @@ var Terminal = {
|
||||
}
|
||||
break;
|
||||
case Programs.BruteSSHProgram:
|
||||
if (s.hasAdminRights == false) {
|
||||
post("Permission denied. You do not have root access to this computer.");
|
||||
} else if (s.sshPortOpen) {
|
||||
if (s.sshPortOpen) {
|
||||
post("SSH Port (22) is already open!");
|
||||
} else {
|
||||
s.sshPortOpen = true;
|
||||
@ -519,9 +517,7 @@ var Terminal = {
|
||||
}
|
||||
break;
|
||||
case Programs.FTPCrackProgram:
|
||||
if (s.hasAdminRights == false) {
|
||||
post("Permission denied. You do not have root access to this computer.");
|
||||
} else if (s.ftpPortOpen) {
|
||||
if (s.ftpPortOpen) {
|
||||
post("FTP Port (21) is already open!");
|
||||
} else {
|
||||
s.ftpPortOpen = true;
|
||||
@ -530,9 +526,7 @@ var Terminal = {
|
||||
}
|
||||
break;
|
||||
case Programs.RelaySMTPProgram:
|
||||
if (s.hasAdminRights == false) {
|
||||
post("Permission denied. You do not have root access to this computer.");
|
||||
} else if (s.smtpPortOpen) {
|
||||
if (s.smtpPortOpen) {
|
||||
post("SMTP Port (25) is already open!");
|
||||
} else {
|
||||
s.smtpPortOpen = true;
|
||||
@ -541,9 +535,7 @@ var Terminal = {
|
||||
}
|
||||
break;
|
||||
case Programs.HTTPWormProgram:
|
||||
if (s.hasAdminRights == false) {
|
||||
post("permission denied. You do not have root access to this computer.");
|
||||
} else if (s.httpPortOpen) {
|
||||
if (s.httpPortOpen) {
|
||||
post("HTTP Port (80) is already open!");
|
||||
} else {
|
||||
s.httpPortOpen = true;
|
||||
@ -552,9 +544,7 @@ var Terminal = {
|
||||
}
|
||||
break;
|
||||
case Programs.SQLInjectProgram:
|
||||
if (s.hasAdminRights == false) {
|
||||
post("permission denied. You do not have root access to this computer.");
|
||||
} else if (s.sqlPortOpen) {
|
||||
if (s.sqlPortOpen) {
|
||||
post("SQL Port (1433) is already open!");
|
||||
} else {
|
||||
s.sqlPortOpen = true;
|
||||
|
Loading…
Reference in New Issue
Block a user