Изменения

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

86 байтов убрано, 13:13, 9 августа 2016
Нет описания правки
local ids = mw.loadData([[Модуль:ИнвСпрайт/ID]])["IDы"]
local modIds = {}
local animated = mw.ustring.find(args[1], :find( ';')
local pageName = mw.title.getCurrentTitle().text
local imgClass = args["классизобр"]
local formatPattern = '&[0-9a-fk-or]'
if mw.ustring.plainTitle:match(plainTitle, formatPattern) then
formattedTitle = title
plainTitle = mw.ustring.plainTitle:gsub(plainTitle, formatPattern, '')
end
-- & is re-escaped because mw.html treats attributes
-- as plain text, but MediaWiki doesn't
local escapedTitle = mw.ustring.gsub((plainTitle or ''), :gsub( '&', '&')
item:addClass('invslot-item-image')
:wikitext('[[Файл:Grid ', img, '.png|32x32px|link=', link or '', '|', escapedTitle, ']]')
function p.getParts(frame, mod)
local parts = {}
parts.title = mw.ustring.frame:match(frame, '^%[%s*([^%]]+)%s*%]')
parts.mod = mw.text.trim(mw.ustring.frame:match(frame, '([^:%]]+):') or mod or '')
local vanilla = {v = 1, vanilla = 1, mc = 1, minecraft = 1}
end
local nameStart = (mw.ustring.frame:find(frame, ':') or mw.ustring.frame:find(frame, '%]') or 0 ) + 1
if nameStart - 1 == #frame then
nameStart = 1
end
parts.text = mw.ustring.frame:match(frame, '%[%s*([^%]]+)%s*%]$')
return parts