local p =
function p.format(frame) local args = frame.args -- expects a sequence of strings local lines = require("Module:Adjacent stations/Metro Trains Melbourne").lines local vlines = require("Module:Adjacent stations/V/Line").lines local result = local colours = -- colours to display local keyset = -- to avoid duplicating colours -- Obtain all unique colours first, in order of argument input local i = 1 local j = 1 while args[i] do if lines[args[i]] then local current = lines[args[i]].color if current and not keyset[current] then colours[j] = current keyset[current] = true j = j + 1 end elseif args[i]
return table.concat(result)end
return p