Nie podano opisu zmian |
Nie podano opisu zmian |
||
Linia 3: | Linia 3: | ||
local p = {} |
local p = {} |
||
function p.link(name) |
function p.link(name) |
||
− | if string.find(name," %( |
+ | if string.find(name," %(Wyspa%)") ~= nil then |
return '[['..name..'|'..string.gsub(name,' %(Wyspa%)','')..']] [[File:The Island Icon.png|link=Wyspa]]' |
return '[['..name..'|'..string.gsub(name,' %(Wyspa%)','')..']] [[File:The Island Icon.png|link=Wyspa]]' |
||
− | elseif string.find(name," %( |
+ | elseif string.find(name," %(Prymitywność Plus%)") ~= nil then |
return '[['..name..'|'..string.gsub(name,' %(Prymitywność Plus%)','')..']] [[File:Primitive Plus Icon.png|link=Prymitywność Plus]]' |
return '[['..name..'|'..string.gsub(name,' %(Prymitywność Plus%)','')..']] [[File:Primitive Plus Icon.png|link=Prymitywność Plus]]' |
||
− | elseif string.find(name," %( |
+ | elseif string.find(name," %(Spalona Ziemia%)") ~= nil then |
return '[['..name..'|'..string.gsub(name,' %(Spalona Ziemia%)','')..']] [[File:Scorched Earth Icon.png|link=Spalona Ziemia]]' |
return '[['..name..'|'..string.gsub(name,' %(Spalona Ziemia%)','')..']] [[File:Scorched Earth Icon.png|link=Spalona Ziemia]]' |
||
elseif string.find(name," %(The Center%)") ~= nil then |
elseif string.find(name," %(The Center%)") ~= nil then |
||
Linia 13: | Linia 13: | ||
elseif string.find(name," %(Ragnarok%)") ~= nil then |
elseif string.find(name," %(Ragnarok%)") ~= nil then |
||
return '[['..name..'|'..string.gsub(name,' %(Ragnarok%)','')..']] [[File:Ragnarok Icon.png|link=Ragnarok]]' |
return '[['..name..'|'..string.gsub(name,' %(Ragnarok%)','')..']] [[File:Ragnarok Icon.png|link=Ragnarok]]' |
||
− | elseif string.find(name," %( |
+ | elseif string.find(name," %(Aberracja%)") ~= nil then |
return '[['..name..'|'..string.gsub(name,' %(Aberracja%)','')..']] [[File:Aberration Icon.png|link=Aberracja]]' |
return '[['..name..'|'..string.gsub(name,' %(Aberracja%)','')..']] [[File:Aberration Icon.png|link=Aberracja]]' |
||
− | elseif string.find(name," %( |
+ | elseif string.find(name," %(Wyginięcie%)") ~= nil then |
return '[['..name..'|'..string.gsub(name,' %(Wyginięcie%)','')..']] [[File:Extinction Icon.png|link=Wyginięcie]]' |
return '[['..name..'|'..string.gsub(name,' %(Wyginięcie%)','')..']] [[File:Extinction Icon.png|link=Wyginięcie]]' |
||
− | elseif string.find(name," %( |
+ | elseif string.find(name," %(Mobilne%)") ~= nil then |
return '[['..name..'|'..string.gsub(name,' %(Mobilne%)','')..']] [[File:Logo Mobile.svg|link=ARK Survival Evolved Mobile|16px]]' |
return '[['..name..'|'..string.gsub(name,' %(Mobilne%)','')..']] [[File:Logo Mobile.svg|link=ARK Survival Evolved Mobile|16px]]' |
||
elseif string.find(name,"Mod:Primal Fear ") ~= nil then |
elseif string.find(name,"Mod:Primal Fear ") ~= nil then |
Wersja z 18:25, 3 sie 2018
Dokumentacja dla tego modułu może zostać utworzona pod nazwą Moduł:DLCLink/opis
-- 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," %(Wyspa%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Wyspa%)','')..']] [[File:The Island Icon.png|link=Wyspa]]'
elseif string.find(name," %(Prymitywność Plus%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Prymitywność Plus%)','')..']] [[File:Primitive Plus Icon.png|link=Prymitywność Plus]]'
elseif string.find(name," %(Spalona Ziemia%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Spalona Ziemia%)','')..']] [[File:Scorched Earth Icon.png|link=Spalona Ziemia]]'
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," %(Aberracja%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Aberracja%)','')..']] [[File:Aberration Icon.png|link=Aberracja]]'
elseif string.find(name," %(Wyginięcie%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Wyginięcie%)','')..']] [[File:Extinction Icon.png|link=Wyginięcie]]'
elseif string.find(name," %(Mobilne%)") ~= nil then
return '[['..name..'|'..string.gsub(name,' %(Mobilne%)','')..']] [[File:Logo Mobile.svg|link=ARK Survival Evolved Mobile|16px]]'
elseif string.find(name,"Mod:Primal Fear ") ~= nil then
return '[['..name..'|'..string.gsub(name,'Mod:Primal Fear ','')..']] [[File:PrimalFearIcon.png|link=Mod:Primal Fear]]'
else
local title = mw.title.new(name)
if title == nil then
return 'page not found: ' .. name
end
local link = (#title.nsText > 0) and (title.fullText .. '|' .. title.text) or title.text
return '[['..link..']]'
end
end
return p