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

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

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;