Add prettier to pre-commit and run it
This commit is contained in:
@@ -19,10 +19,7 @@ export default function FormatTime(time, longFormat) {
|
||||
|
||||
if (Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.settings.TimeFormat === 0) {
|
||||
if (formattedTime > 777600000) return longFormat ? 'Over 9000 days!' : '>9000d';
|
||||
str +=
|
||||
y > 0
|
||||
? `${y + (longFormat ? (y === 1 ? ' year' : ' years') : 'y')}, `
|
||||
: '';
|
||||
str += y > 0 ? `${y + (longFormat ? (y === 1 ? ' year' : ' years') : 'y')}, ` : '';
|
||||
if (str.length > 0 || d > 0)
|
||||
str += `${d + (longFormat ? (d === 1 ? ' day' : ' days') : 'd')}, `;
|
||||
if (str.length > 0 || h > 0)
|
||||
|
||||
@@ -13,7 +13,8 @@ export default function AddMenu() {
|
||||
title.textContent = 'Cookie Monster Statistics';
|
||||
AddMenuStats(title);
|
||||
}
|
||||
} else if (Game.onMenu === 'prefs') { // Added because Framework is broken
|
||||
} else if (Game.onMenu === 'prefs') {
|
||||
// Added because Framework is broken
|
||||
l('menu').childNodes[2].insertBefore(
|
||||
createMenuOptions(),
|
||||
l('menu').childNodes[2].childNodes[l('menu').childNodes[2].childNodes.length - 1],
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import Beautify from '../../BeautifyAndFormatting/Beautify';
|
||||
import GetTimeColour from '../../BeautifyAndFormatting/GetTimeColour';
|
||||
import CalculateGrimoireRefillTime from '../../HelperFunctions/CalculateGrimoireRefillTime';
|
||||
@@ -56,13 +55,7 @@ export default function Grimoire() {
|
||||
const reward = document.createElement('span');
|
||||
reward.style.color = '#33FF00';
|
||||
reward.textContent = Beautify(
|
||||
Math.max(
|
||||
Math.min(
|
||||
Game.cookies * 0.15,
|
||||
Game.cookiesPs * 60 * 30
|
||||
),
|
||||
7
|
||||
),
|
||||
Math.max(Math.min(Game.cookies * 0.15, Game.cookiesPs * 60 * 30), 7),
|
||||
2,
|
||||
);
|
||||
conjure.appendChild(reward);
|
||||
@@ -72,14 +65,8 @@ export default function Grimoire() {
|
||||
const loss = document.createElement('span');
|
||||
loss.style.color = 'red';
|
||||
loss.textContent = Beautify(
|
||||
Math.min(
|
||||
Game.cookies,
|
||||
Math.min(
|
||||
Game.cookies * 0.15,
|
||||
Game.cookiesPs * 60 * 15
|
||||
) + 13
|
||||
),
|
||||
2
|
||||
Math.min(Game.cookies, Math.min(Game.cookies * 0.15, Game.cookiesPs * 60 * 15) + 13),
|
||||
2,
|
||||
);
|
||||
conjure.appendChild(loss);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user