Sin resumen de edición |
Sin resumen de edición |
||
Línea 1: | Línea 1: | ||
+ | -- checks if the name contains a DLC-suffix and changes it to the according DLC-icon. then returns a link to name. |
||
− | -- comprueba si el nombre contiene un sufijo DLC y lo cambia al icono DLC correspondiente. luego devuelve un enlace para nombrar. |
||
local p = {} |
local p = {} |
Revisión del 20:28 19 dic 2017
La documentación para este módulo puede ser creada en Módulo:DLCLink/doc
-- checks if the name contains a DLC-suffix and changes it to the according DLC-icon. then returns a link to name.
local p = {}
function p.link(name)
if string.find(name," %(Primitive Plus%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Primitive Plus%)','')..']] [[File:Primitive Plus Icon.png|link=Primitive Plus]]'
elseif string.find(name," %(Scorched Earth%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Scorched Earth%)','')..']] [[File:Scorched Earth Icon.png|link=Scorched Earth]]'
elseif string.find(name," %(The Center%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(The Center%)','')..']] [[File:The Center Icon.png|link=The Center]]'
elseif string.find(name," %(Ragnarok%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Ragnarok%)','')..']] [[File:Ragnarok Icon.png|link=Ragnarok]]'
elseif string.find(name," %(Aberration%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Aberration%)','')..']] [[File:Aberration Icon.png|link=Aberration]]'
else
return '[['..name..']]'
end
end
return p