Module:Inventory slot: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 5: Line 5:
-- legacyFilename = 'Grid $1.png',
-- legacyFilename = 'Grid $1.png',
legacyFilename = '$1Invicon $2.png',
legacyFilename = '$1Invicon $2.png',
modLink = 'Mods/$1/$2',
-- modLink = 'Mods/$1/$2',
modLink = '$1:$2',
moduleAliases = [[Module:Inventory slot/Aliases]],
moduleAliases = [[Module:Inventory slot/Aliases]],
moduleRandom = [[Module:Random]],
moduleRandom = [[Module:Random]],
Line 118: Line 119:
img = i18n.filename:gsub( '%$1', name .. '.png' )
img = i18n.filename:gsub( '%$1', name .. '.png' )
end
end
-- local link = args.link or ''
-- if link == '' then
-- if mod then
-- link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', name )
-- else
-- link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' )
-- 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 ''
if link == '' then
if link == '' then
if mod then
if mod then   -- <----- this if statement is edited too
link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', name )
if mod == "parallel" then
link = name
else
link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', name )
end
else
else
link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' )
link = "Vanilla:" .. 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 .. '$', '' )

Navigation menu