Documentation for this module may be created at Module:PerkImage/doc
--The function is used in Module:Survivors and Module:Killers for retireving Perk Image
local p = {}
p.main = function(f)
local args = {}
if (type(f) ~= 'string') then
args = f:getParent().args
else
args[1] = f
end
local output = ''
if args[1] == nil or args[1] == '' then
return ''
end
local split = mw.text.split(args[1],' ')
for i, v in ipairs(split) do
if (v == '&') then
v = 'And'
end
v = string.gsub(v,"['!:]","")
if i == 1 then
output = output .. mw.language.getContentLanguage():lc(v)
else
output = output .. mw.language.getContentLanguage():ucfirst(v)
end
end
output = 'IconPerks '..output..'.png'
return output
end
return p