Warning.png

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

Изменения

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

Модуль:Обжиг

294 байта убрано, 18:22, 14 октября 2018
м
Откат
if multirow then
head = ''
elseif head ~= '' then multirow = 1 f:callParserFunction( '#dplvar:set', 'multirow', '1' ) else head = 1 end
-- Заканчивать таблицу при необходимости
local foot = args["подвал"] or ''
recipeClass = 'class="unsortable" |'
end
local process = ' Процесс' if args["Прогресс"] and args["Мод"] then process=' Процесс' end
header = table.concat( {
' {| style="text-align:center" class="wikitable ' .. class .. '" data-description="Процесс"',
'! ' .. 'Ингредиенты !! ' .. recipeClass .. process .. name .. description,
'|-'
}, '\n' )
end
if fuel == '' and (args["Мод"] == 'IndustrialCraft 2' or 'GregTech' and args['Расход'] == 'Электричество') then
fuel = 'Энергия'
elseif fuel == '' then fuel = 'v:Любое топливо,1' end
-- Ячейка с названием
local vanilla = {v = 1, vanilla = 1, mc = 1, minecraft = 1}
local nameCell
if args["название"] or '' ~= '' then
nameCell = args["название"]
elseif multirow or f:callParserFunction( '#dplvar', 'smeltingname' ) == '1' then local names = {} local links = {} for v in mw.text.gsplit( args[2] or args["Выход"] or '', '%s*;%s*' ) do parts = getParts( v, args["Мод"] ) if not names[( parts.mod or '' ) .. parts.name] and output ~= '' then local link = '' if parts.mod then link = parts.mod .. '/' .. parts.name .. '|' end if parts.name:find( '^Люб' ) then
if parts.mod then
link = parts.mod .. '/' .. parts.name .. '|' end  if parts.name:find( '^Люб' ) then if parts.mod then link = parts.mod .. '/' .. mw.ustring.gsub( mw.ustring.sub( parts.name, 7 ), "^%l", mw.ustring.upper ) .. '|' end if parts.mod then table.insert( links, mw.ustring.sub( parts.name, 0, 6 ) .. '[[' .. link .. mw.ustring.sub( parts.name, 6 ) .. ']]' ) elseif parts.mod ~= '' then table.insert( links, '[[' .. link .. parts.name .. ']]' ) else table.insert( links, parts.name ) end end names[( parts.mod or '' ) .. parts.name] = 1
end
table.insert( links, mw.ustring.sub( parts.name, 0, 6 ) .. '[[' .. link .. mw.ustring.sub( parts.name, 6 ) .. ']]' )
else
table.insert( links, '[[' .. link .. parts.name .. ']]' )
end
  nameCell = tablenames[( parts.concat( links, mod or '&nbsp;или<br>' ).. parts.name] = 1
end
end nameCell = table.concat( links, '&nbsp;или<br>' ) end if nameCell and args["запланированное"] then nameCell = nameCell .. '<br>(' .. args["запланированное"] .. ')' end
-- Ячейка с ингредиентами
local vanilla = {v = 1, vanilla = 1, mc = 1, minecraft = 1}
local ingredientsCell
if args["ингредиенты"] or '' ~= '' then
if parts.name:find( '^Люб' ) then
if parts.mod then link = parts.mod .. '/' .. mw.ustring.gsub( mw.ustring.sub( parts.name, 7 ), "^%l", mw.ustring.upper ) .. '|' end
table.insert( ingredientsCell, separator .. mw.ustring.sub( parts.name, 0, 6 ) .. '[[' .. link .. mw.ustring.sub( parts.name, 6 ) .. ']]' )
else elseif parts.mod ~= '' then table.insert( ingredientsCell, separator .. '[[' .. link .. parts.name .. ']]' ) else table.insert( ingredientsCell, separator .. parts.name) end separator = ''  ingredients[parts.name] = 1
end
separator = ''
ingredients[parts.name] = 1
end
end
 
ingredientsCell = table.concat( ingredientsCell )
end
ingredientsCell = table.concat( ingredientsCell ) end
-- Остальные аргументы
local newArgs = {
["Ресурс"] = args[1] or args["Ресурс"], ["Выход"] = args[2] or args["Выход"], ["Топливо"] = fuel, ["РНазв"] = args["рНазв"], ["ВНазв"] = args["вНазв"], ["ТНазв"] = args["тНазв"], ["Мод"] = args["Мод"], ["Прогресс"] = args["Прогресс"], ["Расход"] = args["Расход"] }
-- Ячейка с рецептом
local recipeCell = require( 'Модуль:Интерфейс' ).furnace( newArgs )
local row = {
'|\n' .. ingredientsCell, 'style="padding:1px" |\n' .. recipeCell } if nameCell then table.insert( row, 3, '<b>' .. nameCell .. '</b>' ) end if f:callParserFunction( '#dplvar', 'smeltingdescription' ) == '1' then table.insert( row, args["описание"] or '' ) end row = table.concat( row, '\n|' ) local footer = '' if foot ~= '' then footer = '|}' f:callParserFunction( '#dplvar:set', 'smeltingname', '0', 'smeltingdescription', '0' ) end local title = mw.title.getCurrentTitle() local category = '' if args["запланированное"] and args["некат"] ~= '1' and title.namespace == 0 and not title.isSubpage then category = '[[Категория:Запланированное]]' end return header .. '\n' .. row .. '\n|-\n' .. footer .. category
end
return p
1136
правок

Навигация