-- to do: add rest of S-line parameters
local _index = {}
local functionparameters mapArg(key,= value){
local parameters['strings'] = {
['stringssystem'] = {'system',
['systemline'] = 'systemline',
['lineleft'] = 'lineleft',
['leftright'] = 'leftright',
['right'] = 'right'
['optional strings'] = {
['optional stringsnote'] = {'note',
['notetype'] = 'noteType',
['type-left'] = 'TypeTypeL',
['type-leftright'] = 'TypeLTypeR',
-- ['through'] = 'through', -- The way this would work is that it would replace either "Terminus" cell, rather than just one of them in particular. ▼
['type-right'] = 'TypeR',
-- ['through- rightleft'] = ' throughRthroughL' ,▼
▲-- ['through'] = 'through', -- The way this would work is that it would replace either "Terminus" cell, rather than just one of them in particular.
-- ['through-leftright'] = 'throughLthroughR',
-- ['through-rightbranch'] = 'throughRbranch',
-- ['branchtransfer'] = 'branchtransfer',
-- ['transfer'] = 'transfer'
['optional boolean'] = {
['optional booleanoneway-left'] = {'onewayL',
['oneway-leftright'] = 'onewayLonewayR',
-- ['onewayround-rightleft'] = 'onewayRroundL',
-- ['round-leftright'] = 'roundLroundR',
-- ['round-rightcircular'] = 'roundRcircular',
['circular-left'] = 'circularcircularL',
['circular-leftright'] = 'circularLcircularR',
['circularthrough-rightleft'] = 'circularRthroughL',
['through-leftright'] = 'throughLthroughR',
▲ ['through-right'] = 'throughR'
}
}
local a = string.match(key, '(%a+)%d+') or key ▼
for k, v in pairs(_args) do ▼
local b = tonumber(string.match(key, '%a+(%d+)')) or 1 ▼
▲ local a = string.match( keyk, '(%a+)%d+') or keyk
▲ local b = tonumber(string.match( keyk, '%a+(%d+)')) or 1
if parameters['strings'][a] then
args[parameters['strings'][a]][b] = valuev
_index[b] = true
elseif args[parameters['optional strings'][a]] then
args[parameters['optional strings'][a]][b] = valuev
elseif args[parameters['optional boolean'][a]] then
args[parameters['optional boolean'][a]][b] = yesno(valuev)
end
end
▲ for k, v in pairs(_args) do
mapArg(k, v)
end
local index = {}
local function buildIndex(address)
table.insert(index, address)
end
for k, v in pairs(_index) do
buildIndextable.insert(index, k)
end
table.sort(index)
local data = {}
for i, v in ipairs(index) do ▼
local function getData(count, address)
if args.system[addressv] then
-- data[addressv] = require('Module:L-rail/' .. args.system[addressv])
data[addressv] = require('Module:L-rail/' .. args.system[addressv] .. '/sandbox')
else
data[addressv] = data[index[counti-1]]
end
end
▲ for i, v in ipairs(index) do
getData(i, v)
end
local rows = { -- Included for mixed used with S-line.
|