Page 1 of 1
How to block auto-crafting ingredients a recipe
Posted: Tue May 01, 2018 4:46 pm
by <NO_NAME>
I've made a mod that adds two recipes. The first creates an item; the second destroys it.
Now, if I click the destroying recipe too many times, it uses the first recipe to create new items to be destroyed.
I don't wan that. I want it to only destroy items that are already in player's inventory.
How can I block a recipe from auto-crafting it's ingredients?
Re: How to block auto-crafting ingredients a recipe
Posted: Tue May 01, 2018 5:07 pm
by Deadlock989
Setting allow_as_intermediate = false in a recipe stops it from being used as an intermediate step in any other hand-crafted recipe.
Setting allow_intermediates = false in a recipe stops it from searching for intermediates to supply any missing ingredients when hand-crafting.
Re: How to block auto-crafting ingredients a recipe
Posted: Tue May 01, 2018 6:39 pm
by <NO_NAME>
Thanks! This solved my problem.
Although it's a little weird that you have to set allow_as_intermediate to false when allow_intermediates is false.
I don't see any reason for that.
(If any admin reads this: please change the name of the thread to "How to block auto-crafting ingredients of a recipe". I don't think that I can do that by myself at this point.)
Re: How to block auto-crafting ingredients a recipe
Posted: Tue May 01, 2018 6:56 pm
by Deadlock989
<NO_NAME> wrote:Thanks! This solved my problem.
Although it's a little weird that you have to set allow_as_intermediate to false when allow_intermediates is false.
I don't see any reason for that.
I don't think you have to. See the original request thread:
viewtopic.php?f=65&t=58848
I set them both but only for readability.
Re: How to block auto-crafting ingredients a recipe
Posted: Tue May 01, 2018 7:29 pm
by <NO_NAME>
Deadlock989 wrote:I don't think you have to. See the original request thread:
viewtopic.php?f=65&t=58848
I set them both but only for readability.
Yes, you have to. I tried to set only
allow_intermediates but Factorio refused to start. The error message explicitly told that I have to set
allow_as_intermediate too.
I don't think that this restriction is necessary. I can imagine a recipe that should not auto-craft its ingredients but still can be used by other recipes. There is no contradiction here.
Anyway, I see that
allow_intermediates was your idea, so thank you even more
