mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 20:55:44 +01:00
Remove an unnecessary for loop in HacknetServer upgradeRam (#754)
This commit is contained in:
parent
4b627cde1e
commit
b4f33fe655
@ -104,9 +104,7 @@ export class HacknetServer extends BaseServer implements IHacknetNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
upgradeRam(levels: number, prodMult: number): boolean {
|
upgradeRam(levels: number, prodMult: number): boolean {
|
||||||
for (let i = 0; i < levels; ++i) {
|
this.maxRam *= Math.pow(2, levels);
|
||||||
this.maxRam *= 2;
|
|
||||||
}
|
|
||||||
this.maxRam = Math.min(HacknetServerConstants.MaxRam, Math.round(this.maxRam));
|
this.maxRam = Math.min(HacknetServerConstants.MaxRam, Math.round(this.maxRam));
|
||||||
this.updateHashRate(prodMult);
|
this.updateHashRate(prodMult);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user