Adding more directory-related unit tests. Several more bug fixes and QoL improvements

This commit is contained in:
danielyxie
2019-05-14 01:35:37 -07:00
parent 1775ea86ff
commit fef7aaba8f
24 changed files with 423 additions and 85 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ export function purchaseHacknet() {
}
}
/* END INTERACTIVE TUTORIAL */
const numOwned = Player.hacknetNodes.length;
if (hasHacknetServers()) {
const cost = getCostOfNextHacknetServer();
@@ -350,7 +350,7 @@ export function purchaseCoreUpgrade(node, levels=1) {
export function purchaseCacheUpgrade(node, levels=1) {
const sanitizedLevels = Math.round(levels);
const cost = node.calculateCoreUpgradeCost(sanitizedLevels);
const cost = node.calculateCacheUpgradeCost(sanitizedLevels);
if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {
return false;
}