mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-19 15:54:09 +02:00
run auto fix lint
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user