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

Aller à la navigation Aller à la recherche
m
aucun résumé de modification
m
m
Ligne 236 : Ligne 236 :
         --/
         --/
         --SECTION-RUNNING-COSTS
         --SECTION-RUNNING-COSTS
    local costData = {}
local costData = {}
    local goldCoinsFound = false
local goldCoinsFound = false


     if buildingData.costs or buildingData.influence['bsplendour'] or buildingData.costs['maintenance'] then
     if buildingData.costs or buildingData.influence['bsplendour'] 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
Ligne 245 : Ligne 245 :
                 table.insert(costData, {label = '[[File:Gold Coins.png|frameless|20x20px]] ' .. '[[Gold Coins|Build Cost]]', value = amount})
                 table.insert(costData, {label = '[[File:Gold Coins.png|frameless|20x20px]] ' .. '[[Gold Coins|Build Cost]]', value = amount})
                 goldCoinsFound = true
                 goldCoinsFound = true
             else
             elseif resource ~= 'maintenance' then
                 local resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en')
                 local resourceIcon = i.icon(resource, nil, nil, com.firstUpper({resource}), 'en')
                 table.insert(costData, {label = resourceIcon, value = amount})
                 table.insert(costData, {label = resourceIcon, value = amount})
             end
             end
             if resource ~= 'maintenance' then
             if resource ~= 'maintenance' then
            local second = true
             local displayAmount = amount
             local displayAmount = amount
             if second and buildingData.costs.maintenance then
             if second and buildingData.costs.maintenance then
Ligne 259 : Ligne 258 :
         end
         end
          
          
         if buildingData.costs['maintenance'] then
         if buildingData.costs and 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 = resourceIcon, value = '[[File:Gold Coins.png|frameless|20x20px]]' .. buildingData.costs['maintenance'] .. ' monthly'})
             table.insert(costData, {label = resourceIcon, value = '[[File:Gold Coins.png|frameless|20x20px]]' .. buildingData.costs['maintenance'] .. ' monthly'})
606

modifications

Menu de navigation