Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
Line 127: Line 127:
local productionData = {}
local productionData = {}
if buildingData.employees then
if buildingData.employees then
             local productionData = {}
             local employeeData = {}
             for type, value in pairs(buildingData.employees) do
             for type, value in pairs(buildingData.employees) do
                 table.insert(productionData, {label = com.firstUpper({type}), value = value})
                 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
       
        if #productionData > 0 then
             addSection(infobox, productionData, 'Production')
             addSection(infobox, productionData, 'Production')
    end
         end
         end
         --/
         --/
606

edits

Navigation menu