Module:Inventory slot: Difference between revisions
Support nourl, remove now unnecessary br |
Remove BE and LCE suffixes from links |
||
| Line 13: | Line 13: | ||
-- other modules (such as being moved outside links) | -- other modules (such as being moved outside links) | ||
prefixes = { | prefixes = { | ||
any = 'Any', | any = 'Any', | ||
matching = 'Matching', | matching = 'Matching', | ||
damaged = 'Damaged', | damaged = 'Damaged', | ||
}, | |||
suffixes = { | |||
be = 'BE', | |||
lce = 'LCE', | |||
}, | }, | ||
templateFileUrl = 'FileUrl', | templateFileUrl = 'FileUrl', | ||
} | } | ||
p.i18n = i18n | p.i18n = i18n | ||
local random = require( i18n.moduleRandom ).random | local random = require( i18n.moduleRandom ).random | ||
| Line 105: | Line 105: | ||
else | else | ||
link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' ) | link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' ) | ||
for _, suffix in pairs( i18n.suffixes ) do | |||
link = link:gsub( ' ' .. suffix .. '$', '' ) | |||
end | |||
end | end | ||
elseif link:lower() == 'none' then | elseif link:lower() == 'none' then | ||