模块:Vertical Rail Route Map Stations
来自RIA | Wiki
更多操作
此模块的文档可以在模块:Vertical Rail Route Map Stations/doc创建
local p = {}
function p.render(frame)
local args = frame:getParent().args
local lineColor = args['line-color'] or '#7f7f7f'
local length = args.length or '40'
local output = {}
local i = 1
while true do
local typeParam = args['type' .. i]
if not typeParam or typeParam == '' then
break
end
local transParam = args['trans' .. i] or ''
local zhName = args['station-zh-name' .. i] or ''
local enName = args['station-en-name' .. i] or ''
table.insert(output, '{{!}} ' .. transParam .. ' \n')
table.insert(output, '{{!}} {{VRMN|' .. typeParam .. '|' .. lineColor .. '|' .. transParam .. '|length=' .. length .. '}} \n')
table.insert(output, '{{!}} <span style="font-size:1em;">' .. zhName .. '</span><br><span style="font-size:0.66em;">' .. enName .. '</span>' .. ' \n')
table.insert(output, '{{!}}-' .. '\n')
i = i + 1
end
return frame:preprocess(table.concat(output, '\n'))
end
return p