Small optimization to AscendButton()

This commit is contained in:
Daniël van Noord
2021-07-19 21:59:45 +02:00
parent 075bd89669
commit bb0ba7f116
3 changed files with 11 additions and 14023 deletions

View File

@@ -20,16 +20,15 @@ export default function ReplaceAscendTooltip() {
);
const startDate = Game.sayTime(((Date.now() - Game.startDate) / 1000) * Game.fps, -1);
let str = '';
str += `You've been on this run for <b>${
let str = `You've been on this run for <b>${
startDate === '' ? 'not very long' : startDate
}</b>.<br>`;
str += '<div class="line"></div>';
}</b>.<br>
<div class="line"></div>`;
if (Game.prestige > 0) {
str += `Your prestige level is currently <b>${Beautify(Game.prestige)}</b>.<br>(CpS +${Beautify(
Game.prestige,
)}%)`;
str += '<div class="line"></div>';
)}%)
<div class="line"></div>`;
}
if (CacheLastHeavenlyChips < 1) str += 'Ascending now would grant you no prestige.';
else if (CacheLastHeavenlyChips < 2)
@@ -41,9 +40,9 @@ export default function ReplaceAscendTooltip() {
)} prestige levels</b> (+${Beautify(CacheLastHeavenlyChips)}% CpS)<br>and <b>${Beautify(
CacheLastHeavenlyChips,
)} heavenly chips</b> to spend.`;
str += '<div class="line"></div>';
str += `You need <b>${Beautify(cookiesToNext)} more cookies</b> for the next level.<br>`;
str += `${
str += `<div class="line"></div>
You need <b>${Beautify(cookiesToNext)} more cookies</b> for the next level.<br>
${
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TooltipAscendButton
? `<div class='line'></div>It takes ${CacheTimeTillNextPrestige} to reach the next level and you were making ${Beautify(
CacheHCPerSecond,