Module:Magic: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 178: Line 178:


local function formatRuneList(runes)
local function formatRuneList(runes)
local runeList = {}
local html = mw.html.create()
for i, req in ipairs(runes) do
for i, req in ipairs(runes) do
local rune = Items.getItemByID(req.id)
local rune = Items.getItemByID(req.id)
if rune ~= nil then
if rune ~= nil then
table.insert(runeList, Icons.Icon({rune.name, type='item', notext=true, qty=req.quantity}))
html:wikitext(Icons.Icon({rune.name, type='item', notext=true}))
end
end
end
end
return table.concat(runeList, ', ')  
return tostring(html)
end
end


2,875

edits