Module:Adjacent stations/sandbox: Difference between revisions

Content deleted Content added
sync with live
No edit summary
Line 536:
local system = args[1] or args.system
local line = args[2] or args.line
local Typeline_type = args[3] or args.type
local data = args.data
if system or data then
data = data or getData(system)
 
local icon, Format
local icon_format
 
line = (getLine(data, line))
 
if line then
if Typeline_type then
Typeline_type = data['aliases'] and data['aliases'][mw.ustring.lower(Typeline_type)] or Typeline_type
Typeline_type = line['types'] and line['types'][Typeline_type] -- If there's no type table or entry for this type, then it can't have its own icon
Formaticon_format = Typeline_type['icon format'] or data['type icon format']
icon = Typeline_type['icon']
end
if not (Formaticon_format or icon) then
Formaticon_format = line['icon format'] or data['line icon format']
icon = line['icon']
end
end
 
if not (Format or icon) then
Formatif =not data['system(icon_format or icon) format']then
icon_format = data['system icon format']
icon = data['system icon']
end
 
if Formaticon_format then
if Formaticon_format ~= 'image' then return p._box({data = data, [2] = (args[2] or args.line), [3] = Formaticon_format, type = (args[3] or args.type), bold = args.bold, link = args.link}, frame) end
end
 
Line 606 ⟶ 608:
end
 
if args.name and line and line.title then
return icon .. " " .. line.title
end
return icon
end