Anonymous

Module:Shop: Difference between revisions

From Melvor Idle
No change in size ,  22 October 2022
_getShopTable: Use game defined order when no custom sort defined
(getSkillcapeTable: Implement, _getPurchaseDescription: Implement)
(_getShopTable: Use game defined order when no custom sort defined)
Line 444: Line 444:
end
end


local purchIterator = nil
if sortOrder == nil then
if sortOrder == nil then
purchIterator = Shared.skpairs
Purchases = GameData.sortByOrderTable(Purchases, GameData.rawData.shopDisplayOrder, true)
else
else
table.sort(Purchases, sortOrder)
table.sort(Purchases, sortOrder)
purchIterator = ipairs
end
end
for i, purchase in purchIterator(Purchases) do
for i, purchase in ipairs(Purchases) do
         local purchName = p._getPurchaseName(purchase)
         local purchName = p._getPurchaseName(purchase)
local purchOverride = nil
local purchOverride = nil