commit
0b02d52de7
3 changed files with 19 additions and 7 deletions
|
|
@ -31,6 +31,7 @@ data:extend(
|
||||||
always_show_made_in = true,
|
always_show_made_in = true,
|
||||||
always_show_products = true,
|
always_show_products = true,
|
||||||
allow_productivity = true,
|
allow_productivity = true,
|
||||||
|
subgroup = "raw-material",
|
||||||
ingredients =
|
ingredients =
|
||||||
{
|
{
|
||||||
{type = "fluid", name = "sulfuric-acid", amount = 3},
|
{type = "fluid", name = "sulfuric-acid", amount = 3},
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ data:extend({
|
||||||
enabled = true,
|
enabled = true,
|
||||||
energy_required = mods.Krastorio2 and 16 or 3.2,
|
energy_required = mods.Krastorio2 and 16 or 3.2,
|
||||||
ingredients = {{"aluminum-ore", mods.Krastorio2 and 10 or 1}},
|
ingredients = {{"aluminum-ore", mods.Krastorio2 and 10 or 1}},
|
||||||
|
subgroup = "raw-material",
|
||||||
results = alumina_results,
|
results = alumina_results,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8,20 +8,30 @@ if mods["crafting-efficiency-2"] then
|
||||||
for i, recipe in pairs(util.me.recipes) do
|
for i, recipe in pairs(util.me.recipes) do
|
||||||
-- add remaining recipes with direct items to find the icons
|
-- 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])
|
if data.raw.recipe[recipe] and (data.raw.item[recipe] or data.raw.fluid[recipe])
|
||||||
and not eff_data[recipe] and
|
and not eff_data[recipe] then
|
||||||
recipe ~= "alumina" and -- for some reason this does not work, despite having a main_product
|
local research_level = 1
|
||||||
recipe ~= "phenol" and -- for some reason this does not work, despite having a main_product
|
if not data.raw.recipe[recipe].enabled then
|
||||||
"enriched-" ~= string.sub(recipe, 1, string.len("enriched-")) and
|
for tech, tbl in pairs(data.raw.technology) do
|
||||||
(data.raw.recipe[recipe].main_product or util.get_result_count(recipe) == 1) then
|
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] = {
|
eff_data[recipe] = {
|
||||||
max = 15,
|
max = 15,
|
||||||
icon = util.get_item_or_fluid_icon(recipe),
|
icon = util.get_item_or_fluid_icon(recipe),
|
||||||
crafting = { efficiency = 10 },
|
crafting = { efficiency = 10 },
|
||||||
research = { level = 6 },
|
research = { level = research_level },
|
||||||
}
|
}
|
||||||
|
if recipe:find("smelting") then
|
||||||
|
eff_data[recipe].crafting.efficiency = 20
|
||||||
|
eff_data[recipe].crafting.category = "smelting"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for recipe, d in pairs(eff_data) do
|
for recipe, d in pairs(eff_data) do
|
||||||
log("Adding "..recipe.." crafting efficiency")
|
log("Adding "..recipe.." crafting efficiency")
|
||||||
d.name = recipe:gsub("^%l", string.upper).." efficiency"
|
d.name = recipe:gsub("^%l", string.upper).." efficiency"
|
||||||
CE_Add_Recipe(d, recipe)
|
CE_Add_Recipe(d, recipe)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue