Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
Line 240: Line 240:
if buildingData.costs or buildingData.influence['bsplendour'] then
if buildingData.costs or buildingData.influence['bsplendour'] then
             local costData = {}
             local costData = {}
             local labelText = com.firstUpper({resource})
             for resource, amount in pairs(buildingData.costs) do
            if resource == 'gold coins' then
                local resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en')
        labelText = com.firstUpper({'build cost'})
                table.insert(costData, {label = resourceIcon, value = amount})
    end
            end
            local resourceIcon = i.icon(resource, nil, nil, labelText, 'en') -- Use the correctly set labelText
    table.insert(costData, {label = resourceIcon, value = amount})
           
        end
-- Add 'bsplendour' to running costs if it exists
-- Add 'bsplendour' to running costs if it exists
Line 258: Line 254:
                 addSection(infobox, costData, 'Economic Impact', 2)
                 addSection(infobox, costData, 'Economic Impact', 2)
             end
             end
          
         end
         --/
         --/
     end
     end
606

edits

Navigation menu