Page 1 of 1

Recipe Handcrafting Problem

Posted: Tue Jul 26, 2016 4:21 pm
by TheSAguy
Hi,
So I added a burner mining drill disassemble recipe to my mod and it is causing a problem where I now can't auto craft iron gears. What I mean by auto craft is that if the gears is a component in another item and I have iron plate the gears would be automatically crafted as a component of the new entity I'm crafting.

If I remove the Iron Gears from the results of the disassemble recipe I can once again craft gears.
Is there a solution to this?
Is there a way to force a recipe to be done in a assembly machine and not by hand?
Here is the recipe:

Code: Select all

	{
		type = "recipe",
		name = "bi-burner-mining-drill-disassemble",
		icon = "__Bio_Industries__/graphics/icons/burner-mining-drill_disassemble.png",
		subgroup = "extraction-machine",
		order = "a[items]-a[burner-mining-drill]",
		energy_required = 2,
		ingredients =
		{
		  {"burner-mining-drill", 1},
		},
		results=
		{
		  {"iron-gear-wheel", 2},
		  {"stone", 4},
		  {"iron-plate", 6}
		},

	},
Thanks.

Re: Recipe Handcrafting Problem

Posted: Tue Jul 26, 2016 5:38 pm
by daniel34
TheSAguy wrote:Is there a way to force a recipe to be done in a assembly machine and not by hand?
You can add a crafting category to the recipe, like the engine unit recipe does in the base game:

Code: Select all

    type = "recipe",
    name = "engine-unit",
    energy_required = 20,
    category = "advanced-crafting",
    [...]
It assigns the category "advanced-crafting" to the recipe which only makes it craftable in assembler 2 and 3.

You can also create your own recipe category using

Code: Select all

data:extend({
  {
    type = "recipe-category",
    name = "my-crafting-category"
  }
})
The recipe category also has to be set for the crafting machine, see the code for assembler 2/3 in base\prototypes\entity\entities.lua.

Re: Recipe Handcrafting Problem

Posted: Tue Jul 26, 2016 6:09 pm
by orzelek
Try autocrafting iron gears when you have some burner mining drills in inventory - it will work then.
It's the bug thats been plaguing bob's mods with synthetic wood. If there is more then one path to obtain item game will select one and ignore others for autocrafting purposes.

Re: Recipe Handcrafting Problem

Posted: Fri Aug 12, 2016 1:59 am
by AndrolGenhald
Sorry for the slight necro, but I just ran into this as well. Has anyone put in a feature request for something like an "ignore_when_handcrafting" or "disallow_as_prerequisite" boolean for the recipe prototypes?