Fixed linting issues

This commit is contained in:
Daniël van Noord
2021-05-01 22:43:02 +02:00
parent 1d12977984
commit 1c8bd79640
94 changed files with 8692 additions and 1316 deletions

View File

@@ -1,7 +1,4 @@
import {
CacheDragonAura,
CacheDragonAura2,
} from '../../Cache/VariablesAndData';
import { CacheDragonAura, CacheDragonAura2 } from '../../Cache/VariablesAndData';
import CalculateGains from '../Calculations/CalculateGains';
import CheckOtherAchiev from '../Calculations/CheckOtherAchiev';
import CopyData from '../SimulationData/CopyData';
@@ -24,18 +21,13 @@ export default function CalculateChangeAura(aura) {
CopyData();
// Check if aura being changed is first or second aura
const auraToBeChanged = l('promptContent').children[0].innerHTML.includes(
'secondary',
);
const auraToBeChanged = l('promptContent').children[0].innerHTML.includes('secondary');
if (auraToBeChanged) SimDragonAura2 = aura;
else SimDragonAura = aura;
// Sell highest building but only if aura is different
let price = 0;
if (
SimDragonAura !== CacheDragonAura ||
SimDragonAura2 !== CacheDragonAura2
) {
if (SimDragonAura !== CacheDragonAura || SimDragonAura2 !== CacheDragonAura2) {
for (let i = Game.ObjectsById.length - 1; i > -1; --i) {
if (Game.ObjectsById[i].amount > 0) {
const highestBuilding = SimObjects[Game.ObjectsById[i].name].name;
@@ -44,12 +36,7 @@ export default function CalculateChangeAura(aura) {
price =
SimObjects[highestBuilding].basePrice *
Game.priceIncrease **
Math.max(
0,
SimObjects[highestBuilding].amount -
1 -
SimObjects[highestBuilding].free,
);
Math.max(0, SimObjects[highestBuilding].amount - 1 - SimObjects[highestBuilding].free);
price = Game.modifyBuildingPrice(SimObjects[highestBuilding], price);
price = Math.ceil(price);
break;