Skip to content

Commit

Permalink
Bob's Electronic Assembling Machines Recipe Categories (#921)
Browse files Browse the repository at this point in the history
* Allow Fibreglass boards to be made in an Electronics Assembling Machine
* Move Fibreglass boards to the correct tab
* Clean up code duplication and implemented todo comments
  • Loading branch information
KiwiHawk authored Aug 12, 2023
1 parent fb81d0e commit 7d5d567
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ if angelsmods.industries.overhaul then
move_item("wooden-board", "angels-board", "z[bob]-a")
move_item("phenolic-board", "angels-board", "z[bob]-b")
move_item("fibreglass-board", "angels-board", "z[bob]-c")
move_item("angels-glass-fiber-board", "angels-board", "z[bob]-c", "recipe")

move_item("basic-circuit-board", "angels-circuit-board", "z[bob]-a")
move_item("circuit-board", "angels-circuit-board", "z[bob]-b")
Expand Down
46 changes: 0 additions & 46 deletions angelsindustries/prototypes/overrides/components-block-update.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,6 @@ if angelsmods.industries.components then
OV.remove_prereq("angels-components-mechanical-2", "angels-stone-smelting-2")
OV.add_prereq("angels-components-mechanical-2", "angels-stone-smelting-1")

-----------------------------------------------------------------------------
-- ADD ELECTRONIC RECIPES TO ELECTRONIC ASSMBLY -----------------------------
-----------------------------------------------------------------------------
if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value == true then
--create list of recipes to add to the electronicmachines
for _, elec in pairs({
-- todo: move cables and coils to smelting!
"copper-cable",
"angels-wire-coil-copper-converting",
"angels-wire-gold",
"angels-wire-coil-gold-converting",
"basic-platinated-copper-wire",
"angels-wire-coil-platinum-converting",
"basic-silvered-copper-wire",
"angels-wire-coil-silver-converting",
"basic-tinned-copper-wire",
"angels-wire-coil-tin-converting",
"angels-roll-solder-converting",
"circuit-red-board",
"circuit-green-board",
"circuit-orange-board",
"circuit-blue-board",
--"circuit-yellow-board" --crafted with 2 fluids
"circuit-grey-board",
"circuit-grey-board-alternative",
"circuit-red",
"circuit-green",
"circuit-orange",
"circuit-blue",
"circuit-yellow",
"circuit-grey",
"circuit-red-loaded",
"circuit-green-loaded",
"circuit-orange-loaded",
"circuit-blue-loaded",
"circuit-yellow-loaded",
"circuit-resistor",
"circuit-transistor",
"circuit-microchip",
"circuit-transformer",
"circuit-cpu",
}) do
data.raw.recipe[elec].category = "electronics"
end
end

if angelsmods.industries.tech then
else
-----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ if angelsmods.industries.components then
{ name = "circuit-grey-board", category = "electronics" },
{ name = "circuit-grey-board-alternative", category = "electronics" },
{ name = "circuit-red-board", category = "electronics" },
{ name = "circuit-green-board", category = "electronics-machine" },
{ name = "circuit-orange-board", category = "electronics-machine" },
{ name = "circuit-blue-board", category = "electronics-machine" },
--{ name = "circuit-yellow-board", category = "electronics-machine" },
{ name = "circuit-green-board", category = "electronics-with-fluid" },
{ name = "circuit-orange-board", category = "electronics-with-fluid" },
{ name = "circuit-blue-board", category = "electronics-with-fluid" },
--{ name = "circuit-yellow-board", category = "electronics-with-fluid" }, --crafted with 2 fluids

{ name = "circuit-grey", category = "electronics" },
{ name = "circuit-red", category = "electronics" },
{ name = "circuit-green", category = "electronics-machine" },
{ name = "circuit-orange", category = "electronics-machine" },
{ name = "circuit-blue", category = "electronics-machine" },
{ name = "circuit-yellow", category = "electronics-machine" },
{ name = "circuit-orange", category = "electronics-with-fluid" },
{ name = "circuit-blue", category = "electronics-with-fluid" },
{ name = "circuit-yellow", category = "electronics-with-fluid" },

{ name = "circuit-red-loaded", category = "electronics" },
{ name = "circuit-green-loaded", category = "electronics-machine" },
Expand All @@ -29,9 +29,9 @@ if angelsmods.industries.components then

{ name = "circuit-resistor", category = "electronics" },
{ name = "circuit-transistor", category = "electronics-machine" },
{ name = "circuit-microchip", category = "electronics-machine" },
{ name = "circuit-microchip", category = "electronics-with-fluid" },
{ name = "circuit-transformer", category = "electronics-machine" },
{ name = "circuit-cpu", category = "electronics-machine" },
{ name = "circuit-cpu", category = "electronics-with-fluid" },
{ name = "electronic-parts-resistor", category = "electronics-machine" },
{ name = "electronic-parts-transistor", category = "electronics-machine" },
{ name = "electronic-parts-microchip", category = "electronics-machine" },
Expand Down
1 change: 1 addition & 0 deletions angelssmelting/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version: 0.6.22
Date: xx.xx.xxxx
Changes:
- Increased the tech and required machine tier of Chrome and Platinum (909)
- Allow Fibreglass boards to be made in Bob's Electronics assembling machines (921)
Bugfixes:
- Another attempt at fixed smoke on the blast furnace
---------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ if angelsmods.trigger.smelting_products["solder"].wire then
else
OV.add_prereq("electronics", "angels-solder-smelting-1")
end
end

if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value then
OV.patch_recipes({ { name = "angels-roll-solder-converting", category = "electronics-machine" } })
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ if angelsmods.trigger.smelting_products["copper"].wire then
"__angelssmelting__/graphics/icons/wire-copper.png"
)

if mods["bobassembly"] and mods["bobelectronics"] then
if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value then
OV.patch_recipes({
{
name = "copper-cable",
Expand Down
25 changes: 11 additions & 14 deletions angelssmelting/prototypes/override/smelting-override-glass.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,6 @@ end
-- FIBREGLASS -----------------------------------------------------------------
-------------------------------------------------------------------------------
if angelsmods.trigger.smelting_products["glass"].fibre then
if mods["bobelectronics"] then
else
--[[OV.patch_recipes(
{
{
name = "angels-glass-fiber-board",
results = {
{"!!"},
{name = "angels-glass-fiber-board", type = "item", amount = 4}
},
}
}
)]]
end
else
angelsmods.functions.add_flag("angels-coil-glass-fiber", "hidden")
OV.disable_recipe({ "angels-coil-glass-fiber" })
Expand Down Expand Up @@ -140,6 +126,8 @@ if angelsmods.trigger.smelting_products["glass"].board then
},
},
icon_size = 32,
subgroup = "bob-boards",
order = "c-a3[fibreglass-board]",
},
})
OV.add_unlock("angels-glass-smelting-2", "angels-glass-fiber-board")
Expand All @@ -150,6 +138,15 @@ if angelsmods.trigger.smelting_products["glass"].board then
OV.remove_unlock("advanced-electronics-2", "fibreglass-board")
OV.disable_recipe({ "fibreglass-board" })
end

if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value then
OV.patch_recipes({
{
name = "angels-glass-fiber-board",
category = "electronics-with-fluid",
}
})
end
else
OV.disable_recipe({ "angels-glass-fiber-board" })
end
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if angelsmods.trigger.smelting_products["gold"].wire then
OV.add_prereq("advanced-electronics-2", "angels-gold-smelting-1")
end

if mods["bobassembly"] and mods["bobelectronics"] then
if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value then
OV.patch_recipes({
{
name = "angels-wire-gold",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if angelsmods.trigger.smelting_products["platinum"].wire then
},
},
})
if mods["bobassembly"] and mods["bobelectronics"] then
if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value then
OV.patch_recipes({
{
name = "basic-platinated-copper-wire",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ if angelsmods.trigger.smelting_products["silver"].wire then
end
OV.add_prereq("advanced-electronics", "angels-silver-smelting-1")

if mods["bobassembly"] and mods["bobelectronics"] then
if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value then
OV.patch_recipes({
{
name = "basic-silvered-copper-wire",
Expand Down
24 changes: 12 additions & 12 deletions angelssmelting/prototypes/override/smelting-override-tin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,19 @@ if angelsmods.trigger.smelting_products["tin"].wire then
"__bobelectronics__/graphics/icons/tinned-copper-cable.png",
"__angelssmelting__/graphics/icons/wire-tin.png"
)
end

if mods["bobassembly"] then
OV.patch_recipes({
{
name = "basic-tinned-copper-wire",
category = "electronics",
},
{
name = "angels-wire-coil-tin-converting",
category = "electronics-machine",
},
})
end
if mods["bobassembly"] and settings.startup["bobmods-assembly-electronicmachines"].value then
OV.patch_recipes({
{
name = "basic-tinned-copper-wire",
category = "electronics",
},
{
name = "angels-wire-coil-tin-converting",
category = "electronics-machine",
},
})
end
else
angelsmods.functions.add_flag("angels-wire-tin", "hidden")
Expand Down

0 comments on commit 7d5d567

Please sign in to comment.