Module:Inventory slot: Difference between revisions

m
no edit summary
m (No random)
mNo edit summary
Line 23: Line 23:
--local random = require( i18n.moduleRandom ).random
--local random = require( i18n.moduleRandom ).random
local aliases = mw.loadData( i18n.invAliases )
local aliases = mw.loadData( i18n.invAliases )
local gm4atlas = mw.loadData( i18n.gm4Atlas )
local gm4aliases = mw.loadData( i18n.gm4Aliases )
local pageName = mw.title.getCurrentTitle().text
local pageName = mw.title.getCurrentTitle().text


Line 106: Line 108:
local img
local img
if mod then
if mod and module then
if name:match( '%.gif$' ) or name:match( '%.png$' ) then
if module then
img = i18n.gm4Filename:gsub( '%$1', name .. ' (' .. module .. ')' )
if name:match( '%.gif$' ) or name:match( '%.png$' ) then
name = name:sub( 0, -5 )
img = i18n.gm4Filename:gsub( '%$1', name .. ' (' .. module .. ')' )
name = name:sub( 0, -5 )
else
img = i18n.gm4Filename:gsub( '%$1', name .. ' (' .. module .. ').png' )
end
else
else
img = i18n.gm4Filename:gsub( '%$1', name .. ' (' .. module .. ').png' )
if name:match( '%.gif$' ) or name:match( '%.png$' ) then
img = i18n.gm4Filename:gsub( '%$1', name )
name = name:sub( 0, -5 )
else
img = i18n.gm4Filename:gsub( '%$1', name .. '.png' )
end
end
end
elseif name:match( '%.gif$' ) or name:match( '%.png$' ) then
elseif name:match( '%.gif$' ) or name:match( '%.png$' ) then
Line 126: Line 137:
if mod then
if mod then
if module ~= nil then
if module ~= nil then
link = module .. '/#' .. name
end
end
link = i18n.modLink:gsub( '%$1', module ):gsub( '#%$2', name )
link = name
else
else
--link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' )
--link = name:gsub( '^' .. i18n.prefixes.damaged .. ' ', '' )
Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,636

edits