Skip to content

Commit

Permalink
Assembling Machine Tier Progression #179
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiHawk committed May 20, 2024
1 parent f3bcf07 commit 78ba880
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 72 deletions.
1 change: 1 addition & 0 deletions bobassembly/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 11 additions & 10 deletions bobassembly/prototypes/assembly-electronics-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 8 additions & 4 deletions bobassembly/prototypes/assembly-electronics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
94 changes: 43 additions & 51 deletions bobassembly/prototypes/assembly-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 })
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
17 changes: 10 additions & 7 deletions bobassembly/prototypes/assembly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
},
Expand All @@ -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,
},
Expand Down Expand Up @@ -311,8 +313,7 @@ data:extend({
},
prerequisites = {
"automation-4",
"advanced-electronics-2",
"production-science-pack",
"utility-science-pack",
},
unit = {
count = 120,
Expand All @@ -321,6 +322,7 @@ data:extend({
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 },
},
time = 60,
},
Expand Down Expand Up @@ -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 },
Expand All @@ -491,7 +493,7 @@ data:extend({
},
prerequisites = {
"automation-5",
"utility-science-pack",
"space-science-pack",
},
unit = {
count = 150,
Expand All @@ -501,6 +503,7 @@ data:extend({
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
{ "utility-science-pack", 1 },
{ "space-science-pack", 1 },
},
time = 75,
},
Expand Down

0 comments on commit 78ba880

Please sign in to comment.