模組:MTR/data

Lohankhapedia (自由的百科全書) 欲共你講..。
跳至導覽 跳至搜尋

直接包含本模塊的模板有:

用法[修改]

{{HK-MTR color|Ma On Shan Line}} #9A3820
{{HK-MTR color|馬}} #9A3820
{{HK-MTR color|無意義}} #000
{{HK-MTR icon|馬鞍山}}
{{HK-MTR icon|港島線}}
{{HK-MTR icon|lrt}}
{{HK-MTR icon|North South|沙田站}}
{{HK-MTR icon|WR-KCR|3=西鐵綫以前由九廣鐵路經營}}
{{HK-MTR icon|荃|太子站|跨月台轉車站}}

數據表[修改]

模塊承認的路綫簡稱值及其代表顏色的RGB值見module:MTR/data



local lines = {
	tsuen_wan = {
		name = '荃灣綫',
		codes = {'TSUEN WAN LINE','TSUEN WAN','TWL','TW','荃灣線','荃灣綫','荃灣','荃'},
		color = 'E2231A',
	},
	kwun_tong = {
		name = '觀塘綫',
		codes = {'KWUN TONG LINE','KWUN TONG','KTL','KT','K','觀塘線','觀塘綫','觀塘','觀'},
		color = '00AF41',
	},
	island = {
		name = '港島綫',
		codes = {'ISLAND LINE','ISLAND', 'ISL','IS','I','港島線','港島綫','港島','港'},
		color = '0071CE',
		needs_dab = false, -- 後備迴避歧義用參數,儘管在中文維基百科用不上,如有必要則將false改為true。
	},
	tseung_kwan_o = {
		name = '將軍澳綫',
		codes = {'TSEUNG KWAN O LINE','TSEUNG KWAN O','TKOL','TKO','TKL','TK','將軍澳線','將軍澳綫','將軍澳','將'},
		color = 'A35EB5',
	},
	tung_chung = {
		name = '東涌綫',
		codes = {'TUNG CHUNG LINE','TUNG CHUNG','TCL','TC','東涌線','東涌綫','東涌'},
		color = 'F38B00',
	},
	disneyland = {
		name = '迪士尼綫',
		codes = {'DISNEYLAND RESORT LINE','DISNEYLAND RESORT','DISNEYLAND','DISNEY','DRL','DR','D','迪士尼線','迪士尼綫','迪士尼','迪'},
		color = 'E777CB',
	},
	airport_express = {
		name = '機場快綫',
		codes = {'AIRPORT EXPRESS','AIRPORT','AEL','AE','A','機場快線','機場快綫','機場','機','AEL機','A機'},
		color = '007078',
		needs_dab = false,
	},
	east_rail = {
		name = '東鐵綫',
		codes = {'EAST RAIL LINE','EAST RAIL','EAST','EAL','ERL','ER','E','東鐵線','東鐵綫','東鐵','東'},
		color = '61B4E4',
	},
	north_south = {
		name = '南北走廊',
		codes = {'NORTH SOUTH CORRIDOR','NORTH SOUTH LINE','NORTH-SOUTH LINE','NORTH SOUTH','NORTH-SOUTH','NSL','NSC','NS','南北綫','南北走廊','南北線','南北'},
		color = '61B4E4',
	},
	west_rail = {
		name = '西鐵綫',
		codes = {'WEST RAIL LINE','WEST RAIL','WEST','WRL','WR','W','西鐵線','西鐵綫','西鐵','西'},
		color = 'B6008D',
	},
	ma_on_shan = {
		name = '馬鞍山綫',
		codes = {'MA ON SHAN LINE','MA ON SHAN','MOSL','MOS','MOL','MO','M','馬鞍山線','馬鞍山綫','馬鞍山','馬'},
		color = '9A3820',
	},
	east_west_corridor = {
		name = '東西走廊',
		codes = {'EAST WEST CORRIDOR','EAST WEST LINE','EAST-WEST LINE','EAST WEST','EAST-WEST','EWL','EWC','EW','東西綫','東西走廊','東西線','東西'},
		color = '9A3820',
	},
	ngong_ping_360 = {
		name = '昂坪360',
		codes = {'NGONG PING 360','NGONG PING CABLE CAR','NGONG PING','360','NP360','NGP','昂坪纜車','昂坪360','昂坪','昂'},
		color = '94989A',
	},
	light_rail = {
		name = '輕鐵',
		codes = {'LIGHT RAIL','LIGHT','LIR','LRT','LR','L','香港輕鐵','輕','輕鐵'},
		color = 'CD9700',
		needs_dab = true,
	},
	kcr_east = {
		name = '九廣東鐵',
		codes = {'KCR EAST RAIL','KCR-ER','ER-KCR','ER-KCRC','E-KCR','東鐵KCR','九廣東鐵','九東','東K'},
		color = '005DA0',
	},
	kcr_west = {
		name = '九廣西鐵',
		codes = {'KCR WEST RAIL','KCR-WR','WR-KCR','WR-KCRC','W-KCR','九廣西鐵','西鐵','西鐵KCR','九西','西K'},
		color = 'AC2571',
	},
	kcr_ma_on_shan = {
		name = '九廣馬鐵',
		codes = {'KCR MA ON SHAN RAIL','KCR-MOS','MOR-KCR','MOR-KCRC','M-KCR','九廣馬鐵','馬鞍山鐵路','馬鐵KCR','九馬','馬K','馬鐵'},
		color = '761E10',
	},
	kcr_light = {
		name = '九廣輕鐵',
		codes = {'KCR LIGHT RAIL','KCR-LRT','KCR-LR','LRT-KCR','LR-KCR','LR-KCRC','LR-KCRC','L-KCR','輕鐵KCR','九廣輕鐵','九輕','輕K'},
		color = 'FD722D',
	},
	south_island_east = {
		name = '南港島綫東段',
		codes = {'SOUTH ISLAND LINE EAST SECTION','SOUTH ISLAND LINE EAST','SOUTH ISLAND EAST','SILE','SIE','SEL','SE','南港島線東段','南港島綫東段','南港島綫','南港島線','南港島東','南港','南東'},
		color = 'B6BD00',
	},
	south_island_west = {
		name = '南港島綫西段',
		codes = {'SOUTH ISLAND LINE WEST SECTION','SOUTH ISLAND LINE WEST','SOUTH ISLAND WEST','SILW','SIW','SWL','SW','南港島線西段','南港島綫西段','南港島西','南西'},
		color = '9182C2',
	},
	north_island = {
		name = '北港島綫',
		codes = {'NORTH ISLAND LINE','NORTH ISLAND','NIL','NI','北港島線','北港島綫','北港'},
		color = 'F38B00',
	},
	northern_link = {
		name = '北環綫',
		codes = {'NORTHERN LINK','NORTHERN','NOL','NRL','NR','北環線','北環綫','北環','北'},
		color = 'ff0066',
	},
}
 
local names, colors, needs_dab = {}, {}, {}
for k, t in pairs(lines) do
	local name = t.name
	local color = t.color
	for i, code in ipairs(t.codes) do
		names[code] = name
		colors[code] = color
	end
	needs_dab[name] = t.needs_dab
end
 
return {
	names = names,
	colors = colors,
	needs_dab = needs_dab
}