Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
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 resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en')
                 if resource == 'gold coins' then
                table.insert(costData, {label = resourceIcon, value = amount})
                    labelText = 'Build Cost'
                 if label == 'gold coins' then
                table.insert(costData, {label = 'Build Cost', value = buildingData.costs['gold coins']})
                 end
                 end
                local resourceIcon = i.icon(resource, nil, nil, labelText, 'en')
                table.insert(costData, {label = resourceIcon, value = amount})
             end
             end


606

edits

Navigation menu