Changed order and reformatted settings #721
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import GetWrinkConfigBank from '../../Disp/HelperFunctions/GetWrinkConfigBank';
|
||||
import { ColorGray } from '../../Disp/VariablesAndData';
|
||||
import { ColourGray } from '../../Disp/VariablesAndData';
|
||||
import {
|
||||
CacheMinPP,
|
||||
CacheObjects1,
|
||||
@@ -17,10 +17,10 @@ import ColourOfPP from './ColourOfPP';
|
||||
* It saves all date in CM.Cache.Objects...
|
||||
* It is called by CM.Cache.CacheBuildingsPP()
|
||||
*/
|
||||
function CacheColor(target, amount) {
|
||||
function CacheColour(target, amount) {
|
||||
Object.keys(target).forEach((i) => {
|
||||
if (CMOptions.PPRigidelMode && amount === 1) {
|
||||
target[i].color = ColorGray;
|
||||
target[i].color = ColourGray;
|
||||
return;
|
||||
}
|
||||
target[i].color = ColourOfPP(
|
||||
@@ -29,7 +29,7 @@ function CacheColor(target, amount) {
|
||||
);
|
||||
// Colour based on excluding certain top-buildings
|
||||
for (let j = 0; j < CMOptions.PPExcludeTop; j++) {
|
||||
if (target[i].pp === CachePPArray[j][0]) target[i].color = ColorGray;
|
||||
if (target[i].pp === CachePPArray[j][0]) target[i].color = ColourGray;
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export default function CacheBuildingsPP() {
|
||||
}
|
||||
CacheMinPP = CachePPArray[CMOptions.PPExcludeTop][indexOfMin];
|
||||
|
||||
CacheColor(CacheObjects1, 1);
|
||||
CacheColor(CacheObjects10, 10);
|
||||
CacheColor(CacheObjects100, 100);
|
||||
CacheColour(CacheObjects1, 1);
|
||||
CacheColour(CacheObjects10, 10);
|
||||
CacheColour(CacheObjects100, 100);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import GetCPS from '../../Disp/HelperFunctions/GetCPS';
|
||||
import {
|
||||
ColorBlue,
|
||||
ColorGray,
|
||||
ColorGreen,
|
||||
ColorOrange,
|
||||
ColorPurple,
|
||||
ColorRed,
|
||||
ColorYellow,
|
||||
ColourBlue,
|
||||
ColourGray,
|
||||
ColourGreen,
|
||||
ColourOrange,
|
||||
ColourPurple,
|
||||
ColourRed,
|
||||
ColourYellow,
|
||||
} from '../../Disp/VariablesAndData';
|
||||
import { CacheMinPP, CachePPArray } from '../VariablesAndData';
|
||||
|
||||
@@ -21,22 +21,22 @@ import { CacheMinPP, CachePPArray } from '../VariablesAndData';
|
||||
export default function ColourOfPP(me, price) {
|
||||
let color = '';
|
||||
// Colour based on PP
|
||||
if (me.pp <= 0 || me.pp === Infinity) color = ColorGray;
|
||||
else if (me.pp < CacheMinPP) color = ColorBlue;
|
||||
else if (me.pp === CacheMinPP) color = ColorGreen;
|
||||
else if (me.pp < CachePPArray[10][0]) color = ColorYellow;
|
||||
else if (me.pp < CachePPArray[20][0]) color = ColorOrange;
|
||||
else if (me.pp > CachePPArray[30][0]) color = ColorRed;
|
||||
else color = ColorPurple;
|
||||
if (me.pp <= 0 || me.pp === Infinity) color = ColourGray;
|
||||
else if (me.pp < CacheMinPP) color = ColourBlue;
|
||||
else if (me.pp === CacheMinPP) color = ColourGreen;
|
||||
else if (me.pp < CachePPArray[10][0]) color = ColourYellow;
|
||||
else if (me.pp < CachePPArray[20][0]) color = ColourOrange;
|
||||
else if (me.pp > CachePPArray[30][0]) color = ColourRed;
|
||||
else color = ColourPurple;
|
||||
|
||||
// Colour based on price in terms of CPS
|
||||
if (Number(CMOptions.PPSecondsLowerLimit) !== 0) {
|
||||
if (price / GetCPS() < Number(CMOptions.PPSecondsLowerLimit))
|
||||
color = ColorBlue;
|
||||
color = ColourBlue;
|
||||
}
|
||||
// Colour based on being able to purchase
|
||||
if (CMOptions.PPOnlyConsiderBuyable) {
|
||||
if (price - Game.cookies > 0) color = ColorRed;
|
||||
if (price - Game.cookies > 0) color = ColourRed;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user