Mobius Final Fantasy Wiki
Advertisement

Documentation for this module may be created at Module:Job type/doc

local p = {}
local getArgs = require("Module:Arguments").getArgs

function p.main( frame )
	local args = getArgs(frame, {
		wrappers = "Template:JobType"
	})
	return p._main(args)
end
function p._main( args )
	local jobtype = string.lower(args[1] or "")
	local size = tonumber(args.size) or 20
	local icon
	
	if jobtype == "warrior" then
		icon = "Warrior Icon.png"
	elseif jobtype == "mage" then
		icon = "Mage Icon.png"
	elseif jobtype == "ranger" then
		icon = "Ranger Icon.png"
	elseif jobtype == "monk" then
		icon = "Monk Icon.png"
	elseif jobtype == "support"
		or jobtype == "healer" then
		icon = "Healer Icon.png"
	elseif jobtype == "material" then
		icon = "Material Icon.png"
	elseif jobtype == "meia" then
		icon = "Meia Icon.png"
	elseif jobtype == "sarah" then
		icon = "Sarah Icon.png"
	else
		return ""
	end
	local fmt = "[[File:%s|link=|%dpx]]"
	return string.format(fmt, icon, size)
end

return p
Advertisement