FANDOM


-- <pre>
local Games = {}
local getArgs = require('Dev:Arguments').getArgs
local data = mw.loadData('Module:Codename')
 
function Games.main(frame) -- Implements {{Games|1=Games}}
	local args = getArgs(frame)
	return Games._main(args)
end
 
local function gameoutput(game)
    game = string.lower(game)
    local result = data[game]
    if result then
        return string.format(
            '<span class="gameicon">['..'[' .. 'File:%s|x40px|link=%s]]</span>',
            result['icon'],
            result['link']
        )
    else
        return ''
    end
end
 
function Games._main(args)
    local output = {}
    for i, game in ipairs(args) do
        table.insert( output, gameoutput(game) )
    end
 
    return table.concat(output)
end
 
return Games

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.