Add copper recipe for lumber mill

This commit is contained in:
Simon Brodtmann 2025-03-13 14:05:48 +01:00
parent 3eb14395ac
commit 41a84a503f
2 changed files with 30 additions and 33 deletions

View file

@ -119,7 +119,7 @@ data:extend({
localised_name = { "entity-name.burner-agricultural-tower" }, localised_name = { "entity-name.burner-agricultural-tower" },
icons = { icons = {
{ icon = Lignumis.graphics .. "icons/burner-agricultural-tower.png" }, { icon = Lignumis.graphics .. "icons/burner-agricultural-tower.png" },
{ icon = "__base__/graphics/icons/copper-plate.png", scale = 0.25, shift = { 8, 8 } } { icon = basic_circuit_board and "__base__/graphics/icons/copper-plate.png" or "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } }
}, },
energy_required = 10, energy_required = 10,
ingredients = { ingredients = {
@ -134,4 +134,4 @@ data:extend({
} }
}) })
Technology:new("copper-processing"):addRecipe("burner-agricultural-tower-copper") Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("burner-agricultural-tower-copper")

View file

@ -1,3 +1,4 @@
local Technology = require("__cf-lib__/data/Technology")
local LumberMillFactory = require(MF.buildings .. "LumberMill") local LumberMillFactory = require(MF.buildings .. "LumberMill")
local LumberMill = LumberMillFactory() local LumberMill = LumberMillFactory()
@ -47,27 +48,23 @@ LumberMill.TechnologyBuilder:new()
:ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } }) :ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } })
:apply() :apply()
if not basic_circuit_board then
LumberMill.RecipeBuilder:new() LumberMill.RecipeBuilder:new()
:ingredients({ :ingredients({
{ type = "item", name = "stone-brick", amount = 40 }, { type = "item", name = "stone-brick", amount = 40 },
{ type = "item", name = "lumber", amount = 50 }, { type = "item", name = "lumber", amount = 50 },
{ type = "item", name = "iron-gear-wheel", amount = 50 }, { type = "item", name = "iron-gear-wheel", amount = 50 },
{ type = "item", name = "electronic-circuit", amount = 20 }, { type = "item", name = "copper-plate", amount = basic_circuit_board and 30 or 60 },
{ type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 30 },
{ type = "item", name = "assembling-machine-1", amount = 2 } { type = "item", name = "assembling-machine-1", amount = 2 }
}) })
:apply({ :apply({
name = "lumber-mill-electronic-circuit", name = "lumber-mill-copper",
localised_name = { "entity-name.lumber-mill" }, localised_name = { "entity-name.lumber-mill" },
category = "wood-processing-or-assembling", category = "wood-processing-or-assembling",
icons = { icons = {
{ icon = lumber_mill_item.icon }, { icon = lumber_mill_item.icon },
{ icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } { icon = basic_circuit_board and "__base__/graphics/icons/copper-plate.png" or "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } }
} }
}) })
table.insert(data.raw.technology["electronics"].effects, { Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper")
type = "unlock-recipe",
recipe = "lumber-mill-electronic-circuit"
})
end