Dead by Daylight Wiki
No edit summary
No edit summary
Line 8: Line 8:
 
local split = mw.text.split(args[1],' ')
 
local split = mw.text.split(args[1],' ')
 
for i, v in ipairs(split) do
 
for i, v in ipairs(split) do
v = mw.ustring.gsub(v,"%p","")
 
 
if (v == '&') then
 
if (v == '&') then
 
v = 'And'
 
v = 'And'
 
end
 
end
 
v = mw.ustring.gsub(v,"%p","")
 
if i == 1 then
 
if i == 1 then
 
output = output .. mw.language.getContentLanguage():lc(v)
 
output = output .. mw.language.getContentLanguage():lc(v)

Revision as of 15:06, 5 August 2019


local p = {}
p.main = function(f)
	local args = f:getParent().args
	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 = mw.ustring.gsub(v,"%p","")
		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