fix some bugs

This commit is contained in:
Olivier Gagnon
2021-10-03 21:33:48 -04:00
parent 1a749505e7
commit ab2ffb112f
13 changed files with 85 additions and 14 deletions

View File

@@ -77,8 +77,12 @@ export class HacknetServer extends BaseServer implements IHacknetNode {
// Process this Hacknet Server in the game loop. Returns the number of hashes generated
process(numCycles = 1): number {
const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;
this.onlineTimeSeconds += seconds;
return this.hashRate * seconds;
const hashes = this.hashRate * seconds;
this.totalHashesGenerated += hashes;
return hashes;
}
upgradeCache(levels: number): void {