Module:Sandbox/Szqecs/L-rail explained

local yesno = require("Module:Yesno")local _style = local style =

local function subFormat(s) return '

' .. s .. '

'end

local p =

function p.top return table.concat('end

function p.main(frame) local _args = frame:getParent.args local args = local _index = for k, v in pairs(_args) do local a = string.match(k, '(%a+)%d+') if not a then a = k end local b = tonumber(string.match(k, '%a+(%d+)')) if not b then b = 1 end if a

'system' then args.system[b] = v _index[b] = true elseif a

'line' then args.line[b] = v _index[b] = true elseif a

'left' then args.left[b] = v _index[b] = true elseif a

'right' then args.right[b] = v _index[b] = true elseif a

'typeL' then args.TypeL[b] = v elseif a

'typeR' then args.TypeR[b] = v elseif a

'note' then args.note[b] = v elseif a

'onewayL' then args.onewayL[b] = yesno(v) elseif a

'onewayR' then args.onewayR[b] = yesno(v) elseif a

'circular' then args.circular[b] = yesno(v) elseif a

'circularL' then args.circularL[b] = yesno(v) elseif a

'circularR' then args.circularR[b] = yesno(v) elseif a

'throughL' then args.throughL = yesno(v) elseif a

'throughR' then args.throughR = yesno(v) end end local index = for k, v in pairs(_index) do table.insert(index, k) end table.sort(index) local data = for i, v in ipairs(index) do if args.system[v] then data[v] = require('Module:Sandbox/Szqecs/L-rail/' .. args.system[v]) else data[v] = data[index[i-1]] end end local rows = return rows[_args.rows] or rows['all']end

return p