This commit is contained in:
Brevven 2023-01-16 18:41:01 -08:00
parent a714bc6a01
commit c8661ef1d7

View file

@ -7,12 +7,13 @@ if mods["crafting-efficiency-2"] then
for i, recipe in pairs(util.me.recipes) do for i, recipe in pairs(util.me.recipes) do
-- add remaining recipes with direct items to find the icons -- add remaining recipes with direct items to find the icons
if data.raw.recipe[recipe] and data.raw.item[recipe] and not eff_data[recipe] and if data.raw.recipe[recipe] and (data.raw.item[recipe] or data.raw.fluid[recipe])
and not eff_data[recipe] and
recipe ~= "alumina" and -- for some reason this does not work, despite having a main_product recipe ~= "alumina" and -- for some reason this does not work, despite having a main_product
(data.raw.recipe[recipe].main_product or util.get_result_count(recipe) == 1) then (data.raw.recipe[recipe].main_product or util.get_result_count(recipe) == 1) then
eff_data[recipe] = { eff_data[recipe] = {
max = 15, max = 15,
icon = data.raw.item[recipe].icon, icon = data.raw.item[recipe] and data.raw.item[recipe].icon or data.raw.fluid[recipe].icon,
crafting = { efficiency = 10 }, crafting = { efficiency = 10 },
research = { level = 6 }, research = { level = 6 },
} }