1,124
edits
Line 59: | Line 59: | ||
end | end | ||
local production = | local production = '' | ||
if c.requirements then | if c.requirements then | ||
production = '\'\'\'Requires:\'\'\'<br />' | |||
for k, v in pairs(c.requirements) do | for k, v in pairs(c.requirements) do | ||
production = production .. i.icon(v, nil, nil, v, 'en') .. '<br />' | |||
end | end | ||
end | end | ||
if c.products then | |||
production = production ..'\'\'\'Produces:\'\'\'<br />' | |||
for k, v in pairs(c.production) do | |||
production = production .. i.icon(v, nil, nil, v, 'en') .. '<br />' | |||
end | |||
end | |||
if not production == '' then | |||
local l = string.len(production) | |||
production = string.sub(production, 1, l - 6) | |||
end | |||
local newRow = mw.html.create('tr') | local newRow = mw.html.create('tr') | ||
Line 75: | Line 86: | ||
:wikitext(preReq) | :wikitext(preReq) | ||
:done() | :done() | ||
:tag('td') | |||
:wikitext(production) | |||
:done() | |||
buildingTable:node(newRow) | buildingTable:node(newRow) | ||
end | end |