private void AutoloadGlobalRecipe(Type type) { GlobalRecipe globalRecipe = (GlobalRecipe)Activator.CreateInstance(type); globalRecipe.mod = this; string name = type.Name; if (globalRecipe.Autoload(ref name)) { AddGlobalRecipe(name, globalRecipe); } }
internal static void Add(GlobalRecipe globalRecipe) { globalRecipes.Add(globalRecipe); }
public void AddGlobalRecipe(string name, GlobalRecipe globalRecipe) { globalRecipe.Name = name; globalRecipes[name] = globalRecipe; globalRecipe.mod = this; RecipeHooks.Add(globalRecipe); }