mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 03:25:44 +02:00
UI: Disable buttons when player cannot buy things in tech vendor (#1881)
* UI: Disable buttons when player cannot buy things in tech vendor * Tweak reachMaxCore warning comment --------- Co-authored-by: David Walker <d0sboots@gmail.com>
This commit is contained in:
@@ -101,7 +101,12 @@ export function getPurchaseServerMaxRam(): number {
|
||||
}
|
||||
|
||||
// Manually purchase a server (NOT through Netscript)
|
||||
export function purchaseServer(hostname: string, ram: number, cost: number): void {
|
||||
export function purchaseServer(hostname: string, ram: number): void {
|
||||
const cost = getPurchaseServerCost(ram);
|
||||
if (cost === Infinity) {
|
||||
return;
|
||||
}
|
||||
|
||||
//Check if player has enough money
|
||||
if (!Player.canAfford(cost)) {
|
||||
dialogBoxCreate("You don't have enough money to purchase this server!");
|
||||
|
||||
Reference in New Issue
Block a user