ElEditors, Interface administrators, Administrators
70,975
edits
No edit summary |
No edit summary |
||
Line 29: | Line 29: | ||
local pathIndex = "" | local pathIndex = "" | ||
local jobIndex = "" | local jobIndex = "" | ||
local transString = "" | |||
if data == "base" then | if data == "base" then | ||
Line 35: | Line 36: | ||
local arr = split(data, "x"); | local arr = split(data, "x"); | ||
pathIndex = arr[1] .. "LINE_" | pathIndex = arr[1] .. "LINE_" | ||
if string.find(pathIndex, "t") then | |||
transString = "_T" | |||
pathIndex = pathIndex:gsub("t", "") | |||
arr[2] = "2" | |||
end | |||
jobIndex = arr[2] and ("0" .. arr[2]) or "" | jobIndex = arr[2] and ("0" .. arr[2]) or "" | ||
end | end | ||
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[args[1]] .. "-FACE " .. pathIndex .. jobIndex .. ".png]]") | image:tag('div'):addClass('image-wrap'):wikitext("[[File:Character Face " .. CHARACTER_ID[args[1]] .. "-FACE " .. pathIndex .. jobIndex .. transString .. ".png]]") | ||
return tostring(image) | return tostring(image) |