2,875
edits
No edit summary |
m (Explicitely cast columns to a number) |
||
Line 559: | Line 559: | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local dlc = args[1] or args.DLC or args.dlc or nil | local dlc = args[1] or args.DLC or args.dlc or nil | ||
local columns = args[2] or args.Columns or args.columns or 17 | local columns = tonumber(args[2] or args.Columns or args.columns) or 17 | ||
local html = mw.html.create('table') | local html = mw.html.create('table') | ||
:addClass('wikitable lighttable individual') | :addClass('wikitable lighttable individual') | ||
Line 568: | Line 568: | ||
for _, v in pairs(GameData.rawData.items) do | for _, v in pairs(GameData.rawData.items) do | ||
if dlcFunc(v, dlc) == true then | if dlcFunc(v, dlc) == true then | ||
if i | if i >= columns then | ||
curRow = html:tag('tr') | curRow = html:tag('tr') | ||
i = 0 | i = 0 |
edits