diff --git a/lignumis/prototypes/content/burner-agricultural-tower.lua b/lignumis/prototypes/content/burner-agricultural-tower.lua index ee6bc84..e79a4d9 100644 --- a/lignumis/prototypes/content/burner-agricultural-tower.lua +++ b/lignumis/prototypes/content/burner-agricultural-tower.lua @@ -119,14 +119,14 @@ data:extend({ localised_name = { "entity-name.burner-agricultural-tower" }, icons = { { 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, ingredients = { - { type = "item", name = "stone-brick", amount = 5 }, - { type = "item", name = "wooden-gear-wheel", amount = 20 }, - { type = "item", name = "lumber", amount = 20 }, - { type = "item", name = "copper-plate", amount = 10 }, + { type = "item", name = "stone-brick", amount = 5 }, + { type = "item", name = "wooden-gear-wheel", amount = 20 }, + { type = "item", name = "lumber", amount = 20 }, + { type = "item", name = "copper-plate", amount = 10 }, { type = "item", name = basic_circuit_board and "basic-circuit-board" or "electronic-circuit", amount = 10 } }, results = { { type = "item", name = "burner-agricultural-tower", amount = 1 } }, @@ -134,4 +134,4 @@ data:extend({ } }) -Technology:new("copper-processing"):addRecipe("burner-agricultural-tower-copper") \ No newline at end of file +Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("burner-agricultural-tower-copper") diff --git a/lignumis/prototypes/content/lumber-mill.lua b/lignumis/prototypes/content/lumber-mill.lua index 1d2f6ff..add1dd3 100644 --- a/lignumis/prototypes/content/lumber-mill.lua +++ b/lignumis/prototypes/content/lumber-mill.lua @@ -1,3 +1,4 @@ +local Technology = require("__cf-lib__/data/Technology") local LumberMillFactory = require(MF.buildings .. "LumberMill") local LumberMill = LumberMillFactory() @@ -29,10 +30,10 @@ local lumber_mill_item = LumberMill.ItemBuilder:new() LumberMill.RecipeBuilder:new() :ingredients(table.trim({ - { type = "item", name = "stone-brick", amount = 40 }, - { type = "item", name = "lumber", amount = 100 }, - { type = "item", name = "wooden-gear-wheel", amount = 100 }, - { type = "item", name = "gold-plate", amount = basic_circuit_board and 30 or 60 }, + { type = "item", name = "stone-brick", amount = 40 }, + { type = "item", name = "lumber", amount = 100 }, + { type = "item", name = "wooden-gear-wheel", amount = 100 }, + { type = "item", name = "gold-plate", amount = basic_circuit_board and 30 or 60 }, basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 30 } or nil, { type = "item", name = "burner-assembling-machine", amount = 5 } })) @@ -47,27 +48,23 @@ LumberMill.TechnologyBuilder:new() :ingredients({ { "wood-science-pack", 1 }, { "steam-science-pack", 1 } }) :apply() -if not basic_circuit_board then - LumberMill.RecipeBuilder:new() - :ingredients({ - { type = "item", name = "stone-brick", amount = 40 }, - { type = "item", name = "lumber", amount = 50 }, - { type = "item", name = "iron-gear-wheel", amount = 50 }, - { type = "item", name = "electronic-circuit", amount = 20 }, - { type = "item", name = "assembling-machine-1", amount = 2 } - }) - :apply({ - name = "lumber-mill-electronic-circuit", - localised_name = { "entity-name.lumber-mill" }, - category = "wood-processing-or-assembling", - icons = { - { icon = lumber_mill_item.icon }, - { icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } - } - }) - - table.insert(data.raw.technology["electronics"].effects, { - type = "unlock-recipe", - recipe = "lumber-mill-electronic-circuit" +LumberMill.RecipeBuilder:new() + :ingredients({ + { type = "item", name = "stone-brick", amount = 40 }, + { type = "item", name = "lumber", amount = 50 }, + { type = "item", name = "iron-gear-wheel", amount = 50 }, + { 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 } }) -end + :apply({ + name = "lumber-mill-copper", + localised_name = { "entity-name.lumber-mill" }, + category = "wood-processing-or-assembling", + icons = { + { icon = lumber_mill_item.icon }, + { icon = basic_circuit_board and "__base__/graphics/icons/copper-plate.png" or "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } + } + }) + +Technology:new(basic_circuit_board and "copper-processing" or "electronics"):addRecipe("lumber-mill-copper")