Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
Line 214: Line 214:
         if buildingData.construction then
         if buildingData.construction then
             local constructionData = {}
             local constructionData = {}
            local pair = {}
             for resource, amount in pairs(buildingData.construction) do
             for resource, amount in pairs(buildingData.construction) do
                 local resourceIcon = i.icon(resource, amount, nil, com.firstUpper({resource}), 'en')
                 local resourceIcon = i.icon(resource, amount, nil, com.firstUpper({resource}), 'en')
 
                 table.insert(constructionData, { label = resourceIcon, value = amount })
                 table.insert(pair, { label = resourceIcon, value = amount })
                if #pair == 2 then
                    table.insert(constructionData, pair)
                    pair = {}
                end
            end
 
            if #pair == 1 then
                table.insert(constructionData, pair)
             end
             end


606

edits

Navigation menu