fix lack of gold formatting on guild upgrade button on game load

This commit is contained in:
2023-04-07 20:45:08 +02:00
parent a0b7db1bf6
commit 4f2d742284
+2 -1
View File
@@ -12,7 +12,8 @@ export class Guild {
constructor(level: number, gold: number, upgrades: {[index:string]: GuildUpgrade} = {}) {
this.gold = gold;
this.level = level;
this.displayUpgradeCost = this.getUpgradeCost() ?? "Max level";
const rawDisplayUpgradeCost = this.getUpgradeCost();
this.displayUpgradeCost = rawDisplayUpgradeCost ? formatGold(rawDisplayUpgradeCost) : "Max level";
this.upgradeCost = this.getUpgradeCost();
this.adventurerCapacity = upgrades.adventurerCapacity as AdventurerCapacityUpgrade ?? new AdventurerCapacityUpgrade();