Anonymous

Module:Face: Difference between revisions

From Elwiki
no edit summary
(Created page with "require('Module:CommonFunctions') local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(frame) local args = getArgs(frame); local CHARACTER_ID = { Elsword = 1, Aisha = 2, Rena = 3, Raven = 4, Eve = 5, Chung = 6, Ara = 7, Elesis = 8, Add = 9, LuCiel = 10, Rose = 11, Ain = 12, Laby = 13, Noah = 14, Lithia = 15 }...")
 
No edit summary
Line 31: Line 31:
     local link = args.link and (data == "base" and character or args.link) or ""
     local link = args.link and (data == "base" and character or args.link) or ""
     local lang = args.link and args.lang and ("/" .. args.lang) or ""
     local lang = args.link and args.lang and ("/" .. args.lang) or ""
    local scale = args.scale or 1


     if data == "base" then
     if data == "base" then
Line 46: Line 47:


     local image = mw.html.create('div'):addClass('image-cropped')
     local image = mw.html.create('div'):addClass('image-cropped')
     image:tag('div'):addClass('image-wrap'):wikitext("[[File:Character Face " .. CHARACTER_ID[character] .. "-FACE " .. pathIndex .. jobIndex .. transString .. ".png|link=" .. link .. lang .. "]]")
     image:tag('div'):addClass('image-wrap')
        :attr({
            width = 116 * scale,
            height = 60 * scale
        })
        :wikitext("[[File:Character Face " .. CHARACTER_ID[character] .. "-FACE " .. pathIndex .. jobIndex .. transString .. ".png|link=" .. link .. lang .. "]]")


     return tostring(image)
     return tostring(image)