tModLoader v0.11.8.9
A mod to make and play Terraria mods
GlobalRecipe.cs
Go to the documentation of this file.
1namespace 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}
This class provides hooks that control all recipes in the game.
Definition: GlobalRecipe.cs:7
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
Mod mod
The mod which added this GlobalRecipe.
Definition: GlobalRecipe.cs:11
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 Autoload(ref string name)
Allows you to automatically load a GlobalRecipe instead of using Mod.AddGlobalRecipe....
Definition: GlobalRecipe.cs:27
string Name
The name of this GlobaRecipe.
Definition: GlobalRecipe.cs:19
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
Definition: Mod.cs:25
ModProperties Properties
Definition: Mod.cs:52
bool Autoload
Whether or not this mod will autoload content by default. Autoloading content means you do not need t...