示例#1
0
        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);
            }
        }
示例#2
0
		internal static void Add(GlobalRecipe globalRecipe)
		{
			globalRecipes.Add(globalRecipe);
		}
示例#3
0
 internal static void Add(GlobalRecipe globalRecipe)
 {
     globalRecipes.Add(globalRecipe);
 }
示例#4
0
		public void AddGlobalRecipe(string name, GlobalRecipe globalRecipe)
		{
			globalRecipe.Name = name;
			globalRecipes[name] = globalRecipe;
			globalRecipe.mod = this;
			RecipeHooks.Add(globalRecipe);
		}