So I managed some shenanigan's and hacked a solution that didn't involve control scripts.
I also found a slight bug/issue/problem with your checkProbs function, which blocked Cryogenic science from working, even with reverse factory fluid items disabled.
Basically this is the code that works around these issues for my stream game tomorrow. I needed something working.
[code]
-- hack attempt to force the reverse factory to use the custom recipe, not the changed vanilla one.
if mods['reverse-factory'] then
local Recipe = require('kry_stdlib/stdlib/data/recipe')
-- Must be in the format of {"item type", "item name", "recipe name"}
data.raw.recipe["promethium-science-pack"].hidden = true
Recipe("cryogenic-science-pack"):remove_result("fluoroketone-hot")
Recipe("cryogenic-science-pack"):remove_ingredient("fluoroketone-cold")
Recipe("cryogenic-science-pack"):add_ingredient({type = "fluid", name = "fluoroketone-cold", amount = 3})
table.insert(rf.custom_recycle, {"tool", "promethium-science-pack", "advanced-promethium-science-pack"})
end
[/code]
I hide the base game recipe, shuffle the cryo stuff to make that work, and add my custom recipe to the list. I do this in data-updates.lua.
I have fluid returns disabled for my server, so the cold fluoroketone is just the cost of doing business and creates a nice sink.