crafting efficiency
This commit is contained in:
parent
6c7b85f515
commit
e7181ad5e8
6 changed files with 39 additions and 7 deletions
|
@ -1,4 +1,11 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 0.0.11
|
||||||
|
Date: 2022-01-17
|
||||||
|
Features:
|
||||||
|
- (Beta) Crafting efficiency compatibility
|
||||||
|
Localization:
|
||||||
|
- ru by CV514
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 0.0.10
|
Version: 0.0.10
|
||||||
Date: 2022-01-06
|
Date: 2022-01-06
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
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
|
|
@ -5,7 +5,7 @@ require("map-gen-preset-updates")
|
||||||
-- require("strange-matter")
|
-- require("strange-matter")
|
||||||
-- require("compatibility/248k")
|
-- require("compatibility/248k")
|
||||||
require("compatibility/bob")
|
require("compatibility/bob")
|
||||||
|
require("compatibility/crafting-efficiency")
|
||||||
require("prototypes/assembler-updates")
|
require("prototypes/assembler-updates")
|
||||||
|
|
||||||
local util = require("data-util")
|
local util = require("data-util")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bzchlorine",
|
"name": "bzchlorine",
|
||||||
"version": "0.0.10",
|
"version": "0.0.11",
|
||||||
"factorio_version": "1.1",
|
"factorio_version": "1.1",
|
||||||
"title": "Salt & Chlorine",
|
"title": "Salt & Chlorine",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
2
me.lua
2
me.lua
|
@ -2,6 +2,8 @@ local me = {}
|
||||||
|
|
||||||
me.name = "bzchlorine"
|
me.name = "bzchlorine"
|
||||||
me.list = {}
|
me.list = {}
|
||||||
|
-- Recipes with very specific ratios are deliberately excluded
|
||||||
|
me.recipes = {"chlorine", "epoxy", "pcb-substrate", "pcb", "bakelite-hcl"}
|
||||||
|
|
||||||
function me.starting_patch()
|
function me.starting_patch()
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
-- Enable prod modules for some recipes
|
-- Enable prod modules for some recipes
|
||||||
-- Recipes with very specific ratios are deliberately excluded
|
local util = require("data-util")
|
||||||
recipes = {"chlorine", "epoxy", "pcb-substrate", "pcb", "bakelite-hcl"}
|
|
||||||
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
|
if data.raw.recipe[recipe] then
|
||||||
for j, module in pairs(data.raw.module) do
|
for j, module in pairs(data.raw.module) do
|
||||||
if module.effect then
|
if module.effect then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue