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

Нет описания правки
Нет описания правки
Строка 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 output = {}
    for _, v in pairs(recipe["effects"]) do
    table.insert(output, v.description)
    end
   
     output = string.concat(output, "\n")
   
     out = frame:preprocess("{{Recipe Box" ..
     out = frame:preprocess("{{Recipe Box" ..
         "|name={{#invoke:Entity Lookup|getname|" .. recipe["effects"][1]["Entity"] .. "}}" ..
         "|name={{#invoke:Entity Lookup|getname|" .. recipe["effects"][1]["Entity"] .. "}}" ..
         "|component-1=" .. input ..
         "|component-1=" .. input ..
         "|transformer={{Recipe Transformers|mixableRecipes}}" ..
         "|transformer={{Recipe Transformers|mixableRecipes}}" ..
         "|result={{Result Component|item={{#invoke:Entity Lookup|getname|" ..
         "|result=" .. output .. "}}")
        output .. "}}|image=" .. getimage(frame, output) .. "|amount=" .. outamount .. "}}" ..
        "}}")
     return out
     return out
end
end