Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
Re-reverting to new version
m
Tag: Manual revert
m (Re-reverting to new version)
Line 125: Line 125:
     if buildingData then
     if buildingData then
--SECTION-PRODUCTION
--SECTION-PRODUCTION
local productionData = {}
        local productionData = {}
if buildingData.employees then
        if buildingData.employees then
            local employeeData = {}
             for type, value in pairs(buildingData.employees) do
             for type, value in pairs(buildingData.employees) do
                 table.insert(employeeData, {label = com.firstUpper({type}), value = value})
                 table.insert(productionData, {label = com.firstUpper({type}), value = value})
             end
             end
        end


             if #employeeData > 0 then
        if buildingData.workers then
                 addSection(infobox, employeeData, 'Employees', 2)
            local workers = buildingData.workers
             if buildingData.rank then
                 workers = workers .. ' ' .. buildingData.rank
             end
             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) -- The 2 means 2 columns, it can add more or less
         end
         end
         --/
         --/
606

edits

Navigation menu