Skip to content

Commit

Permalink
Merge pull request #52 from danielyxie/dev
Browse files Browse the repository at this point in the history
Dev v0.20.1
  • Loading branch information
danielyxie authored Jun 8, 2017
2 parents 9820fde + b43ad2f commit 5f5db07
Show file tree
Hide file tree
Showing 12 changed files with 302 additions and 64 deletions.
4 changes: 4 additions & 0 deletions css/popupboxes.css
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,8 @@
color: white;
text-decoration: none;
cursor: pointer;
}

#import-game-file-selector {
display:none;
}
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,9 @@ <h1> Game Options </h1>
<br>
<a id="changelog-link" class="a-link-button" style="display:block;"> Changelog </a>
<a id="save-game-link" class="a-link-button" style="display:block;"> Save Game </a>
<a id="export-game-link" class="a-link-button" style="display:block;"> (BETA) Export Game </a>
<input type="file" id="import-game-file-selector" name="file"/>
<a id="import-game-link" class="a-link-button" style="display:block;" onclick="saveObject.importGame();"> (BETA) Import Game </a>
<a id="delete-game-link" class="a-link-button" style="display:block;"> Delete Game </a>
<a id="debug-delete-scripts-link" class="a-link-button tooltip" style="display:block;">
(DEBUG) Delete Active Scripts
Expand Down
16 changes: 15 additions & 1 deletion src/Constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CONSTANTS = {
Version: "0.20.0",
Version: "0.20.1",

//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
Expand Down Expand Up @@ -535,6 +535,13 @@ CONSTANTS = {
"RAM Upgrades on your home computer",

Changelog:
"v0.20.1<br>" +
"-Fixed bug where sometimes scripts would crash without showing the error<br>" +
"-Added Deepscan programs to Dark Web<br>" +
"-Declining a faction invite will stop you from receiving invitations from that faction for the rest of the run<br>" +
"-(BETA) Added functionality to export/import saves. WARNING This is only lightly tested. You cannot choose where to save your file " +
"it just goes to the default save location. Also I have no idea what will happen if you try to import a file " +
"that is not a valid save. I will address these in later updates<br><br>" +
"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, " +
Expand Down Expand Up @@ -645,6 +652,13 @@ CONSTANTS = {
"-You can now see what an Augmentation does and its price even while its locked<br><br>",

LatestUpdate:
"v0.20.1<br>" +
"-Fixed bug where sometimes scripts would crash without showing the error<br>" +
"-Added Deepscan programs to Dark Web<br>" +
"-Declining a faction invite will stop you from receiving invitations from that faction for the rest of the run<br>" +
"-(BETA) Added functionality to export/import saves. WARNING This is only lightly tested. You cannot choose where to save your file " +
"it just goes to the default save location. Also I have no idea what will happen if you try to import a file " +
"that is not a valid save. I will address these in later updates<br><br>" +
"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, " +
Expand Down
32 changes: 27 additions & 5 deletions src/DarkWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ listAllDarkwebItems = function() {
}

buyDarkwebItem = function(itemName) {
if (itemName.toLowerCase() == "brutessh.exe") {
if (itemName.toLowerCase() == Programs.BruteSSHProgram.toLowerCase()) {
var price = parseDarkwebItemPrice(DarkWebItems.BruteSSHProgram);
if (price > 0 && Player.money >= price) {
Player.loseMoney(price);
Expand All @@ -57,7 +57,7 @@ buyDarkwebItem = function(itemName) {
} else {
post("Not enough money to purchase " + itemName);
}
} else if (itemName.toLowerCase() == "ftpcrack.exe") {
} else if (itemName.toLowerCase() == Programs.FTPCrackProgram.toLowerCase()) {
var price = parseDarkwebItemPrice(DarkWebItems.FTPCrackProgram);
if (price > 0 && Player.money >= price) {
Player.loseMoney(price);
Expand All @@ -67,7 +67,7 @@ buyDarkwebItem = function(itemName) {
} else {
post("Not enough money to purchase " + itemName);
}
} else if (itemName.toLowerCase() == "relaysmtp.exe") {
} else if (itemName.toLowerCase() == Programs.RelaySMTPProgram.toLowerCase()) {
var price = parseDarkwebItemPrice(DarkWebItems.RelaySMTPProgram);
if (price > 0 && Player.money >= price) {
Player.loseMoney(price);
Expand All @@ -77,7 +77,7 @@ buyDarkwebItem = function(itemName) {
} else {
post("Not enough money to purchase " + itemName);
}
} else if (itemName.toLowerCase() == "httpworm.exe") {
} else if (itemName.toLowerCase() == Programs.HTTPWormProgram.toLowerCase()) {
var price = parseDarkwebItemPrice(DarkWebItems.HTTPWormProgram);
if (price > 0 && Player.money >= price) {
Player.loseMoney(price);
Expand All @@ -87,7 +87,7 @@ buyDarkwebItem = function(itemName) {
} else {
post("Not enough money to purchase " + itemName);
}
} else if (itemName.toLowerCase() == "sqlinject.exe") {
} else if (itemName.toLowerCase() == Programs.SQLInjectProgram.toLowerCase()) {
var price = parseDarkwebItemPrice(DarkWebItems.SQLInjectProgram);
if (price > 0 && Player.money >= price) {
Player.loseMoney(price);
Expand All @@ -97,6 +97,26 @@ buyDarkwebItem = function(itemName) {
} else {
post("Not enough money to purchase " + itemName);
}
} else if (itemName.toLowerCase() == Programs.DeepscanV1.toLowerCase()) {
var price = parseDarkwebItemPrice(DarkWebItems.DeepScanV1Program);
if (price > 0 && Player.money >= price) {
Player.loseMoney(price);
Player.getHomeComputer().programs.push(Programs.DeepscanV1);
post("You have purchased the DeepscanV1.exe program. The new program " +
"can be found on your home computer.");
} else {
post("Not enough money to purchase " + itemName);
}
} else if (itemName.toLowerCase() == Programs.DeepscanV2.toLowerCase()) {
var price = parseDarkwebItemPrice(DarkWebItems.DeepScanV2Program);
if (price > 0 && Player.money >= price) {
Player.loseMoney(price);
Player.getHomeComputer().programs.push(Programs.DeepscanV2);
post("You have purchased the DeepscanV2.exe program. The new program " +
"can be found on your home computer.");
} else {
post("Not enough money to purchase " + itemName);
}
} else {
post("Unrecognized item");
}
Expand Down Expand Up @@ -129,4 +149,6 @@ DarkWebItems = {
RelaySMTPProgram: Programs.RelaySMTPProgram + " - $5,000,000 - Opens up SMTP Ports",
HTTPWormProgram: Programs.HTTPWormProgram + " - $30,000,000 - Opens up HTTP Ports",
SQLInjectProgram: Programs.SQLInjectProgram + " - $250,000,000 - Opens up SQL Ports",
DeepScanV1Program: Programs.DeepscanV1 + " - $500,000 - Enables 'scan-analyze' with a depth up to 5",
DeepScanV2Program: Programs.DeepscanV2 + " - $25,000,000 - Enables 'scan-analyze' with a depth up to 10",
}
Loading

0 comments on commit 5f5db07

Please sign in to comment.