Changes according to Eslint

This commit is contained in:
Daniël van Noord
2021-03-16 09:32:50 +01:00
parent 26d8e75935
commit a65af049b6
63 changed files with 314 additions and 295 deletions

View File

@@ -63,9 +63,9 @@ export function CreateBotBar() {
l('wrapper').appendChild(BotBar);
for (const i of Object.keys(Game.Objects)) {
Object.keys(Game.Objects).forEach((i) => {
CreateBotBarBuildingColumn(i);
}
});
}
/**
@@ -74,7 +74,7 @@ export function CreateBotBar() {
export function UpdateBotBar() {
if (CMOptions.BotBar === 1 && CacheObjects1 && Game.buyMode === 1) {
let count = 0;
for (const i of Object.keys(CacheObjects1)) {
Object.keys(CacheObjects1).forEach((i) => {
let target = Game.buyBulk;
if (Game.buyMode === 1) {
LastTargetBotBar = target;
@@ -84,7 +84,7 @@ export function UpdateBotBar() {
if (target === 1) target = CacheObjects1;
if (target === 10) target = CacheObjects10;
if (target === 100) target = CacheObjects100;
count++;
count += 1;
l('CMBotBar').firstChild.firstChild.childNodes[0].childNodes[
count
].childNodes[1].textContent = Game.Objects[i].amount;
@@ -115,6 +115,6 @@ export function UpdateBotBar() {
l('CMBotBar').firstChild.firstChild.childNodes[3].childNodes[
count
].textContent = timeColor.text;
}
});
}
}

View File

@@ -105,7 +105,7 @@ export function UpdateTimerBar() {
(Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.time) /
Game.fps,
);
numberOfTimers++;
numberOfTimers += 1;
} else l('CMTimerBarGC').style.display = 'none';
// Regulates visibility of Reindeer timer
@@ -152,7 +152,7 @@ export function UpdateTimerBar() {
(Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time) /
Game.fps,
);
numberOfTimers++;
numberOfTimers += 1;
} else {
l('CMTimerBarRen').style.display = 'none';
}
@@ -160,7 +160,7 @@ export function UpdateTimerBar() {
// On every frame all buff-timers are deleted and re-created
const BuffTimerBars = {};
l('CMTimerBarBuffTimers').innerHTML = '';
for (const i of Object.keys(Game.buffs)) {
Object.keys(Game.buffs).forEach((i) => {
if (Game.buffs[i]) {
const timer = CreateTimer(Game.buffs[i].name, Game.buffs[i].name, [
{ id: `${Game.buffs[i].name}Bar` },
@@ -187,13 +187,13 @@ export function UpdateTimerBar() {
timer.lastChild.children[2].textContent = Math.ceil(
Game.buffs[i].time / Game.fps,
);
numberOfTimers++;
numberOfTimers += 1;
BuffTimerBars[Game.buffs[i].name] = timer;
}
}
for (const i of Object.keys(BuffTimerBars)) {
});
Object.keys(BuffTimerBars).forEach((i) => {
l('CMTimerBarBuffTimers').appendChild(BuffTimerBars[i]);
}
});
if (numberOfTimers !== 0) {
l('CMTimerBar').style.height = `${numberOfTimers * 12 + 2}px`;