Compare commits

..

22 commits
main ... main

Author SHA1 Message Date
Simon Brodtmann
f59f718ced 4.0.10 2025-12-12 23:06:46 +01:00
Simon Brodtmann
3850e5ec12 Fix integrated electronics not being unlocked 2025-12-12 23:05:50 +01:00
Simon Brodtmann
7e0c0b53b6 4.0.9 2025-12-10 21:09:50 +01:00
Simon Brodtmann
cb899a4c82 Fix recipe names of bob-resin-wood and bob-resin-oil 2025-12-10 20:49:01 +01:00
Simon Brodtmann
67f6456cd3 4.0.8 2025-11-08 21:19:18 +01:00
Simon Brodtmann
ecb3789f66 Fix recipes for K2 and SE 2025-11-08 21:01:46 +01:00
Simon Brodtmann
ecfad09c1f Fix recipe names 2025-11-08 09:16:53 +01:00
Simon Brodtmann
ce91e2406c 4.0.7 2025-10-21 21:21:26 +02:00
Simon Brodtmann
351c9d7aee Fix crash due to result_count 2025-10-21 21:19:22 +02:00
Simon Brodtmann
09a964cd55 4.0.6 2025-10-21 15:27:40 +02:00
Simon Brodtmann
c61ada2486 Update to bz mods version 2 2025-10-21 15:03:31 +02:00
Simon Brodtmann
c8727f5e56 4.0.5 2025-10-16 00:41:56 +02:00
Simon Brodtmann
8739f2c2e6 Fix K2 compatibility 2025-10-16 00:41:15 +02:00
Simon Brodtmann
6bbb2beb8e 4.0.4 2025-10-13 18:01:17 +02:00
Simon Brodtmann
da5e870ce9 Compatibility fixes 2025-10-13 16:04:32 +02:00
Simon Brodtmann
37161038a4 4.0.3 2025-10-11 18:09:44 +02:00
Simon Brodtmann
13b23b6523 Mod compatibility fixes 2025-10-11 18:08:38 +02:00
Simon Brodtmann
95e0570f4d Mark Space Age as incompatible 2025-10-10 16:13:06 +02:00
Simon Brodtmann
0ca86d181c Fix K2 compatibility 2025-10-08 23:56:22 +02:00
Simon Brodtmann
5378517c41 4.0.2 2025-10-07 17:27:21 +02:00
Simon Brodtmann
f1a100b154 Fix ingredient of bob-resin-wood 2025-10-06 20:27:23 +02:00
7a0a71f583 Changed Rocket Control Unit to be conditional 2025-10-06 10:48:09 +02:00
6 changed files with 229 additions and 224 deletions

View file

@ -1,4 +1,54 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 4.0.10
Date: 12.12.2025
Bug Fixes:
- Fix integrated electronics not being unlocked
---------------------------------------------------------------------------------------------------
Version: 4.0.9
Date: 08.11.2025
Bug Fixes:
- Fix recipe names of bob-resin-wood and bob-resin-oil
---------------------------------------------------------------------------------------------------
Version: 4.0.8
Date: 08.11.2025
Bug Fixes:
- Fix recipe names
- Fix recipes for K2 and SE
---------------------------------------------------------------------------------------------------
Version: 4.0.7
Date: 21.10.2025
Bug Fixes:
- Fix crash due to result_count
---------------------------------------------------------------------------------------------------
Version: 4.0.6
Date: 21.10.2025
Changes:
- Switch to bz mods forks
---------------------------------------------------------------------------------------------------
Version: 4.0.5
Date: 16.10.2025
Bug Fixes:
- Increase mod compatibility
---------------------------------------------------------------------------------------------------
Version: 4.0.4
Date: 13.10.2025
Bug Fixes:
- Increase mod compatibility
---------------------------------------------------------------------------------------------------
Version: 4.0.3
Date: 11.10.2025
Changes:
- Mark Space Age as incompatible
Bug Fixes:
- Increase mod compatibility
---------------------------------------------------------------------------------------------------
Version: 4.0.2
Date: 07.10.2025
Changes:
- Changed Rocket Control Unit to be conditional (by Kejser Kagespiser)
Bug Fixes:
- Fix ingredient of bob-resin-wood
---------------------------------------------------------------------------------------------------
Version: 4.0.1 Version: 4.0.1
Date: 05.10.2025 Date: 05.10.2025
Bug Fixes: Bug Fixes:

View file

@ -1,11 +1,11 @@
{ {
"name": "MDbobelectronics2", "name": "MDbobelectronics2",
"version": "4.0.1", "version": "4.0.10",
"factorio_version": "2.0", "factorio_version": "2.0",
"title": "Bob's Electronics SE KR for 2.0", "title": "Bob's Electronics SE KR for 2.0",
"description": "(Space Exploration and Krastorio edition) Requires Bob's functions library mod.\n\nThis mod changes the way you build electronics, making the process more realistic.\nFirst you have to assemble electronic components, then combine them into circuit boards.\nOptional setting for the following: 'unlike in the base game, each tier of circuit board does NOT require the previous tier.'\nIt also adds a 4th tier of electronics used for high end machinery.\n\nAlthough it can work by itself, it is designed to function best with krastorio and space exploration.",
"author": "Bobingabout, MdRuz, cackling fiend, Kejser Kagespiser", "author": "Bobingabout, MdRuz, cackling fiend, Kejser Kagespiser",
"contact": "", "homepage": "https://discord.gg/ufvFUJtVwk",
"homepage": "https://forums.factorio.com/viewtopic.php?f=190&t=95748",
"dependencies": [ "dependencies": [
"base >= 2.0.0", "base >= 2.0.0",
"boblibrary >= 2.0.1", "boblibrary >= 2.0.1",
@ -13,11 +13,11 @@
"? space-exploration >= 0.7.34", "? space-exploration >= 0.7.34",
"? space-exploration-postprocess >= 0.7.4", "? space-exploration-postprocess >= 0.7.4",
"? aai-industry >= 0.6.13", "? aai-industry >= 0.6.13",
"? bzsilicon >= 2.0.18", "? bzsilicon2 >= 2.0.19",
"? bzlead >= 2.0.28", "? bzlead2 >= 2.0.29",
"? bztitanium >= 2.0.26", "? bztitanium2 >= 2.0.27",
"? Krastorio2 >= 2.0.8", "? Krastorio2 >= 2.0.8",
"! bobelectronics" "! bobelectronics",
], "! space-age"
"description": "(Space Exploration and Krastorio edition) Requires Bob's functions library mod.\n\nThis mod changes the way you build electronics, making the process more realistic.\nFirst you have to assemble electronic components, then combine them into circuit boards.\nOptional setting for the following: 'unlike in the base game, each tier of circuit board does NOT require the previous tier.'\nIt also adds a 4th tier of electronics used for high end machinery.\n\nAlthough it can work by itself, it is designed to function best with krastorio and space exploration." ]
} }

View file

@ -1,179 +1,161 @@
--recycling doesnt detect recipe change, doing it manually --recycling doesnt detect recipe change, doing it manually
if mods["space-exploration"] then if mods["space-exploration"] then
if mods["Krastorio2"] then if mods["Krastorio2"] then
bobmods.lib.recipe.remove_result("se-recycle-radar", "electronic-circuit") bobmods.lib.recipe.remove_result("se-recycle-radar", "electronic-circuit")
bobmods.lib.recipe.add_result("se-recycle-radar", "automation-core") bobmods.lib.recipe.add_result("se-recycle-radar", "kr-automation-core")
else else
bobmods.lib.recipe.remove_result("se-recycle-radar", "electronic-circuit") bobmods.lib.recipe.remove_result("se-recycle-radar", "electronic-circuit")
bobmods.lib.recipe.add_result("se-recycle-radar", {type="item", name="basic-circuit-board", amount=6}) bobmods.lib.recipe.add_result("se-recycle-radar", { type = "item", name = "basic-circuit-board", amount = 6 })
end end
--fix for krastorio/spaceex radar recipe glitch --fix for krastorio/spaceex radar recipe glitch
end end
--insulated-cable --insulated-cable
if mods["bzsilicon"] then if mods["bzsilicon2"] then
bobmods.lib.recipe.add_ingredient("optical-fiber", {type="item", name="insulated-cable", amount=1}) bobmods.lib.recipe.add_ingredient("optical-fiber", { type = "item", name = "insulated-cable", amount = 1 })
--seems that new version of bzsilicon adds this ingredient which interfears --seems that new version of bzsilicon adds this ingredient which interfears
if data.raw.item["silicon"] then bobmods.lib.recipe.remove_ingredient("processing-unit", mods["Krastorio2"] and "kr-silicon" or "silicon")
bobmods.lib.recipe.remove_ingredient("processing-unit", "silicon")
end
end end
------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------
if settings.startup["bobmods-recursive-circuitred"].value == true then if settings.startup["bobmods-recursive-circuitred"].value == true then
if mods["space-exploration"] and not mods["Krastorio2"] then if mods["space-exploration"] and not mods["Krastorio2"] then
bobmods.lib.recipe.set_ingredient("advanced-circuit", { type = "item", name = "electronic-circuit", amount = 2 })
bobmods.lib.recipe.set_ingredient("advanced-circuit", {type="item", name="electronic-circuit", amount=2}) bobmods.lib.recipe.set_ingredient("processing-unit", { type = "item", name = "advanced-circuit", amount = 2 })
bobmods.lib.recipe.set_ingredient("processing-unit", { type = "item", name = "electronic-circuit", amount = 20 })
bobmods.lib.recipe.set_ingredient("processing-unit", {type="item", name="advanced-circuit", amount=2}) bobmods.lib.recipe.set_ingredient("se-processing-unit-holmium", { type = "item", name = "advanced-circuit", amount = 1 })
bobmods.lib.recipe.set_ingredient("processing-unit", {type="item", name="electronic-circuit", amount=20}) bobmods.lib.recipe.set_ingredient("se-processing-unit-holmium", { type = "item", name = "electronic-circuit", amount = 10 })
bobmods.lib.recipe.set_ingredient("se-processing-unit-holmium", {type="item", name="advanced-circuit", amount=1}) bobmods.lib.recipe.set_ingredient("advanced-processing-unit", { type = "item", name = "processing-unit", amount = 1 })
bobmods.lib.recipe.set_ingredient("se-processing-unit-holmium", {type="item", name="electronic-circuit", amount=10}) end
bobmods.lib.recipe.set_ingredient("advanced-processing-unit", {type="item", name="processing-unit", amount=1}) if mods["Krastorio2"] and not mods["space-exploration"] then
end bobmods.lib.recipe.set_ingredient("advanced-circuit", { type = "item", name = "electronic-circuit", amount = 4 })
bobmods.lib.recipe.set_ingredient("processing-unit", { type = "item", name = "advanced-circuit", amount = 6 })
bobmods.lib.recipe.set_ingredient("advanced-processing-unit", { type = "item", name = "processing-unit", amount = 1 })
end
if mods["Krastorio2"] and not mods["space-exploration"] then if mods["Krastorio2"] and mods["space-exploration"] then
bobmods.lib.recipe.set_ingredient("advanced-circuit", { type = "item", name = "electronic-circuit", amount = 4 })
bobmods.lib.recipe.set_ingredient("advanced-circuit", {type="item", name="electronic-circuit", amount=4}) bobmods.lib.recipe.set_ingredient("processing-unit", { type = "item", name = "advanced-circuit", amount = 6 })
bobmods.lib.recipe.set_ingredient("processing-unit", {type="item", name="advanced-circuit", amount=6}) bobmods.lib.recipe.set_ingredient("se-processing-unit-holmium", { type = "item", name = "advanced-circuit", amount = 3 })
bobmods.lib.recipe.set_ingredient("advanced-processing-unit", {type="item", name="processing-unit", amount=1})
end
if mods["Krastorio2"] and mods["space-exploration"] then bobmods.lib.recipe.set_ingredient("advanced-processing-unit", { type = "item", name = "processing-unit", amount = 1 })
end
bobmods.lib.recipe.set_ingredient("advanced-circuit", {type="item", name="electronic-circuit", amount=4}) if not mods["Krastorio2"] and not mods["space-exploration"] then
bobmods.lib.recipe.set_ingredient("advanced-circuit", { type = "item", name = "electronic-circuit", amount = 2 })
bobmods.lib.recipe.set_ingredient("processing-unit", {type="item", name="advanced-circuit", amount=6}) bobmods.lib.recipe.set_ingredient("processing-unit", { type = "item", name = "advanced-circuit", amount = 2 })
bobmods.lib.recipe.set_ingredient("se-processing-unit-holmium", {type="item", name="advanced-circuit", amount=3}) bobmods.lib.recipe.set_ingredient("processing-unit", { type = "item", name = "electronic-circuit", amount = 20 })
bobmods.lib.recipe.set_ingredient("advanced-processing-unit", {type="item", name="processing-unit", amount=1}) bobmods.lib.recipe.set_ingredient("advanced-processing-unit", { type = "item", name = "processing-unit", amount = 1 })
end end
if not mods["Krastorio2"] and not mods["space-exploration"] then --change results
bobmods.lib.recipe.set_ingredient("advanced-circuit", {type="item", name="electronic-circuit", amount=2}) if mods["Krastorio2"] then
bobmods.lib.recipe.set_result("electronic-circuit", { type = "item", name = "electronic-circuit", amount = 1 })
bobmods.lib.recipe.set_ingredient("processing-unit", {type="item", name="advanced-circuit", amount=2}) bobmods.lib.recipe.set_result("advanced-circuit", { type = "item", name = "advanced-circuit", amount = 2 })
bobmods.lib.recipe.set_ingredient("processing-unit", {type="item", name="electronic-circuit", amount=20}) bobmods.lib.recipe.set_result("processing-unit", { type = "item", name = "processing-unit", amount = 2 })
bobmods.lib.recipe.set_result("se-processing-unit-holmium", { type = "item", name = "processing-unit", amount = 2 })
bobmods.lib.recipe.set_ingredient("advanced-processing-unit", {type="item", name="processing-unit", amount=1}) end
end
--change results --if not then make sure to remove
if mods["Krastorio2"] then
--bobmods.lib.recipe.set_result("electronic-circuit", {type="item", name="electronic-circuit", amount=1})
bobmods.lib.recipe.set_result("advanced-circuit", {type="item", name="advanced-circuit", amount=2})
bobmods.lib.recipe.set_result("processing-unit", {type="item", name="processing-unit", amount=2})
bobmods.lib.recipe.set_result("se-processing-unit-holmium", {type="item", name="processing-unit", amount=2})
end
--if not then make sure to remove
else else
bobmods.lib.recipe.remove_ingredient("advanced-circuit", "electronic-circuit")
bobmods.lib.recipe.remove_ingredient("advanced-circuit", "electronic-circuit") bobmods.lib.recipe.remove_ingredient("processing-unit", "advanced-circuit")
bobmods.lib.recipe.remove_ingredient("processing-unit", "electronic-circuit")
bobmods.lib.recipe.remove_ingredient("processing-unit", "advanced-circuit") bobmods.lib.recipe.remove_ingredient("se-processing-unit-holmium", "advanced-circuit")
bobmods.lib.recipe.remove_ingredient("processing-unit", "electronic-circuit") bobmods.lib.recipe.remove_ingredient("se-processing-unit-holmium", "electronic-circuit")
bobmods.lib.recipe.remove_ingredient("se-processing-unit-holmium", "advanced-circuit") --just in case go back to 1 result
bobmods.lib.recipe.remove_ingredient("se-processing-unit-holmium", "electronic-circuit") bobmods.lib.recipe.set_result("advanced-circuit", { type = "item", name = "advanced-circuit", amount = 1 })
bobmods.lib.recipe.set_result("processing-unit", { type = "item", name = "processing-unit", amount = 1 })
--just in case go back to 1 result
bobmods.lib.recipe.set_result("advanced-circuit", {type="item", name="advanced-circuit", amount=1})
bobmods.lib.recipe.set_result("processing-unit", {type="item", name="processing-unit", amount=1})
if mods["space-exploration"] and not mods["Krastorio2"] then bobmods.lib.recipe.set_result("se-processing-unit-holmium", {type="item", name="processing-unit", amount=2}) end
if mods["space-exploration"] and not mods["Krastorio2"] then
bobmods.lib.recipe.set_result("se-processing-unit-holmium", { type = "item", name = "processing-unit", amount = 2 })
end
end end
data.raw.recipe["electronic-circuit"].ingredients = {
{ type = "item", name = "basic-circuit-board", amount = 1 },
{ type = "item", name = "basic-electronic-components", amount = 5 }
}
if mods["Krastorio2"] then if mods["Krastorio2"] then
bobmods.lib.recipe.add_ingredient("advanced-circuit", {type="item", name="electronic-components", amount=2}) bobmods.lib.recipe.remove_ingredient("advanced-circuit", "copper-cable")
bobmods.lib.recipe.add_ingredient("advanced-processing-unit", {type="item", name="rare-metals", amount=5}) bobmods.lib.recipe.set_ingredient("advanced-circuit", { type = "item", name = "kr-electronic-components", amount = 2 })
bobmods.lib.recipe.add_ingredient("advanced-processing-unit", {type="item", name="processing-electronics", amount=2}) bobmods.lib.recipe.add_ingredient("advanced-processing-unit", { type = "item", name = "kr-rare-metals", amount = 5 })
bobmods.lib.recipe.add_ingredient("advanced-processing-unit", {type="fluid", name="nitric-acid", amount=10}) bobmods.lib.recipe.add_ingredient("advanced-processing-unit", { type = "item", name = "processing-electronics", amount = 2 })
bobmods.lib.recipe.add_ingredient("advanced-processing-unit", { type = "fluid", name = "kr-nitric-acid", amount = 10 })
bobmods.lib.recipe.add_ingredient("kr-advanced-assembling-machine", {"advanced-processing-unit", amount=2}) bobmods.lib.recipe.add_ingredient("kr-advanced-assembling-machine", { "advanced-processing-unit", amount = 2 })
bobmods.lib.recipe.add_ingredient("kr-advanced-furnace", {"advanced-processing-unit", amount=5}) bobmods.lib.recipe.add_ingredient("kr-advanced-furnace", { "advanced-processing-unit", amount = 5 })
end end
------------------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------
--add circuits to recipes
if mods["space-exploration"] then if mods["space-exploration"] then
data.raw.recipe["electronic-circuit-wood"].hidden = true
bobmods.lib.recipe.add_ingredient("electronic-circuit", { type = "item", name = "stone-tablet", amount = 1 })
bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", {type="item", name="basic-electronic-components", amount=1}) --add circuits to recipes
bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", {type="item", name="BOBMD-electronic-components", amount=2}) bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", { type = "item", name = "basic-electronic-components", amount = 1 })
bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", {type="item", name="intergrated-electronics", amount=1}) bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", { type = "item", name = "BOBMD-electronic-components", amount = 2 })
bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", {type="item", name="superior-circuit-board", amount=1}) bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", { type = "item", name = "intergrated-electronics", amount = 1 })
bobmods.lib.recipe.add_ingredient("processing-unit", {type="fluid", name="sulfuric-acid", amount=4}) bobmods.lib.recipe.add_ingredient("se-processing-unit-holmium", { type = "item", name = "superior-circuit-board", amount = 1 })
bobmods.lib.recipe.add_ingredient("processing-unit", { type = "fluid", name = "sulfuric-acid", amount = 4 })
bobmods.lib.recipe.add_ingredient("se-space-assembling-machine", { "advanced-processing-unit", amount = 2 })
bobmods.lib.recipe.replace_ingredient("se-spaceship-console", "processing-unit", "advanced-processing-unit")
bobmods.lib.recipe.add_ingredient("se-space-supercomputer-2", { "advanced-processing-unit", amount = 150 })
bobmods.lib.recipe.replace_ingredient("se-space-supercomputer-3", "processing-unit", "advanced-processing-unit")
bobmods.lib.recipe.add_ingredient("se-space-assembling-machine", {"advanced-processing-unit", amount=2}) --Force circuits back to my own tab
bobmods.lib.recipe.replace_ingredient("se-spaceship-console", "processing-unit", "advanced-processing-unit") if data.raw.item["electronic-circuit"] then
bobmods.lib.recipe.add_ingredient("se-space-supercomputer-2", {"advanced-processing-unit", amount=150}) data.raw.item["electronic-circuit"].subgroup = "bob-electronic-boards"
bobmods.lib.recipe.replace_ingredient("se-space-supercomputer-3", "processing-unit", "advanced-processing-unit") end
if data.raw.item["advanced-circuit"] then
data.raw.item["advanced-circuit"].subgroup = "bob-electronic-boards"
--SE 0.6 it no longer makes sense end
--[[ if data.raw.item["processing-unit"] then
bobmods.lib.recipe.replace_ingredient("speed-module-6", "processing-unit", "advanced-processing-unit") data.raw.item["processing-unit"].subgroup = "bob-electronic-boards"
bobmods.lib.recipe.replace_ingredient("speed-module-7", "processing-unit", "advanced-processing-unit") end
bobmods.lib.recipe.replace_ingredient("productivity-module-6", "processing-unit", "advanced-processing-unit") if data.raw.item["se-processing-unit-holmium"] then
bobmods.lib.recipe.replace_ingredient("productivity-module-7", "processing-unit", "advanced-processing-unit") data.raw.item["se-processing-unit-holmium"].subgroup = "bob-electronic-boards"
bobmods.lib.recipe.replace_ingredient("effectivity-module-6", "processing-unit", "advanced-processing-unit") end
bobmods.lib.recipe.replace_ingredient("effectivity-module-7", "processing-unit", "advanced-processing-unit")
]]
--SE 0.6 force circuits back to my own tab
if data.raw.item["electronic-circuit"] then data.raw.item["electronic-circuit"].subgroup = "bob-electronic-boards" end
if data.raw.item["advanced-circuit"] then data.raw.item["advanced-circuit"].subgroup = "bob-electronic-boards" end
if data.raw.item["processing-unit"] then data.raw.item["processing-unit"].subgroup = "bob-electronic-boards" end
if data.raw.item["se-processing-unit-holmium"] then data.raw.item["se-processing-unit-holmium"].subgroup = "bob-electronic-boards" end
end end
--progression fix for krastorio: --progression fix for krastorio:
if data.raw.fluid["hydrogen-chloride"] then if data.raw.fluid["kr-hydrogen-chloride"] then
bobmods.lib.tech.add_recipe_unlock("kr-fluids-chemistry", "kr-hydrogen-chloride")
bobmods.lib.tech.remove_recipe_unlock("kr-advanced-chemistry", "kr-hydrogen-chloride")
end
bobmods.lib.tech.add_recipe_unlock("kr-fluids-chemistry", "hydrogen-chloride") if data.raw.item["solder"] then
bobmods.lib.tech.remove_recipe_unlock("kr-advanced-chemistry", "hydrogen-chloride") local electronic_circuit = data.raw.recipe["electronic-circuit"]
for _, ingredient in pairs(electronic_circuit.ingredients) do
ingredient.amount = ingredient.amount * 2
end
for _, result in pairs(electronic_circuit.results) do
result.amount = result.amount * 2
result.amount_min = result.amount_min and result.amount_min * 2 or nil
result.amount_max = result.amount_max and result.amount_max * 2 or nil
end
electronic_circuit.energy_required = electronic_circuit.energy_required and electronic_circuit.energy_required * 2 or 1
bobmods.lib.recipe.add_ingredient("electronic-circuit", {type="item", name="solder", amount=1})
bobmods.lib.recipe.add_ingredient("advanced-circuit", {type="item", name="solder", amount=1})
bobmods.lib.recipe.add_ingredient("processing-unit", {type="item", name="solder", amount=2})
bobmods.lib.recipe.add_ingredient("advanced-processing-unit", {type="item", name="solder", amount=4})
end end
if data.raw.item["electronic-circuit"] then
bobmods.lib.recipe.set_ingredients("electronic-circuit", {{type="item", name="basic-circuit-board", 1}, {"basic-electronic-components", amount=5}})
end

View file

@ -16,8 +16,8 @@ for i, recipe in pairs(data.raw.recipe) do
end end
if data.raw.fluid["hydrogen-chloride"] then if data.raw.fluid["kr-hydrogen-chloride"] then
bobmods.lib.recipe.replace_ingredient("ferric-chloride-solution", "water", "hydrogen-chloride") bobmods.lib.recipe.replace_ingredient("ferric-chloride-solution", "water", "kr-hydrogen-chloride")
end end
if data.raw.item["tinned-copper-cable"] then if data.raw.item["tinned-copper-cable"] then
@ -28,10 +28,9 @@ if data.raw.item["tinned-copper-cable"] then
end end
if data.raw.item["carbon"] then if data.raw.item["carbon"] then
bobmods.lib.recipe.replace_ingredient("basic-electronic-components", "coal", "carbon") bobmods.lib.recipe.replace_ingredient("basic-electronic-components", "coal", "carbon")
elseif data.raw.item["coke"] then elseif data.raw.item[mods["Krastorio2"] and "kr-coke" or "coke"] then
bobmods.lib.recipe.replace_ingredient("basic-electronic-components", "coal", "coke") bobmods.lib.recipe.replace_ingredient("basic-electronic-components", "coal", mods["Krastorio2"] and "kr-coke" or "coke")
end end
if data.raw.item["silicon-wafer"] then if data.raw.item["silicon-wafer"] then
@ -39,10 +38,10 @@ if data.raw.item["silicon-wafer"] then
bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="silicon-wafer", amount=4}) bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="silicon-wafer", amount=4})
bobmods.lib.recipe.add_ingredient("processing-electronics", {type="item", name="silicon-wafer", amount=6}) bobmods.lib.recipe.add_ingredient("processing-electronics", {type="item", name="silicon-wafer", amount=6})
else else
if data.raw.item["silicon"] then if data.raw.item[mods["Krastorio2"] and "kr-silicon" or "silicon"] then
bobmods.lib.recipe.add_ingredient("BOBMD-electronic-components", {type="item", name="silicon", amount=1}) bobmods.lib.recipe.add_ingredient("BOBMD-electronic-components", {type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=1})
bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="silicon", amount=2}) bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=2})
bobmods.lib.recipe.add_ingredient("processing-electronics", {type="item", name="silicon", amount=3}) bobmods.lib.recipe.add_ingredient("processing-electronics", {type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=3})
else else
bobmods.lib.recipe.add_ingredient("BOBMD-electronic-components", {type="item", name="copper-plate", amount=1}) bobmods.lib.recipe.add_ingredient("BOBMD-electronic-components", {type="item", name="copper-plate", amount=1})
bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="copper-plate", amount=2}) bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="copper-plate", amount=2})
@ -66,8 +65,8 @@ if data.raw.item["silicon-nitride"] then
bobmods.lib.recipe.replace_ingredient("processing-electronics", "plastic-bar", "silicon-nitride") bobmods.lib.recipe.replace_ingredient("processing-electronics", "plastic-bar", "silicon-nitride")
end end
if data.raw.item["glass"] then if data.raw.item[mods["Krastorio2"] and "kr-glass" or "glass"] then
bobmods.lib.recipe.add_ingredient("fibreglass-board", {type="item", name="glass", amount=1}) bobmods.lib.recipe.add_ingredient("fibreglass-board", {type="item", name=mods["Krastorio2"] and "kr-glass" or "glass", amount=1})
else else
bobmods.lib.recipe.add_ingredient("fibreglass-board", {type="item", name="plastic-bar", amount=1}) bobmods.lib.recipe.add_ingredient("fibreglass-board", {type="item", name="plastic-bar", amount=1})
end end
@ -96,22 +95,17 @@ else
end end
end end
if data.raw.item["solder"] then
bobmods.lib.recipe.add_ingredient("electronic-circuit", {type="item", name="solder", amount=1})
bobmods.lib.recipe.add_ingredient("advanced-circuit", {type="item", name="solder", amount=1})
bobmods.lib.recipe.add_ingredient("processing-unit", {type="item", name="solder", amount=2})
bobmods.lib.recipe.add_ingredient("advanced-processing-unit", {type="item", name="solder", amount=4})
end
if mods["aai-industry"] then if mods["aai-industry"] then
local greenrecipe2 = table.deepcopy(data.raw["recipe"]["basic-circuit-board"]) local greenrecipe2 = table.deepcopy(data.raw["recipe"]["basic-circuit-board"])
greenrecipe2.name = "basic-circuit-board-stone" greenrecipe2.name = "basic-circuit-board-stone"
greenrecipe2.localised_name = { "item-name.basic-circuit-board" }
data:extend({greenrecipe2}) data:extend({greenrecipe2})
bobmods.lib.recipe.replace_ingredient("basic-circuit-board-stone", "wood", "stone-tablet") bobmods.lib.recipe.replace_ingredient("basic-circuit-board-stone", "wood", "stone-tablet")
--- ---
local greyrecipe2 = table.deepcopy(data.raw["recipe"]["phenolic-board"]) local greyrecipe2 = table.deepcopy(data.raw["recipe"]["phenolic-board"])
greyrecipe2.name = "phenolic-board-stone" greyrecipe2.name = "phenolic-board-stone"
greyrecipe2.localised_name = { "item-name.phenolic-board" }
data:extend({greyrecipe2}) data:extend({greyrecipe2})
bobmods.lib.recipe.replace_ingredient("phenolic-board-stone", "wood", "stone-tablet") bobmods.lib.recipe.replace_ingredient("phenolic-board-stone", "wood", "stone-tablet")

View file

@ -1,5 +1,4 @@
data:extend( data:extend({
{
{ {
type = "item", type = "item",
name = "resin", name = "resin",
@ -9,47 +8,42 @@ data:extend(
order = "f[resin]", order = "f[resin]",
stack_size = 100 stack_size = 100
}, },
{ {
type = "recipe", type = "recipe",
name = "bob-resin-wood", name = "bob-resin-wood",
localised_name = { "item-name.resin" },
category = "crafting-machine", category = "crafting-machine",
subgroup = "bob-resource-chemical", subgroup = "bob-resource-chemical",
energy_required = 1, energy_required = 1,
ingredients = ingredients = {
{ { type = "item", name = "wood", amount = 1 },
{ "wood", 1},
}, },
results = {{type="item", name="resin", amount=1}}, results = { { type = "item", name = "resin", amount = 1 } },
allow_decomposition = false allow_decomposition = false
}, },
{ {
type = "recipe", type = "recipe",
name = "bob-resin-oil", name = "bob-resin-oil",
localised_name = { "item-name.resin" },
category = "chemistry", category = "chemistry",
subgroup = "bob-resource-chemical", subgroup = "bob-resource-chemical",
energy_required = 1, energy_required = 1,
enabled = false, enabled = false,
ingredients = ingredients = {
{ { type = "fluid", name = "heavy-oil", amount = 10 },
{type="fluid", name="heavy-oil", amount=10},
}, },
results = {{type="item", name="resin", amount=1}}, results = { { type = "item", name = "resin", amount = 1 } },
crafting_machine_tint = crafting_machine_tint = {
{ primary = { r = 0.5, g = 0.04, b = 0.0, a = 0.000 },
primary = {r = 0.5, g = 0.04, b = 0.0, a = 0.000}, secondary = { r = 0.85, g = 0.6, b = 0.3, a = 0.000 },
secondary = {r = 0.85, g = 0.6, b = 0.3, a = 0.000}, tertiary = { r = 1, g = 0.6, b = 0.0, a = 0.000 },
tertiary = {r = 1, g = 0.6, b = 0.0, a = 0.000},
}, },
allow_decomposition = false allow_decomposition = false
}, },
} })
)
data:extend( data:extend({
{
{ {
type = "item", type = "item",
name = "rubber", name = "rubber",
@ -59,28 +53,24 @@ data:extend(
order = "f[rubber]", order = "f[rubber]",
stack_size = 100 stack_size = 100
}, },
{ {
type = "recipe", type = "recipe",
name = "bob-rubber", name = "bob-rubber",
subgroup = "bob-resource-chemical", subgroup = "bob-resource-chemical",
category = "smelting", category = "smelting",
energy_required = 3.5, energy_required = 3.5,
ingredients = ingredients = {
{ { type = "item", name = "resin", amount = 1 },
{ "resin", 1},
}, },
results = {{type="item", name="rubber", amount=1}}, results = { { type = "item", name = "rubber", amount = 1 } },
allow_decomposition = false allow_decomposition = false
}, },
} })
)
if not data.raw.item["silicon-wafer"] then if not data.raw.item["silicon-wafer"] then
if data.raw.item["silicon"] or data.raw.item["silicon-plate"] then if data.raw.item["kr-silicon"] or data.raw.item["silicon"] or data.raw.item["silicon-plate"] then
data:extend( data:extend({
{
{ {
type = "item", type = "item",
name = "silicon-wafer", name = "silicon-wafer",
@ -90,83 +80,72 @@ if not data.raw.item["silicon-wafer"] then
order = "f[silicon-wafer]", order = "f[silicon-wafer]",
stack_size = 200 stack_size = 200
}, },
{ {
type = "recipe", type = "recipe",
name = "silicon-wafer", name = "silicon-wafer",
category = "crafting-machine", category = "crafting-machine",
enabled = false, enabled = false,
energy_required = 5, energy_required = 5,
ingredients = ingredients = {},
{ results = { { type = "item", name = "silicon-wafer", amount = 8 } },
},
results = {{type="item", name="silicon-wafer", amount=1}},
result_count = 8
},
} }
) })
if data.raw.item["silicon"] then if data.raw.item["kr-silicon"] then
table.insert(data.raw.recipe["silicon-wafer"].ingredients ,{type="item", name="silicon", amount=1}) table.insert(data.raw.recipe["silicon-wafer"].ingredients, { type = "item", name = "kr-silicon", amount = 1 })
elseif data.raw.item["silicon"] then
table.insert(data.raw.recipe["silicon-wafer"].ingredients, { type = "item", name = "silicon", amount = 1 })
else else
table.insert(data.raw.recipe["silicon-wafer"].ingredients ,{type="item", name="silicon-plate", amount=1}) table.insert(data.raw.recipe["silicon-wafer"].ingredients, { type = "item", name = "silicon-plate", amount = 1 })
end end
end end
end end
if data.raw.item["tin-plate"] then if data.raw.item["tin-plate"] then
data:extend( data:extend({
{
{ {
type = "item", type = "item",
name = "solder-alloy", name = "solder-alloy",
icon = "__MDbobelectronics2__/graphics/icons/solder-plate.png", icon = "__MDbobelectronics2__/graphics/icons/solder-plate.png",
icon_size = 32, icon_size = 32,
subgroup = "bob-alloy", subgroup = "raw-resource",
order = "c-b-h[solder]", order = "c-b-h[solder]",
stack_size = 200 stack_size = 200
}, },
{ {
type = "recipe", type = "recipe",
name = "solder-alloy", name = "solder-alloy",
energy_required = 7, energy_required = 7,
enabled = false, enabled = false,
category = "crafting-machine", category = "crafting-machine",
ingredients = ingredients = {
{ { type = "item", name = "tin-plate", amount = 9 },
{type="item", name="tin-plate", amount=9}, { type = "item", name = "copper-plate", amount = 1 },
{type="item", name="copper-plate", amount=1},
}, },
results = {{type="item", name="solder-alloy", amount=11}}, results = { { type = "item", name = "solder-alloy", amount = 11 } },
allow_decomposition = false allow_decomposition = false
}, },
} })
)
if data.raw.item["silver-plate"] then if data.raw.item["silver-plate"] then
table.insert(data.raw.recipe["solder-alloy"].ingredients,{type="item", name="silver-plate", amount=1}) table.insert(data.raw.recipe["solder-alloy"].ingredients, { type = "item", name = "silver-plate", amount = 1 })
end end
if data.raw.item["lead-plate"] then if data.raw.item["lead-plate"] then
data:extend( data:extend({
{
{ {
type = "recipe", type = "recipe",
name = "solder-alloy-lead", name = "solder-alloy-lead",
energy_required = 7, energy_required = 7,
enabled = false, enabled = false,
category = "crafting-machine", category = "crafting-machine",
ingredients = ingredients = {
{ { type = "item", name = "tin-plate", amount = 4 },
{type="item", name="tin-plate", amount=4}, { type = "item", name = "lead-plate", amount = 7 },
{type="item", name="lead-plate", amount=7},
}, },
results = {{type="item", name="solder-alloy", amount=11}}, results = { { type = "item", name = "solder-alloy", amount = 11 } },
allow_decomposition = false allow_decomposition = false
}, },
} })
)
end end
end end

View file

@ -73,7 +73,7 @@ if data.raw.technology["silicon-processing"] then
bobmods.lib.tech.add_prerequisite("advanced-circuit", "silicon-processing") bobmods.lib.tech.add_prerequisite("advanced-circuit", "silicon-processing")
end end
bobmods.lib.tech.add_recipe_unlock("processing-unit", "integrated-electronics") bobmods.lib.tech.add_recipe_unlock("processing-unit", "intergrated-electronics")
bobmods.lib.tech.add_recipe_unlock("processing-unit", "fibreglass-board") bobmods.lib.tech.add_recipe_unlock("processing-unit", "fibreglass-board")
bobmods.lib.tech.add_recipe_unlock("processing-unit", "superior-circuit-board") bobmods.lib.tech.add_recipe_unlock("processing-unit", "superior-circuit-board")
bobmods.lib.tech.add_recipe_unlock("processing-unit", "processing-unit") bobmods.lib.tech.add_recipe_unlock("processing-unit", "processing-unit")