Difference between revisions of "Module:Adjacent stations/Taiwan High Speed Rail"

From blackwiki
Jump to navigation Jump to search
blackwiki>Szqecs
(Undid revision 838347953 by Szqecs (talk))
m (86 revisions imported)
 
(39 intermediate revisions by 5 users not shown)
Line 1: Line 1:
local function link(s1, s2, s3)
+
local x = "%1 station"
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 {
+
local p = {
['system title'] = '[[File:Taiwan High Speed Rail Logo(Log Only).svg|18px]] ' .. link('Taiwan High Speed Rail'),
+
["system title"] = "[[Taiwan High Speed Rail]]",
['THSR'] = {
+
["system icon"] = "[[File:Taiwan High Speed Rail Logo(Log Only).svg|18px|link=Taiwan High Speed Rail|alt=Taiwan High Speed Rail]]",
['line title'] = link('Taiwan High Speed Rail#Stations_transportation', nil, 'HSR'),
+
["system color"] = "c35617",
['colour'] = 'c35617',
+
["name format"] = "color: #FFFFFF; background-color: #C35617;",
['station link'] = function(s)
+
["station format"] = {
if s == 'Nangang'
+
"%1 HSR station",
or s == 'Taipei'
+
["Taipei"] = "Taipei Main Station",
or s == 'Banqiao' then
+
["Nangang"] = x,
return link(s, ' station')
+
["Banqiao"] = x
else
+
},
return link(s, ' HSR station')
+
["lines"] = {
end
+
["_default"] = {
end,
+
["title"] = "[[Taiwan High Speed Rail|THSR]]",
['left terminus'] = 'Nangang',
+
["color"] = "c35617",
['right terminus'] = 'Zuoying'
+
["left terminus"] = "Nangang",
 +
["right terminus"] = "Zuoying"
 +
}
 
}
 
}
 
}
 
}
 +
 +
return p

Latest revision as of 12:51, 26 September 2020

Documentation for this module may be created at Module:Adjacent stations/Taiwan High Speed Rail/doc

local x = "%1 station"

local p = {
	["system title"] = "[[Taiwan High Speed Rail]]",
	["system icon"] = "[[File:Taiwan High Speed Rail Logo(Log Only).svg|18px|link=Taiwan High Speed Rail|alt=Taiwan High Speed Rail]]",
	["system color"] =  "c35617",
	["name format"] = "color: #FFFFFF; background-color: #C35617;",
	["station format"] = {
		"%1 HSR station",
		["Taipei"] = "Taipei Main Station",
		["Nangang"] = x,
		["Banqiao"] = x
	},
	["lines"] = {
		["_default"] = {
			["title"] = "[[Taiwan High Speed Rail|THSR]]",
			["color"] = "c35617",
			["left terminus"] = "Nangang",
			["right terminus"] = "Zuoying"
		}
	}
}

return p