crafting efficiency
This commit is contained in:
parent
bd88ab6fb1
commit
57adbec0dd
6 changed files with 37 additions and 3 deletions
27
compatibility/crafting-efficiency.lua
Normal file
27
compatibility/crafting-efficiency.lua
Normal file
|
@ -0,0 +1,27 @@
|
|||
local util = require("data-util");
|
||||
|
||||
if mods["crafting-efficiency-2"] then
|
||||
|
||||
local eff_data = {
|
||||
}
|
||||
|
||||
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
|
||||
recipe ~= "phenol" and -- for some reason this doesn't work right now
|
||||
(data.raw.recipe[recipe].main_product or util.get_result_count(recipe) == 1) then
|
||||
eff_data[recipe] = {
|
||||
max = 15,
|
||||
icon = data.raw.item[recipe] and data.raw.item[recipe].icon or data.raw.fluid[recipe].icon,
|
||||
crafting = { efficiency = 10 },
|
||||
research = { level = 6 },
|
||||
}
|
||||
end
|
||||
end
|
||||
for recipe, d in pairs(eff_data) do
|
||||
log("Adding "..recipe.." crafting efficiency")
|
||||
d.name = recipe:gsub("^%l", string.upper).." efficiency"
|
||||
CE_Add_Recipe(d, recipe)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue