Thanks !
So, let's see, exceptions to
To use complex recycling, by which ingredients rather than the item itself are returned, an item must have a basic recipe inside a machine with a configurable recipe selector, and that basic recipe must require at least one (solid) item and only output a single (solid) item.
(multi-result incompatibility added, thanks for reminding me)
(in vanilla SA)
Code: Select all
if recipe.category == "recycling" then return end
Not one, can't configure recipes for recycler.
Code: Select all
-- Allow recipes to opt-out
if recipe.auto_recycle == false then return end
Will deal with these after.
-- Disallow smelting and chemistry recipes
Code: Select all
if recipe.subgroup == "empty-barrel" then return end
I don't understand what this is about, filled barrels recycle into empty barrels (and empty barrels into steel) just fine ??
Code: Select all
if recipe.category == "smelting" then return end
Not one, can't configure recipes for furnaces.
EDIT : checked anyway to be sure, and as expected, these are the 4 iron / copper / steel plate and iron brick recipes, and SA added lithium plate.
Code: Select all
if recipe.category == "chemistry" then return end
Yup, that's pretty much the big exception
1.) Made in a chemical / cryo plant.
Code: Select all
if recipe.category == "chemistry-or-cryogenics" and recipe.name ~= "battery" then return end
in
space-age/prototypes/recipe.lua :
Acid Neutralisation, Steam Condensation : irrelevant, doesn't produce a solid item.
Carbon, Lithium, Ammoniacal Solution Separation (Ice), Solid Fuel from Ammonia, Ammonia Rocket Fuel : already exception 1.)
Several recipes also get updated into this category :
Code: Select all
space-age/base-data-updates.lua:data.raw.recipe["sulfuric-acid"].category = "chemistry-or-cryogenics"
space-age/base-data-updates.lua:data.raw.recipe.sulfur.category = "chemistry-or-cryogenics"
space-age/base-data-updates.lua:data.raw.recipe["plastic-bar"].category = "chemistry-or-cryogenics"
space-age/base-data-updates.lua:data.raw.recipe.explosives.category = "chemistry-or-cryogenics"
space-age/base-data-updates.lua:data.raw.recipe.battery.category = "chemistry-or-cryogenics"
All are covered by exception 1.)
... except the exception to the exception :
Battery
Code: Select all
if recipe.category == "crushing" then return end
All of these 9 (have a chance to) return multiple items, already covered.
Code: Select all
local recycling_metallurgy = {["big-mining-drill"]=true, ["turbo-transport-belt"]=true, ["turbo-underground-belt"]=true, ["turbo-splitter"]=true}
if recipe.category == "metallurgy" and recycling_metallurgy[recipe.name] == nil then return end
The 4 of the first one are just normal recipes anyway.
20 recipes in this category, for the other 16 recipes :
Metallurgic Science Pack : another exception, but we already know that
Science Packs are the exception 2.)3.)
Molten Iron / Copper from Lava (Stone) : not an exception, this isn't a basic recipe for Stone
Molten Iron / Copper : nope, produces fluid
Casting Iron / Steel / Copper / Iron Gear Wheel / Iron Stick / Pipe / Copper Cable : nope, requires only fluid, isn't a basic recipe for none of these
Casting Pipe to Ground / Low Density Structures / Concrete : nope, isn't a basic recipe for none of these
Tungsten Plate : whoops, that's one exception for sure (though you could be forgiven for missing it considering how similar it feels to other plates).
(Not sure how Foundry ended up alone in the
metallurgy-or-assembling category ??)
Code: Select all
if recipe.category == "organic" then return end
13 recipes :
Spoilable would be the big exception 3.) 2.)
Copper / Iron Bacteria Cultivation, Pentapod Egg, Bioflux : spoilable exception
Nutrients from Yumako Mash and Bioflux : not a basic recipe (nutrients don't have one), also spoilable exception
Rocket Fuel from Jelly, Bioplastic, Biosulfur, Burnt Spoilage (into Carbon) : not a basic recipe
Biolubricant : not a basic recipe, doesn't make a (solid) item
Carbon Fiber : uh oh, another exception, didn't see that one coming ! (Note that it's not about having a spoilable item as an ingredient because
Biochamber returns fresh pentapod eggs
.)
Agricultural Science Pack : already mentioned
Exception 3.)
Weirdly, the
Code: Select all
category = "organic-or-assembling"
doesn't seem to be included here ?
It has 6 recipes :
Nutrients from Spoilage / Fish / Biter Egg : wouldn't be basic recipes
Biochamber : known to recycle indeed
Tree Seed from Wood : actually uses basic recycling, but is not a basic recipe (despite not having any other)
Rocket Fuel updated to this category : would have been an exception
Code: Select all
if recipe.category == "cryogenics" and recipe.name ~= "railgun-turret" and recipe.name ~= "railgun" and recipe.name ~= "cryogenic-plant" and recipe.name ~= "fusion-reactor" and recipe.name ~= "fusion-generator" then return end
Ok, this is spoilerish for me, I'll get back to these later.
Code: Select all
if string.find(recipe.name, "science") and string.find(recipe.name, "pack") then return end
And here it is,
Exception 3.)
Code: Select all
-- Items which go into T3 modules recycle into themselves
if recipe.name == "tungsten-carbide" then return end
if recipe.name == "superconductor" then return end
Tungsten Carbide and
Superconductor, the already mentioned exceptions.
Code: Select all
if recipe.name == "biolab" then return end
Biolab is another already mentioned exception.
----
Ok, coming back to
Code: Select all
-- Allow recipes to opt-out
if recipe.auto_recycle == false then return end
Code: Select all
grep -R "auto_recycle = false" | wc -l
54
(9 of them in
base-data-updates.lua)
Ok, I'll come to these a bit later...