FANDOM


-- <nowiki>
local p = {}
local getArgs = require('Dev:Arguments').getArgs
local data = mw.loadData('Module:Icon/data')
 
-- Implements {{icon|1=console|2=button}}
function p.main(frame)
    local args = getArgs(frame)
    local console = args.console or args[1]
    local button = args.button or args[2]
 
    if not (console or button) then
        return
    end
 
    local tmp = data[console:lower()][button:lower()]
 
    return '[[File:' .. tmp.file .. '|alt=' .. tmp.alt .. '|link=]]'
end
 
return p
-- </nowiki>
Community content is available under CC-BY-SA unless otherwise noted.