Skip to content

Commit

Permalink
Electronics assembler updates (#247)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
Qatavin and KiwiHawk authored Dec 4, 2024
1 parent b8c64be commit da9a24c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 19 deletions.
48 changes: 37 additions & 11 deletions bobassembly/prototypes/assembly-electronics-updates.lua
Original file line number Diff line number Diff line change
@@ -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
Expand Down
33 changes: 25 additions & 8 deletions bobassembly/prototypes/assembly-electronics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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 } },
Expand All @@ -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,
},
Expand Down Expand Up @@ -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 },
},
Expand All @@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -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 } },
Expand All @@ -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,
Expand All @@ -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",
Expand Down

0 comments on commit da9a24c

Please sign in to comment.