crafting efficiency
This commit is contained in:
parent
21dc3e77c0
commit
5db52eb57f
4 changed files with 34 additions and 9 deletions
26
compatibility/crafting-efficiency.lua
Normal file
26
compatibility/crafting-efficiency.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
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
|
||||
(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
|
||||
|
|
@ -3,6 +3,7 @@ require("prototypes/processing-unit-updates")
|
|||
require("prototypes/recipe-updates")
|
||||
require("map-gen-preset-updates")
|
||||
-- require("compatibility/bob")
|
||||
require("compatibility/crafting-efficiency")
|
||||
|
||||
-- require("strange-matter")
|
||||
-- require("compatibility/248k")
|
||||
|
|
|
|||
5
me.lua
5
me.lua
|
|
@ -2,6 +2,11 @@ local me = {}
|
|||
|
||||
me.name = "bzgold"
|
||||
me.list = {}
|
||||
me.recipes = {
|
||||
"electronic-circuit-silver", "silver-plate", "silver-wire",
|
||||
"gold-ingot", "platinum-ingot", "palladium-ingot",
|
||||
"temperature-sensor", "mlcc",
|
||||
}
|
||||
|
||||
|
||||
function me.silver()
|
||||
|
|
|
|||
11
modules.lua
11
modules.lua
|
|
@ -1,15 +1,8 @@
|
|||
-- Enable prod modules for some recipes
|
||||
-- Recipes with very specific ratios are deliberately excluded
|
||||
recipes = {
|
||||
"electronic-circuit-silver", "silver-plate", "silver-wire",
|
||||
"gold-ingot", "platinum-ingot", "palladium-ingot",
|
||||
"temperature-sensor", "mlcc",
|
||||
}
|
||||
local util = require("data-util")
|
||||
|
||||
if mods["Krastorio2"] then
|
||||
end
|
||||
|
||||
for i, recipe in pairs(recipes) do
|
||||
for i, recipe in pairs(util.me.recipes) do
|
||||
if data.raw.recipe[recipe] then
|
||||
for j, module in pairs(data.raw.module) do
|
||||
if module.effect then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue