Fix upgr bar legend, wrink butt tooltip #700, #695

This commit is contained in:
Daniël van Noord
2021-03-19 17:38:45 +01:00
parent 641471b5bc
commit 51c89bdc88
6 changed files with 406 additions and 1344 deletions

View File

@@ -38,22 +38,24 @@ function CreateUpgradeBarLegend() {
return div;
};
legend.appendChild(legendLine(ColorBlue, 'Better than best PP building'));
legend.appendChild(legendLine(ColorGreen, 'Same as best PP building'));
legend.appendChild(
legendLine(
ColorYellow,
'Between best and worst PP buildings closer to best',
),
legendLine(ColorBlue, 'Better than the best PP of a building option'),
);
legend.appendChild(
legendLine(
ColorOrange,
'Between best and worst PP buildings closer to worst',
),
legendLine(ColorGreen, 'Same as the best PP building option'),
);
legend.appendChild(
legendLine(ColorYellow, 'Within the top 10 of PP for buildings'),
);
legend.appendChild(
legendLine(ColorOrange, 'Within the top 20 of PP for buildings'),
);
legend.appendChild(
legendLine(ColorRed, 'Within the top 30 of PP for buildings'),
);
legend.appendChild(
legendLine(ColorPurple, 'Outside of the top 30 of PP for buildings'),
);
legend.appendChild(legendLine(ColorRed, 'Same as worst PP building'));
legend.appendChild(legendLine(ColorPurple, 'Worse than worst PP building'));
legend.appendChild(legendLine(ColorGray, 'Negative or infinity PP'));
return legend;
}

View File

@@ -2,6 +2,7 @@ import {
CacheWrinklersFattest,
CacheWrinklersTotal,
} from '../../../Cache/VariablesAndData';
import { Beautify } from '../../BeautifyAndFormatting/BeautifyFormatting';
import { TooltipName } from '../../VariablesAndData';
import * as Create from '../CreateTooltip';
@@ -16,9 +17,9 @@ export default function WrinklerButton() {
const WrinklerReward = document.createElement('div');
WrinklerReward.id = 'CMWrinklerReward';
if (TooltipName === 'PopAll') {
WrinklerReward.textContent = CacheWrinklersTotal;
WrinklerReward.textContent = Beautify(CacheWrinklersTotal);
} else if (TooltipName === 'PopFattest') {
WrinklerReward.textContent = CacheWrinklersFattest[0];
WrinklerReward.textContent = Beautify(CacheWrinklersFattest[0]);
}
l('tooltip').appendChild(WrinklerReward);