Warning.png

Поддержка Wiki прекращена, она доступна в режиме архива. Информация в ней устарела и может быть неактуальной.

Изменения

Перейти к: навигация, поиск

Модуль:Интерфейс

701 байт добавлено, 12:18, 21 августа 2016
Нет описания правки
----------------------------------------------------------------------------------------------------
-- Модуль для отображения окон интерфейса (крафта, обжига, варки...)на страницах Minecraft Wiki.
----------------------------------------------------------------------------------------------------
return slot{
args[item], ["мод"] = args["Мод"], ["ссылка"] = args[prefix .. 'Ссылка'],
["назв"] = args[prefix .. 'Назв'], ["класс"] = class, ["умолчание"] = default, ["стиль"] = style
}
end
local arrow = body:tag('span'):addClass('mcui-arrow'):tag('br'):done()
if args["Стрелка"] or '' ~= '' then
arrow:csscssText( 'background-image', ':{{FileUrl|Grid layout ' .. args["Стрелка"] .. ' (' .. args["Мод"] .. ').png}}'
)
end
icon:addClass( 'mcui-shapeless' )
:attr( 'title',
'Этот рецепт — рецепт — бесформенный; ресурсы могут располагаться в сетке верстака в любом порядке.'
)
elseif fixed ~= '' then
local exceptFixed = ''
if notFixed ~= '' then
exceptFixed = ', за исключением ' .. notFixed .. '.'
end
icon:addClass( 'mcui-fixed' )
:attr( 'title',
'Этот рецепт — рецепт — фиксированный, его ингредиенты не могут быть перемещены или зеркально отражены' .. exceptFixed .. '.'
)
end
end
local body = mw.html.create( 'span' ):addClass( 'mcui mcui-Furnace' ):cssText( 'height:108px' )
local input = body:tag( 'span' ):addClass( 'mcui-input' )
end
end
if fuelImg ~= '' and args["Мод"] then fuel:cssText( 'background-image:{{FileUrl|Grid layout ' .. fuelImg .. ' (' .. args["Мод"] .. ').png}}' )
end
input:wikitext( addSlot( args, 'Топливо', 'Т' ) )
local arrow = body:tag( 'span' ):addClass( 'mcui-arrow' ):tag( 'br' ):done()
local arrowImg = args["Прогресс"] or ''
if not burning or ( args["Выход"] or '' ) == '' then
end
end
if arrowImg ~= '' and args["Мод"] then arrow:csscssText( 'height: 100%; vertical-align: middle; background-image:none; margin:0;width:0',) body:wikitext( '{{FileUrl|[[File:Grid layout ' .. arrowImg .. ' Progress (' .. args["Мод"] .. ').png}}|link=|middle]]' ) end body input:tagcssText( 'span' ) margin-right:addClass( 'mcui-output14px' ) :wikitext( addSlot( args, 'Выход', 'В', 'invslot-large' ) ) end
local output = body:tag( 'span' )
:addClass( 'mcui-output' )
:wikitext( addSlot( args, 'Выход', 'В', 'invslot-large' ) )
 
if arrowImg ~= '' and args["Мод"] then
output:cssText( 'margin-left:18px' )
end
 
return tostring( mw.html.create( 'div' ):node( body ) )
end
local body = mw.html.create( 'span' ):addClass( 'mcui mcui-Brewing_Stand' )
local input = body:tag( 'span' ):addClass( 'mcui-input' )
local inactive = ( args["Ресурс"] or '' ) == '' or
( ( args["Выход1"] or '' ) == '' and ( args["Выход2"] or '' ) == '' and ( args["Выход3"] or '' ) == '' )
 
if not inactive then
local fuelslot = 'Огненный порошок'
input:wikitext( slot{ fuelslot } )
else
input:wikitext( slot{ ["умолчание"] = 'Grid_layout_Brewing_Blaze_Empty' } )
end
 
input:tag( 'span' ):addClass( 'mcui-blaze' ):tag( 'br' )
input:tag( 'span' ):addClass( 'mcui-bubbling' ):tag( 'br' )
input:wikitext( addSlot( args, 'Ресурс', 'Р' ) )
input:tag( 'span' ):addClass( 'mcui-arrow' ):tag( 'br' )
if ( args["Ресурс"] or '' ) == '' or ( ( args["Выход1"] or '' ) == '' and ( args["Выход2"] or '' ) == '' and ( args["Выход3"] or '' ) == '' )inactive
then
input:addClass( 'mcui-inactive' )
end
body:tag( 'span' ):addClass( 'mcui-paths' ):tag( 'br' )

Навигация