606
edits
m |
m |
||
| Line 241: | Line 241: | ||
if buildingData.costs or buildingData.influence['bsplendour'] or buildingData.costs['maintenance'] then | if buildingData.costs or buildingData.influence['bsplendour'] or buildingData.costs['maintenance'] then | ||
for resource, amount in pairs(buildingData.costs) do | for resource, amount in pairs(buildingData.costs) do | ||
if resource == 'gold coins' then | if resource == 'gold coins' then | ||
local resourceIcon = i.icon('gold coins', nil, nil, 'gold coins', 'en') | local resourceIcon = i.icon('gold coins', nil, nil, 'gold coins', 'en') | ||
| Line 256: | Line 249: | ||
table.insert(costData, {label = resourceIcon, value = amount}) | table.insert(costData, {label = resourceIcon, value = amount}) | ||
end | end | ||
if resource ~= 'maintenance' then | |||
local displayAmount = amount | |||
if first and buildingData.costs.maintenance then | |||
displayAmount = displayAmount .. ' ' .. buildingData.costs.maintenance | |||
first = false | |||
end | |||
end | |||
end | end | ||
if buildingData.costs['maintenance'] then | if buildingData.costs['maintenance'] then | ||
local resourceIcon = i.icon('maintenance', nil, nil, 'maintenance', 'en') | local resourceIcon = i.icon('maintenance', nil, nil, 'maintenance', 'en') | ||
table.insert(costData, {label = '[[File:Gold Coins.png|frameless|20x20px]]' .. | table.insert(costData, {label = resourceIcon, value = '[[File:Gold Coins.png|frameless|20x20px]]' .. buildingData.costs['maintenance'] .. ' monthly'}) | ||
end | end | ||
edits