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

14015
dist/CookieMonsterDev.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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