606
edits
m |
m |
||
| Line 127: | Line 127: | ||
local productionData = {} | local productionData = {} | ||
if buildingData.employees then | if buildingData.employees then | ||
local | local employeeData = {} | ||
for type, value in pairs(buildingData.employees) do | for type, value in pairs(buildingData.employees) do | ||
table.insert( | table.insert(employeeData, {label = com.firstUpper({type}), value = value}) | ||
end | |||
if #employeeData > 0 then | |||
addSection(infobox, employeeData, 'Employees', 0) | |||
end | end | ||
end | end | ||
| Line 159: | Line 163: | ||
table.insert(productionData, {label = 'Produces', value = output}) | table.insert(productionData, {label = 'Produces', value = output}) | ||
end | end | ||
end | |||
if #productionData > 0 then | |||
addSection(infobox, productionData, 'Production') | addSection(infobox, productionData, 'Production') | ||
end | end | ||
--/ | --/ | ||
edits