AddRecipe

Description
AddRecipe adds a crafting recipe to the game. Can be used to add crafting recipes for existing prefabs, override recipes for existing prefabs, and add crafting recipes for new prefabs.

Parameters

 * - The name of the recipe's entry in the game's table of crafting recipes. If the product parameter is omitted (which it typically is), this is also the name of the output of the crafting recipe. If this is the name of a prefab, the ingredients of this recipe determines what it will drop when deconstructed via the Deconstruction Staff.
 * - A list of ingredients used to craft the product. Each of these are ingredient objects, for more details see below.
 * - The crafting tab in which this recipe will be added. Use a constant found in . This can be found in  . For adding new recipe tabs, see API/AddRecipeTab
 * - Determines what kind of crafting structure is needed to access this recipe.
 * (optional) - Accepts a "placer" string. Used to allow the player to place a newly crafted building. Can also accept a table with key/value pairs. Currently used values are "placer" and "no_deconstruction". See below for more details.
 * (optional) - The minimum spacing between the object being placed and other obstructions. Default is nil, which sets the value to 3.2.
 * (optional) - If true, the player cannot permanently unlock the recipe. Most commonly associated with recipes in the Ancient Tab. Default is nil, which sets nounlock to false.
 * (optional) - The quantity of the product that results from the crafting recipe. Default is nil, which provides 1 item in the result.
 * (optional) - Defines the tag a character is required to have to access this recipe. Used to restrict crafting recipes to specific characters.
 * (optional) - An atlas file that positions the image.
 * (optional) - An image to override the crafting result's image.
 * (optional) - A function that returns true if the object can be placed, false otherwise. Used for buildings with special placement restrictions.
 * (optional) - A string with the name of the output prefab for the recipe. If left as nil, the first parameter is used instead. Allows one to make multiple crafting recipes with the same output.
 * (optional) - TODO
 * (optional) - TODO

Defines an ingredient to be used in a crafting recipe, and how much of it is needed. This object can be stored in a variable, or placed directly in the  function call as a parameter.

For example, Rope is crafted with 3 grass in the Refine Tab. This means the ingredient list would be:.

The placer is a string representing what structure a prefab will place. It is defined in a prefab file using the MakePlacer function.

It is also important to note that it is also possible to pass a table to this parameter with key/value pairs. Currently used keys are "placer" and "no_deconstruction". This is used with Walter's Slingshot Ammo, where the placer is defined as:. This prevents the slingshot ammo from being deconstructed by the Deconstruction Staff. This can be found in, near the text "SLINGSHOT AMMO". The table also accepts "placer" which is associated with the parameter's original input.

Vanilla Examples
The AddRecipe function will be available in modmain.lua by default, without needing to use GLOBAL. Note that in  the original recipes use Recipe, however these examples will use AddRecipe, which is how modders are intended to call the function.

Custom Recipe Examples
TODO Examples to be written here:
 * Replacing a Vanilla Recipe
 * Two Recipes one output
 * Recipe for new prefab