<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FNbound%2FScribbles</id>
	<title>Module:Sandbox/Nbound/Scribbles - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FNbound%2FScribbles"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Nbound/Scribbles&amp;action=history"/>
	<updated>2026-04-21T09:06:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/Nbound/Scribbles&amp;diff=145905&amp;oldid=prev</id>
		<title>imported&gt;Nbound at 07:15, 21 July 2013</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Nbound/Scribbles&amp;diff=145905&amp;oldid=prev"/>
		<updated>2013-07-21T07:15:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
 &lt;br /&gt;
function p.Shield(frame)&lt;br /&gt;
    local pframe = frame:getParent()&lt;br /&gt;
    local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself&lt;br /&gt;
    local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template&lt;br /&gt;
    &lt;br /&gt;
    --store special inputs&lt;br /&gt;
    local customsize = args[&amp;quot;size&amp;quot;] -- store custom size if specified&lt;br /&gt;
    local alt = args[&amp;quot;alt&amp;quot;] or &amp;quot;&amp;quot; -- store value of alt&lt;br /&gt;
    args[&amp;quot;alt&amp;quot;], args[&amp;quot;size&amp;quot;] = nil, nil -- destroy before populating tables&lt;br /&gt;
    &lt;br /&gt;
    -- populate table of highway types&lt;br /&gt;
    local htype = {}&lt;br /&gt;
    local indexcount = 1&lt;br /&gt;
    for i = 1,7,2 do  -- set to grab 4&lt;br /&gt;
        if args[i] then&lt;br /&gt;
            htype[indexcount] = args[i] -- Get types of highway&lt;br /&gt;
            indexcount = indexcount + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    -- populate table of allocations (route numbers)&lt;br /&gt;
    local alloc = {}&lt;br /&gt;
    indexcount = 1&lt;br /&gt;
    for i = 2,8,2 do -- set to grab 4&lt;br /&gt;
        if args[i] then&lt;br /&gt;
            alloc[indexcount] = args[i] -- Get allocations (route numbers)&lt;br /&gt;
            indexcount = indexcount + 1&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
   &lt;br /&gt;
    -- set up extension (currently not required)&lt;br /&gt;
    local ext = &amp;quot;.svg&amp;quot; -- this shouldnt need to ever change, but its here if needed. (it could also be moved into the table below)&lt;br /&gt;
    &lt;br /&gt;
    -- set up base types of highways with properties&lt;br /&gt;
    local entries = {N  = { filename = &amp;quot;File:AUS national highway &amp;quot;,            description = &amp;quot;National Highway &amp;quot;,   size = &amp;quot;x20px&amp;quot;},&lt;br /&gt;
                     AN = { filename = &amp;quot;File:Australian Alphanumeric Route &amp;quot;,   description = &amp;quot;State Route &amp;quot;,        size = &amp;quot;x15px&amp;quot;},&lt;br /&gt;
                     NSW= { filename = &amp;quot;File:NSW alphanumeric route &amp;quot;,          description = &amp;quot;Route &amp;quot;,              size = &amp;quot;x20px&amp;quot;},&lt;br /&gt;
                     S  = { filename = &amp;quot;File:AUS state route &amp;quot;,                 description = &amp;quot;State Route &amp;quot;,        size = &amp;quot;x20px&amp;quot;},&lt;br /&gt;
                     R  = { filename = &amp;quot;File:AUS national route &amp;quot;,              description = &amp;quot;National Route &amp;quot;,     size = &amp;quot;x20px&amp;quot;},&lt;br /&gt;
                     Met= { filename = &amp;quot;File:Metroad &amp;quot;,                         description = &amp;quot;Metroad &amp;quot;,            size = &amp;quot;x20px&amp;quot;}};&lt;br /&gt;
                 &lt;br /&gt;
    -- set up base type aliases (used if highway types share all properites)&lt;br /&gt;
    local aliases = {QLD = &amp;quot;AN&amp;quot;, SA = &amp;quot;AN&amp;quot;, NT = &amp;quot;AN&amp;quot;, VIC = &amp;quot;AN&amp;quot;, TAS = &amp;quot;AN&amp;quot;, -- all use alpha numeric&lt;br /&gt;
                     ACT = &amp;quot;NSW&amp;quot;}; --ACT also uses NSW style alphanumeric&lt;br /&gt;
    setmetatable(entries, {__index = function(t,k) return rawget(t,aliases[k]); end});&lt;br /&gt;
    &lt;br /&gt;
    --produce shields&lt;br /&gt;
    local count = 1&lt;br /&gt;
    local shield = {}&lt;br /&gt;
    repeat&lt;br /&gt;
        if alt == &amp;quot;on&amp;quot; then&lt;br /&gt;
            table.insert(shield, &amp;quot;[[&amp;quot; .. entries[(htype[count])].filename .. alloc[count] .. ext .. &amp;quot;|&amp;quot; .. (customsize or entries[(htype[count])].size) .. &amp;quot;|alt=&amp;quot; .. entries[(htype[count])].description .. alloc[count] .. &amp;quot;]]&amp;quot; or nil)&lt;br /&gt;
        else&lt;br /&gt;
            table.insert(shield, &amp;quot;[[&amp;quot; .. entries[(htype[count])].filename .. alloc[count] .. ext .. &amp;quot;|&amp;quot; .. (customsize or entries[(htype[count])].size) .. &amp;quot;|link=|alt=]]&amp;quot; or nil)&lt;br /&gt;
        end&lt;br /&gt;
        count = count + 1&lt;br /&gt;
    until count == indexcount -- compare count to number of shields grabbed earlier&lt;br /&gt;
    return (shield[1] or &amp;quot;&amp;quot;) .. (shield[2] or &amp;quot;&amp;quot;) .. (shield[3] or &amp;quot;&amp;quot;) .. (shield[4] or &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Nbound</name></author>
	</entry>
</feed>