asteroid crushing recipe in signal gui

This commit is contained in:
Brevven 2025-02-16 14:43:45 -08:00
parent 7e99170f27
commit e04739d9db
4 changed files with 13 additions and 2 deletions

View file

@ -928,7 +928,12 @@ function add_product(recipe, product)
if recipe ~= nil then
if product.name and data.raw[product.type][product.name] then
if recipe.results == nil then
recipe.results = {{recipe.result, recipe.result_count and recipe.result_count or 1}}
recipe.results = {}
end
for _, old in pairs(recipe.results) do
if old.name == product.name then
return
end
end
recipe.result = nil
recipe.result_count = nil