Change upgrade formatting to specify the current and new multipliers to speed.

This commit is contained in:
hexagonhexagon 2020-05-29 16:35:41 -04:00
parent a2ee16589f
commit d52e4c9054
3 changed files with 13 additions and 11 deletions

View File

@ -258,7 +258,6 @@
align-self: end;
justify-self: center;
color: $colorGreenBright;
text-transform: uppercase;
@include S(margin-top, 20px);
}
}

View File

@ -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(
"<currentMult>",
currentTierMultiplier.toString()
);
continue;
}
// Set description
handle.elemDescription.innerText = T.shopUpgrades[upgradeId].description.replace(
"<gain>",
Math.floor(tierHandle.improvement * 100.0)
);
handle.elemDescription.innerText = T.shopUpgrades[upgradeId].description
.replace("<currentMult>", currentTierMultiplier.toString())
.replace("<newMult>", (currentTierMultiplier + tierHandle.improvement).toString());
tierHandle.required.forEach(({ shape, amount }) => {
const container = makeDiv(handle.elemRequirements, null, ["requirement"]);

View File

@ -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<currentMult>)
# The "Statistics" window
statistics:
@ -352,16 +352,16 @@ ingame:
shopUpgrades:
belt:
name: Belts, Distributor & Tunnels
description: Speed +<gain>%
description: Speed x<currentMult> → x<newMult>
miner:
name: Extraction
description: Speed +<gain>%
description: Speed x<currentMult> → x<newMult>
processors:
name: Cutting, Rotating & Stacking
description: Speed +<gain>%
description: Speed x<currentMult> → x<newMult>
painting:
name: Mixing & Painting
description: Speed +<gain>%
description: Speed x<currentMult> → x<newMult>
# Buildings and their name / description
buildings: