Модуль:Meals Lookup: различия между версиями

м Откат правок KrasnoshchekovPavel (обсуждение) к последней версии Mhamster
Метка: откат
Нет описания правки
Строка 341: Строка 341:
     local recipe = p.chemicals[id]
     local recipe = p.chemicals[id]
     local input = buildreagents(frame, getchemicalreagents(recipe))
     local input = buildreagents(frame, getchemicalreagents(recipe))
     local output = recipe["effects"][1]["Entity"]
   
     local outamount = recipe["effects"][1]["Number"]
     local results = {}
    for _, v in pairs(recipe["effects"]) do
    table.insert(results, v.description)
    end
   
     local result = table.concat(results, "\n")
   
     out = frame:preprocess("{{Recipe Box" ..
     out = frame:preprocess("{{Recipe Box" ..
        "|name={{#invoke:Entity Lookup|getname|" .. recipe["effects"][1]["Entity"] .. "}}" ..
         "|component-1=" .. input ..
         "|component-1=" .. input ..
        "|name= " ..
         "|transformer={{Recipe Transformers|mixableRecipes}}" ..
         "|transformer={{Recipe Transformers|mixableRecipes}}" ..
         "|result={{Result Component|item={{#invoke:Entity Lookup|getname|" ..
         "|result=" .. result .. "}}")
        output .. "}}|image=" .. getimage(frame, output) .. "|amount=" .. outamount .. "}}" ..
        "}}")
     return out
     return out
end
end