Module:Inventory slot: Difference between revisions

added comments to pretty much everything, a few other changes (some ported upstream from RuMCW, notably WebP support and more robust frame text parsing)
 
m Set all links to disable on inventory slot
 
(One intermediate revision by the same user not shown)
Line 164: Line 164:
if link == '' then
if link == '' then
if mod then
if mod then
link = i18n.modLink:gsub( '%$1', mod ):gsub( '%$2', name )
link = nil
else
else
-- Strip the “Damaged” prefix out
-- Strip the “Damaged” prefix out
link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' )
link = nil
end
end
elseif link:lower() == 'none' then
elseif link:lower() == 'none' then