Terraria ModLoader  0.11.7.8
A mod to make and play Terraria mods
GlobalRecipe.cs
Go to the documentation of this file.
1 namespace Terraria.ModLoader
2 {
6  public class GlobalRecipe
7  {
11  public Mod mod {
12  get;
13  internal set;
14  }
15 
19  public string Name {
20  get;
21  internal set;
22  }
23 
27  public virtual bool Autoload(ref string name) {
28  return mod.Properties.Autoload;
29  }
30 
34  public virtual bool RecipeAvailable(Recipe recipe) {
35  return true;
36  }
37 
43  public virtual void OnCraft(Item item, Recipe recipe) {
44  }
45  }
46 }
virtual void OnCraft(Item item, Recipe recipe)
Allows you to make anything happen when the player uses the given recipe. The item parameter is the i...
Definition: GlobalRecipe.cs:43
virtual bool RecipeAvailable(Recipe recipe)
Whether or not the conditions are met for the given recipe to be available for the player to use...
Definition: GlobalRecipe.cs:34
virtual bool Autoload(ref string name)
Allows you to automatically load a GlobalRecipe instead of using Mod.AddGlobalRecipe. Return true to allow autoloading; by default returns the mod's autoload property. Name is initialized to the overriding class name. Use this method to either force or stop an autoload, and to change the default internal name.
Definition: GlobalRecipe.cs:27
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
Definition: Mod.cs:24
This class provides hooks that control all recipes in the game.
Definition: GlobalRecipe.cs:6