run auto fix lint

This commit is contained in:
Olivier Gagnon
2021-04-29 23:52:56 -04:00
parent 77cb63e36a
commit 3fad505096
183 changed files with 1547 additions and 1546 deletions
+9 -9
View File
@@ -22,7 +22,7 @@ import { createRandomIp } from "../../utils/IPAddress";
import {
Generic_fromJSON,
Generic_toJSON,
Reviver
Reviver,
} from "../../utils/JSONReviver";
interface IConstructorParams {
@@ -41,25 +41,25 @@ export class HacknetServer extends BaseServer implements IHacknetNode {
}
// Cache level. Affects hash Capacity
cache: number = 1;
cache = 1;
// Number of cores. Improves hash production
cores: number = 1;
cores = 1;
// Number of hashes that can be stored by this Hacknet Server
hashCapacity: number = 0;
hashCapacity = 0;
// Hashes produced per second
hashRate: number = 0;
hashRate = 0;
// Similar to Node level. Improves hash production
level: number = 1;
level = 1;
// How long this HacknetServer has existed, in seconds
onlineTimeSeconds: number = 0;
onlineTimeSeconds = 0;
// Total number of hashes earned by this server
totalHashesGenerated: number = 0;
totalHashesGenerated = 0;
constructor(params: IConstructorParams={ hostname: "", ip: createRandomIp() }) {
super(params);
@@ -85,7 +85,7 @@ export class HacknetServer extends BaseServer implements IHacknetNode {
}
// Process this Hacknet Server in the game loop. Returns the number of hashes generated
process(numCycles: number=1): number {
process(numCycles=1): number {
const seconds = numCycles * CONSTANTS.MilliPerCycle / 1000;
return this.hashRate * seconds;