Différences entre les versions de « Module:OInfobox-Building »

Aller à la navigation Aller à la recherche
m
aucun résumé de modification
m
m
Ligne 241 : Ligne 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 buildingData.costs['gold coins'] then
                if resource == 'gold coins' then
            labelText = com.firstUpper({'build cost'})
                    labelText = com.firstUpper({'build cost'})
            end
                end
                 local resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en')
                 local resourceIcon = i.icon(resource, nil, nil, labelText, 'en')
                 table.insert(costData, {label = resourceIcon, value = amount})
                 table.insert(costData, {label = resourceIcon, value = amount})
            end
         end
         end
Ligne 257 : Ligne 258 :
             if #costData > 0 then
             if #costData > 0 then
                 addSection(infobox, costData, 'Economic Impact', 2)
                 addSection(infobox, costData, 'Economic Impact', 2)
           
            if #costData == 0 then
                return box
             end
             end
         end
         end
606

modifications

Menu de navigation