SeaBlock NG

by wanne

Recreation of Trainwrecks mod

Overhaul
a month ago
2.0 - 2.1
1.93K
Environment Mining

b can't use the recycler

6 days ago

Hello,
Thanks for creating this version of Seablock. I'm currently grinding toward yellow science :)
I stumbled upon a bug (?) — after unlocking the recycler (for 5k science), I can't recycle anything in it.
I'm pretty sure it's caused by "SeaBlockWanne", because after disabling this mod and loading my save, I can recycle again.
After some fiddling, I think I found the root cause:
In the data-stage cleanup block --Remove not needed effects from technologies, SeaBlockWanne iterates every technology's effects and removes any unlock-recipe effect whose target recipe is hidden = true:
if w.type == "mining-drill-productivity-bonus"
or w.type == "mining-with-fluid"
or (w.type == "unlock-recipe" and not data.raw["recipe"][w.recipe])
or (w.type == "unlock-recipe" and data.raw["recipe"][w.recipe].hidden) then
table.remove(v.effects, i)
end
All vanilla recycling recipes are generated with hidden = true (in the recycler mod's recycling.lua, structure.hidden = true), and their unlock effects are appended to the recycling technology. So the … and data.raw["recipe"][w.recipe].hidden clause deletes all recycling unlocks, leaving the recycling tech with no unlock effects. Result: no *-recycling recipe is ever enabled, so the recycler has nothing to reverse.
Suggested fix: don't strip unlock-recipe effects from recipes in the recycling category (or exempt the recycling technology from this cleanup pass).

New response