From 2bbb00146833d99ec1818164b93a7b9f4f59de51 Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 16 Jan 2023 19:03:34 -0800 Subject: [PATCH] update --- changelog.txt | 4 ++-- compatibility/crafting-efficiency.lua | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index ea9686d..16beaf5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,8 +1,8 @@ --------------------------------------------------------------------------------------------------- Version: 1.2.11 -Date: 2022-01-15 +Date: 2022-01-17 Features: - - Crafting efficiency compatibility + - (Beta) Crafting efficiency compatibility --------------------------------------------------------------------------------------------------- Version: 1.2.10 Date: 2022-12-27 diff --git a/compatibility/crafting-efficiency.lua b/compatibility/crafting-efficiency.lua index 27b6eff..282f6e5 100644 --- a/compatibility/crafting-efficiency.lua +++ b/compatibility/crafting-efficiency.lua @@ -7,10 +7,12 @@ if mods["crafting-efficiency-2"] then for i, recipe in pairs(util.me.recipes) do -- 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 util.get_result_count(recipe) == 1 then + if data.raw.recipe[recipe] and (data.raw.item[recipe] or data.raw.fluid[recipe]) + and not eff_data[recipe] and + (data.raw.recipe[recipe].main_product or util.get_result_count(recipe) == 1) then eff_data[recipe] = { 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 }, research = { level = 6 }, }