From 740ba5a5ae092b4a59ea2985783d0f67e8b01ee2 Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 16 Jan 2023 19:05:17 -0800 Subject: [PATCH] update --- changelog.txt | 4 ++-- compatibility/crafting-efficiency.lua | 13 +++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/changelog.txt b/changelog.txt index 09d5ca2..57b1b89 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,10 +1,10 @@ --------------------------------------------------------------------------------------------------- Version: 0.11.8 -Date: 2023-01-15 +Date: 2023-01-17 Fixes: - Add optional depenency on aai-industry to fix some mod load order discrepancies Features: - - Support for Crafting Efficieny mod + - (Beta) Support for Crafting Efficieny mod --------------------------------------------------------------------------------------------------- Version: 0.11.7 Date: 2023-01-01 diff --git a/compatibility/crafting-efficiency.lua b/compatibility/crafting-efficiency.lua index eb9c24b..82ee49f 100644 --- a/compatibility/crafting-efficiency.lua +++ b/compatibility/crafting-efficiency.lua @@ -2,21 +2,14 @@ local util = require("data-util"); if mods["crafting-efficiency-2"] then - local recipes = util.me.recipes local eff_data = { - -- ["synthetic-diamond"] = { - -- max = 15, - -- icon = data.raw.item["diamond"].icon, - -- crafting = { efficiency = 10 }, - -- research = { level = 6 }, - -- }, } - for i, recipe in pairs(recipes) do + 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] then + if data.raw.recipe[recipe] and data.raw.item[recipe] and not eff_data[recipe] and + (data.raw.recipe[recipe].main_product or util.get_result_count(recipe) == 1) then eff_data[recipe] = { - name = recipe.." efficiency", max = 15, icon = data.raw.item[recipe].icon, crafting = { efficiency = 10 },