Module:Clickpic: Difference between revisions
Created page with "-- <pre> local p = {} local pics = { Gem = {image='Gemini Icon',link='Gemini Station'}, Earth = {image='Earth Icon',link='Earth'}, Mars = {image='Mars Icon',link='Mars'},..." |
mNo edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
local pics = { | local pics = { | ||
gem = {image='Gemini Icon',link='Gemini Station'}, | |||
earth = {image='Earth Icon',link='Earth'}, | |||
mars = {image='Mars Icon',link='Mars'}, | |||
jupiter = {image='Jupiter Icon',link='Jupiter'}, | |||
eris = {image='Eris Icon',link='Eris'}, | |||
mercury = {image='Mercury Icon',link='Mercury'} | |||
} | } | ||
function p.main(frame) | function p.main(frame) | ||
local args = frame:getParent().args | local args = frame:getParent().args | ||
local | local skill = args[1] or '' | ||
local level = args[2] | local level = args[2] | ||
return p._main( | return p._main(skill, level) | ||
end | end | ||
function p._main( | function p._main(skill, level) | ||
local file | local file | ||
if type( | if type(skill) == 'string' and pics[skill:lower()] then | ||
file = pics[ | file = pics[skill:lower()] | ||
else | else | ||
file = pics. | file = pics.earth | ||
end | end | ||