Différences entre les versions de « Module:OTable »

Aller à la navigation Aller à la recherche
m
aucun résumé de modification
m
m
Ligne 48 : Ligne 48 :
local c = buildingList[v]
local c = buildingList[v]
local buildingType = c.type
local buildingType = c.type
local influence = ''
local influence = ''
if c.influence then
          if c.influence then
          local influenceKeys = {}
          local influenceKeys = {}
          for k in pairs(c.influence) do
          local tierValue = c.influence.tier
          if k ~= 'perEach splendour' then
       
            table.insert(influenceKeys, k)
          for k in pairs(c.influence) do
            if k ~= 'perEach splendour' and k ~= 'tier' then -- Exclude 'perEach splendour' and 'tier'
            table.insert(influenceKeys, k)
            end
           end
           end
          end
          local lastKey = influenceKeys[#influenceKeys]
          local lastKey = influenceKeys[#influenceKeys]
          local itemCount = #influenceKeys
          local itemCount = #influenceKeys
       
 
          for k, v in pairs(c.influence) do
          for k, v in pairs(c.influence) do
            if k ~= 'perEach splendour' and k ~= 'tier' then
          if k ~= 'perEach splendour' then
            influence = influence .. i.icon(k, v, nil, k, 'en')
            influence = influence .. i.icon(k, v, nil, k, 'en')
            if k ~= lastKey and itemCount > 1 then
            if k ~= lastKey and itemCount > 1 then
              influence = influence .. '<br />'
            influence = influence .. '<br />'
            end
             end
             end
          end
       
          -- Append the tier in brackets if it exists
          if tierValue then
            influence = influence .. ' (' .. tierValue .. ')'
           end
           end
           end
           end
        end
          local unlocks = influence
        local unlocks = influence
local production = ''
local production = ''
606

modifications

Menu de navigation