Skip to content

Commit

Permalink
Simplified brain recipes #184
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiHawk committed Jun 18, 2024
1 parent e22b212 commit 833bad0
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 203 deletions.
1 change: 1 addition & 0 deletions bobclasses/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version: 1.3.0
Date: ???
Changes:
- Reduced the tier of electronics required for player brains #180
- Changed player brains to use circuits rather than circuit components #184
---------------------------------------------------------------------------------------------------
Version: 1.2.1
Date: 21. 02. 2024
Expand Down
3 changes: 3 additions & 0 deletions bobclasses/prototypes/parts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ data:extend({
enabled = false,
ingredients = {
{ "iron-plate", 5 },
{ "advanced-circuit", 20 },
},
result = "player-brain",
},
Expand Down Expand Up @@ -181,6 +182,8 @@ data:extend({
enabled = false,
ingredients = {
{ "steel-plate", 5 },
{ "advanced-circuit", 10 },
{ "processing-unit", 10 },
},
result = "player-brain-2",
},
Expand Down
26 changes: 3 additions & 23 deletions bobclasses/prototypes/recipe-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,9 @@ if data.raw["recipe-category"]["electronics"] then
data.raw.recipe["player-brain-2"].category = "electronics"
end

if
data.raw.item["circuit-board"]
and data.raw.item["basic-electronic-components"]
and data.raw.item["electronic-components"]
and data.raw.item["intergrated-electronics"]
then
bobmods.lib.recipe.add_ingredient("player-brain", { "circuit-board", 5 })
bobmods.lib.recipe.add_ingredient("player-brain", { "basic-electronic-components", 10 })
bobmods.lib.recipe.add_ingredient("player-brain", { "electronic-components", 25 })

bobmods.lib.recipe.add_ingredient("player-brain-2", { "superior-circuit-board", 8 })
bobmods.lib.recipe.add_ingredient("player-brain-2", { "basic-electronic-components", 8 })
bobmods.lib.recipe.add_ingredient("player-brain-2", { "electronic-components", 30 })
bobmods.lib.recipe.add_ingredient("player-brain-2", { "intergrated-electronics", 20 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("player-brain", { "solder", 5 })
bobmods.lib.recipe.add_ingredient("player-brain-2", { "solder", 10 })
end
else
bobmods.lib.recipe.add_ingredient("player-brain", { "advanced-circuit", 20 })

bobmods.lib.recipe.add_ingredient("player-brain-2", { "advanced-circuit", 10 })
bobmods.lib.recipe.add_ingredient("player-brain-2", { "processing-unit", 10 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("player-brain", { "solder", 5 })
bobmods.lib.recipe.add_ingredient("player-brain-2", { "solder", 10 })
end

if data.raw.item["titanium-plate"] then
Expand Down
1 change: 1 addition & 0 deletions boblogistics/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Date: ???
Changes:
- Reduced the tier of electronics required for T1 robots #180
- Combined Construction and Logistics Brains and Tools #184
- Changed robot brains to use circuits rather than circuit components #184
---------------------------------------------------------------------------------------------------
Version: 1.2.2
Date: 21. 02. 2024
Expand Down
82 changes: 22 additions & 60 deletions boblogistics/prototypes/recipe/robots-recipe-updates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,91 +10,53 @@ if settings.startup["bobmods-logistics-robotrequireprevious"].value == true then
bobmods.lib.recipe.add_ingredient("bob-construction-robot-4", { "bob-construction-robot-3", 1 })
end

if data.raw.tool["module-case"] or data.raw.item["module-case"] then
if data.raw.recipe["bob-robot-brain"] then
bobmods.lib.tech.add_recipe_unlock("robotics", "module-case")
bobmods.lib.recipe.add_ingredient("bob-robot-brain", { "module-case", 1 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "module-case", 1 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "module-case", 1 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "module-case", 1 })
end
end

if data.raw.recipe["bob-robot-brain"] then
if data.raw["recipe-category"]["electronics"] then
data.raw.recipe["bob-robot-brain"].category = "electronics"
end
if data.raw.item["basic-circuit-board"] and data.raw.item["basic-electronic-components"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain", { "basic-circuit-board", 1 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain", { "basic-electronic-components", 8 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain", { "solder", 5 })
end
else
bobmods.lib.recipe.add_ingredient("bob-robot-brain", { "electronic-circuit", 4 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain", { "solder", 5 })
end
end

if data.raw.recipe["bob-robot-brain-2"] then
if data.raw["recipe-category"]["electronics"] then
data.raw.recipe["bob-robot-brain-2"].category = "electronics"
end
if
data.raw.item["circuit-board"]
and data.raw.item["basic-electronic-components"]
and data.raw.item["electronic-components"]
then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "circuit-board", 1 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "basic-electronic-components", 10 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "electronic-components", 6 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "solder", 5 })
end
else
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "electronic-circuit", 2 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "advanced-circuit", 2 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-2", { "solder", 5 })
end
end

if data.raw.recipe["bob-robot-brain-3"] then
if data.raw["recipe-category"]["electronics"] then
data.raw.recipe["bob-robot-brain-3"].category = "electronics"
end
if
data.raw.item["superior-circuit-board"]
and data.raw.item["basic-electronic-components"]
and data.raw.item["electronic-components"]
and data.raw.item["intergrated-electronics"]
then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "superior-circuit-board", 1 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "basic-electronic-components", 8 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "electronic-components", 6 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "intergrated-electronics", 4 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "solder", 5 })
end
else
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "advanced-circuit", 2 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "processing-unit", 2 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-3", { "solder", 5 })
end
end

if data.raw.recipe["bob-robot-brain-4"] then
if data.raw["recipe-category"]["electronics"] then
data.raw.recipe["bob-robot-brain-4"].category = "electronics"
end
if
data.raw.item["multi-layer-circuit-board"]
and data.raw.item["basic-electronic-components"]
and data.raw.item["electronic-components"]
and data.raw.item["intergrated-electronics"]
and data.raw.item["processing-electronics"]
then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "multi-layer-circuit-board", 1 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "basic-electronic-components", 12 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "electronic-components", 8 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "intergrated-electronics", 6 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "processing-electronics", 4 })
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "solder", 5 })
end
else
if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "processing-unit", 2 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "advanced-processing-unit", 2 })
else
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "processing-unit", 4 })
end
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "solder", 5 })
end
if data.raw.item["advanced-processing-unit"] then
bobmods.lib.recipe.set_ingredient("bob-robot-brain-4", { "processing-unit", 2 })
bobmods.lib.recipe.add_ingredient("bob-robot-brain-4", { "advanced-processing-unit", 2 })
end
end

Expand Down
19 changes: 15 additions & 4 deletions boblogistics/prototypes/robot-parts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ if settings.startup["bobmods-logistics-robotparts"].value == true then
name = "bob-robot-brain",
energy_required = 5,
enabled = false,
ingredients = {},
ingredients = {
{ "basic-circuit-board", 2 },
{ "electronic-circuit", 2 },
},
result = "bob-robot-brain",
},

Expand All @@ -261,7 +264,10 @@ if settings.startup["bobmods-logistics-robotparts"].value == true then
name = "bob-robot-brain-2",
energy_required = 10,
enabled = false,
ingredients = {},
ingredients = {
{ "electronic-circuit", 2 },
{ "advanced-circuit", 2 },
},
result = "bob-robot-brain-2",
},

Expand All @@ -270,7 +276,10 @@ if settings.startup["bobmods-logistics-robotparts"].value == true then
name = "bob-robot-brain-3",
energy_required = 15,
enabled = false,
ingredients = {},
ingredients = {
{ "advanced-circuit", 2 },
{ "processing-unit", 2 },
},
result = "bob-robot-brain-3",
},

Expand All @@ -279,7 +288,9 @@ if settings.startup["bobmods-logistics-robotparts"].value == true then
name = "bob-robot-brain-4",
energy_required = 20,
enabled = false,
ingredients = {},
ingredients = {
{ "processing-unit", 4 },
},
result = "bob-robot-brain-4",
},

Expand Down
5 changes: 0 additions & 5 deletions bobmodules/prototypes/recipe/electronics-updates.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
if data.raw.item["aluminium-plate"] then
bobmods.lib.recipe.replace_ingredient("module-case", "iron-plate", "aluminium-plate")
bobmods.lib.tech.add_prerequisite("modules", "aluminium-processing")
end

if data.raw.item["tin-plate"] then
bobmods.lib.recipe.add_ingredient("module-circuit-board", { "tin-plate", 1 })
bobmods.lib.recipe.add_ingredient("module-processor-board", { "tin-plate", 1 })
Expand Down
4 changes: 2 additions & 2 deletions bobmodules/prototypes/recipe/electronics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ data:extend({
enabled = false,
ingredients = {
{ "plastic-bar", 2 },
{ "iron-plate", 5 },
{ "steel-plate", 1 },
},
result = "module-case",
},
Expand All @@ -16,7 +16,7 @@ data:extend({
enabled = false,
ingredients = {
{ "plastic-bar", 5 },
{ "iron-plate", 10 },
{ "steel-plate", 2 },
},
result = "module-case",
},
Expand Down
1 change: 1 addition & 0 deletions bobwarfare/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version: 1.3.0
Date: ???
Changes:
- Spread out the armor techs more evenly between tech tiers #180
- Changed combat robot and mech brains to use circuits rather than circuit components #184
---------------------------------------------------------------------------------------------------
Version: 1.2.1
Date: 21. 02. 2024
Expand Down
18 changes: 14 additions & 4 deletions bobwarfare/prototypes/robot-parts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ if settings.startup["bobmods-warfare-robotupdate"].value == true and bobmods.war
name = "robot-brain-combat",
energy_required = 5,
enabled = false,
ingredients = {},
ingredients = {
{ "electronic-circuit", 2 },
},
result = "robot-brain-combat",
},

Expand All @@ -96,7 +98,10 @@ if settings.startup["bobmods-warfare-robotupdate"].value == true and bobmods.war
name = "robot-brain-combat-2",
energy_required = 10,
enabled = false,
ingredients = {},
ingredients = {
{ "electronic-circuit", 1 },
{ "advanced-circuit", 1 },
},
result = "robot-brain-combat-2",
},

Expand All @@ -105,7 +110,10 @@ if settings.startup["bobmods-warfare-robotupdate"].value == true and bobmods.war
name = "robot-brain-combat-3",
energy_required = 15,
enabled = false,
ingredients = {},
ingredients = {
{ "advanced-circuit", 1 },
{ "processing-unit", 1 },
},
result = "robot-brain-combat-3",
},

Expand All @@ -114,7 +122,9 @@ if settings.startup["bobmods-warfare-robotupdate"].value == true and bobmods.war
name = "robot-brain-combat-4",
energy_required = 20,
enabled = false,
ingredients = {},
ingredients = {
{ "processing-unit", 2 },
},
result = "robot-brain-combat-4",
},

Expand Down
Loading

0 comments on commit 833bad0

Please sign in to comment.