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 Szqecs (talk | contribs) at 04:30, 22 April 2018 (Created page with 'local function link(s1, s2) if s2 then return table.concat({'\[\[', s1, '|', s2, '\]\]'}) elseif s1 then return table.concat({'\[\[', s1, '\]\]'}) end end...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local function link(s1, s2)
	if s2 then
		return table.concat({'\[\[', s1, '|', s2, '\]\]'})
	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', 'Airport MRT')
		, ['colour'] = 'c35617'
		, ['station link'] = function(s)
			local exception = {
				['Taipei Main'] = link('Taipei Main station (Taoyuan Metro)', 'Taipei Main station')
				, ['Taoyuan HSR'] = link('Taoyuan HSR station')
				, ['Zhongli railway station'] = link('Zhongli railway station')
				, ['Airport Terminal 2 or Huanbei'] = link('Airport Terminal 2 MRT station', 'Airport Terminal')
			}
			return exception[s] or link(s .. ' MRT station', s)
		end
		, ['left terminus'] = 'Nangang'
		, ['right terminus'] = 'Zuoying'
	}
}