I will try to write my own version that works with siblings.
I will try to write my own version that works with siblings.
Also, right now I propose solution for another problem:
gets some weird results, like green circuit recipe dup
...because we both set it. For avoid this, I use next code (based on your lib):
function util.remove_all_recipe_effects(recipe_name)
for name, _ in pairs(data.raw.technology) do
util.remove_recipe_effect(name, recipe_name)
end
end
function util.add_unlock_force(technology_name, recipe)
util.set_enabled(recipe, false)
util.remove_all_recipe_effects(recipe)
util.add_unlock(technology_name, recipe)
end
...
util.add_unlock_force("electronics", "electronic-circuit")
However, to avoid all dups we both need to use it.
Also, with this remove_prior_unlocks
is no longer needed.
P.S. Yes, I am using your data-util.lua
lib. It's very suitable for me ^_^