Module:Inventory slot: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 139: Line 139:
-- link = nil
-- link = nil
-- end
-- end
-- local link = args.link or ''
-- if link == '' then
-- if mod then  -- <----- this if statement is edited too
-- if mod == "parallel" then
-- link = name
-- else
-- link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', name )
-- end
-- else
-- link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' ) .. ' (Vanilla)'
-- for _, suffix in pairs( i18n.suffixes ) do
-- link = link:gsub( ' ' .. suffix .. '$', '' )
-- end
-- end
-- elseif link:lower() == 'none' then
-- link = nil
-- end
-- if link == pageName then
-- link = nil
-- end
local link = args.link or ''
local link = args.link or ''
Line 149: Line 170:
end
end
else
else
link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' ) .. ' (Vanilla)'
link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' )
for _, suffix in pairs( i18n.suffixes ) do
for _, suffix in pairs( i18n.suffixes ) do
link = link:gsub( ' ' .. suffix .. '$', '' )
link = link:gsub( ' ' .. suffix .. '$', '' )
Line 159: Line 180:
if link == pageName then
if link == pageName then
link = nil
link = nil
end
end
local formattedTitle
local formattedTitle

Navigation menu