More actions
SerpentofSet (talk | contribs) No edit summary |
SerpentofSet (talk | contribs) No edit summary |
||
Line 34: | Line 34: | ||
colorBySlot["Tech"] = "#DE9CFF" | colorBySlot["Tech"] = "#DE9CFF" | ||
--{{#invoke:ItemsByStat|tablefy|stat|statName|suffix}} | |||
p.tablefy = function(frame) | p.tablefy = function(frame) | ||
local stat = frame.args[1] | local stat = frame.args[1] | ||
local statName = frame.args[2] | |||
local suffix = frame.args[3] | |||
local tableData = selectByStat(stat) | local tableData = selectByStat(stat) | ||
local outString = '{| class="wikitable sortable"\n|-\n!Item!!Cost!! | local outString = '{| class="wikitable sortable"\n|-\n!Item!!Cost!!'..statName..'\n' | ||
for i=1,#tableData do | for i=1,#tableData do | ||
outString = outString.. | outString = outString.. | ||
Line 43: | Line 47: | ||
frame:expandTemplate{title="Item", args={tableData[i][1]}}.."||".. | frame:expandTemplate{title="Item", args={tableData[i][1]}}.."||".. | ||
frame:expandTemplate{title="Souls", args={tableData[i][3]}}.."||".. | frame:expandTemplate{title="Souls", args={tableData[i][3]}}.."||".. | ||
tableData[i][5].."\n" | "+"..tableData[i][5]..suffix.."\n" | ||
end | end | ||
return outString.."|}" | return outString.."|}" |