From ba54eafc17da666934dfe4ff4398eead03de331f Mon Sep 17 00:00:00 2001 From: Monkey-bored Date: Sun, 7 Apr 2024 22:33:59 +0300 Subject: [PATCH 1/2] [#249] Cannot upgrade piece twice --- core/development/ui/UpgradeUI.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/core/development/ui/UpgradeUI.ts b/core/development/ui/UpgradeUI.ts index c76dfe58..1d519a8c 100644 --- a/core/development/ui/UpgradeUI.ts +++ b/core/development/ui/UpgradeUI.ts @@ -31,6 +31,7 @@ export function showUpgradeablePiecesElements( upgradeElement.innerHTML = upgradeablePiece.resource; upgradeElement.addEventListener('click', () => { upgradePiece(piece, upgradeablePiece); + showUpgradeablePiecesElements(upgradeablePiece, upgradeablePiece.upgrades); }); const upgradePriceElement = document.createElement('p'); From 093dcf464fdc4690b7a29096cd71858ebc6500a4 Mon Sep 17 00:00:00 2001 From: Monkey-bored Date: Sun, 7 Apr 2024 22:39:01 +0300 Subject: [PATCH 2/2] [trivial] formatting --- core/development/ui/UpgradeUI.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/development/ui/UpgradeUI.ts b/core/development/ui/UpgradeUI.ts index 1d519a8c..79c72cc7 100644 --- a/core/development/ui/UpgradeUI.ts +++ b/core/development/ui/UpgradeUI.ts @@ -31,7 +31,10 @@ export function showUpgradeablePiecesElements( upgradeElement.innerHTML = upgradeablePiece.resource; upgradeElement.addEventListener('click', () => { upgradePiece(piece, upgradeablePiece); - showUpgradeablePiecesElements(upgradeablePiece, upgradeablePiece.upgrades); + showUpgradeablePiecesElements( + upgradeablePiece, + upgradeablePiece.upgrades, + ); }); const upgradePriceElement = document.createElement('p');