Compare commits

..

No commits in common. "main" and "4.0.6" have entirely different histories.
main ... 4.0.6

3 changed files with 63 additions and 43 deletions

View file

@ -1,9 +1,4 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 4.0.7
Date: 21.10.2025
Bug Fixes:
- Fix crash due to result_count
---------------------------------------------------------------------------------------------------
Version: 4.0.6 Version: 4.0.6
Date: 21.10.2025 Date: 21.10.2025
Changes: Changes:

View file

@ -1,6 +1,6 @@
{ {
"name": "MDbobelectronics2", "name": "MDbobelectronics2",
"version": "4.0.7", "version": "4.0.6",
"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.", "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,4 +1,5 @@
data:extend({ data:extend(
{
{ {
type = "item", type = "item",
name = "resin", name = "resin",
@ -8,18 +9,21 @@ 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",
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 }, {
{ type = "item", name = "wood", amount = 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",
@ -27,21 +31,25 @@ data:extend({
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 }, {
secondary = { r = 0.85, g = 0.6, b = 0.3, a = 0.000 }, primary = {r = 0.5, g = 0.04, b = 0.0, a = 0.000},
tertiary = { r = 1, g = 0.6, b = 0.0, 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},
}, },
allow_decomposition = false allow_decomposition = false
}, },
}) }
)
data:extend({ data:extend(
{
{ {
type = "item", type = "item",
name = "rubber", name = "rubber",
@ -51,24 +59,28 @@ 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 }, { type = "item", name = "resin", amount = 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["kr-silicon"] or 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",
@ -78,30 +90,36 @@ 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["kr-silicon"] then if data.raw.item["kr-silicon"] then
table.insert(data.raw.recipe["silicon-wafer"].ingredients, { type = "item", name = "kr-silicon", amount = 1 }) table.insert(data.raw.recipe["silicon-wafer"].ingredients ,{type="item", name="kr-silicon", amount=1})
elseif data.raw.item["silicon"] then elseif data.raw.item["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="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",
@ -111,39 +129,46 @@ if data.raw.item["tin-plate"] then
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 = "copper-plate", amount = 1 }, {type="item", name="tin-plate", amount=9},
{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 = "lead-plate", amount = 7 }, {type="item", name="tin-plate", amount=4},
{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