local lines = {
tsuen_wan = {
name = 'Tsuen Wan Line',
codes = {'TSUEN WAN LINE', 'TSUEN WAN', 'TWL', 'TW'},
color = 'ed1d24',
},
kwun_tong = {
name = 'Kwun Tong Line',
codes = {'KWUN TONG LINE', 'KWUN TONG', 'KTL', 'KT', 'K'},
color = '00ab4e',
},
island = {
name = 'Island Line',
codes = {'ISLAND LINE', 'ISLAND', 'ISL', 'IS', 'I'},
color = '007dc5',
needs_dab = true,
},
tseung_kwan_o = {
name = 'Tseung Kwan O Line',
codes = {'TSEUNG KWAN O LINE', 'TSEUNG KWAN O', 'TKOL', 'TKO', 'TKL', 'TK'},
color = '7d499d',
},
tung_chung = {
name = 'Tung Chung Line',
codes = {'TUNG CHUNG LINE', 'TUNG CHUNG', 'TCL', 'TC'},
color = 'f7943e',
},
disneyland = {
name = 'Disneyland Resort Line',
codes = {'DISNEYLAND RESORT LINE', 'DISNEYLAND RESORT', 'DISNEYLAND', 'DISNEY', 'DRL', 'DR', 'D'},
color = 'f173ac',
},
airport_express = {
name = 'Airport Express',
codes = {'AIRPORT EXPRESS', 'AIRPORT', 'AEL', 'AE', 'A'},
color = '00888a',
needs_dab = true,
},
east_rail = {
name = 'East Rail Line',
codes = {'EAST RAIL LINE', 'EAST RAIL', 'EAST', 'EAL', 'ERL', 'ER', 'E'},
color = '53b7e8',
},
north_south = {
name = 'North South Corridor',
codes = {'NORTH SOUTH CORRIDOR', 'NORTH SOUTH LINE', 'NORTH-SOUTH LINE', 'NORTH SOUTH', 'NORTH-SOUTH', 'NSL', 'NSC', 'NS'},
color = '53b7e8',
},
west_rail = {
name = 'West Rail Line',
codes = {'WEST RAIL LINE', 'WEST RAIL', 'WEST', 'WRL', 'WR', 'W'},
color = 'a3238f',
},
ma_on_shan = {
name = 'Ma On Shan Line',
codes = {'MA ON SHAN LINE', 'MA ON SHAN', 'MOSL', 'MOS', 'MOL', 'MO', 'M'},
color = '923011',
},
east_west_corridor = {
name = 'East West Corridor',
codes = {'EAST WEST CORRIDOR', 'EAST WEST LINE', 'EAST-WEST LINE', 'EAST WEST', 'EAST-WEST', 'EWL', 'EWC', 'EW'},
color = '923011',
},
east_kowloon = {
name = 'East Kowloon Line',
codes = {'EAST KOWLOON LINE', 'EAST KOWLOON', 'EKL', 'EK'},
color = 'd3c087',
},
ngong_ping_360 = {
name = 'Ngong Ping 360',
codes = {'NGONG PING 360', 'NGONG PING CABLE CAR', 'NGONG PING', '360', 'NP360', 'NGP'},
color = '94989A',
},
light_rail = {
name = 'Light Rail',
codes = {'LIGHT RAIL', 'LIGHT', 'LIR', 'LRT', 'LR', 'L'},
color = 'd3a809',
needs_dab = true,
},
kcr_east = {
name = 'KCR East Rail',
codes = {'KCR EAST RAIL', 'KCR-ER', 'ER-KCR', 'ER-KCRC', 'E-KCR'},
color = '005DA0',
},
kcr_west = {
name = 'KCR West Rail',
codes = {'KCR WEST RAIL', 'KCR-WR', 'WR-KCR', 'WR-KCRC', 'W-KCR'},
color = 'AC2571',
},
kcr_ma_on_shan = {
name = 'KCR Ma On Shan Rail',
codes = {'KCR MA ON SHAN RAIL', 'KCR-MOS', 'MOR-KCR', 'MOR-KCRC', 'M-KCR'},
color = '761E10',
},
kcr_light = {
name = 'KCR Light Rail',
codes = {'KCR LIGHT RAIL', 'KCR-LRT', 'KCR-LR', 'LRT-KCR', 'LR-KCR', 'LR-KCRC', 'LR-KCRC', 'L-KCR'},
color = 'FD722D',
},
south_island_east = {
name = 'South Island Line',
codes = {'SOUTH ISLAND LINE EAST SECTION', 'SOUTH ISLAND LINE EAST', 'SOUTH ISLAND EAST', 'SOUTH ISLAND LINE', 'SOUTH ISLAND', 'SIL', 'SILE', 'SIE', 'SEL', 'SE'},
color = 'BAC429',
},
south_island_west = {
name = 'South Island Line (West)',
codes = {'SOUTH ISLAND LINE WEST SECTION', 'SOUTH ISLAND LINE WEST', 'SOUTH ISLAND WEST', 'SILW', 'SIW', 'SWL', 'SW'},
color = '9182C2',
},
north_island = {
name = 'North Island Line',
codes = {'NORTH ISLAND LINE', 'NORTH ISLAND', 'NIL', 'NI'},
color = '7d499d',
},
northern_link = {
name = 'Northern Link',
codes = {'NORTHERN LINK', 'NORTHERN', 'NOL', 'NRL', 'NR', 'NL'},
color = '888',
needs_dab = true,
},
guangdong_through_train = {
name = 'Guangdong Through Train',
codes = {'GUANGDONG', 'GUANGJIU', 'JIUGUANG', 'GD'},
color = '000',
},
beijing_kowloon_through_train = {
name = 'Beijing–Kowloon Through Train',
codes = {'BEIJING–KOWLOON', 'BEIJING-KOWLOON', 'BEIJINGKOWLOON', 'BK'},
color = '000',
},
shanghai_kowloon_through_train = {
name = 'Shanghai–Kowloon Through Train',
codes = {'SHANGHAI–KOWLOON', 'SHANGHAI-KOWLOON', 'SHANGHAIKOWLOON', 'SK'},
color = '000',
},
l505 = {
name = '505',
codes = {'505'},
color = 'FF0000',
textcolor = "FFF",
lr = true,
},
l507 = {
name = '507',
codes = {'507'},
color = '008000',
textcolor = "FFF",
lr = true,
link = '',
},
l610 = {
name = '610',
codes = {'610'},
color = 'A52A2A',
textcolor = "FFF",
lr = true,
link = '',
},
l614 = {
name = '614',
codes = {'614'},
color = '00BFFF',
lr = true,
link = '',
},
l614P = {
name = '614P',
codes = {'614P'},
color = 'FFC0CB',
lr = true,
link = '',
},
l615 = {
name = '615',
codes = {'615'},
color = 'FFFF00',
lr = true,
link = '',
},
l615P = {
name = '615P',
codes = {'615P'},
color = '000080',
textcolor = "FFF",
lr = true,
link = '',
},
l705 = {
name = '705',
codes = {'705'},
color = '9ACD32',
lr = true,
link = 'MTR Light Rail Routes 705 and 706',
},
l706 = {
name = '706',
codes = {'706'},
color = 'D8BFD8',
lr = true,
link = 'MTR Light Rail Routes 705 and 706',
},
l751 = {
name = '751',
codes = {'751'},
color = 'FFA500',
lr = true,
link = '',
},
l751P = {
name = '751P',
codes = {'751P'},
color = '000',
textcolor = "FFF",
lr = true,
link = '',
},
l761P = {
name = '761P',
codes = {'761P'},
color = '4B0082',
textcolor = "FFF",
lr = true,
link = '',
},
zone1 = {
name = 'Light Rail zone 1',
codes = {'ZONE1'},
color = 'F0397B',
},
zone2 = {
name = 'Light Rail zone 2',
codes = {'ZONE2'},
color = 'F68712',
},
zone3 = {
name = 'Light Rail zone 3',
codes = {'ZONE3'},
color = '0E88D3',
},
zone4 = {
name = 'Light Rail zone 4',
codes = {'ZONE4'},
color = '33B540',
},
zone5A = {
name = 'Light Rail zone 5A',
codes = {'ZONE5A'},
color = 'F25C19',
},
zone5 = {
name = 'Light Rail zone 5',
codes = {'ZONE5'},
color = '7641A4',
},
}
local names, colors, textcolors, needs_dab, lr, link = {}, {}, {}, {}, {}, {}
for k, t in pairs(lines) do
local name, color, textcolor = t.name, t.color, t.textcolor
for i, code in ipairs(t.codes) do
names[code] = name
colors[code] = color
textcolors[code] = textcolor
end
needs_dab[name] = t.needs_dab
lr[name] = t.lr
link[name] = t.link
end
return {
names = names,
colors = colors,
textcolors = textcolors,
needs_dab = needs_dab,
lr = lr,
link = link,
}