From d52e4c90544a86ff79940d252022cf6494b6c8b9 Mon Sep 17 00:00:00 2001 From: hexagonhexagon Date: Fri, 29 May 2020 16:35:41 -0400 Subject: [PATCH 1/2] Change upgrade formatting to specify the current and new multipliers to speed. --- src/css/ingame_hud/shop.scss | 1 - src/js/game/hud/parts/shop.js | 13 ++++++++----- translations/base-en.yaml | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/css/ingame_hud/shop.scss b/src/css/ingame_hud/shop.scss index d27c98de..0d073ce9 100644 --- a/src/css/ingame_hud/shop.scss +++ b/src/css/ingame_hud/shop.scss @@ -258,7 +258,6 @@ align-self: end; justify-self: center; color: $colorGreenBright; - text-transform: uppercase; @include S(margin-top, 20px); } } diff --git a/src/js/game/hud/parts/shop.js b/src/js/game/hud/parts/shop.js index 0445e604..bf2ae8e5 100644 --- a/src/js/game/hud/parts/shop.js +++ b/src/js/game/hud/parts/shop.js @@ -63,6 +63,7 @@ export class HUDShop extends BaseHUDPart { const { tiers } = UPGRADES[upgradeId]; const currentTier = this.root.hubGoals.getUpgradeLevel(upgradeId); + const currentTierMultiplier = this.root.hubGoals.upgradeImprovements[upgradeId]; const tierHandle = tiers[currentTier]; // Set tier @@ -87,15 +88,17 @@ export class HUDShop extends BaseHUDPart { if (!tierHandle) { // Max level - handle.elemDescription.innerText = T.ingame.shop.maximumLevel; + handle.elemDescription.innerText = T.ingame.shop.maximumLevel.replace( + "", + currentTierMultiplier.toString() + ); continue; } // Set description - handle.elemDescription.innerText = T.shopUpgrades[upgradeId].description.replace( - "", - Math.floor(tierHandle.improvement * 100.0) - ); + handle.elemDescription.innerText = T.shopUpgrades[upgradeId].description + .replace("", currentTierMultiplier.toString()) + .replace("", (currentTierMultiplier + tierHandle.improvement).toString()); tierHandle.required.forEach(({ shape, amount }) => { const container = makeDiv(handle.elemRequirements, null, ["requirement"]); diff --git a/translations/base-en.yaml b/translations/base-en.yaml index 60fd7ccb..0baa7f7d 100644 --- a/translations/base-en.yaml +++ b/translations/base-en.yaml @@ -288,7 +288,7 @@ ingame: # The roman number for each tier tierLabels: [I, II, III, IV, V, VI, VII, VIII, IX, X] - maximumLevel: Maximum level + maximumLevel: MAXIMUM LEVEL (Speed x) # The "Statistics" window statistics: @@ -352,16 +352,16 @@ ingame: shopUpgrades: belt: name: Belts, Distributor & Tunnels - description: Speed +% + description: Speed x → x miner: name: Extraction - description: Speed +% + description: Speed x → x processors: name: Cutting, Rotating & Stacking - description: Speed +% + description: Speed x → x painting: name: Mixing & Painting - description: Speed +% + description: Speed x → x # Buildings and their name / description buildings: From 501db321a1f24bae3bdfeb9adef120ed9c198665 Mon Sep 17 00:00:00 2001 From: hexagonhexagon Date: Fri, 29 May 2020 19:24:45 -0400 Subject: [PATCH 2/2] Corrected CSS wrapping "Speed..." text to next line. Made max level text align the same as the others. --- src/css/ingame_hud/shop.scss | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/css/ingame_hud/shop.scss b/src/css/ingame_hud/shop.scss index 0d073ce9..e1463c69 100644 --- a/src/css/ingame_hud/shop.scss +++ b/src/css/ingame_hud/shop.scss @@ -88,7 +88,7 @@ } .description { - grid-column: 3 / 4; + grid-column: 2 / 4; grid-row: 1 / 2; @include PlainText; color: #aaa; @@ -253,12 +253,7 @@ display: none; } .description { - // grid-column: 2 / 4; - // grid-row: 2 / 3; - align-self: end; - justify-self: center; color: $colorGreenBright; - @include S(margin-top, 20px); } } }