Sort Building list based on PP of selected buy mode (#340)

This commit is contained in:
DanielNoord authored and GitHub committed 2020-11-24 18:35:56 +01:00
1 parent 8ea9400a07
commit d40f90d233
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -1283,9 +1283,9 @@ CM.Disp.UpdateBuildings = function() {
// Build array of pointers, sort by pp, use array index (+2) as the grid row number
// (grid rows are 1-based indexing, and row 1 is the bulk buy/sell options)
var arr = Object.keys(CM.Cache.Objects).map(k =>
var arr = Object.keys(CM.Cache[target]).map(k =>
{
var o = CM.Cache.Objects[k];
var o = CM.Cache[target][k];
o.name = k;
o.id = Game.Objects[k].id;
return o;
+2 -2
View File
@@ -644,9 +644,9 @@ CM.Disp.UpdateBuildings = function() {
// Build array of pointers, sort by pp, use array index (+2) as the grid row number
// (grid rows are 1-based indexing, and row 1 is the bulk buy/sell options)
var arr = Object.keys(CM.Cache.Objects).map(k =>
var arr = Object.keys(CM.Cache[target]).map(k =>
{
var o = CM.Cache.Objects[k];
var o = CM.Cache[target][k];
o.name = k;
o.id = Game.Objects[k].id;
return o;