Module:Skills: Difference between revisions

getAncientRelicsTable: Change ordering logic for relics
(getAncientRelicsTable: Finish implementing this (accidentally committed too soon previously))
(getAncientRelicsTable: Change ordering logic for relics)
Line 514: Line 514:
local skillNameA, skillNameB = Constants.getSkillName(a.skillID), Constants.getSkillName(b.skillID)
local skillNameA, skillNameB = Constants.getSkillName(a.skillID), Constants.getSkillName(b.skillID)
if skillNameA == skillNameB then
if skillNameA == skillNameB then
return a.number < b.number
-- Order by numbers at the end of relic IDs
-- Relics have a 'number' property, but this appears to contain duplicates
return string.sub(a.id, string.len(a.id)) < string.sub(b.id, string.len(b.id))
else
else
return skillNameA < skillNameB
return skillNameA < skillNameB