Warning.png

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

Изменения

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

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

294 байта убрано, 14:36, 24 октября 2018
м
Тест
if multirow then
head = ''
elseif head ~= '' then
multirow = 1
f:callParserFunction( '#dplvar:set', 'multirow', '1' )
end
local input = mw.text.trim( args[1] or args["Ресурс"] or '' )
local output = mw.text.trim( args[2] or args["Выход"] or '' )
local fuel = args["топливо"] or args["Топливо"] or ''
if fuel == '' and (args["Мод"] == 'IndustrialCraft 2' or 'GregTech' and args['Расход'] == 'Электричество') then
-- Ячейка с названием
local nameCell
if f:callParserFunction( '#dplvar', 'craftingnamesmeltingname' ) == '1' then if args["название"] or '' ~= '' then nameCell = args["название"] else local names = {} local links = {} for v in mw.text.gsplit( args[2] or args["Выход"] or '', '%s*;%s*' ) do parts = getParts( v, args["Мод"] ) parts.mod = parts.mod or '' if not names[( parts.mod or .. ':' ) .. parts.name] and output ~= '' then table.insert( links, prefixedLink( parts.name, parts.mod ) ) names[parts.mod .. ':' .. parts.name] = 1 end
end
 
nameCell = table.concat( links, '&nbsp;или<br>' )
end
nameCell = table.concat( links, '&nbsp;или<br>' )
end
end if nameCell and args["запланированное"] then nameCell = nameCell .. '<br>(' .. args["запланированное"] .. ')' end
-- Создать список ингредиентов
else
ingredientsCell = {}
for k, v in ipairs{ input, fuel } ( ingredientKeys ) do
local separator = '&nbsp;+'
if k == 2 and next( ingredients ) #ingredientKeys then separator = '&nbsp;+<br>\n' elseif animatedIngredients[v] and not animatedIngredients[v].final then separator = '&nbsp;или' end  local mod = ( ingredients[v] or animatedIngredients[v] ).mod local name = ( ingredients[v] or animatedIngredients[v] ).name table.insert( ingredientsCell, prefixedLink( name, mod ) .. separator )
end
ingredientsCell local mod = ( ingredients[v] or animatedIngredients[v] ).mod local name = ( ingredients[v] or animatedIngredients[v] ).name table.concatinsert( ingredientsCell, '<br>\n' prefixedLink( name, mod ) .. separator )
end
ingredientsCell = table.concat( ingredientsCell, '<br>\n' )
end
-- Остальные аргументы
local newArgs = {}  newArgs["Ресурс"] = args[1] or args["Ресурс"], newArgs["Выход"] = args[2] or args["Выход"], newArgs["Топливо"] = fuel, newArgs["РНазв"] = args["рНазв"], newArgs["ВНазв"] = args["вНазв"], newArgs["ТНазв"] = args["тНазв"], newArgs["Мод"] = args["Мод"], newArgs["Прогресс"] = args["Прогресс"], newArgs["Расход"] = args["Расход"]}
-- Ячейка с рецептом
end
end
end
end
end
end
if args["отладка"] == '1' then
return '<pre>' .. header .. '\n' .. row .. '\n|-\n' .. footer .. categories .. '</pre>'
else
return header .. '\n' .. row .. '\n|-\n' .. footer .. categories
end
end
return header .. '\n' .. row .. '\n|-\n' .. footer .. category
end
return p
1136
правок

Навигация