Content deleted Content added
BrandonXLF (talk | contribs) No edit summary Tag: Reverted |
BrandonXLF (talk | contribs) Restored revision 1042505863 by BrandonXLF (Restorer) |
||
Line 3:
local p = {}
local getArgs = require('Module:Arguments').getArgs
local data = mw.loadData('Module:Sandbox/BrandonXLF/4')
Line 22 ⟶ 21:
elseif routeNum and routeNum >= 500 then -- Exception for secondary and tertiary highways
fileName = 'Ontario Highway ' .. route .. '.svg'
elseif
fileName = 'Ontario ' .. route .. '.svg'
end
Line 37 ⟶ 36:
elseif routeNum and routeNum >= 800 and division == 'highway' then
size = '20px'
elseif
size = 'x25px'
elseif division == 'toll' then
Line 76 ⟶ 75:
end
if (frame:callParserFunction(
return '[[' .. link .. '|' .. display .. ']]' -- Return the link
else
Line 85 ⟶ 84:
-- Gets the wikitext for a place
local function getPlace(frame, place, args)
if
return '[[' .. place .. ', Ontario|' .. place .. ']]'
else
Line 131 ⟶ 130:
local picture = ''
if
args['nosh'] = 'yes'
args['nolink'] = 'yes'
Line 137 ⟶ 136:
-- Define the picture
if not
picture = pictureWikitext(frame, route, roadType, roadInfo, args) -- Return picture of road 1
Line 150 ⟶ 149:
end
if
if picture ~= '' then picture = picture .. ' ' end -- Add a NBSP if there's already a picture
picture = picture .. '[[File:TCH-blank.svg|x20px]]' -- Add the TCH picture
Line 156 ⟶ 155:
end
if not
export = picture -- Add the picture if it goes first
end
-- Define the text
if not
if export ~= '' then export = export .. ' ' end -- Add a NBSP after the picture if it exists
export = export .. getText(frame, route, roadInfo, args) -- Return text of road 1
Line 173 ⟶ 172:
end
if
export = export .. ' / [[Trans-Canada Highway|TCH]]' -- Add the TCH text
end
Line 217 ⟶ 216:
end
if
if export ~= '' then export = export .. ' ' end -- Add a space if export already has text
export = export .. picture -- Add the picture if it goes last
|