mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 23:38:35 +02:00
more fixes
This commit is contained in:
@@ -47,7 +47,7 @@ export function purchaseHacknet(player: IPlayer): number {
|
||||
throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);
|
||||
}
|
||||
|
||||
if (!player.canAfford(cost)) {
|
||||
if (!player.canAfford(cost) || numOwned >= HacknetServerConstants.MaxServers) {
|
||||
return -1;
|
||||
}
|
||||
player.loseMoney(cost, "hacknet_expenses");
|
||||
|
||||
Reference in New Issue
Block a user