17,105
edits
(Update for v1.0.3) |
(getItemDataExport: Implement) |
||
Line 540: | Line 540: | ||
table.insert(resultPart, '\r\n|}') | table.insert(resultPart, '\r\n|}') | ||
return table.concat(resultPart) | return table.concat(resultPart) | ||
end | |||
function p.getItemDataExport(frame) | |||
local resultTable = mw.html.create('table') | |||
resultTable:addClass('wikitable') | |||
resultTable:tag('tr'):addClass('headerRow-0') | |||
:tag('th'):wikitext('ItemID'):done() | |||
:tag('th'):wikitext('ItemName'):done() | |||
:tag('th'):wikitext('GPValue'):done() | |||
for i, item in ipairs(ItemData.Items) do | |||
resultTable:tag('tr') | |||
:tag('td'):wikitext(item.id):done() | |||
:tag('td'):wikitext(item.name):done() | |||
:tag('td'):wikitext(item.sellsFor):done() | |||
end | |||
return tostring(resultTable) | |||
end | end | ||
return p | return p |