--log("price of omnine: "..omni.lib.chain_omnite_cost("omnine",{"omnine-growth","stone-omnisolvent-a","omnic-hydrolyzation-a"}))

omni.lib.omni_recipe_fluid_change_category("omnic-hydrolyzation","omniplant")
omni.lib.omni_recipe_fluid_change_category("omniston-solvation","omniplant")
omni.lib.omni_recipe_fluid_change_category("stone-omnisolvent","omniplant")

omni.lib.add_unlock_recipe("omnic-hydrolyzation-1","hydrolization-omnic-acid")
for _,recipe in pairs(data.raw.recipe) do
	if omni.lib.start_with(recipe.name,"distillation-") then
		local fluid = string.sub(recipe.name,string.len("distillation-")+1,string.len(recipe.name)-2)
		omni.lib.omni_recipe_fluid_change_category("distillation-"..fluid,"omniplant")
		
	end
end

omni.lib.replace_prerequisite("omnic-hydrolyzation-1","omni-sorting-electric-1","crystallology-1")

if angelsmods and angelsmods.refining then
	--log("test: "..settings.startup["omnicrystal-sloth"].value)
	--"angelsore7-crystallization-"
	if not settings.startup["omnicrystal-sloth"].value then
		for _,rec in pairs(data.raw.recipe) do	
			if omni.lib.start_with(rec.name,"slag-processing-") and not omni.lib.recipe_result_contains(rec.name,{"stone-crushed","slag-slurry"}) then
				omni.lib.remove_recipe_all_techs(rec.name)
				rec.enabled = false
			end
		end
	end
end