From 8334da6f5b0f82f798d6efe2f60f41c29bb65063 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 19 Dec 2025 22:17:20 +0100 Subject: [PATCH] Wooden Logistics: Fix crafting categories --- .../compatibility/wood-logistics.lua | 62 +++++++------------ 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/lignumis/prototypes/compatibility/wood-logistics.lua b/lignumis/prototypes/compatibility/wood-logistics.lua index 98ea43f..1dfc138 100644 --- a/lignumis/prototypes/compatibility/wood-logistics.lua +++ b/lignumis/prototypes/compatibility/wood-logistics.lua @@ -9,11 +9,9 @@ end local basic_circuit_board = settings.startup["lignumis-basic-circuit-board"].value local electric_lumber_mill = settings.startup["lignumis-electric-lumber-mill"].value - --- Lumber -if settings.startup["wood-logistics-lumber"].value then - Recipe:new("lumber"):addCategory("wood-processing") -end +table.insert(data.raw["assembling-machine"]["burner-assembling-machine"].crafting_categories, "crafting-or-carpentry") +table.insert(data.raw["assembling-machine"]["steam-assembling-machine"].crafting_categories, "crafting-or-carpentry") +table.insert(data.raw["assembling-machine"]["steam-assembling-machine"].crafting_categories, "advanced-crafting-or-carpentry") -- Lumber mill @@ -45,16 +43,13 @@ if settings.startup["wood-logistics-lumber-mill"].value then data.raw.item["lumber-mill"].default_import_location = "lignumis" - table.assign(data.raw.recipe["lumber-mill"], { - additional_categories = { "wood-processing" }, - ingredients = table.trim({ - { type = "item", name = "stone-brick", amount = 40 }, - { type = "item", name = "lumber", amount = 50 }, - { type = "item", name = "wooden-gear-wheel", amount = 50 }, - { type = "item", name = "gold-plate", amount = basic_circuit_board and 20 or 40 }, - basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 20 } or nil, - { type = "item", name = "burner-assembling-machine", amount = 2 } - }) + data.raw.recipe["lumber-mill"].ingredients = table.trim({ + { type = "item", name = "stone-brick", amount = 40 }, + { type = "item", name = "lumber", amount = 50 }, + { type = "item", name = "wooden-gear-wheel", amount = 50 }, + { type = "item", name = "gold-plate", amount = basic_circuit_board and 20 or 40 }, + basic_circuit_board and { type = "item", name = "basic-circuit-board", amount = 20 } or nil, + { type = "item", name = "burner-assembling-machine", amount = 2 } }) Recipe:new("lumber-mill") @@ -104,35 +99,24 @@ end -- Wooden belts if settings.startup["wood-logistics-belts"].value then Recipe:new("wood-transport-belt") - :replaceIngredient("copper-cable", "wooden-gear-wheel", 1) - :assign({ - additional_categories = { "wood-processing" } - }) - - Recipe:new("wood-underground-belt") - :assign({ - additional_categories = { "wood-processing" } - }) + :replaceIngredient("copper-cable", "wooden-gear-wheel", 1) Recipe:new("wood-splitter") - :replaceIngredient("copper-cable", basic_circuit_board and "basic-circuit-board" or "gold-cable", basic_circuit_board and 5 or nil) - :assign({ - additional_categories = { "wood-processing" } - }) + :replaceIngredient("copper-cable", basic_circuit_board and "basic-circuit-board" or "gold-cable", basic_circuit_board and 5 or nil) if not basic_circuit_board then Recipe:new("wood-splitter") - :clone("wood-splitter-electronic-circuit") - :replaceIngredient(basic_circuit_board and "gold-cable" or "basic-circuit-board", "electronic-circuit", 2) - :assign({ - localised_name = { "entity-name.wood-splitter" }, - icons = { - { icon = data.raw.item["wood-splitter"].icon }, - { icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } - } - }) - :unlockedByTechnology("electronics") - :apply() + :clone("wood-splitter-electronic-circuit") + :replaceIngredient(basic_circuit_board and "gold-cable" or "basic-circuit-board", "electronic-circuit", 2) + :assign({ + localised_name = { "entity-name.wood-splitter" }, + icons = { + { icon = data.raw.item["wood-splitter"].icon }, + { icon = "__base__/graphics/icons/electronic-circuit.png", scale = 0.25, shift = { 8, 8 } } + } + }) + :unlockedByTechnology("electronics") + :apply() end Item:new("wood-transport-belt")