Example #1
0
        public static void PostAddRecipes()
        {
            if (ModContent.GetInstance <ServerConfig>().AncientMuramasa)
            {
                var finder = new RecipeFinder();
                finder.AddIngredient(ItemID.Muramasa);
                var foundRecipes = finder.SearchRecipes();
                foreach (var foundRecipe in foundRecipes)
                {
                    var editor = new RecipeEditor(foundRecipe);
                    editor.AcceptRecipeGroup("GoldensMisc:Muramasa");
                }
            }
            if (ModContent.GetInstance <ServerConfig>().AncientForges)
            {
                var finder = new RecipeFinder();
                finder.AddIngredient(ItemID.Hellforge);
                var foundRecipes = finder.SearchRecipes();
                foreach (var foundRecipe in foundRecipes)
                {
                    var editor = new RecipeEditor(foundRecipe);
                    editor.AcceptRecipeGroup("GoldensMisc:Hellforge");
                }
            }
            if (ModContent.GetInstance <ServerConfig>().NinjaGear)
            {
                var finder = new RecipeFinder();
                finder.AddIngredient(ItemID.TigerClimbingGear);
                finder.AddIngredient(ItemID.Tabi);
                finder.AddIngredient(ItemID.BlackBelt);
                finder.SetResult(ItemID.MasterNinjaGear);

                var foundRecipes = finder.SearchRecipes();
                foreach (var foundRecipe in foundRecipes)
                {
                    var editor = new RecipeEditor(foundRecipe);
                    editor.DeleteIngredient(ItemID.Tabi);
                    editor.DeleteIngredient(ItemID.BlackBelt);
                    editor.AddIngredient(ModContent.ItemType <NinjaGear>());
                }
            }
        }