1,124
edits
Line 102: | Line 102: | ||
result:node(infoboxImage(args['image'], args['caption'])) | result:node(infoboxImage(args['image'], args['caption'])) | ||
end | end | ||
--Prerequisites group | |||
local prereq = {} | |||
table.insert(prereq, infoboxData(buildingData.building, 'Building')) | |||
table.insert(prereq, infoboxData(buildingData.population, 'Population')) | |||
for k,v in pairs(buildingData.influence) do | |||
table.insert(prereq, infoboxData(v, k .. 'Influence')) | |||
end | |||
for k, v in pairs(buildingData.splendor) do | |||
table.insert(prereq, infoboxData(v, k .. 'Splendor')) | |||
end | |||
if #prereq > 0 then | |||
prereqSet = infoboxGroup(prereq, nil, 'Prerequisites') | |||
for k, v in prereqSet do | |||
result:node(v) | |||
end | |||
end | |||
--Production group | --Production group | ||
local workers = buildingData.workers | local workers = buildingData.workers |