Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
BrandonXLF (talk | contribs) No edit summary |
||
Line 12:
-- Override the default format with exceptions for some highways
if division == 'highway' then
highwayNumber =
highwayNumber = tonumber(highwayNumber)
if route:upper() == '407ETR' then -- Picture exceptions
Line 29 ⟶ 30:
end
if frame:callParserFunction('#ifexist', '
local size = 'x20px' -- Default size
Line 45 ⟶ 46:
end
return '[[File:' ..
end
end
return '[[File:RR ' .. route .. ' jct.svg|alt=|link=|x20px]]' -- Display default image format
return '' -- Fallback to returning nothing
end
Line 133 ⟶ 138:
if args['con'] then
if picture ~= '' then picture = picture .. ' ' end -- Add a NBSP if there's already a picture
picture = picture .. pictureWikitext(frame, args['con'], roadType, roadInfo, args) -- Add the picture of the first concurrency end
if args['con2'] then
if picture ~= '' then picture = picture .. ' ' end -- Add a NBSP if there's already a picture
picture = picture .. pictureWikitext(frame, args['con2'], roadType, roadInfo, args) -- Add the picture of the second concurrency end
if args['tch'] then
if picture ~= '' then picture = picture .. '
picture = picture .. '[[File:TCH-blank.svg|x20px]]' -- Add the TCH picture
end
end
if not args['pic aft']
export = picture -- Add the picture if it goes first
end
Line 151 ⟶ 159:
-- Define the text
if not args['notext'] then -- If allowed to show text
▲ export = export .. ' ' -- Add a NBSP after the picture if it exists
▲ end
export = export .. getText(frame, route, roadInfo, args) -- Return text of road 1
if args['con'] then
export = export .. ' / ' .. getText(
end
Line 201 ⟶ 206:
cities = table.concat(cities, ', ') -- Concat the cities into a single string
if cities ~= '' then
export = export .. ' – ' .. cities -- Add the cities to the output
end
if args['pic aft'] and picture then
▲ export = export .. ' ' -- Add a space if export already has text
export = export .. picture -- Add the picture if it goes last
end
|