Jump to content

Module:Adjacent stations/Taoyuan Metro

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jc86035 (talk | contribs) at 16:35, 23 April 2018 (remove unnecessary backslashes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local function link(s1, s2, s3)
	if s3 then
		return table.concat({'[[', s1, '|', s3, ']]'})
	elseif s2 then
		return table.concat({'[[', s1, s2, '|', s1, ']]'})
	elseif s1 then
		return table.concat({'[[', s1, ']]'})
	end
end

return {
	['system title'] = '[[File:Taoyuan Metro logo seal only.svg|18px]] ' .. link('Taoyuan Metro'),
	['Airport'] = {
		['line title'] = link('Taoyuan Airport MRT'),
		['colour'] = '8e47ad',
		['station link'] = function(s)
			local exception = {
				['Taipei Main'] = link('Taipei Main station', ' (Taoyuan Metro)'),
				['Taoyuan HSR'] = link('Taoyuan HSR station'),
				['Zhongli railway station'] = link('Zhongli railway station'),
				['Airport Terminal 2 or Huanbei'] = table.concat({link('Airport Terminal 2', ' MRT station'), ' or ', link('Huanbei', ' MRT station')})
			}
			return exception[s] or link(s, ' MRT station')
		end,
		['left terminus'] = 'Taipei Main',
		['right terminus'] = {
			'Airport Terminal 2 or Huanbei',
			['Huanbei'] = 'Huanbei'
		}
	}
}