Difference between revisions of "Module:OInfobox-Building"

Jump to navigation Jump to search
m
no edit summary
m
m
Line 194: Line 194:
         local first = true
         local first = true
           for resource, amount in pairs(buildingData.influence) do
           for resource, amount in pairs(buildingData.influence) do
           if resource ~= 'tier' and resource ~= 'perEach splendour' then -- Exclude 'tier' and 'perEach splendour'
           if resource ~= 'tier' and resource ~= 'bsplendour' then -- Exclude 'tier' and 'bsplendour'
             local displayAmount = amount
             local displayAmount = amount
             if first and buildingData.influence.tier then
             if first and buildingData.influence.tier then
Line 234: Line 234:
         local costData = {}
         local costData = {}


if buildingData.costs or buildingData.influence['perEach splendour'] then
if buildingData.costs or buildingData.influence['bsplendour'] then
             local costData = {}
             local costData = {}
             for resource, amount in pairs(buildingData.costs) do
             for resource, amount in pairs(buildingData.costs) do
Line 241: Line 241:
             end
             end
-- Add 'perEach splendour' to running costs if it exists
-- Add 'bsplendour' to running costs if it exists
if buildingData.influence['perEach splendour'] then
if buildingData.influence['bsplendour'] then
             local resourceIcon = i.icon('Building Splendour', nil, nil, 'splendor', 'en')
             local resourceIcon = i.icon('Building Splendour', nil, nil, 'splendor', 'en')
         table.insert(costData, {label = resourceIcon, value = buildingData.influence['perEach splendour']})
         table.insert(costData, {label = resourceIcon, value = buildingData.influence['bsplendour']})
             end
             end
606

edits

Navigation menu