Skip to content

Commit c29a33d

Browse files
committed
Mobile UI support
Added Mobile UI support for single level refund.
1 parent 05b161d commit c29a33d

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/BlueberryUpgrades.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,7 @@ export const updateMobileAmbrosiaHTML = (k: AmbrosiaUpgradeNames) => {
13051305

13061306
const buyOne = document.createElement('button')
13071307
const buyMax = document.createElement('button')
1308+
const refundOne = document.createElement('button')
13081309

13091310
buyOne.classList.add('modalBtnBuy')
13101311
buyOne.textContent = i18next.t('general.buyOne')
@@ -1320,8 +1321,16 @@ export const updateMobileAmbrosiaHTML = (k: AmbrosiaUpgradeNames) => {
13201321
updateMobileAmbrosiaHTML(k)
13211322
})
13221323

1324+
refundOne.classList.add('modalBtnBuy')
1325+
refundOne.textContent = i18next.t('ambrosia.refundOneLevelBtn')
1326+
refundOne.addEventListener('click', () => {
1327+
refundOneAmbrosiaUpgradeLevel(k)
1328+
updateMobileAmbrosiaHTML(k)
1329+
})
1330+
13231331
buttonDiv.appendChild(buyOne)
13241332
buttonDiv.appendChild(buyMax)
1333+
buttonDiv.appendChild(refundOne)
13251334
elm.appendChild(buttonDiv)
13261335
}
13271336
}

translations/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"refund": "You have refunded all spent Blueberries and Ambrosia.",
3535
"refundOneLevelZero": "This upgrade is already at level 0.",
3636
"refundOneLevelPrereq": "Cannot refund: <<orange|{{name}}>> depends on this upgrade.",
37+
"refundOneLevelBtn": "Refund x1",
3738
"refundWord": "Refund",
3839
"ignoreEXALT": "[<<white|♔>>] This upgrade is active even if an EXALT says otherwise!",
3940
"notUnlocked": "Clear No Golden Quark Upgrades, Tier 1!",

0 commit comments

Comments
 (0)