Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
Line 213: Line 213:
         ---SECTION-CONSTRUCTION
         ---SECTION-CONSTRUCTION
         if buildingData.construction then
         if buildingData.construction then
             local constructionText = ''
             local constructionData = {}
             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')
                 constructionText = constructionText .. resourceIcon .. '<br />'
                 table.insert(constructionData, { label = resourceIcon })
             end
             end


             if string.len(constructionText) > 0 and string.sub(constructionText, -6) == '<br />' then
             if #constructionData > 0 then
                 constructionText = string.sub(constructionText, 1, #constructionText - 6)
                 addSection(infobox, constructionData, 'Construction Requirements') -- Call addSection without the column count
             end
             end
            addSection(infobox, {{ label = constructionText }}, 'Construction Requirements')
         end
         end
         --/
         --/
606

edits

Navigation menu