Изменения

Модуль:Инвентарный слот

771 байт убрано, 09:21, 6 августа 2016
Отмена правки 521, сделанной участником MailGik (обс.)
local category
local parts = p.getParts(frame, args["мод"])
local tooltipTitle title = parts.titleor mw.text.trim(args["назв"] or '')
local mod = parts.mod
local name = parts.name
end
local title = args.title or ''
if title == '' then
if tooltipTitle then
title = tooltipTitle:gsub( '&[0-9a-fk-or]', '' )
elseif link:lower() == 'none' or link ~= name:gsub( '%s%(.*', '' ) then
title = name:gsub( '%s%(.*', '' )
end
end
if not tooltipTitle and title:lower() == 'none' then
tooltipTitle = 0
end
 
local tooltip = ''
if tooltipTitle then
tooltip = ' data-minetip-title="' .. tooltipTitle .. '"'
end
if tooltipDesc then
tooltip = tooltip .. ' data-minetip-text="' .. tooltipDesc .. '"'
end
local image = {
'<span class="item ' .. imgClass .. '" title="' .. title .. '"' .. tooltip .. '>',
'[[Datei:Grid ' .. img .. '.png|32x32px|link=' .. link .. '|alt=' .. alt .. ']]',
'</span>',
}
 
local formattedTitle
local plainTitle
-- & is re-escaped because mw.html treats attributes
-- as plain text, but MediaWiki doesn't
local escapedTitle = mw.ustring.gsub(( plainTitle or '' ):gsub( , '&', '&#38;' ) item:addClass( 'invslot-item-image' ) :wikitext( '[[FileФайл:Grid ', img, '.png|32x32px|link=', link or '', '|', Autolink.xlink(escapedTitle,'nolink'), ']]' )
else
if not sprite then