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

Aller à la navigation Aller à la recherche
124 octets supprimés ,  19 avril 2025 à 07:46
m
aucun résumé de modification
m
m
Ligne 213 : Ligne 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

modifications

Menu de navigation