plenty of bf

This commit is contained in:
Olivier Gagnon
2021-11-15 23:49:33 -05:00
parent ded230eaaf
commit ef781a0627
15 changed files with 213 additions and 115 deletions
+6
View File
@@ -19,6 +19,7 @@ import {
import { createRandomIp } from "../utils/IPAddress";
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
import { IPlayer } from "../PersonObjects/IPlayer";
interface IConstructorParams {
adminRights?: boolean;
@@ -122,6 +123,11 @@ export class HacknetServer extends BaseServer implements IHacknetNode {
}
}
updateRamUsed(ram: number, player: IPlayer): void {
super.updateRamUsed(ram, player);
this.updateHashRate(player.hacknet_node_money_mult);
}
updateHashCapacity(): void {
this.hashCapacity = 32 * Math.pow(2, this.cache);
}