Module:RoleInfobox: Difference between revisions
Content deleted Content added
m Added newline |
m Updated MainImage width |
||
| (7 intermediate revisions by the same user not shown) | |||
Line 1:
local Infobox = {}
local HF = require('Module:HF')
function Infobox.trimTable ( trimTable )
output = {}
for i, value in ipairs(trimTable) do
output[i] = HF.trim(value)
end
return output
end
function Infobox.MainImage( field, vars )
local output = field.Value
if not HF.isempty(output) then
output = '[[File:' .. output .. '|
return output
end
Line 14 ⟶ 22:
if not HF.isempty(field.Value) then
local ships = HF.explode(';', field.Value)
ships = Infobox.trimTable(ships)
table.sort(ships)
for i, ship in ipairs(ships) do
output = output
end
if string.sub(output, -
output = string.sub( output, 1, -7 )
end
Line 31 ⟶ 42:
if not HF.isempty(field.Value) then
local upgrades = HF.explode(';', field.Value)
upgrades = Infobox.trimTable(upgrades)
table.sort(upgrades)
for i, upgrade in ipairs(upgrades) do
output = output
end
if string.sub(output, -
output = string.sub( output, 1, -7 )
end
| |||