Fix prettier installation #774
This commit is contained in:
@@ -6,8 +6,6 @@ import { FavouriteSettings } from '../../Disp/VariablesAndData';
|
||||
*/
|
||||
export default function ToggleFavouriteSetting(config) {
|
||||
if (FavouriteSettings.includes(config))
|
||||
FavouriteSettings = FavouriteSettings.filter(function (ele) {
|
||||
return ele !== config;
|
||||
});
|
||||
FavouriteSettings = FavouriteSettings.filter((ele) => ele !== config);
|
||||
else FavouriteSettings.push(config);
|
||||
}
|
||||
|
||||
@@ -70,16 +70,14 @@ export default function UpdateBuildings() {
|
||||
return o;
|
||||
});
|
||||
|
||||
arr.sort(function (a, b) {
|
||||
return ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
|
||||
arr.sort((a, b) => ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
|
||||
ColoursOrdering.indexOf(b.color)
|
||||
? 1
|
||||
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
|
||||
? -1
|
||||
: a.pp < b.pp
|
||||
? -1
|
||||
: 0;
|
||||
});
|
||||
: 0);
|
||||
} else if (CMOptions.SortBuildings === 2) {
|
||||
arr = Object.keys(target).map((k) => {
|
||||
const o = target[k];
|
||||
@@ -88,16 +86,14 @@ export default function UpdateBuildings() {
|
||||
return o;
|
||||
});
|
||||
|
||||
arr.sort(function (a, b) {
|
||||
return ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
|
||||
arr.sort((a, b) => ColoursOrdering.indexOf(a.color) > // eslint-disable-line no-nested-ternary
|
||||
ColoursOrdering.indexOf(b.color)
|
||||
? 1
|
||||
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
|
||||
? -1
|
||||
: a.pp < b.pp
|
||||
? -1
|
||||
: 0;
|
||||
});
|
||||
: 0);
|
||||
}
|
||||
|
||||
for (let x = 0; x < arr.length; x++) {
|
||||
|
||||
@@ -79,15 +79,13 @@ export default function UpdateUpgrades() {
|
||||
}
|
||||
|
||||
if (CMOptions.SortUpgrades) {
|
||||
arr.sort(function (a, b) {
|
||||
return ColoursOrdering.indexOf(a.color) > ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
|
||||
arr.sort((a, b) => ColoursOrdering.indexOf(a.color) > ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
|
||||
? 1
|
||||
: ColoursOrdering.indexOf(a.color) < ColoursOrdering.indexOf(b.color) // eslint-disable-line no-nested-ternary
|
||||
? -1
|
||||
: a.pp < b.pp
|
||||
? -1
|
||||
: 0;
|
||||
});
|
||||
: 0);
|
||||
} else {
|
||||
arr.sort((a, b) => a.price - b.price);
|
||||
}
|
||||
|
||||
@@ -20,9 +20,7 @@ export default function CreateWrinklerButtons() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('wb', 'PopAll');
|
||||
},
|
||||
() => CreateTooltip('wb', 'PopAll'),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
@@ -43,9 +41,7 @@ export default function CreateWrinklerButtons() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('wb', 'PopFattest');
|
||||
},
|
||||
() => CreateTooltip('wb', 'PopFattest'),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
|
||||
@@ -68,13 +68,11 @@ export default function AddMissingAchievements() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return (function () {
|
||||
() => (function () {
|
||||
return CrateTooltipLockedAchievements(
|
||||
Game.AchievementsById[id],
|
||||
);
|
||||
})();
|
||||
},
|
||||
})(),
|
||||
'top',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
|
||||
@@ -21,17 +21,17 @@ export default function Flash(mode, config, forced) {
|
||||
l('CMFlashScreen').style.opacity = '0.5';
|
||||
if (mode === 3) {
|
||||
l('CMFlashScreen').style.display = 'inline';
|
||||
setTimeout(function () {
|
||||
setTimeout(() => {
|
||||
Flash(2, config, true);
|
||||
}, 1000 / Game.fps);
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
setTimeout(() => {
|
||||
Flash(0, config, true);
|
||||
}, 1000 / Game.fps);
|
||||
}
|
||||
} else if (mode === 2) {
|
||||
l('CMFlashScreen').style.opacity = '1';
|
||||
setTimeout(function () {
|
||||
setTimeout(() => {
|
||||
Flash(1, config, true);
|
||||
}, 1000 / Game.fps);
|
||||
} else if (mode === 0) l('CMFlashScreen').style.display = 'none';
|
||||
|
||||
@@ -14,9 +14,7 @@ export default function ReplaceTooltipGrimoire() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('g', `${i}`);
|
||||
},
|
||||
() => CreateTooltip('g', `${i}`),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
|
||||
@@ -17,9 +17,7 @@ export default function ReplaceTooltipUpgrade() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('u', `${i}`);
|
||||
},
|
||||
() => CreateTooltip('u', `${i}`),
|
||||
'store',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
|
||||
@@ -21,9 +21,7 @@ function ReplaceTooltipBuild() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('b', `${i}`);
|
||||
},
|
||||
() => CreateTooltip('b', `${i}`),
|
||||
'store',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
@@ -42,9 +40,7 @@ function ReplaceTooltipLump() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('s', 'Lump');
|
||||
},
|
||||
() => CreateTooltip('s', 'Lump'),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
@@ -61,9 +57,7 @@ function ReplaceTooltipGarden() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('ha', 'HarvestAllButton');
|
||||
},
|
||||
() => CreateTooltip('ha', 'HarvestAllButton'),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
@@ -75,9 +69,7 @@ function ReplaceTooltipGarden() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('p', [`${coords[0]}`, `${coords[2]}`]);
|
||||
},
|
||||
() => CreateTooltip('p', [`${coords[0]}`, `${coords[2]}`]),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
@@ -93,9 +85,7 @@ function ReplaceTooltipPantheon() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('pag', i);
|
||||
},
|
||||
() => CreateTooltip('pag', i),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
@@ -106,12 +96,10 @@ function ReplaceTooltipPantheon() {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(
|
||||
this,
|
||||
function () {
|
||||
return CreateTooltip('pas', [
|
||||
() => CreateTooltip('pas', [
|
||||
i,
|
||||
Game.Objects.Temple.minigame.slot[i],
|
||||
]);
|
||||
},
|
||||
]),
|
||||
'this',
|
||||
);
|
||||
Game.tooltip.wobble();
|
||||
|
||||
@@ -69,7 +69,7 @@ export default function ReplaceNative() {
|
||||
l('bigCookie').removeEventListener('click', Game.ClickCookie, false);
|
||||
l('bigCookie').addEventListener(
|
||||
'click',
|
||||
function () {
|
||||
() => {
|
||||
FixMouseY(Game.ClickCookie);
|
||||
},
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user