fix
This commit is contained in:
parent
3866132e3e
commit
e60dd5dfb1
2 changed files with 10 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.1.9
|
||||
Date: 2022-01-17
|
||||
Date: 2023-01-17
|
||||
Features:
|
||||
- (Beta) Crafting efficiency compatibility
|
||||
---------------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -10,15 +10,15 @@ if mods["crafting-efficiency-2"] then
|
|||
if data.raw.recipe[recipe] and (data.raw.item[recipe] or data.raw.fluid[recipe])
|
||||
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
|
||||
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 = util.get_item_or_fluid_icon(recipe),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue