606
edits
m |
m |
||
| Line 125: | Line 125: | ||
if buildingData then | if buildingData then | ||
--SECTION-PRODUCTION | --SECTION-PRODUCTION | ||
local productionData = {} | |||
if buildingData.employees then | |||
for type, value in pairs(buildingData.employees) do | for type, value in pairs(buildingData.employees) do | ||
table.insert( | table.insert(productionData, {label = com.firstUpper({type}), value = value}) | ||
end | end | ||
end | |||
if | if buildingData.workers then | ||
local workers = buildingData.workers | |||
if buildingData.rank then | |||
workers = workers .. ' ' .. buildingData.rank | |||
end | end | ||
table.insert(productionData, {label = 'Workers', value = workers.firstUpper}) | |||
end | |||
-- | |||
if buildingData.input then | if buildingData.input then | ||
local input = '' | local input = '' | ||
| Line 166: | Line 169: | ||
if #productionData > 0 then | if #productionData > 0 then | ||
addSection(infobox, productionData, 'Production') | addSection(infobox, productionData, 'Production', 2) -- Apply 2 columns to the whole section | ||
end | end | ||
--/ | --/ | ||
edits