跳转到内容

模組:Adjacent stations/KLRT

被永久保护的模块
维基百科,自由的百科全书

local colors = {
	["1"] = "1964b7",
	["2"] = "dc241f",
	["3"] = "fe8e10",
	["4"] = "721422",
	["5"] = "e0115f",
	["6"] = "8c238f",
	["7"] = "33a8b5",
	["8"] = "7dba00",
	["9"] = "11753a",
	["10"] = "e47443",
	["11"] = "59b8e6",
	["12"] = "faca05",
	["13"] = "635FAA",
	["14"] = "808000",
	["21"] = "1e4d2b",
	["22"] = "4b0082"
}
local icon = "[[%s|<span style=\"display: inline-block; vertical-align: middle; " 
	.. "position: relative; border-radius: 3.3px; height: 20px; width: 22px; "
	.. "line-height: 100%%; background: #%s; text-align: center; font-weight: bold; "
	.. "font-size: 5px;\"><span style=\"position: absolute; top: 6.67px; left: 2px; "
	.. "border: 1.67px solid white; border-radius: 10%%; height: 8.33px; width: 15px; "
	.. "color: black; background: white; text-align: center; line-height: 8.89px; "
	.. "font-weight: bold; font-size: 11.11px;%s\";>%s</span></span>]]"

local x = "%1站 (吉隆坡)"
local s = "%1站 (雪兰莪)"

local p = {
	["system title"] = "[[File:Rapid KL Logo.svg|70px|link=Rapid KL]]",
	["system icon"] = "",
	["lines"] = {
		["_default"] = {
			["title"] = "[[%1线]]",
			["color"] = "000000"
		},
                 -- 已开通
		["芙蓉"] = {
			["title"] = "[[芙蓉线]]",
			["color"] =  colors["1"],
                        ["icon"] = string.format(icon, "芙蓉线", colors["1"], "", "1"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["巴生港"] = {
			["title"] = "[[巴生港线]]",
			["color"] =  colors["2"],
                        ["icon"] = string.format(icon, "巴生港线", colors["2"], "", "2"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["安邦"] = {
			["title"] = "[[安邦线]]",
			["color"] =  colors["3"],
                        ["icon"] = string.format(icon, "安邦线", colors["3"], "", "3"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["大城堡"] = {
			["title"] = "[[大城堡线]]",
			["color"] =  colors["4"],
                        ["icon"] = string.format(icon, "大城堡线", colors["4"], "", "4"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["格拉那再也"] = {
			["title"] = "[[格拉那再也线]]",
			["color"] =  colors["5"],
                        ["icon"] = string.format(icon, "格拉那再也线", colors["5"], "", "5"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["机场快线"] = {
			["title"] = "[[吉隆坡机场快线]]",
			["color"] =  colors["6"],
                        ["icon"] = string.format(icon, "吉隆坡机场快线", colors["6"], "", "6"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["机场支线"] = {
			["title"] = "[[吉隆坡机场支线]]",
			["color"] =  colors["7"],
                        ["icon"] = string.format(icon, "吉隆坡机场支线", colors["7"], "", "7"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["单轨列车"] = {
			["title"] = "[[吉隆坡单轨列车]]",
			["color"] =  colors["8"],
                        ["icon"] = string.format(icon, "吉隆坡单轨列车", colors["8"], "", "8"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["加影"] = {
			["title"] = "[[加影线]]",
			["color"] =  colors["9"],
                        ["icon"] = string.format(icon, "加影线", colors["9"], "", "9"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["天空花园"] = {
			["title"] = "[[天空花园线]]",
			["color"] =  colors["10"],
                        ["icon"] = string.format(icon, "天空花园线", colors["10"], "", "10"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["布城"] = {
			["title"] = "[[布城线]]",
			["color"] = colors["12"],
                        ["icon"] = string.format(icon, "布城线", colors["12"], "", "12"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["双威BRT"] = {
			["title"] = "[[双威线|双威BRT]]",
			["color"] =  colors["21"],
                        ["icon"] = string.format(icon, "双威线", colors["21"], "", "B1"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},

		-- 未开通
		["莎阿南"] = {
			["title"] = "[[莎阿南线]]",
			["color"] =  colors["11"],
                        ["icon"] = string.format(icon, "莎阿南线", colors["11"], " font-style: italic;", "11"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["环状"] = {
			["title"] = "[[环状线 (吉隆坡)|环状线]]",
			["color"] =  colors["13"],
                        ["icon"] = string.format(icon, "环状线 (吉隆坡)", colors["13"], " font-style: italic;", "13"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["布城单轨或电车"] = {
			["title"] = "[[布城单轨|布城单轨或电车]]",
			["color"] =  colors["14"],
                        ["icon"] = string.format(icon, "布城单轨", colors["14"], " font-style: italic;", "14"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		},
		["联邦BRT"] = {
			["title"] = "[[联邦线|联邦BRT]]",
			["color"] =  colors["22"],
                        ["icon"] = string.format(icon, "联邦线", colors["22"], " font-style: italic;", "B2"),
			["left terminus"] = "?",
			["right terminus"] = "?",
		}
	},

	-- 站名格式数据
	["station format"] = {
		"%1站",
		-- 消歧义
		-- 芙蓉线
		["吉隆坡中央"] = "吉隆坡中央车站",
		["冼都(KTM)"] = "冼都站 (马来亚铁道)",
		["沙叻秀(KTM)"] = "沙叻秀站 (马来亚铁道)",
		-- 巴生港线
		["巴生(KTM)"] = "巴生站 (马来亚铁道)",
		-- 安邦线
		["冼都"] = "冼都站 (轻快铁)",
		["人民广场"] = x,
		["丽阳(安邦)"] = "丽阳站 (安邦)",
                -- 大城堡线
		["沙叻秀"] = "沙叻秀站 (轻快铁)",
                -- 格拉那再也线
		["大学"] = x,
                -- 机场快线
		["布城/赛城"] = "布城中央车站",
                -- 莎亚南线
		["丽阳(八打灵再也)"] = "丽阳站 (八打灵再也)",
		["中路"] = s,
		["巴生(轻快铁)"] = "巴生站 (轻快铁)",
                -- 布城线
		["布城中央"] = "布城中央车站",
		["科技园"] = x,
                -- 双威线
		["双威-斯迪亚再也"] = "斯迪亚再也站",
		-- 模板格式需要
	},

	["aliases"] = {
		["1"] = "芙蓉",
		["blue"] = "芙蓉",
		["kb"] = "芙蓉",
		["kc"] = "芙蓉",
		["seremban"] = "芙蓉",
		["seremban line"] = "芙蓉",
		["2"] = "巴生港",
		["red"] = "巴生港",
		["ka"] = "巴生港",
		["kd"] = "巴生港",
		["port klang"] = "巴生港",
		["port klang line"] = "巴生港",
		["3"] = "安邦",
		["orange"] = "安邦",
		["lrt1"] = "安邦",
		["ag"] = "安邦",
		["ampang"] = "安邦",
		["ampang line"] = "安邦",
		["4"] = "大城堡",
		["maroon"] = "大城堡",
		["sp"] = "大城堡",
		["ph"] = "大城堡",
		["sri petaling"] = "大城堡",
		["putra heights"] = "大城堡",
		["sri petaling line"] = "大城堡",
		["5"] = "格拉那再也",
		["ruby"] = "格拉那再也",
		["lrt2"] = "格拉那再也",
		["kj"] = "格拉那再也",
		["Kelana Jaya"] = "格拉那再也",
		["kelana jaya"] = "格拉那再也",
		["kelana jaya line"] = "格拉那再也",
		["6"] = "机场快线",
		["purple"] = "机场快线",
		["ke"] = "机场快线",
		["klia express"] = "机场快线",
		["express"] = "机场快线",
		["klia ekspres"] = "机场快线",
		["7"] = "机场支线",
		["teal"] = "机场支线",
		["kt"] = "机场支线",
		["transit"] = "机场支线",
		["klia transit"] = "机场支线",
		["8"] = "单轨列车",
		["lightgreen"] = "单轨列车",
		["mr"] = "单轨列车",
		["monorail"] = "单轨列车",
		["kl monorail"] = "单轨列车",
		["9"] = "加影",
		["green"] = "加影",
		["mrt1"] = "加影",
		["kg"] = "加影",
		["sbk"] = "加影",
		["sungai buloh kajang"] = "加影",
		["sungai buloh kajang line"] = "加影",
		["sungai buloh-kajang line"] = "加影",
		["mrt kajang line"] = "加影",
		["kajang"] = "加影",
		["10"] = "天空花园",
		["brown"] = "天空花园",
		["ks"] = "天空花园",
		["skypark"] = "天空花园",
		["11"] = "莎阿南",
		["skyblue"] = "莎阿南",
		["lrt3"] = "莎阿南",
		["sa"] = "莎阿南",
		["bk"] = "莎阿南",
		["buk"] = "莎阿南",
		["js"] = "莎阿南",
		["johan setia line"] = "莎阿南",
		["bandar utama-klang line"] = "莎阿南",
		["shah alam"] = "莎阿南",
		["s"] = "莎阿南",
		["12"] = "布城",
		["yellow"] = "布城",
		["mrt2"] = "布城",
		["ssp"] = "布城",
		["py"] = "布城",
		["mrt putrajaya line"] = "布城",
		["putrajaya"] = "布城",
		["13"] = "环状",
		["grey"] = "环状",
		["mrt3"] = "环状",
		["cc"] = "环状",
		["circle mrt"] = "环状",
		["14"] = "布城单轨或电车",
		["olive"] = "布城单轨或电车",
		["pm"] = "布城单轨或电车",
		["21"] = "双威BRT",
		["darkgreen"] = "双威BRT",
		["b1"] = "双威BRT",
		["sb"] = "双威BRT",
		["brt sunway"] = "双威BRT",
		["brt sunway line"] = "双威BRT",
		["sunway"] = "双威BRT",
		["sunway line"] = "双威BRT",
		["22"] = "联邦BRT",
		["violet"] = "联邦BRT",
		["b2"] = "联邦BRT",
		["fb"] = "联邦BRT",
		["federal"] = "联邦BRT",
		["federal line"] = "联邦BRT",
		["brt federal"] = "联邦BRT",
		["brt federal line"] = "联邦BRT"
	}
}

local stationAliases = {
		-- 简繁转换
		["火車東站"] = "火车东站",
		["Kakusei Homura"] = "Pneuma",
		["Kakusei Hikari"] = "Pneuma",
}
for k, v in pairs(stationAliases) do
	p["station format"][k] = p["station format"][v]
end

local lineAliases = {
	['B1'] = '21',
	['B2'] = '22',
	['KA'] = '2',
	['KB'] = '1',
	['KC'] = '1',
	['KD'] = '2',
	['AG'] = '3',
	['SP'] = '4',
	['KJ'] = '5',
	['Kelana Jaya Line'] = '5',
	['KE'] = '6',
	['KT'] = '7',
	['MR'] = '8',
	['KG'] = '9',
	['Sungai Buloh-Kajang Line'] = '9',
	['KS'] = '10',
	['SA'] = '11',
	['PY'] = '12',
	['Sungai Buloh-Serdang-Putrajaya Line'] = '12',
	['CC'] = '13',
	['PM'] = '14',
	['SB'] = '21',
	['FB'] = '22',
}
for k, v in pairs(lineAliases) do
	p.lines[k] = p.lines[v]
end

return p