Fix building sorting #515

This commit is contained in:
Daniel van Noord committed 2021-01-26 13:31:01 +01:00
1 parent b6069e2358
commit 7795aa79a5
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1874,11 +1874,11 @@ CM.Disp.UpdateBotTimerBarPosition = function() {
*/
CM.Disp.UpdateBuildings = function() {
if (Game.buyMode == 1) {
if (CM.Options.BuildColor == 1) {
var target = '';
if (Game.buyBulk == 10 && CM.Options.BulkBuildColor == 1) target = 'Objects10';
else if (Game.buyBulk == 100 && CM.Options.BulkBuildColor == 1) target = 'Objects100';
else target = 'Objects';
if (CM.Options.BuildColor == 1) {
for (var i in CM.Cache[target]) {
l('productPrice' + Game.Objects[i].id).style.color = CM.Options.Colors[CM.Cache[target][i].color];
}
+1 -1
View File
@@ -691,11 +691,11 @@ CM.Disp.UpdateBotTimerBarPosition = function() {
*/
CM.Disp.UpdateBuildings = function() {
if (Game.buyMode == 1) {
if (CM.Options.BuildColor == 1) {
var target = '';
if (Game.buyBulk == 10 && CM.Options.BulkBuildColor == 1) target = 'Objects10';
else if (Game.buyBulk == 100 && CM.Options.BulkBuildColor == 1) target = 'Objects100';
else target = 'Objects';
if (CM.Options.BuildColor == 1) {
for (var i in CM.Cache[target]) {
l('productPrice' + Game.Objects[i].id).style.color = CM.Options.Colors[CM.Cache[target][i].color];
}