From da9a24c1bb0991b0d96844b7a768b5879b90bd76 Mon Sep 17 00:00:00 2001 From: Qatavin <108201496+Qatavin@users.noreply.github.com> Date: Wed, 4 Dec 2024 01:32:44 -0800 Subject: [PATCH] Electronics assembler updates (#247) * Update assembly-electronics-updates.lua Recipe for EAM1 revised to place it in T2. Additional revisions made to EAM2 in order to separate it more from EAM1. * Add fluid box to EAM1 * Add electronics-with-fluid crafting to EAM1 * Add flipping for EAM1 * Increate the tech tier and ingredient tier of electronics assembling machines --------- Co-authored-by: KiwiHawk <59639+KiwiHawk@users.noreply.github.com> --- .../assembly-electronics-updates.lua | 48 ++++++++++++++----- .../prototypes/assembly-electronics.lua | 33 +++++++++---- 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/bobassembly/prototypes/assembly-electronics-updates.lua b/bobassembly/prototypes/assembly-electronics-updates.lua index c75b80af4..b0adc2406 100644 --- a/bobassembly/prototypes/assembly-electronics-updates.lua +++ b/bobassembly/prototypes/assembly-electronics-updates.lua @@ -1,33 +1,59 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then - if data.raw.item["basic-circuit-board"] then - bobmods.lib.recipe.replace_ingredient("electronics-machine-1", "electronic-circuit", "basic-circuit-board") + + if data.raw.item["bronze-alloy"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-1", "steel-plate", "bronze-alloy") + if mods["bobelectronics"] then + bobmods.lib.tech.add_prerequisite("electronics-machine-1", "bob-electronics") + else + bobmods.lib.tech.add_prerequisite("electronics-machine-1", "alloy-processing") + end + end + + if data.raw.item["cobalt-steel-gear-wheel"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-2", "iron-gear-wheel", "cobalt-steel-gear-wheel") + bobmods.lib.tech.add_prerequisite("electronics-machine-2", "cobalt-processing") end - if data.raw.item["steel-bearing"] then - bobmods.lib.recipe.add_ingredient("electronics-machine-2", { type = "item", name = "steel-bearing", amount = 5 }) + if data.raw.item["cobalt-steel-bearing"] then + bobmods.lib.recipe.add_ingredient("electronics-machine-2", { type = "item", name = "cobalt-steel-bearing", amount = 5 }) else bobmods.lib.recipe.add_ingredient("electronics-machine-2", { type = "item", name = "iron-gear-wheel", amount = 3 }) end - if data.raw.item["steel-gear-wheel"] then - bobmods.lib.recipe.replace_ingredient("electronics-machine-2", "iron-gear-wheel", "steel-gear-wheel") + if data.raw.item["bob-aluminium-plate"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-2", "steel-plate", "bob-aluminium-plate") + bobmods.lib.tech.add_prerequisite("electronics-machine-2", "aluminium-processing") end - if data.raw.item["bob-titanium-plate"] then + if data.raw.item["nitinol-alloy"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "steel-plate", "nitinol-alloy") + bobmods.lib.tech.add_prerequisite("electronics-machine-3", "nitinol-processing") + elseif data.raw.item["bob-titanium-plate"] then bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "steel-plate", "bob-titanium-plate") bobmods.lib.tech.add_prerequisite("electronics-machine-3", "titanium-processing") + end + + if data.raw.item["copper-tungsten-alloy"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "iron-plate", "copper-tungsten-alloy") + bobmods.lib.tech.add_prerequisite("electronics-machine-3", "tungsten-alloy-processing") elseif data.raw.item["bob-tungsten-plate"] then - bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "steel-plate", "bob-tungsten-plate") + bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "iron-plate", "bob-tungsten-plate") bobmods.lib.tech.add_prerequisite("electronics-machine-3", "tungsten-processing") end - if data.raw.item["titanium-bearing"] then - bobmods.lib.recipe.add_ingredient("electronics-machine-3", { type = "item", name = "titanium-bearing", amount = 5 }) + if data.raw.item["ceramic-bearing"] then + bobmods.lib.recipe.add_ingredient("electronics-machine-3", { type = "item", name = "ceramic-bearing", amount = 5 }) + bobmods.lib.tech.add_prerequisite("electronics-machine-3", "ceramics") + elseif data.raw.item["nitinol-bearing"] then + bobmods.lib.recipe.add_ingredient("electronics-machine-3", { type = "item", name = "nitinol-bearing", amount = 5 }) else bobmods.lib.recipe.add_ingredient("electronics-machine-3", { type = "item", name = "iron-gear-wheel", amount = 3 }) end - if data.raw.item["titanium-gear-wheel"] then + if data.raw.item["nitinol-gear-wheel"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "iron-gear-wheel", "nitinol-gear-wheel") + bobmods.lib.tech.add_prerequisite("electronics-machine-3", "nitinol-processing") + elseif data.raw.item["titanium-gear-wheel"] then bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "iron-gear-wheel", "titanium-gear-wheel") bobmods.lib.tech.add_prerequisite("electronics-machine-3", "titanium-processing") elseif data.raw.item["tungsten-gear-wheel"] then diff --git a/bobassembly/prototypes/assembly-electronics.lua b/bobassembly/prototypes/assembly-electronics.lua index 55033d135..f0efff557 100644 --- a/bobassembly/prototypes/assembly-electronics.lua +++ b/bobassembly/prototypes/assembly-electronics.lua @@ -85,6 +85,20 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then percent = 70, }, }, + fluid_boxes = { + { + production_type = "input", + pipe_picture = assembler3pipepictures(), + pipe_covers = pipecoverspictures(), + pipe_connections = { + { flow_direction = "input", direction = defines.direction.north, position = { 0.5, -0.5 } }, + }, + secondary_draw_orders = { north = -1 }, + volume = 1000, + }, + }, + fluid_boxes_off_when_no_fluid_recipe = true, + forced_symmetry = "vertical", collision_box = { { -0.7, -0.7 }, { 0.7, 0.7 } }, selection_box = { { -1, -1 }, { 1, 1 } }, fast_replaceable_group = "assembling-machine", @@ -143,7 +157,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then idle_sound = { filename = "__base__/sound/idle1.ogg", volume = 0.6 }, apparent_volume = 1.5, }, - crafting_categories = { "electronics", "electronics-machine" }, + crafting_categories = { "electronics", "electronics-machine", "electronics-with-fluid" }, crafting_speed = 1, energy_source = { type = "electric", @@ -173,7 +187,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then enabled = false, ingredients = { { type = "item", name = "electronic-circuit", amount = 5 }, - { type = "item", name = "iron-plate", amount = 5 }, + { type = "item", name = "steel-plate", amount = 5 }, { type = "item", name = "iron-gear-wheel", amount = 5 }, }, results = { { type = "item", name = "electronics-machine-1", amount = 1 } }, @@ -191,12 +205,13 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then }, }, prerequisites = { - "automation", + "automation-2", }, unit = { count = 30, ingredients = { { "automation-science-pack", 1 }, + { "logistic-science-pack", 1 }, }, time = 10, }, @@ -349,7 +364,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then enabled = false, ingredients = { { type = "item", name = "electronics-machine-1", amount = 1 }, - { type = "item", name = "advanced-circuit", amount = 5 }, + { type = "item", name = "processing-unit", amount = 5 }, { type = "item", name = "steel-plate", amount = 5 }, { type = "item", name = "iron-gear-wheel", amount = 5 }, }, @@ -370,8 +385,8 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then prerequisites = { "electronics-machine-1", "steel-processing", - "advanced-circuit", - "chemical-science-pack", + "processing-unit", + "production-science-pack" }, unit = { count = 80, @@ -380,6 +395,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then { "automation-science-pack", 1 }, { "logistic-science-pack", 1 }, { "chemical-science-pack", 1 }, + { "production-science-pack", 1 }, }, }, order = "a-c-b", @@ -531,6 +547,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then { type = "item", name = "electronics-machine-2", amount = 1 }, { type = "item", name = "processing-unit", amount = 5 }, { type = "item", name = "steel-plate", amount = 5 }, + { type = "item", name = "iron-plate", amount = 5 }, { type = "item", name = "iron-gear-wheel", amount = 5 }, }, results = { { type = "item", name = "electronics-machine-3", amount = 1 } }, @@ -550,8 +567,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then prerequisites = { "electronics-machine-2", "processing-unit", - "production-science-pack", - "utility-science-pack", + "space-science-pack", }, unit = { count = 140, @@ -562,6 +578,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then { "chemical-science-pack", 1 }, { "production-science-pack", 1 }, { "utility-science-pack", 1 }, + { "space-science-pack", 1 }, }, }, order = "a-c-c",