tModLoader v0.11.8.9
A mod to make and play Terraria mods
|
This class provides hooks that control all recipes in the game. More...
Public Member Functions | |
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. More... | |
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 item the player has just crafted. More... | |
virtual bool | RecipeAvailable (Recipe recipe) |
Whether or not the conditions are met for the given recipe to be available for the player to use. This hook can be used for conditions unrelated to items or tiles (for example, biome or time). More... | |
Properties | |
Mod | mod [get, set] |
The mod which added this GlobalRecipe. More... | |
string | Name [get, set] |
The name of this GlobaRecipe. More... | |
This class provides hooks that control all recipes in the game.
Definition at line 6 of file GlobalRecipe.cs.
|
virtual |
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 at line 27 of file GlobalRecipe.cs.
References Terraria.ModLoader.ModProperties.Autoload, Terraria.ModLoader.GlobalRecipe.mod, and Terraria.ModLoader.Mod.Properties.
Referenced by Terraria.ModLoader.Mod.AutoloadGlobalRecipe().
|
virtual |
Allows you to make anything happen when the player uses the given recipe. The item parameter is the item the player has just crafted.
item | The item created. |
recipe | The recipe used to create the item. |
Definition at line 43 of file GlobalRecipe.cs.
Referenced by Terraria.ModLoader.RecipeHooks.OnCraft().
|
virtual |
Whether or not the conditions are met for the given recipe to be available for the player to use. This hook can be used for conditions unrelated to items or tiles (for example, biome or time).
Definition at line 34 of file GlobalRecipe.cs.
Referenced by Terraria.ModLoader.RecipeHooks.RecipeAvailable().
|
getset |
The mod which added this GlobalRecipe.
Definition at line 11 of file GlobalRecipe.cs.
Referenced by Terraria.ModLoader.GlobalRecipe.Autoload().
|
getset |
The name of this GlobaRecipe.
Definition at line 19 of file GlobalRecipe.cs.
Referenced by Terraria.ModLoader.Mod.AutoloadGlobalRecipe().