Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
BrandonXLF (talk | contribs) No edit summary |
||
Line 8:
local function pictureWikitext(frame, route, division, roadInfo, args)
local existingFile = ''
if roadInfo['pic'] then
Line 24 ⟶ 25:
end
end
if mw.title.new('File:' .. fileName).file.exists then -- Check if the file exists and record it if it does
existingFile = fileName
size = '24px'▼
size = '21px'▼
size = '20px'▼
size = 'x25px'▼
size = 'x30px'▼
end
end
Line 40 ⟶ 54:
if existingFile == '' then
return '' -- Return nothing if no existing file was found
▲ end
▲ local size = 'x20px' -- Default size
▲ -- Override default size with exceptions
▲ elseif route:upper() == '407ETR' then
▲ size = '24px'
▲ elseif division == 'kawartha lakes' then
▲ size = '21px'
▲ elseif routeNum and routeNum >= 800 then
▲ size = '20px'
▲ elseif args['shield'] == 'yes' and division == 'highway' then
▲ size = 'x25px'
▲ elseif division == 'toll' then
▲ size = 'x30px'
end
|