Difference between revisions of "Module:OTable"

Jump to navigation Jump to search
m
no edit summary
m
m
Line 48: Line 48:
local c = buildingList[v]
local c = buildingList[v]
local buildingType = c.type
local buildingType = c.type
local influence = ''
local influence = ''
local influence = ''
if c.influence then
if c.influence then
Line 56: Line 55:
end
end
local lastKey = influenceKeys[#influenceKeys]
local lastKey = influenceKeys[#influenceKeys]
local itemCount = #influenceKeys


for k, v in pairs(c.influence) do
for k, v in pairs(c.influence) do
if k ~= lastKey then
influence = influence .. i.icon(k, v, nil, k, 'en')
influence = influence .. i.icon(k, v, nil, k, 'en') .. '<br />'
if k ~= lastKey and itemCount > 1 then
influence = influence .. '<br />'
end
end
end
if #c.influence > 1 and string.sub(influence, -6) == '<br />' then
influence = string.sub(influence, 1, #influence - 6)
end
end
end
end
606

edits

Navigation menu