1,124
edits
Line 33: | Line 33: | ||
for k, v in pairs (dataTable) do | for k, v in pairs (dataTable) do | ||
local c = buildingList[v] | |||
local getPreReq = {} | local getPreReq = {} | ||
table.insert(getPreReq, | table.insert(getPreReq, c.building) | ||
table.insert(getPreReq, | table.insert(getPreReq, c.population) | ||
if | if c.splendor then | ||
for k, v in pairs(v.splendor) do | for k, v in pairs(v.splendor) do | ||
table.insert(getPreReq, i.icon(k .. ' splendor', v, nil, nil, 'en')) | table.insert(getPreReq, i.icon(k .. ' splendor', v, nil, nil, 'en')) | ||
Line 42: | Line 43: | ||
end | end | ||
if | if c.influence then | ||
for k, v in pairs(v.influence) do | for k, v in pairs(v.influence) do | ||
table.insert(getPreReq, i.icon(k .. ' influence', v, nil, nil, 'en')) | table.insert(getPreReq, i.icon(k .. ' influence', v, nil, nil, 'en')) | ||
Line 57: | Line 58: | ||
local production = {} | local production = {} | ||
if | if c.requirements then | ||
local reqs = '' | local reqs = '' | ||
for k, v in pairs( | for k, v in pairs(c.requirements) do | ||
end | end | ||
Line 67: | Line 68: | ||
local newRow = mw.html.create('tr') | local newRow = mw.html.create('tr') | ||
newRow:tag('th') | newRow:tag('th') | ||
:wikitext( | :wikitext(v) | ||
:done() | :done() | ||
:tag('td') | :tag('td') |