mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-07 19:14:37 +01:00
Added new update text. Bugs with server max money. Updated to version 0.20.0
This commit is contained in:
@ -18,19 +18,20 @@
|
||||
z-index: 2;
|
||||
width: 50%;
|
||||
height: auto;
|
||||
top: 50%;
|
||||
max-height: 40%;
|
||||
top: 40%;
|
||||
left: 50%;
|
||||
margin: -10% 0 0 -25%;
|
||||
overflow: auto;
|
||||
background-color: black;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
border: 5px solid #FFFFFF;
|
||||
}
|
||||
|
||||
.dialog-box-content {
|
||||
z-index: 2;
|
||||
background-color: black;
|
||||
padding: 10px;
|
||||
border: 5px solid #FFFFFF;
|
||||
}
|
||||
|
||||
.dialog-box-close-button {
|
||||
|
@ -1,5 +1,5 @@
|
||||
CONSTANTS = {
|
||||
Version: "0.19.7",
|
||||
Version: "0.20.0",
|
||||
|
||||
//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
|
||||
//and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
|
||||
@ -538,29 +538,29 @@ CONSTANTS = {
|
||||
"v0.20.0<br>" +
|
||||
"-Refactored Netscript Interpreter code. Operations in Netscript should now run significantly faster (Every operation " +
|
||||
"such as a variable assignment, a function call, a binary operator, getting a variable's value, etc. used to take up to several seconds, " +
|
||||
"now each one should only take 750 milliseconds). <br> " +
|
||||
"-Percentage money stolen when hacking lowered to compensate for faster script speeds<br>" +
|
||||
"-Hacking experience granted by grow() halved<br>" +
|
||||
"-Weaken() is now ~11% faster, but only grants 3 base hacking exp upon completion instead of 5 <br>" +
|
||||
"now each one should only take 750 milliseconds). <br><br>" +
|
||||
"-Percentage money stolen when hacking lowered to compensate for faster script speeds<br><br>" +
|
||||
"-Hacking experience granted by grow() halved<br><br>" +
|
||||
"-Weaken() is now ~11% faster, but only grants 3 base hacking exp upon completion instead of 5 <br><br>" +
|
||||
"-Rebalancing of script RAM costs. Base RAM Cost for a script increased from 1GB to 1.5GB. Loops, hack(), grow() " +
|
||||
"and weaken() all cost slightly less RAM than before <br>" +
|
||||
"-Added getServerRequiredHackingLevel(server) Netscript command. <br>" +
|
||||
"and weaken() all cost slightly less RAM than before <br><br>" +
|
||||
"-Added getServerRequiredHackingLevel(server) Netscript command. <br><br>" +
|
||||
"-Added fileExists(file, [server]) Netscript command, which is used to check if a script/program exists on a " +
|
||||
"specified server<br>" +
|
||||
"-Added isRunning(script, [server]) Netscript command, which is used to check if a script is running on the specified server<br>" +
|
||||
"-Added killall Terminal command. Kills all running scripts on the current machine<br> " +
|
||||
"-Added kill() and killall() Netscript commands. Used to kill scripts on specified machines. See Netscript documentation<br>" +
|
||||
"-Re-designed 'Active Scripts' tab<br>" +
|
||||
"-Hacknet Node base production rate lowered from 1.6 to 1.55 ($/second)<br>" +
|
||||
"-Increased monetary cost of RAM (Upgrading home computer and purchasing servers will now be more expensive)<br>" +
|
||||
"specified server<br><br>" +
|
||||
"-Added isRunning(script, [server]) Netscript command, which is used to check if a script is running on the specified server<br><br>" +
|
||||
"-Added killall Terminal command. Kills all running scripts on the current machine<br><br>" +
|
||||
"-Added kill() and killall() Netscript commands. Used to kill scripts on specified machines. See Netscript documentation<br><br>" +
|
||||
"-Re-designed 'Active Scripts' tab<br><br>" +
|
||||
"-Hacknet Node base production rate lowered from 1.6 to 1.55 ($/second)<br><br>" +
|
||||
"-Increased monetary cost of RAM (Upgrading home computer and purchasing servers will now be more expensive)<br><br>" +
|
||||
"-NEW GROWTH MECHANICS - The rate of growth on a server now depends on a server's security level. A higher security level " +
|
||||
"will result in lower growth on a server when using the grow() command. Furthermore, calling grow() on a server raises that " +
|
||||
"server's security level by " + (2 * this.ServerFortifyAmount) + ". For reference, if a server has a security level of 10 " +
|
||||
"it will have approximately the same growth rate as before. <br>" +
|
||||
"-Server growth no longer happens naturally<br>" +
|
||||
"-Servers now have a maximum limit to their money. This limit is 50 times it's starting money<br>" +
|
||||
"-Hacking now grants 10% less hacking experience<br> " +
|
||||
"-You can now edit scripts that are running<br>" +
|
||||
"it will have approximately the same growth rate as before. <br><br>" +
|
||||
"-Server growth no longer happens naturally<br><br>" +
|
||||
"-Servers now have a maximum limit to their money. This limit is 50 times it's starting money<br><br>" +
|
||||
"-Hacking now grants 10% less hacking experience<br><br>" +
|
||||
"-You can now edit scripts that are running<br><br><br><br>" +
|
||||
"v0.19.7<br>" +
|
||||
"-Added changelog to Options menu<br>" +
|
||||
"-Bug fix with autocompletion (wasn't working properly for capitalized filenames/programs<br><br>" +
|
||||
@ -644,7 +644,30 @@ CONSTANTS = {
|
||||
"-You can now see what an Augmentation does and its price even while its locked<br><br>",
|
||||
|
||||
LatestUpdate:
|
||||
"",
|
||||
|
||||
|
||||
"v0.20.0<br>" +
|
||||
"-Refactored Netscript Interpreter code. Operations in Netscript should now run significantly faster (Every operation " +
|
||||
"such as a variable assignment, a function call, a binary operator, getting a variable's value, etc. used to take up to several seconds, " +
|
||||
"now each one should only take 750 milliseconds). <br> " +
|
||||
"-Percentage money stolen when hacking lowered to compensate for faster script speeds<br>" +
|
||||
"-Hacking experience granted by grow() halved<br>" +
|
||||
"-Weaken() is now ~11% faster, but only grants 3 base hacking exp upon completion instead of 5 <br>" +
|
||||
"-Rebalancing of script RAM costs. Base RAM Cost for a script increased from 1GB to 1.5GB. Loops, hack(), grow() " +
|
||||
"and weaken() all cost slightly less RAM than before <br>" +
|
||||
"-Added getServerRequiredHackingLevel(server) Netscript command. <br>" +
|
||||
"-Added fileExists(file, [server]) Netscript command, which is used to check if a script/program exists on a " +
|
||||
"specified server<br>" +
|
||||
"-Added isRunning(script, [server]) Netscript command, which is used to check if a script is running on the specified server<br>" +
|
||||
"-Added killall Terminal command. Kills all running scripts on the current machine<br> " +
|
||||
"-Added kill() and killall() Netscript commands. Used to kill scripts on specified machines. See Netscript documentation<br>" +
|
||||
"-Re-designed 'Active Scripts' tab<br>" +
|
||||
"-Hacknet Node base production rate lowered from 1.6 to 1.55 ($/second)<br>" +
|
||||
"-Increased monetary cost of RAM (Upgrading home computer and purchasing servers will now be more expensive)<br>" +
|
||||
"-NEW GROWTH MECHANICS - The rate of growth on a server now depends on a server's security level. A higher security level " +
|
||||
"will result in lower growth on a server when using the grow() command. Furthermore, calling grow() on a server raises that " +
|
||||
"server's security level by " + (2 * this.ServerFortifyAmount) + ". For reference, if a server has a security level of 10 " +
|
||||
"it will have approximately the same growth rate as before. <br>" +
|
||||
"-Server growth no longer happens naturally<br>" +
|
||||
"-Servers now have a maximum limit to their money. This limit is 50 times it's starting money<br>" +
|
||||
"-Hacking now grants 10% less hacking experience<br> " +
|
||||
"-You can now edit scripts that are running<br><br>",
|
||||
}
|
@ -67,15 +67,17 @@ loadGame = function(saveObj) {
|
||||
}
|
||||
if (saveObj.hasOwnProperty("VersionSave")) {
|
||||
try {
|
||||
console.log("here");
|
||||
var ver = JSON.parse(saveObj.VersionSave, Reviver);
|
||||
console.log("version from save: " + ver);
|
||||
if (ver != CONSTANTS.Version) {
|
||||
//TODO Create update pop up
|
||||
createNewUpdateText();
|
||||
}
|
||||
} catch(e) {
|
||||
Engine.version = CONSTANTS.Version;
|
||||
createNewUpdateText();
|
||||
}
|
||||
} else {
|
||||
Engine.version = CONSTANTS.Version;
|
||||
createNewUpdateText();
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -88,6 +90,13 @@ BitburnerSaveObject.prototype.deleteGame = function() {
|
||||
Engine.createStatusText("Game deleted!");
|
||||
}
|
||||
|
||||
createNewUpdateText = function() {
|
||||
dialogBoxCreate("New update!<br>" +
|
||||
"Please report any bugs/issues through the github repository " +
|
||||
"or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>" +
|
||||
CONSTANTS.LatestUpdate);
|
||||
}
|
||||
|
||||
|
||||
BitburnerSaveObject.prototype.toJSON = function() {
|
||||
return Generic_toJSON("BitburnerSaveObject", this);
|
||||
|
@ -1,32 +1,64 @@
|
||||
/* Pop up Dialog Box */
|
||||
dialogBoxes = [];
|
||||
|
||||
//Close dialog box when clicking outside
|
||||
/*
|
||||
$(document).click(function(event) {
|
||||
if (dialogBoxOpened) {
|
||||
if (!$(event.target).closest('.dialog-box-container').length){
|
||||
--dialogBoxCount;
|
||||
dialogBoxes.splice(0, 1);
|
||||
$(".dialog-box-container").remove();
|
||||
if (dialogBoxCount == 0) {
|
||||
|
||||
if (dialogBoxes.length == 0) {
|
||||
dialogBoxOpened = false;
|
||||
} else {
|
||||
dialogBoxes[0].style.display +
|
||||
}
|
||||
}
|
||||
}
|
||||
});*/
|
||||
$(document).click(function(event) {
|
||||
if (dialogBoxOpened && dialogBoxes.length >= 1) {
|
||||
if (!$(event.target).closest(dialogBoxes[0]).length){
|
||||
dialogBoxes[0].remove();
|
||||
dialogBoxes.splice(0, 1);
|
||||
if (dialogBoxes.length == 0) {
|
||||
dialogBoxOpened = false;
|
||||
} else {
|
||||
dialogBoxes[0].style.visibility = "visible";
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//Dialog box close buttons
|
||||
/*
|
||||
$(document).on('click', '.dialog-box-close-button', function( event ) {
|
||||
console.log("clicked close button");
|
||||
if (dialogBoxOpened) {
|
||||
$(this).closest('.dialog-box-container').remove();
|
||||
--dialogBoxCount;
|
||||
if (dialogBoxCount == 0) {
|
||||
if (dialogBoxes.length == 0) {
|
||||
dialogBoxOpened = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
$(document).on('click', '.dialog-box-close-button', function( event ) {
|
||||
if (dialogBoxOpened && dialogBoxes.length >= 1) {
|
||||
dialogBoxes[0].remove();
|
||||
dialogBoxes.splice(0, 1);
|
||||
if (dialogBoxes.length == 0) {
|
||||
dialogBoxOpened = false;
|
||||
} else {
|
||||
dialogBoxes[0].style.visibility = "visible";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var dialogBoxOpened = false;
|
||||
var dialogBoxCount = 0;
|
||||
|
||||
dialogBoxCreate = function(txt) {
|
||||
var container = document.createElement("div");
|
||||
@ -47,9 +79,12 @@ dialogBoxCreate = function(txt) {
|
||||
container.appendChild(content);
|
||||
|
||||
document.body.appendChild(container);
|
||||
if (dialogBoxes.length >= 1) {
|
||||
container.style.visibility = "hidden";
|
||||
}
|
||||
dialogBoxes.push(container);
|
||||
|
||||
setTimeout(function() {
|
||||
dialogBoxOpened = true;
|
||||
++dialogBoxCount;
|
||||
}, 500);
|
||||
}, 400);
|
||||
}
|
Reference in New Issue
Block a user