Here ya go. I think this is a better solution to the issue.
diff --git a/dist/data-final-fixes.lua b/dist/data-final-fixes.lua
index 9ccd97f..1dca2a0 100644
--- a/dist/data-final-fixes.lua
+++ b/dist/data-final-fixes.lua
@@ -127,9 +127,9 @@ local function main()
end
if data.raw[item_type] and data.raw[item_type][name] and data.raw.technology[techs[1]] then
- -- if data.raw.item["deadlock-stack-" .. name] then
- -- deadlock.destroy_stack(name)
- -- end
+ if item.restack then
+ deadlock.destroy_stack(name)
+ end
if data.raw.item["deadlock-stack-" .. name] then
add_item_to_tech(name, techs[1])
diff --git a/dist/migrations/items.lua b/dist/migrations/items.lua
index 852cd39..f2ef937 100644
--- a/dist/migrations/items.lua
+++ b/dist/migrations/items.lua
@@ -30,13 +30,13 @@ Items.items = {
["phenolic-board"] = {tech = "advanced-electronics", type = "item"},
["wooden-board"] = {tech = "DEFAULT", type = "item"},
--bob-electronic-boards
- ["advanced-circuit"] = {tech = "advanced-electronics", type = "item"},
+ ["advanced-circuit"] = {tech = "advanced-electronics", type = "item", restack = true},
["advanced-processing-unit"] = {tech = "advanced-electronics-3", type = "item"},
["basic-circuit-board"] = {tech = "DEFAULT", type = "item"},
["circuit-board"] = {tech = "advanced-electronics", type = "item"},
- ["electronic-circuit"] = {tech = "electronics", type = "item"},
+ ["electronic-circuit"] = {tech = "electronics", type = "item", restack = true},
["multi-layer-circuit-board"] = {tech = "advanced-electronics-3", type = "item"},
- ["processing-unit"] = {tech = "advanced-electronics-2", type = "item"},
+ ["processing-unit"] = {tech = "advanced-electronics-2", type = "item", restack = true},
["superior-circuit-board"] = {tech = "advanced-electronics-2", type = "item"},
--bob-electronic-components
["basic-electronic-components"] = {tech = "electronics", type = "item"},
@@ -295,7 +295,7 @@ Items.items = {
["alien-artifact-purple"] = {tech = "DEFAULT", type = "item"},
["alien-artifact-red"] = {tech = "DEFAULT", type = "item"},
["alien-artifact-yellow"] = {tech = "DEFAULT", type = "item"},
- ["battery"] = {tech = "battery", type = "item"},
+ ["battery"] = {tech = "battery", type = "item", restack = true},
["copper-plate"] = {tech = "DEFAULT", type = "item"},
["explosives"] = {tech = "explosives", type = "item"},
["iron-plate"] = {tech = "DEFAULT", type = "item"},