mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 05:47:14 +02:00
increase achievment counter
This commit is contained in:
Vendored
+25
-25
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -423,15 +423,11 @@ function processAllHacknetServerEarnings(player: IPlayer, numCycles: number): nu
|
|||||||
|
|
||||||
const wastedHashes = player.hashManager.storeHashes(hashes);
|
const wastedHashes = player.hashManager.storeHashes(hashes);
|
||||||
if (wastedHashes > 0) {
|
if (wastedHashes > 0) {
|
||||||
// Currently set to cap in at 1% of the capacity so it's probably still more efficient to run a script to use the hashes
|
|
||||||
const maxHashesToConvert = player.hashManager.capacity * 0.01;
|
|
||||||
const hashesToConvertToCash = Math.min(wastedHashes, maxHashesToConvert);
|
|
||||||
|
|
||||||
const upgrade = HashUpgrades["Sell for Money"];
|
const upgrade = HashUpgrades["Sell for Money"];
|
||||||
if (upgrade === null) throw new Error("Could not get the hash upgrade");
|
if (upgrade === null) throw new Error("Could not get the hash upgrade");
|
||||||
if (!upgrade.cost) throw new Error("Upgrade is not properly configured");
|
if (!upgrade.cost) throw new Error("Upgrade is not properly configured");
|
||||||
|
|
||||||
const multiplier = Math.floor(hashesToConvertToCash / upgrade.cost);
|
const multiplier = Math.floor(wastedHashes / upgrade.cost);
|
||||||
if (multiplier > 0) {
|
if (multiplier > 0) {
|
||||||
player.gainMoney(upgrade.value * multiplier, "hacknet");
|
player.gainMoney(upgrade.value * multiplier, "hacknet");
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -165,7 +165,7 @@ const Engine: {
|
|||||||
messages: 150,
|
messages: 150,
|
||||||
mechanicProcess: 5, // Processes certain mechanics (Corporation, Bladeburner)
|
mechanicProcess: 5, // Processes certain mechanics (Corporation, Bladeburner)
|
||||||
contractGeneration: 3000, // Generate Coding Contracts
|
contractGeneration: 3000, // Generate Coding Contracts
|
||||||
achievementsCounter: 300, // Check if we have new achievements
|
achievementsCounter: 60, // Check if we have new achievements
|
||||||
},
|
},
|
||||||
|
|
||||||
decrementAllCounters: function (numCycles = 1) {
|
decrementAllCounters: function (numCycles = 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user