FANDOM


-- 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]]'
  else
    return '[['..name..']]'
  end
end
return p