Content deleted Content added
No edit summary |
No edit summary |
||
Line 434:
if inline ~= 'box' then
if station then
if inline and mw.ustring.match(inline, 'route') then return '' end
local _Format = data['station format'][station] or data['station format'][1]
station = _Format and getStation(station, _Format) or station or ''
Line 454:
local result
if Type and Type ~= '' and inline ~= 'box' and not station then
if line == '' then
line = Type
Line 567:
local system = args[1] or args.system
local data = args.data
if not system and not data then return end▼
▲ if not system and not data then
data = data or getData(system)
local icon, icon_format▼
▲ local icon_format
if line then
▲ local line_type = args[3] or args.type
▲ 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
if line_type.icon then▼
▲ if not icon then
icon = line.icon▼
end
-- Only if there is no icon use the icon_format.
if not icon and not icon_format then icon_format = line['icon format'] or data['line icon format'] end
▲ icon_format = line['icon format'] or data['line icon format']
if icon and string.find(icon, "%%1") and default and default.icon then▼
▲ if icon and string.find(icon, "%%1")
end
if not icon then icon = data['system icon'] end
if icon_format then
if icon_format ~= 'image' then
icon = p._box({data = data, [2] =
if require("Module:Yesno")(args.name) then
local filter = {yes = true, small = true, dot = true, square = true}
return icon .. " " .. line.title▼
local _Format = data['station format'][station] or data['station format'][1]
station = _Format and getStation(station, _Format) or station or ''
if filter[icon_format] then return icon .. ' – ' .. station end
return icon .. " " .. station
else
if not line then return icon .. " " .. data["system title"] end▼
if filter[icon_format] then return icon end
end
▲ return icon .. " " .. data["system title"]
end
end
Line 668 ⟶ 653:
end
if require("Module:Yesno")(args.name) then
local station = args.station
▲ if line and line.title then
▲ return icon .. " " .. line.title
local _Format = data['station format'][station] or data['station format'][1]
station = _Format and getStation(station, _Format) or station or ''
return icon and (icon .. " " .. station) or error(i18n[lang]['error_missing']('icon'))
else
if line then return icon .. " " .. line end
return icon and (icon .. " " .. data["system title"]) or error(i18n[lang]['error_missing']('icon'))▼
end
▲ return icon .. " " .. data["system title"]
end
return icon
Line 780 ⟶ 770:
return getTerminusText(terminus, data['station format'] or i18n[lang]['error_format'])
else
terminus = frame:expandTemplate{ title = 'S-line/' .. system .. ' ' .. prefix .. '/' .. lineN, args = {
return frame:expandTemplate{ title = system .. ' stations', args = {['station'] = terminus, ['line'] = lineN, ['branch'] = typeN} }
end
|