From 5db25cd8a0ef8c48cd9e5616c02984ca40b9a58e Mon Sep 17 00:00:00 2001 From: Nihilistzsche Date: Fri, 10 Feb 2023 17:11:04 -0800 Subject: [PATCH] Everything efficiency. --- compatibility/crafting-efficiency.lua | 25 +++++++++++-------------- prototypes/phenol.lua | 4 ++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/compatibility/crafting-efficiency.lua b/compatibility/crafting-efficiency.lua index ae51f03..aa76720 100644 --- a/compatibility/crafting-efficiency.lua +++ b/compatibility/crafting-efficiency.lua @@ -8,20 +8,17 @@ 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] 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 - local research_level = 6 - if data.raw.recipe[recipe].enabled then - research_level = 1 - else - for tech, tbl in pairs(data.raw.technology) do - for _, effect in pairs(tbl.effects or {}) do - if effect.type == "unlock-recipe" and effect.recipe == recipe then - research_level = math.min(#tbl.unit.ingredients, research_level) - end - end - end - end + and not eff_data[recipe] then + local research_level = 1 + if not data.raw.recipe[recipe].enabled then + for tech, tbl in pairs(data.raw.technology) do + for _, effect in pairs(tbl.effects or {}) do + if effect.type == "unlock-recipe" and effect.recipe == recipe then + research_level = math.min(#tbl.unit.ingredients, 6) + end + end + end + end eff_data[recipe] = { max = 15, icon = data.raw.item[recipe] and data.raw.item[recipe].icon or data.raw.fluid[recipe].icon, diff --git a/prototypes/phenol.lua b/prototypes/phenol.lua index 2e53109..597000e 100644 --- a/prototypes/phenol.lua +++ b/prototypes/phenol.lua @@ -37,8 +37,10 @@ if data.raw.item["coke"] then category = cat, main_product = "phenol", enabled = "false", + icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128, ingredients = {{"coal", 6}, {"wood", 6}}, energy_required = 16, + subgroup = "raw-material", results = { {type="item", name="phenol", amount = 6}, {type="item", name="coke", amount = 3}, @@ -53,8 +55,10 @@ if data.raw.item["coke"] then category = cat, main_product = "phenol", enabled = "false", + icon = "__bzgas__/graphics/icons/phenol.png", icon_size = 128, ingredients = {{"coal", 4}}, energy_required = 6.4, + subgroup = "raw-material", results = { {type="item", name="phenol", amount = 2}, {type="item", name="coke", amount = 1},