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 resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en')
                 local labelText = com.firstUpper({resource})
                 table.insert(costData, {label = resourceIcon, value = amount})
                 local finalLabel = labelText
                 if resourceIcon == 'gold coins' then
                 if resource == 'gold coins' then
                table.insert(costData, {label = 'Build Cost', value = amount})
                    finalLabel = 'Build Cost' -- Rename only in this section
                 end
                 end
                local resourceIcon = i.icon(resource, nil, nil, labelText, 'en') -- Keep original for icon
                table.insert(costData, {label = finalLabel, value = amount}) -- Use finalLabel here
             end
             end
        end


-- Add 'bsplendour' to running costs if it exists
-- Add 'bsplendour' to running costs if it exists
Ligne 259 : Ligne 262 :
         end
         end
         --/
         --/
    end
    --/
     return infobox
     return infobox
end
end


return p
return p
606

modifications

Menu de navigation