285
edits
Falterfire (talk | contribs) (Initial pass at getSmithingTable) |
ByteFoolish (talk | contribs) (getSkillName) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 19: | Line 19: | ||
if skName == skillName then | if skName == skillName then | ||
return ID | return ID | ||
end | |||
end | |||
return nil | |||
end | |||
function p.getSkillName(skillID) | |||
for skName, ID in Shared.skpairs(Constants.skill) do | |||
if ID == skillID then | |||
return skName | |||
end | end | ||
end | end | ||
Line 227: | Line 236: | ||
local result = '{|class="wikitable sortable stickyHeader"' | local result = '{|class="wikitable sortable stickyHeader"' | ||
result = result..'\r\n|-class="headerRow-0"' | result = result..'\r\n|-class="headerRow-0"' | ||
result = result..'\r\n!Item!!Name!!'..Icons.Icon({'Smithing', 'skill', notext=true})..'!!XP!!Value!!Ingredients' | result = result..'\r\n!Item!!Name!!'..Icons.Icon({'Smithing', type='skill', notext=true})..' Level!!XP!!Value!!Ingredients' | ||
table.sort(smithList, function(a, b) | table.sort(smithList, function(a, b) | ||
Line 242: | Line 251: | ||
result = result..item.smithingQty..'x ' | result = result..item.smithingQty..'x ' | ||
end | end | ||
result = result..' | result = result..'[['..item.name..']]' | ||
result = result..'||data-sort-value="'..item.smithingLevel..'"|'..Icons._SkillReq('Smithing', item.smithingLevel) | result = result..'||data-sort-value="'..item.smithingLevel..'"|'..Icons._SkillReq('Smithing', item.smithingLevel) | ||
result = result..'||'..item.smithingXP | result = result..'||'..item.smithingXP |
edits