2,875
edits
No edit summary |
No edit summary |
||
Line 187: | Line 187: | ||
local ul = div:tag('ul') | local ul = div:tag('ul') | ||
local itemList = Shared.sortDictionary( | local courseItems = courseRequirements.CourseItemCosts | ||
-- Put GP and SC at the top, and remove them from the list | |||
-- to avoid sorting and re-adding them below. | |||
local gpVal = table.remove(courseItems, 'GP') | |||
local scVal = table.remove(courseItems, 'SC') | |||
if gpVal then ul:tag('li'):wikitext(getItemIcon('GP', gpVal)) end | |||
if scVal then ul:tag('li'):wikitext(getItemIcon('SC', scVal)) end | |||
local itemList = Shared.sortDictionary(courseItems, | |||
function(a, b) return a.item < b.item end, | function(a, b) return a.item < b.item end, | ||
function(a, b) return {item = a, amount = b} end) | function(a, b) return {item = a, amount = b} end) |
edits