Module:Adjacent stations/sandbox: Difference between revisions

Content deleted Content added
Renamed args.direction to args.side
No edit summary
Line 570:
local line_type = args[3] or args.type
if line_type then
line_type = data.aliases and data.aliases[mw.ustring.lower(line_type)] or line_type
line_type = line.types and line.types[line_type] -- If there's no type table or entry for this type, then it can't have its own icon
icon_format = line_type['icon format'] or data['type icon format']
Line 741:
local prefix = (side == 'r') and 'right' or 'left'
local data = args.data
local line
 
if system or data then
Line 746 ⟶ 747:
end
if data then
local line, lineN = getLine(data, lineN)
if ornot line then error(i18n[lang]['error_unknown'](lineN)) end
if typeN and data and data['aliases'] then typeN = data['aliases'][mw.ustring.lower(typeN)] or typeN end
local Type = line['types'] and line['types'][typeN]