Content deleted Content added
No edit summary |
Temporary testing. Reverting later. |
||
Line 88:
local t = {}
function mapArg(i, v)
for i, v in ipairs(index) do▼
if args.system[v] then
table.insert(t, table.concat({'\n|-',
Line 104:
local _line = data[v][args.line[v]]
lineTitle[v] = _line['line title']
colour[v] = _line.colour
note[v] = args.note[v] or ''
Line 170:
table.insert(t, table.concat({'\n|', style['body rightcell'], right[v], rightTerminus[v]}))
end
end
▲ for i, v in ipairs(index) do
mapArg(i, v)
end
Line 216 ⟶ 219:
-- to do: add rest of S-line parameters
local _index = {}
local
['
['
['
['
['right'] = 'right'
},
['
['
['type
['type-
['type-right'] = 'TypeR',
-- ['through'] = 'through', -- The way this would work is that it would replace either "Terminus" cell, rather than just one of them in particular.
-- ['through-left'] = 'throughL',▼
-- ['through-
-- ['
-- ['
-- ['transfer'] = 'transfer'
},
['
['oneway-
-- ['round-
-- ['
['circular
['circular-
['
['through-
}
}
}▼
for k, v in pairs(_args) do▼
▲ local a = string.match(k, '(%a+)%d+') or k
▲ local b = tonumber(string.match(k, '%a+(%d+)')) or 1
if parameters['strings'][a] then
args[parameters['strings'][a]][b] =
_index[b] = true
elseif args[parameters['optional strings'][a]] then
args[parameters['optional strings'][a]][b] =
elseif args[parameters['optional boolean'][a]] then
args[parameters['optional boolean'][a]][b] = yesno(
end
end
▲ for k, v in pairs(_args) do
mapArg(k, v)
end
local index = {}
local function buildIndex(k)
for k, v in pairs(_index) do▼
table.insert(index, k)
end
▲ for k, v in pairs(_index) do
buildIndex(k)
end
table.sort(index)
local data = {}
local function getData(i, v)
for i, v in ipairs(index) do▼
if args.system[v] then
-- data[v] = require('Module:L-rail/' .. args.system[v])
Line 275 ⟶ 284:
end
end
▲ for i, v in ipairs(index) do
getData(i, v)
end
local rows = { -- Included for mixed used with S-line.
|