17,101
edits
m (Amend references to other modules) |
(getThievingNavbox: Order NPCs based on level requirement) |
||
Line 46: | Line 46: | ||
table.insert(returnPart, '|-\r\n|') | table.insert(returnPart, '|-\r\n|') | ||
local npcData = {} | |||
for i, npc in ipairs(SkillData.Thieving.NPCs) do | |||
table.insert(npcData, {["level"] = npc.level, ["name"] = npc.name}) | |||
end | |||
table.sort(npcData, function(a, b) return a.level < b.level end) | |||
local npcList = {} | local npcList = {} | ||
-- Create row for each NPC | -- Create row for each NPC | ||
for i, npc in | for i, npc in ipairs(npcData) do | ||
table.insert(npcList, Icons.Icon({npc.name, type='thieving'})) | table.insert(npcList, Icons.Icon({npc.name, type='thieving'})) | ||
end | end |