crafting efficiency
This commit is contained in:
parent
8ea483b31c
commit
ebd7a88335
6 changed files with 44 additions and 14 deletions
|
|
@ -1,4 +1,11 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.11.8
|
||||
Date: 2023-01-15
|
||||
Fixes:
|
||||
- Add optional depenency on aai-industry to fix some mod load order discrepancies
|
||||
Features:
|
||||
- Support for Crafting Efficieny mod
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.11.7
|
||||
Date: 2023-01-01
|
||||
Changes:
|
||||
|
|
|
|||
32
compatibility/crafting-efficiency.lua
Normal file
32
compatibility/crafting-efficiency.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
local util = require("data-util");
|
||||
|
||||
if mods["crafting-efficiency-2"] then
|
||||
|
||||
local recipes = util.me.recipes
|
||||
local eff_data = {
|
||||
-- ["synthetic-diamond"] = {
|
||||
-- max = 15,
|
||||
-- icon = data.raw.item["diamond"].icon,
|
||||
-- crafting = { efficiency = 10 },
|
||||
-- research = { level = 6 },
|
||||
-- },
|
||||
}
|
||||
|
||||
for i, recipe in pairs(recipes) do
|
||||
-- add remaining recipes with direct items to find the icons
|
||||
if data.raw.recipe[recipe] and data.raw.item[recipe] and not eff_data[recipe] then
|
||||
eff_data[recipe] = {
|
||||
name = recipe.." efficiency",
|
||||
max = 15,
|
||||
icon = data.raw.item[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
|
||||
|
|
@ -2,6 +2,7 @@ require("recipe-updates")
|
|||
require("strange-matter")
|
||||
require("recipes/silicon-vulcanite")
|
||||
require("compatibility/248k")
|
||||
require("compatibility/crafting-efficiency")
|
||||
|
||||
if data.raw.resource["stone"] then
|
||||
if mods["space-exploration"] then
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bzsilicon",
|
||||
"version": "0.11.7",
|
||||
"version": "0.11.8",
|
||||
"factorio_version": "1.1",
|
||||
"title": "Silica & Silicon",
|
||||
"author": "Brevven",
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
"dependencies": [
|
||||
"? Krastorio2",
|
||||
"? 248k",
|
||||
"? aai-industry",
|
||||
"? modmashsplinterelectronics",
|
||||
"(?) IndustrialRevolution",
|
||||
"base >= 0.18"
|
||||
|
|
|
|||
1
me.lua
1
me.lua
|
|
@ -1,6 +1,7 @@
|
|||
local me = {}
|
||||
me.name = "bzsilicon"
|
||||
me.silicon_processing = mods["Krastorio2"] and "kr-silicon-processing" or "silicon-processing"
|
||||
me.recipes = {"silica", "silicon", "optical-fiber", "silicon-wafer", "solar-cell", "gyro", "silicon-smelting-vulcanite"}
|
||||
|
||||
function me.use_gyros()
|
||||
if me.get_setting("bz-all-intermediates") then return true end
|
||||
|
|
|
|||
14
modules.lua
14
modules.lua
|
|
@ -1,19 +1,7 @@
|
|||
local util = require("__bzsilicon__.data-util");
|
||||
|
||||
recipes = {"silica", "silicon", "optical-fiber"}
|
||||
if util.me.more_intermediates() then
|
||||
table.insert(recipes, "silicon-wafer")
|
||||
table.insert(recipes, "solar-cell")
|
||||
end
|
||||
if util.me.use_gyros() then
|
||||
table.insert(recipes, "gyro")
|
||||
end
|
||||
|
||||
if mods["space-exploration"] then
|
||||
table.insert(recipes, "silicon-smelting-vulcanite")
|
||||
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