diff --git a/bobassembly/changelog.txt b/bobassembly/changelog.txt index b5d8e7de9..d6d2294f4 100644 --- a/bobassembly/changelog.txt +++ b/bobassembly/changelog.txt @@ -3,6 +3,7 @@ Version: 1.3.0 Date: ??? Changes: - Code tidy: Remove unnecessary global variables #178 + - Improved Assembling Machine tier progression #179 --------------------------------------------------------------------------------------------------- Version: 1.2.2 Date: 21. 02. 2024 diff --git a/bobassembly/prototypes/assembly-electronics-updates.lua b/bobassembly/prototypes/assembly-electronics-updates.lua index 1f3791ece..1d4503249 100644 --- a/bobassembly/prototypes/assembly-electronics-updates.lua +++ b/bobassembly/prototypes/assembly-electronics-updates.lua @@ -16,11 +16,9 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then if data.raw.item["titanium-plate"] then bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "steel-plate", "titanium-plate") bobmods.lib.tech.add_prerequisite("electronics-machine-3", "titanium-processing") - else - if data.raw.item["tungsten-plate"] then - bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "steel-plate", "tungsten-plate") - bobmods.lib.tech.add_prerequisite("electronics-machine-3", "tungsten-processing") - end + elseif data.raw.item["tungsten-plate"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "steel-plate", "tungsten-plate") + bobmods.lib.tech.add_prerequisite("electronics-machine-3", "tungsten-processing") end if data.raw.item["titanium-bearing"] then @@ -32,11 +30,9 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then if 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") - else - if data.raw.item["tungsten-gear-wheel"] then - bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "iron-gear-wheel", "tungsten-gear-wheel") - bobmods.lib.tech.add_prerequisite("electronics-machine-3", "tungsten-processing") - end + elseif data.raw.item["tungsten-gear-wheel"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "iron-gear-wheel", "tungsten-gear-wheel") + bobmods.lib.tech.add_prerequisite("electronics-machine-3", "tungsten-processing") end -- add new electronics crafting categories @@ -59,9 +55,14 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then data.raw.recipe["electronic-circuit"].category = "electronics" data.raw.recipe["advanced-circuit"].category = "electronics" data.raw.recipe["processing-unit"].category = "electronics-machine" + if data.raw.recipe["advanced-processing-unit"] then data.raw.recipe["advanced-processing-unit"].category = "electronics-machine" end + if data.raw.item["advanced-processing-unit"] then + bobmods.lib.recipe.replace_ingredient("electronics-machine-3", "processing-unit", "advanced-processing-unit") + bobmods.lib.tech.add_prerequisite("electronics-machine-3", "advanced-electronics-3") + end if settings.startup["bobmods-assembly-limits"].value == true then data.raw["assembling-machine"]["electronics-machine-1"].ingredient_count = 3 diff --git a/bobassembly/prototypes/assembly-electronics.lua b/bobassembly/prototypes/assembly-electronics.lua index dc577ce3c..1e9bc57a9 100644 --- a/bobassembly/prototypes/assembly-electronics.lua +++ b/bobassembly/prototypes/assembly-electronics.lua @@ -166,7 +166,7 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then ingredients = { { "automation-science-pack", 1 }, }, - time = 15, + time = 10, }, order = "a-c-a", }, @@ -330,13 +330,15 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then "electronics-machine-1", "steel-processing", "advanced-electronics", + "chemical-science-pack", }, unit = { - count = 50, + count = 80, time = 30, ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 }, + { "chemical-science-pack", 1 }, }, }, order = "a-c-b", @@ -500,15 +502,17 @@ if settings.startup["bobmods-assembly-electronicmachines"].value == true then "electronics-machine-2", "advanced-electronics-2", "production-science-pack", + "utility-science-pack", }, unit = { - count = 100, - time = 45, + count = 140, + time = 60, ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 }, { "chemical-science-pack", 1 }, { "production-science-pack", 1 }, + { "utility-science-pack", 1 }, }, }, order = "a-c-c", diff --git a/bobassembly/prototypes/assembly-updates.lua b/bobassembly/prototypes/assembly-updates.lua index 93c8f0c3d..af0fd7102 100644 --- a/bobassembly/prototypes/assembly-updates.lua +++ b/bobassembly/prototypes/assembly-updates.lua @@ -2,10 +2,17 @@ data.raw.technology["automation-2"].prerequisites = { "automation", "electronics bobmods.lib.tech.add_prerequisite("automation-2", "steel-processing") bobmods.lib.tech.add_prerequisite("automation-2", "logistic-science-pack") -data.raw.technology["automation-3"].prerequisites = { "automation-2", "steel-processing", "advanced-electronics" } +data.raw.technology["automation-3"].prerequisites = { + "automation-2", + "advanced-electronics", + "chemical-science-pack", +} bobmods.lib.tech.set_science_pack_count("automation-3", 60) -data.raw.technology["automation-3"].unit.ingredients = - { { "automation-science-pack", 2 }, { "logistic-science-pack", 1 } } +data.raw.technology["automation-3"].unit.ingredients = { + { "automation-science-pack", 1 }, + { "logistic-science-pack", 1 }, + { "chemical-science-pack", 1 }, +} data.raw.technology["automation-3"].unit.time = 30 bobmods.lib.item.set_subgroup("assembling-machine-1", "bob-assembly-machine") @@ -16,8 +23,11 @@ data.raw["assembling-machine"]["assembling-machine-1"].energy_usage = "100kW" data.raw["assembling-machine"]["assembling-machine-2"].energy_usage = "135kW" data.raw["assembling-machine"]["assembling-machine-3"].energy_usage = "210kW" -data.raw.recipe["assembling-machine-3"].ingredients = - { { "assembling-machine-2", 1 }, { "steel-plate", 9 }, { "advanced-circuit", 3 } } +data.raw.recipe["assembling-machine-3"].ingredients = { + { "assembling-machine-2", 1 }, + { "steel-plate", 9 }, + { "advanced-circuit", 3 }, +} if data.raw.item["steel-gear-wheel"] then bobmods.lib.recipe.add_ingredient("assembling-machine-3", { "steel-gear-wheel", 5 }) @@ -31,11 +41,9 @@ data.raw["assembling-machine"]["assembling-machine-3"].next_upgrade = "assemblin if data.raw.item["aluminium-plate"] then bobmods.lib.recipe.replace_ingredient("assembling-machine-4", "steel-plate", "aluminium-plate") bobmods.lib.tech.add_prerequisite("automation-4", "aluminium-processing") -else - if data.raw.item["brass-alloy"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-4", "steel-plate", "brass-alloy") - bobmods.lib.tech.add_prerequisite("automation-4", "zinc-processing") - end +elseif data.raw.item["brass-alloy"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-4", "steel-plate", "brass-alloy") + bobmods.lib.tech.add_prerequisite("automation-4", "zinc-processing") end if data.raw.item["steel-bearing"] then @@ -47,20 +55,16 @@ end if data.raw.item["brass-gear-wheel"] then bobmods.lib.recipe.replace_ingredient("assembling-machine-4", "iron-gear-wheel", "brass-gear-wheel") bobmods.lib.tech.add_prerequisite("automation-4", "zinc-processing") -else - if data.raw.item["steel-gear-wheel"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-4", "iron-gear-wheel", "steel-gear-wheel") - end +elseif data.raw.item["steel-gear-wheel"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-4", "iron-gear-wheel", "steel-gear-wheel") end if data.raw.item["titanium-plate"] then bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "steel-plate", "titanium-plate") bobmods.lib.tech.add_prerequisite("automation-5", "titanium-processing") -else - if data.raw.item["tungsten-plate"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "steel-plate", "tungsten-plate") - bobmods.lib.tech.add_prerequisite("automation-5", "tungsten-processing") - end +elseif data.raw.item["tungsten-plate"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "steel-plate", "tungsten-plate") + bobmods.lib.tech.add_prerequisite("automation-5", "tungsten-processing") end if data.raw.item["titanium-bearing"] then @@ -72,61 +76,49 @@ end if data.raw.item["titanium-gear-wheel"] then bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "iron-gear-wheel", "titanium-gear-wheel") bobmods.lib.tech.add_prerequisite("automation-5", "titanium-processing") -else - if data.raw.item["tungsten-gear-wheel"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "iron-gear-wheel", "tungsten-gear-wheel") - bobmods.lib.tech.add_prerequisite("automation-5", "tungsten-processing") - end +elseif data.raw.item["tungsten-gear-wheel"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "iron-gear-wheel", "tungsten-gear-wheel") + bobmods.lib.tech.add_prerequisite("automation-5", "tungsten-processing") end if data.raw.item["nitinol-alloy"] then bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "steel-plate", "nitinol-alloy") bobmods.lib.tech.add_prerequisite("automation-6", "nitinol-processing") -else - if data.raw.item["titanium-plate"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "steel-plate", "titanium-plate") - bobmods.lib.tech.add_prerequisite("automation-6", "titanium-processing") - end +elseif data.raw.item["titanium-plate"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "steel-plate", "titanium-plate") + bobmods.lib.tech.add_prerequisite("automation-6", "titanium-processing") end if data.raw.item["tungsten-carbide"] then bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-plate", "tungsten-carbide") bobmods.lib.tech.add_prerequisite("automation-6", "tungsten-alloy-processing") -else - if data.raw.item["tungsten-plate"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-plate", "tungsten-plate") - bobmods.lib.tech.add_prerequisite("automation-6", "tungsten-processing") - end +elseif data.raw.item["tungsten-plate"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-plate", "tungsten-plate") + bobmods.lib.tech.add_prerequisite("automation-6", "tungsten-processing") end if data.raw.item["nitinol-bearing"] then bobmods.lib.recipe.add_ingredient("assembling-machine-6", { "nitinol-bearing", 5 }) +elseif data.raw.item["titanium-bearing"] then + bobmods.lib.recipe.add_ingredient("assembling-machine-6", { "titanium-bearing", 5 }) else - if data.raw.item["titanium-bearing"] then - bobmods.lib.recipe.add_ingredient("assembling-machine-6", { "titanium-bearing", 5 }) - else - bobmods.lib.recipe.add_ingredient("assembling-machine-6", { "iron-gear-wheel", 3 }) - end + bobmods.lib.recipe.add_ingredient("assembling-machine-6", { "iron-gear-wheel", 3 }) end if data.raw.item["nitinol-gear-wheel"] then bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-gear-wheel", "nitinol-gear-wheel") bobmods.lib.tech.add_prerequisite("automation-6", "nitinol-processing") -else - if data.raw.item["titanium-gear-wheel"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-gear-wheel", "titanium-gear-wheel") - bobmods.lib.tech.add_prerequisite("automation-6", "titanium-processing") - else - if data.raw.item["tungsten-gear-wheel"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-gear-wheel", "tungsten-gear-wheel") - bobmods.lib.tech.add_prerequisite("automation-6", "tungsten-processing") - end - end +elseif data.raw.item["titanium-gear-wheel"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-gear-wheel", "titanium-gear-wheel") + bobmods.lib.tech.add_prerequisite("automation-6", "titanium-processing") +elseif data.raw.item["tungsten-gear-wheel"] then + bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "iron-gear-wheel", "tungsten-gear-wheel") + bobmods.lib.tech.add_prerequisite("automation-6", "tungsten-processing") end if data.raw.item["advanced-processing-unit"] then - bobmods.lib.recipe.replace_ingredient("assembling-machine-6", "processing-unit", "advanced-processing-unit") - bobmods.lib.tech.add_prerequisite("automation-6", "advanced-electronics-3") + bobmods.lib.recipe.replace_ingredient("assembling-machine-5", "processing-unit", "advanced-processing-unit") + bobmods.lib.tech.add_prerequisite("automation-5", "advanced-electronics-3") end if settings.startup["bobmods-assembly-limits"].value == true then diff --git a/bobassembly/prototypes/assembly.lua b/bobassembly/prototypes/assembly.lua index 0f2691e07..4ff354fa0 100644 --- a/bobassembly/prototypes/assembly.lua +++ b/bobassembly/prototypes/assembly.lua @@ -112,7 +112,7 @@ data:extend({ enabled = false, ingredients = { { "assembling-machine-3", 1 }, - { "advanced-circuit", 3 }, + { "processing-unit", 3 }, { "steel-plate", 9 }, { "iron-gear-wheel", 5 }, }, @@ -133,14 +133,16 @@ data:extend({ }, prerequisites = { "automation-3", - "chemical-science-pack", + "advanced-electronics-2", + "production-science-pack", }, unit = { - count = 80, + count = 100, ingredients = { { "automation-science-pack", 1 }, { "logistic-science-pack", 1 }, { "chemical-science-pack", 1 }, + { "production-science-pack", 1 }, }, time = 45, }, @@ -311,8 +313,7 @@ data:extend({ }, prerequisites = { "automation-4", - "advanced-electronics-2", - "production-science-pack", + "utility-science-pack", }, unit = { count = 120, @@ -321,6 +322,7 @@ data:extend({ { "logistic-science-pack", 1 }, { "chemical-science-pack", 1 }, { "production-science-pack", 1 }, + { "utility-science-pack", 1 }, }, time = 60, }, @@ -469,7 +471,7 @@ data:extend({ enabled = false, ingredients = { { "assembling-machine-5", 1 }, - { "processing-unit", 3 }, + { "rocket-control-unit", 3 }, { "steel-plate", 5 }, { "iron-plate", 5 }, { "iron-gear-wheel", 5 }, @@ -491,7 +493,7 @@ data:extend({ }, prerequisites = { "automation-5", - "utility-science-pack", + "space-science-pack", }, unit = { count = 150, @@ -501,6 +503,7 @@ data:extend({ { "chemical-science-pack", 1 }, { "production-science-pack", 1 }, { "utility-science-pack", 1 }, + { "space-science-pack", 1 }, }, time = 75, },