Everything efficiency.
This commit is contained in:
parent
2e41b14809
commit
5db25cd8a0
2 changed files with 15 additions and 14 deletions
|
@ -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,
|
||||
|
|
|
@ -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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue