Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
Tag: Undo
Line 241: Line 241:
             local costData = {}
             local costData = {}
             for resource, amount in pairs(buildingData.costs) do
             for resource, amount in pairs(buildingData.costs) do
                local labelText = com.firstUpper({resource})
            local labelText = com.firstUpper({resource})
                if resource == 'gold coins' then
            if buildingData.costs['gold coins'] then
                    labelText = com.firstUpper({'build cost'})
            labelText = com.firstUpper({'build cost'})
                end
            end
                 local resourceIcon = i.icon(resource, nil, nil, labelText, 'en')
                 local resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en')
                 table.insert(costData, {label = resourceIcon, value = amount})
                 table.insert(costData, {label = resourceIcon, value = amount})
            end
         end
         end
Line 258: Line 257:
             if #costData > 0 then
             if #costData > 0 then
                 addSection(infobox, costData, 'Economic Impact', 2)
                 addSection(infobox, costData, 'Economic Impact', 2)
            end
         end
         end
         --/
         --/
606

edits

Navigation menu