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