mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 20:55:44 +01:00
Playtesting - Rebalancing, bugfixes, improved UI
This commit is contained in:
parent
d6c094f4de
commit
dbdb089887
@ -24,6 +24,7 @@
|
||||
padding-left: 10px;
|
||||
height: 100%;
|
||||
margin-left: 10%;
|
||||
width: 75%;
|
||||
color: #66ff33;
|
||||
}
|
||||
|
||||
@ -31,17 +32,25 @@
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
#script-editor-filename {
|
||||
float: left;
|
||||
resize: none;
|
||||
color: #66ff33;
|
||||
width: 100%;
|
||||
margin: 4px;
|
||||
padding: 4px;
|
||||
|
||||
border: none;
|
||||
outline: none;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
border: 2px solid white;
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 8px rgba(0,0,0,0.1),
|
||||
0 0 16px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow:
|
||||
inset 0 0 8px rgba(0,0,0,0.1),
|
||||
0 0 16px rgba(0,0,0,0.1);
|
||||
box-shadow:
|
||||
inset 0 0 8px rgba(0,0,0,0.1),
|
||||
0 0 16px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
#script-editor-status {
|
||||
@ -51,13 +60,21 @@
|
||||
|
||||
#script-editor-text {
|
||||
color: #66ff33;
|
||||
width: 90%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 4px;
|
||||
padding: 4px;
|
||||
|
||||
outline: none;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
border: 2px solid white;
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 8px rgba(0,0,0,0.1),
|
||||
0 0 16px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow:
|
||||
inset 0 0 8px rgba(0,0,0,0.1),
|
||||
0 0 16px rgba(0,0,0,0.1);
|
||||
box-shadow:
|
||||
inset 0 0 8px rgba(0,0,0,0.1),
|
||||
0 0 16px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
/* Active scripts */
|
||||
|
@ -29,6 +29,7 @@ li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
|
||||
/* Main menu */
|
||||
.mainmenu {
|
||||
list-style-type: none;
|
||||
|
19
index.html
19
index.html
@ -120,12 +120,15 @@
|
||||
|
||||
<!-- Script editor -->
|
||||
<div id="script-editor-container">
|
||||
<span>
|
||||
<p id="script-editor-filename-tag"> Script name: </p>
|
||||
|
||||
</span>
|
||||
|
||||
<input id="script-editor-filename" type="text" maxlength="30"> </input>
|
||||
<br>
|
||||
<br><br>
|
||||
<textarea id="script-editor-text" style="border: none" autofocus> </textarea>
|
||||
<textarea id="script-editor-text" autofocus> </textarea>
|
||||
</div>
|
||||
|
||||
<!-- Active scripts info page -->
|
||||
@ -455,17 +458,17 @@
|
||||
<a href="#" id="location-gym-train-agi" class="a-link-button">Train Agility</a>
|
||||
|
||||
<!-- Purchase servers -->
|
||||
<a href="#" id="location-purchase-1gb" class="a-link-button"> Purchase 1GB Server - $100,000</a>
|
||||
<a href="#" id="location-purchase-2gb" class="a-link-button"> Purchase 2GB Server - $250,000</a>
|
||||
<a href="#" id="location-purchase-4gb" class="a-link-button"> Purchase 4GB Server - $600,000</a>
|
||||
<a href="#" id="location-purchase-8gb" class="a-link-button"> Purchase 8GB Server - $1,500,000</a>
|
||||
<a href="#" id="location-purchase-1gb" class="a-link-button"> Purchase 1GB Server - $50,000</a>
|
||||
<a href="#" id="location-purchase-2gb" class="a-link-button"> Purchase 2GB Server - $100,000</a>
|
||||
<a href="#" id="location-purchase-4gb" class="a-link-button"> Purchase 4GB Server - $250,000</a>
|
||||
<a href="#" id="location-purchase-8gb" class="a-link-button"> Purchase 8GB Server - $1,000,000</a>
|
||||
<a href="#" id="location-purchase-16gb" class="a-link-button"> Purchase 16GB Server - $4,000,000</a>
|
||||
<a href="#" id="location-purchase-32gb" class="a-link-button"> Purchase 32GB Server - $9,000,000</a>
|
||||
<a href="#" id="location-purchase-32gb" class="a-link-button"> Purchase 32GB Server - $10,000,000</a>
|
||||
<a href="#" id="location-purchase-64gb" class="a-link-button"> Purchase 64GB Server - $20,000,000</a>
|
||||
<a href="#" id="location-purchase-128gb" class="a-link-button"> Purchase 128GB Server - $45,000,000</a>
|
||||
<a href="#" id="location-purchase-128gb" class="a-link-button"> Purchase 128GB Server - $50,000,000</a>
|
||||
<a href="#" id="location-purchase-256gb" class="a-link-button"> Purchase 256GB Server - $100,000,000</a>
|
||||
<a href="#" id="location-purchase-512gb" class="a-link-button"> Purchase 512GB Server - $250,000,000</a>
|
||||
<a href="#" id="location-purchase-1tb" class="a-link-button"> Purchase 1TB Server - $600,000,000</a>
|
||||
<a href="#" id="location-purchase-1tb" class="a-link-button"> Purchase 1TB Server - $750,000,000</a>
|
||||
<a href="#" id="location-purchase-tor" class="a-link-button"> Purchase TOR Router - $2,000,000</a>
|
||||
|
||||
<!-- Travel agency -->
|
||||
|
@ -451,7 +451,7 @@ initAugmentations = function() {
|
||||
|
||||
//Misc augmentations
|
||||
var Neurotrainer1 = new Augmentation("Neurotrainer I");
|
||||
Neurotrainer1.setRequirements(50000, 20000000);
|
||||
Neurotrainer1.setRequirements(40000, 10000000);
|
||||
Neurotrainer1.setInfo("A decentralized cranial implant that improves the brain's ability to learn. It is\n" +
|
||||
"installed by releasing millions of nanobots into the human brain, each of which\n" +
|
||||
"attaches to a different neural pathway to enhance the brain's ability to retain\n" +
|
||||
|
@ -203,40 +203,40 @@ CompanyPositions = {
|
||||
//Constructor: CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi, reqCha, reqRep, salary)
|
||||
|
||||
//Software
|
||||
SoftwareIntern: new CompanyPosition("Software Engineering Intern", 1, 1, 1, 1, 1, 1, 0, 1),
|
||||
JuniorDev: new CompanyPosition("Junior Software Engineer", 50, 1, 1, 1, 1, 1, 9000, 5),
|
||||
SeniorDev: new CompanyPosition("Senior Software Engineer", 250, 1, 1, 1, 1, 50, 36000, 12),
|
||||
LeadDev: new CompanyPosition("Lead Software Developer", 400, 1, 1, 1, 1, 100, 72000, 15),
|
||||
SoftwareIntern: new CompanyPosition("Software Engineering Intern", 1, 0, 0, 0, 0, 0, 0, 1),
|
||||
JuniorDev: new CompanyPosition("Junior Software Engineer", 50, 0, 0, 0, 0, 25, 9000, 5),
|
||||
SeniorDev: new CompanyPosition("Senior Software Engineer", 250, 0, 0, 0, 0, 75, 36000, 12),
|
||||
LeadDev: new CompanyPosition("Lead Software Developer", 400, 0, 0, 0, 0, 150, 72000, 15),
|
||||
|
||||
//IT
|
||||
ITIntern: new CompanyPosition("IT Intern", 1, 1, 1, 1, 1, 1, 0, .8),
|
||||
ITAnalyst: new CompanyPosition("IT Analyst", 25, 1, 1, 1, 1, 1, 9000, 2),
|
||||
ITManager: new CompanyPosition("IT Manager", 150, 1, 1, 1, 1, 50, 36000, 8),
|
||||
SysAdmin: new CompanyPosition("Systems Administrator", 250, 1, 1, 1, 1, 75, 72000, 13),
|
||||
SecurityEngineer: new CompanyPosition("Security Engineer", 150, 1, 1, 1, 1, 25, 36000, 10),
|
||||
NetworkEngineer: new CompanyPosition("Network Engineer", 150, 1, 1, 1, 1, 25, 36000, 10),
|
||||
NetworkAdministrator: new CompanyPosition("Network Administrator", 250, 1, 1, 1, 1, 75, 72000, 12),
|
||||
ITIntern: new CompanyPosition("IT Intern", 1, 0, 0, 0, 0, 1, 0, .8),
|
||||
ITAnalyst: new CompanyPosition("IT Analyst", 25, 0, 0, 0, 0, 1, 9000, 2),
|
||||
ITManager: new CompanyPosition("IT Manager", 150, 0, 0, 0, 0, 50, 36000, 8),
|
||||
SysAdmin: new CompanyPosition("Systems Administrator", 250, 0, 0, 0, 0, 75, 72000, 13),
|
||||
SecurityEngineer: new CompanyPosition("Security Engineer", 150, 0, 0, 0, 0, 25, 36000, 10),
|
||||
NetworkEngineer: new CompanyPosition("Network Engineer", 150, 0, 0, 0, 0, 25, 36000, 10),
|
||||
NetworkAdministrator: new CompanyPosition("Network Administrator", 250, 0, 0, 0, 0, 75, 72000, 12),
|
||||
|
||||
//Technology management
|
||||
HeadOfSoftware: new CompanyPosition("Head of Software", 500, 1, 1, 1, 1, 250, 108000, 30),
|
||||
HeadOfEngineering: new CompanyPosition("Head of Engineering", 500, 1, 1, 1, 1, 250, 10800, 30),
|
||||
VicePresident: new CompanyPosition("Vice President of Technology", 600, 1, 1, 1, 1, 400, 144000, 40),
|
||||
CTO: new CompanyPosition("Chief Technology Officer", 750, 1, 1, 1, 1, 500, 216000, 50),
|
||||
HeadOfSoftware: new CompanyPosition("Head of Software", 500, 0, 0, 0, 0, 250, 108000, 30),
|
||||
HeadOfEngineering: new CompanyPosition("Head of Engineering", 500, 0, 0, 0, 0, 250, 10800, 30),
|
||||
VicePresident: new CompanyPosition("Vice President of Technology", 600, 0, 0, 0, 0, 400, 144000, 40),
|
||||
CTO: new CompanyPosition("Chief Technology Officer", 750, 0, 0, 0, 0, 500, 216000, 50),
|
||||
|
||||
//Business
|
||||
BusinessIntern: new CompanyPosition("Business Intern", 1, 1, 1, 1, 1, 1, 0, 1),
|
||||
BusinessAnalyst: new CompanyPosition("Business Analyst", 5, 1, 1, 1, 1, 50, 9000, 8),
|
||||
BusinessManager: new CompanyPosition("Business Manager", 50, 1, 1, 1, 1, 100, 36000, 15),
|
||||
OperationsManager: new CompanyPosition("Operations Manager", 50, 1, 1, 1, 1, 200, 72000, 20),
|
||||
CFO: new CompanyPosition("Chief Financial Officer", 75, 1, 1, 1, 1, 500, 108000, 50),
|
||||
CEO: new CompanyPosition("Chief Executive Officer", 100, 1, 1, 1, 1, 750, 216000, 100),
|
||||
BusinessIntern: new CompanyPosition("Business Intern", 1, 0, 0, 0, 0, 1, 0, 1),
|
||||
BusinessAnalyst: new CompanyPosition("Business Analyst", 5, 0, 0, 0, 0, 50, 9000, 8),
|
||||
BusinessManager: new CompanyPosition("Business Manager", 50, 0, 0, 0, 0, 100, 36000, 15),
|
||||
OperationsManager: new CompanyPosition("Operations Manager", 50, 0, 0, 0, 0, 200, 72000, 20),
|
||||
CFO: new CompanyPosition("Chief Financial Officer", 75, 0, 0, 0, 0, 500, 108000, 50),
|
||||
CEO: new CompanyPosition("Chief Executive Officer", 100, 0, 0, 0, 0, 750, 216000, 100),
|
||||
|
||||
//Non-tech/management jobs
|
||||
Waiter: new CompanyPosition("Waiter", 1, 1, 1, 1, 1, 1, 0, .5),
|
||||
Employee: new CompanyPosition("Employee", 1, 1, 1, 1, 1, 1, 0, .5),
|
||||
Waiter: new CompanyPosition("Waiter", 0, 0, 0, 0, 0, 0, 0, .5),
|
||||
Employee: new CompanyPosition("Employee", 0, 0, 0, 0, 0, 0, 0, .5),
|
||||
PoliceOfficer: new CompanyPosition("Police Officer", 10, 100, 100, 100, 100, 9000, 4),
|
||||
PoliceChief: new CompanyPosition("Police Chief", 100, 300, 300, 300, 300, 18000, 10),
|
||||
SecurityGuard: new CompanyPosition("Security Guard", 1, 50, 50, 50, 50, 0, 3),
|
||||
SecurityGuard: new CompanyPosition("Security Guard", 0, 50, 50, 50, 50, 0, 3),
|
||||
SecurityOfficer: new CompanyPosition("Security Officer", 25, 150, 150, 150, 150, 9000, 6),
|
||||
SecuritySupervisor: new CompanyPosition("Security Supervisor", 25, 250, 250, 250, 250, 36000, 12),
|
||||
HeadOfSecurity: new CompanyPosition("Head of Security", 50, 500, 500, 500, 500, 72000, 20),
|
||||
|
@ -151,12 +151,12 @@ PlayerObject.prototype.applyForWaiterJob = function() {
|
||||
//Checks if the Player is qualified for a certain position
|
||||
PlayerObject.prototype.isQualified = function(company, position) {
|
||||
var offset = company.jobStatReqOffset;
|
||||
var reqHacking = position.requiredHacking > 1 ? position.requiredHacking+offset : 1;
|
||||
var reqStrength = position.requiredStrength > 1 ? position.requiredStrength+offset : 1;
|
||||
var reqDefense = position.requiredDefense > 1 ? position.requiredDefense+offset : 1;
|
||||
var reqDexterity = position.requiredDexterity > 1 ? position.requiredDexterity+offset : 1;
|
||||
var reqAgility = position.requiredDexterity > 1 ? position.requiredDexterity+offset : 1;
|
||||
var reqCharisma = position.requiredCharisma > 1 ? position.requiredCharisma+offset : 1;
|
||||
var reqHacking = position.requiredHacking > 0 ? position.requiredHacking+offset : 0;
|
||||
var reqStrength = position.requiredStrength > 0 ? position.requiredStrength+offset : 0;
|
||||
var reqDefense = position.requiredDefense > 0 ? position.requiredDefense+offset : 0;
|
||||
var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity+offset : 0;
|
||||
var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity+offset : 0;
|
||||
var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma+offset : 0;
|
||||
|
||||
if (this.hacking_skill >= reqHacking &&
|
||||
this.strength >= reqStrength &&
|
||||
|
@ -34,6 +34,9 @@ CONSTANTS = {
|
||||
MillisecondsPerHour: 3600000,
|
||||
GameCyclesPerHour: 3600000 / 200,
|
||||
|
||||
MillisecondsPerHalfHour: 1800000,
|
||||
GameCyclesPerHalfHour: 1800000 / 200,
|
||||
|
||||
FactionWorkHacking: "Faction Hacking Work",
|
||||
FactionWorkField: "Faction Field Work",
|
||||
FactionWorkSecurity: "Faction Security Work",
|
||||
|
@ -40,7 +40,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 50) {
|
||||
bruteSshALink.style.display = "block";
|
||||
bruteSshALink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.BruteSSHProgram, CONSTANTS.MillisecondsPerHour);
|
||||
Player.startCreateProgramWork(Programs.BruteSSHProgram, CONSTANTS.MillisecondsPerHalfHour);
|
||||
});
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 125) {
|
||||
ftpCrackALink.style.display = "block";
|
||||
ftpCrackALink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsPer4Hours);
|
||||
Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsPerHour);
|
||||
});
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 300) {
|
||||
relaySmtpALink.style.display = "block";
|
||||
relaySmtpAlink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.RelaySMTPProgram. CONSTANTS.MillisecondsPer8Hours);
|
||||
Player.startCreateProgramWork(Programs.RelaySMTPProgram. CONSTANTS.MillisecondsPer4Hours);
|
||||
});
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 500) {
|
||||
httpWormALink.style.display = "block";
|
||||
httpWormALink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.HTTPWormProgram, CONSTANTS.MillisecondsPer10Hours);
|
||||
Player.startCreateProgramWork(Programs.HTTPWormProgram, CONSTANTS.MillisecondsPer8Hours);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1186,22 +1186,22 @@ initLocationButtons = function() {
|
||||
});
|
||||
|
||||
purchase1gb.addEventListener("click", function() {
|
||||
purchaseServerBoxCreate(1, 100000);
|
||||
purchaseServerBoxCreate(1, 50000);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase2gb.addEventListener("click", function() {
|
||||
purchaseServerBoxCreate(2, 250000);
|
||||
purchaseServerBoxCreate(2, 100000);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase4gb.addEventListener("click", function() {
|
||||
purchaseServerBoxCreate(4, 600000);
|
||||
purchaseServerBoxCreate(4, 250000);
|
||||
return false;
|
||||
});
|
||||
|
||||
purchase8gb.addEventListener("click", function() {
|
||||
purchaseServerBoxCreate(8, 1500000);
|
||||
purchaseServerBoxCreate(8, 1000000);
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -1211,7 +1211,7 @@ initLocationButtons = function() {
|
||||
});
|
||||
|
||||
purchase32gb.addEventListener("click", function() {
|
||||
purchaseServerBoxCreate(32, 9000000);
|
||||
purchaseServerBoxCreate(32, 10000000);
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -1221,7 +1221,7 @@ initLocationButtons = function() {
|
||||
});
|
||||
|
||||
purchase128gb.addEventListener("click", function() {
|
||||
purchaseServerBoxCreate(128, 45000000);
|
||||
purchaseServerBoxCreate(128, 50000000);
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -1236,7 +1236,7 @@ initLocationButtons = function() {
|
||||
});
|
||||
|
||||
purchase1tb.addEventListener("click", function() {
|
||||
purchaseServerBoxCreate(1024, 600000000);
|
||||
purchaseServerBoxCreate(1024, 750000000);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
@ -229,8 +229,8 @@ PlayerObject.prototype.hack = function() {
|
||||
}
|
||||
|
||||
PlayerObject.prototype.analyze = function() {
|
||||
//TODO Analyze only takes 5 seconds for now..maybe change this in the future?
|
||||
this.actionTime = 5;
|
||||
//TODO Analyze only takes 1 seconds for now..maybe change this in the future?
|
||||
this.actionTime = 1;
|
||||
this.startAction = true;
|
||||
}
|
||||
|
||||
@ -421,7 +421,7 @@ PlayerObject.prototype.work = function(numCycles) {
|
||||
" at " + Player.companyName + "<br><br>" +
|
||||
"You have been working for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "<br><br>" +
|
||||
"You have earned: <br><br>" +
|
||||
"$" + this.workMoneyGained + " (" + (this.workMoneyGainRate * cyclesPerSec).toFixed(2) + " / sec) <br><br>" +
|
||||
"$" + this.workMoneyGained.toFixed(2) + " ($" + (this.workMoneyGainRate * cyclesPerSec).toFixed(2) + " / sec) <br><br>" +
|
||||
this.workRepGained.toFixed(3) + " (" + (this.workRepGainRate * cyclesPerSec).toFixed(3) + " / sec) reputation for this company <br><br>" +
|
||||
this.workHackExpGained.toFixed(3) + " (" + (this.workHackExpGainRate * cyclesPerSec).toFixed(3) + " / sec) hacking exp <br><br>" +
|
||||
this.workStrExpGained.toFixed(3) + " (" + (this.workStrExpGainRate * cyclesPerSec).toFixed(3) + " / sec) strength exp <br>" +
|
||||
|
@ -413,19 +413,19 @@ initForeignServers = function() {
|
||||
AddToAllServers(JoesGunsServer);
|
||||
|
||||
var Zer0NightclubServer = new Server();
|
||||
Zer0NightclubServer.init(createRandomIp(), "zer0", "ZER0 Nightclub", true, false, false, false, 8);
|
||||
Zer0NightclubServer.init(createRandomIp(), "zer0", "ZER0 Nightclub", true, false, false, false, 4);
|
||||
Zer0NightclubServer.setHackingParameters(75, 750000, 25, 40);
|
||||
Zer0NightclubServer.setPortProperties(1);
|
||||
AddToAllServers(Zer0NightclubServer);
|
||||
|
||||
var NectarNightclubServer = new Server();
|
||||
NectarNightclubServer.init(createRandomIp(), "nectar-net", "Nectar Nightclub Network", true, false, false, false, 4);
|
||||
NectarNightclubServer.init(createRandomIp(), "nectar-net", "Nectar Nightclub Network", true, false, false, false, 2);
|
||||
NectarNightclubServer.setHackingParameters(20, 400000, 20, 25);
|
||||
NectarNightclubServer.setPortProperties(0);
|
||||
AddToAllServers(NectarNightclubServer);
|
||||
|
||||
var NeoNightclubServer = new Server();
|
||||
NeoNightclubServer.init(createRandomIp(), "neo-net", "Neo Nightclub Network", true, false, false, false, 4);
|
||||
NeoNightclubServer.init(createRandomIp(), "neo-net", "Neo Nightclub Network", true, false, false, false, 2);
|
||||
NeoNightclubServer.setHackingParameters(50, 500000, 25, 25);
|
||||
NeoNightclubServer.setPortProperties(1);
|
||||
AddToAllServers(NeoNightclubServer);
|
||||
|
@ -868,7 +868,13 @@ var Engine = {
|
||||
processServerGrowth(numCyclesOffline); //Should be done before offline production for scripts
|
||||
loadAllRunningScripts(); //This also takes care of offline production for those scripts
|
||||
if (Player.isWorking) {
|
||||
Player.work(numCyclesOffline);
|
||||
if (Player.currentWorkFactionName != "") {
|
||||
Player.workForFaction(numCyclesOffline);
|
||||
} else if (Player.createProgramName != "") {
|
||||
Player.createProgramWork(numCyclesOffline);
|
||||
} else {
|
||||
Player.work(numCyclesOffline);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//No save found, start new game
|
||||
@ -889,7 +895,14 @@ var Engine = {
|
||||
if (Player.isWorking) {
|
||||
var cancelButton = document.getElementById("work-in-progress-cancel-button");
|
||||
cancelButton.addEventListener("click", function() {
|
||||
Player.finishWork(true);
|
||||
if (Player.currentWorkFactionName != "") {
|
||||
var fac = Factions[Player.currentWorkFactionName];
|
||||
Player.finishFactionWork(true, fac);
|
||||
} else if (Player.createProgramName != "") {
|
||||
Player.finishCreateProgramWork(true, Player.createProgramName);
|
||||
} else {
|
||||
Player.finishWork(true);
|
||||
}
|
||||
});
|
||||
Engine.loadWorkInProgressContent();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user