1,124
edits
(Created page with "local p = {} local com = require( "Module:Common" ) function bundleRow() end function bundleGroup(bundle) bundleRows = mw.text.split(bundle, '\n') for k, v in ipairs(bu...") |
|||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local com = require( "Module:Common" ) | local com = require( "Module:Common" ) | ||
local icon = require( "Module:Icon" ) | |||
function bundleRow(currentRow) | |||
function bundleRow() | currentRow = mw.text.split(currentRow, ';') | ||
objects = table.getn(currentRow) | |||
result = mw.html.create('div') | |||
result:addClass('bundle-row bundle-col-' .. objects) | |||
for k, v in ipairs(currentRow) do | |||
vs = mw.text.split(v, '-') | |||
result:tag('span') | |||
:wikitext(icon._requirements(vs[1], vs[2], nil, 'no')) | |||
:done() | |||
if k ~= objects then | |||
result:tag('span') | |||
:addClass('bundle-joiner') | |||
:wikitext('+') | |||
end | |||
end | |||
return result | |||
end | end | ||
function bundleGroup(bundle) | function bundleGroup(bundle) | ||
bundleRows = mw.text.split(bundle, '\n') | bundleRows = mw.text.split(bundle, '\n') | ||
rowCount = table.getn(bundleRows) | |||
result = mw.html.create('div') | |||
result:addClass('bundle-frame') | |||
for k, v in ipairs(bundleRows) do | for k, v in ipairs(bundleRows) do | ||