FANDOM

 
2,979 Pages

-- <pre>
local Appearances = {}
local getArgs = require('Dev:Arguments').getArgs
local data = mw.loadData('Module:Codename')
 
function Appearances.main(frame) -- Implements {{Appearances|1=Appearances}}
	local args = getArgs(frame)
	return Appearances._main(args)
end
 
local function appoutput(app)
    app = string.lower(app)
    local result = data[app]
    if result then
        return string.format(
            '<span class="appicon">['..'[' .. 'File:%s|x%s|link=%s]]</span>',
            result['icon']['image'],
            result['icon']['size'],
            result['pagename']
        )
    else
        return ''
    end
end
 
function Appearances._main(args)
    local output = {}
    for i, app in ipairs(args) do
        table.insert( output, appoutput(app) )
    end
 
    return table.concat(output)
end
 
return Appearances
 
--</pre>
--[[Category:Modules]]
Community content is available under CC-BY-SA unless otherwise noted.