public static void RemoveRecipes() { List <Tuple <int, int[]> > recipesToDelete = new List <Tuple <int, int[]> > { new Tuple <int, int[]>(ItemID.NightsEdge, new int[] { ItemID.BloodButcherer }), new Tuple <int, int[]>(ItemID.MechanicalWorm, new int[] { ItemID.Vertebrae }), new Tuple <int, int[]>(ItemID.SuperHealingPotion, new int[0]), new Tuple <int, int[]>(ItemID.CelestialSigil, new int[0]), new Tuple <int, int[]>(ItemID.FragmentVortex, new int[0]), new Tuple <int, int[]>(ItemID.FragmentNebula, new int[0]), new Tuple <int, int[]>(ItemID.FragmentSolar, new int[0]), new Tuple <int, int[]>(ItemID.FragmentStardust, new int[0]) }; foreach (var toDeleteRecipe in recipesToDelete) { var finder = new RecipeFinder(); finder.SetResult(toDeleteRecipe.Item1); foreach (var ingredient in toDeleteRecipe.Item2) { finder.AddIngredient(ingredient); } foreach (Recipe foundRecipe in finder.SearchRecipes()) { RecipeEditor editor = new RecipeEditor(foundRecipe); editor.DeleteRecipe(); } } }
// Showcase RecipeFinder and RecipeEditor // With these classes, you can find and edit recipes public static void ExampleRecipeEditing(Mod mod) { // In the following example, we find recipes that uses a chain as ingredient and then we remove that ingredient from the recipe. RecipeFinder finder = new RecipeFinder(); // make a new RecipeFinder finder.AddIngredient(ItemID.Chain); // add Chain (with a stack of 1) to the finder foreach (Recipe recipe in finder.SearchRecipes()) // loop every recipe found by the finder { RecipeEditor editor = new RecipeEditor(recipe); // for the currently looped recipe, make a new RecipeEditor editor.DeleteIngredient(ItemID.Chain); // delete the Chain ingredient. } // The following is a more precise example, finding an exact recipe and deleting it if possible. finder = new RecipeFinder(); // make a new RecipeFinder finder.AddRecipeGroup("IronBar"); // add a new recipe group, in this case the vanilla one for iron or lead bars. finder.AddTile(TileID.Anvils); // add a required tile, any anvil finder.SetResult(ItemID.Chain, 10); // set the result to be 10 chains Recipe exactRecipe = finder.FindExactRecipe(); // try to find the exact recipe matching our criteria bool isRecipeFound = exactRecipe != null; // if our recipe is not null, it means we found the exact recipe if (isRecipeFound) // since our recipe is found, we can continue { RecipeEditor editor = new RecipeEditor(exactRecipe); // for our recipe, make a new RecipeEditor editor.DeleteRecipe(); // delete the recipe } }
public static void EditVanillaRecipes() { if (Config.MolotovCraft > 0) { var recipe = new ModRecipe(VanillaTweaks.Instance); recipe.AddIngredient(ItemID.Ale, 5); recipe.AddIngredient(ItemID.Torch, 1); recipe.AddIngredient(ItemID.Silk, 1); recipe.AddIngredient(ItemID.Gel, Config.MolotovCraft); recipe.SetResult(ItemID.MolotovCocktail, 5); recipe.AddRecipe(); } if (Config.BoneBlockFix) { var finder = new RecipeFinder(); finder.AddIngredient(ItemID.BoneBlockWall, 4); finder.AddTile(TileID.BoneWelder); finder.SetResult(ItemID.BoneBlock, 1); var recipe = finder.FindExactRecipe(); if (recipe != null) { recipe.createItem.SetDefaults(ItemID.Bone); } } var foundRecipes = new List <Recipe>(); if (Config.JestersArrowCraft == 0) { foreach (var recipe in Main.recipe) { if (recipe != null && recipe.createItem != null && recipe.createItem.type == ItemID.JestersArrow) { foundRecipes.Add(recipe); } } foreach (var recipe in foundRecipes) { var editor = new RecipeEditor(recipe); editor.DeleteRecipe(); } foundRecipes.Clear(); } else { foreach (var recipe in Main.recipe) { if (recipe != null && recipe.createItem != null && recipe.createItem.type == ItemID.JestersArrow) { var editor = new RecipeEditor(recipe); editor.SetIngredientStack(ItemID.WoodenArrow, Config.JestersArrowCraft); editor.SetResult(ItemID.JestersArrow, Config.JestersArrowCraft); } } } }
public static void DestroyRecipes() { foreach (short lunarTool in LunarTools) { RecipeFinder finder = new RecipeFinder(); finder.SetResult(lunarTool); List <Terraria.Recipe> recipes = finder.SearchRecipes(); recipes.ForEach(x => { var editor = new RecipeEditor(x); editor.DeleteRecipe(); }); } }
public static bool DeleteAlike() { List <Recipe> recipes = Finder.SearchRecipes(); foreach (Recipe recipe in recipes) { Editor = new RecipeEditor(recipe); Editor.DeleteRecipe(); } return(recipes.Count > 0); }
public static void removeRecipe(int itemID) { RecipeFinder rf = new RecipeFinder(); rf.SetResult(itemID); foreach (Recipe r in rf.SearchRecipes()) { RecipeEditor re = new RecipeEditor(r); re.DeleteRecipe(); } }
public override void AddRecipes() { RecipeFinder finder = new RecipeFinder(); finder.AddIngredient(ItemID.Amethyst, 8); finder.AddIngredient(ItemID.CopperBar, 10); foreach (Recipe recipe in finder.SearchRecipes()) { RecipeEditor editor = new RecipeEditor(recipe); editor.DeleteRecipe(); } }
public static bool DeleteExact() { Recipe foundRecipe = Finder.FindExactRecipe(); if (foundRecipe != null) { Editor = new RecipeEditor(foundRecipe); Editor.DeleteRecipe(); return(true); } return(false); }
public static void RecipeRemover(int ItemRecipeToRemove) { //removes ANY recipe that results in ItemRecipeToRemove RecipeFinder finder = new RecipeFinder(); finder.SetResult(ItemRecipeToRemove); foreach (Recipe recipe in finder.SearchRecipes()) { RecipeEditor editor = new RecipeEditor(recipe); editor.DeleteRecipe(); } }
public override void PostSetupContent() { base.PostSetupContent(); RecipeFinder recipeFinder = new RecipeFinder(); recipeFinder.SetResult(ItemID.BeetleScaleMail); recipeFinder.AddIngredient(ItemID.TurtleScaleMail); foreach (Recipe recip in recipeFinder.SearchRecipes()) { RecipeEditor recipeEditor = new RecipeEditor(recip); recipeEditor.DeleteRecipe(); } ModRecipe recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.Gel, 10); recipe.AddIngredient(ItemID.Wood, 10); recipe.AddIngredient(ItemID.ManaCrystal, 1); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.SlimeStaff); recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.ChlorophyteBar, 14); recipe.AddIngredient(ItemID.BeetleHusk, 5); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.BeetleHelmet); recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.ChlorophyteBar, 27); recipe.AddIngredient(ItemID.BeetleHusk, 10); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.BeetleScaleMail); recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.ChlorophyteBar, 21); recipe.AddIngredient(ItemID.BeetleHusk, 8); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.BeetleLeggings); recipe.AddRecipe(); AlchemistRecipe crecipe = new AlchemistRecipe(this); crecipe.AddIngredient(ItemID.Bottle, 15); crecipe.AddIngredient(ItemID.Deathweed, 1); crecipe.AddIngredient(ItemID.VialofVenom, 1); crecipe.AddIngredient(ItemID.Fireblossom, 1); crecipe.AddIngredient(ItemID.ExplosivePowder, 1); crecipe.AddTile(TileID.AlchemyTable); crecipe.SetResult(ItemID.ToxicFlask, 15); crecipe.AddRecipe(); ModMethods.PostSetupContent(); }
public static void DestroyRecipes() { foreach (var lunarTool in LunarTools) { var finder = new RecipeFinder(); finder.SetResult(lunarTool); var recipes = finder.SearchRecipes(); recipes.ForEach(x => { var editor = new RecipeEditor(x); editor.DeleteRecipe(); }); } }
public static void RemoveRecipe(int itemID) { RecipeFinder rf = new RecipeFinder(); rf.SetResult(itemID); List <Recipe> list = rf.SearchRecipes(); for (int i = 0; i < list.Count; i++) { Recipe r = list[i]; RecipeEditor re = new RecipeEditor(r); re.DeleteRecipe(); } }
// Adapt certain vanilla recipes to our own 'pillar recipes' // For Night's Edge there is Blood Carnage, for Mechanical Worm there is Mechanical Brain public static void AdaptToNovaRecipes(Mod mod) { //Night's Edge can't be crafted with Blood Butcherer //Mechanical Worm can't be crafted with Vertebrae // Search night's edge var rFinder = new RecipeFinder(); rFinder.SetResult(ItemID.NightsEdge); rFinder.AddIngredient(ItemID.BloodButcherer); // Add to found recipes var foundRecipes = rFinder.SearchRecipes(); // Search mech worm rFinder = new RecipeFinder(); rFinder.SetResult(ItemID.MechanicalWorm); rFinder.AddIngredient(ItemID.Vertebrae); // Add to found recipes foundRecipes = foundRecipes.Concat(rFinder.SearchRecipes()).ToList(); // For all found recipes, delete them foundRecipes.ForEach(recipe => { var rEditor = new RecipeEditor(recipe); rEditor.DeleteRecipe(); }); //The following recipes (with result of this type) require Nova Fragments for crafting foreach (short resultType in new short[] { ItemID.SuperHealingPotion, ItemID.CelestialSigil, ItemID.FragmentVortex, ItemID.FragmentNebula, ItemID.FragmentSolar, ItemID.FragmentStardust }) { rFinder = new RecipeFinder(); rFinder.SetResult(resultType); rFinder.SearchRecipes().ForEach(recipe => { var rEditor = new RecipeEditor(recipe); rEditor.AddIngredient(mod.ItemType <NovaFragment>(), resultType == ItemID.CelestialSigil ? 20 : 1); // 20 frags for sigil, 1 for others }); } }
public static void EditVanillaRecipes() { if (GetInstance <ServerConfig>().MolotovBlueGelCraft > 0) { var recipe = new ModRecipe(GetInstance <VanillaTweaks>()); recipe.AddIngredient(ItemID.Ale, 5); recipe.AddIngredient(ItemID.Torch, 1); recipe.AddIngredient(ItemID.Silk, 1); recipe.AddIngredient(ItemID.Gel, GetInstance <ServerConfig>().MolotovBlueGelCraft); recipe.SetResult(ItemID.MolotovCocktail, 5); recipe.AddRecipe(); } var foundRecipes = new List <Recipe>(); if (GetInstance <ServerConfig>().JestersArrowCraft == 0) { foreach (var recipe in Main.recipe) { if (recipe != null && recipe.createItem != null && recipe.createItem.type == ItemID.JestersArrow) { foundRecipes.Add(recipe); } } foreach (var recipe in foundRecipes) { var editor = new RecipeEditor(recipe); editor.DeleteRecipe(); } foundRecipes.Clear(); } else { foreach (var recipe in Main.recipe) { if (recipe != null && recipe.createItem != null && recipe.createItem.type == ItemID.JestersArrow) { var editor = new RecipeEditor(recipe); editor.SetIngredientStack(ItemID.WoodenArrow, GetInstance <ServerConfig>().JestersArrowCraft); editor.SetResult(ItemID.JestersArrow, GetInstance <ServerConfig>().JestersArrowCraft); } } } }
private static void RemoveNightsEdgeRecipe() { RecipeFinder finder = new RecipeFinder(); { finder.AddIngredient(ItemID.BloodButcherer, 1); finder.AddIngredient(ItemID.FieryGreatsword, 1); finder.AddIngredient(ItemID.BladeofGrass, 1); finder.AddIngredient(ItemID.Muramasa, 1); finder.AddTile(TileID.DemonAltar); finder.SetResult(ItemID.NightsEdge, 1); Recipe recipe2 = finder.FindExactRecipe(); if (recipe2 != null) { RecipeEditor editor = new RecipeEditor(recipe2); editor.DeleteRecipe(); } } }
public static void ExactRecipeRemover2Ingredients(int Ingredient1, int Ingredient1Amount, int Ingredient2, int Ingredient2Amount, int CraftingStation, int RecipeResult) { //this method is for when there's an item whose recipe needs to be removed, but we can't use RecipeRemover //that usually means we're giving it a custom recipe somewhere else, since RecipeRemover runs on any recipe that results in that item //using exact recipes is thus required. not sure if we need to do this again, but if we do, now theres a method RecipeFinder finder = new RecipeFinder(); finder.AddIngredient(Ingredient1, Ingredient1Amount); finder.AddIngredient(Ingredient2, Ingredient2Amount); finder.AddTile(CraftingStation); finder.SetResult(RecipeResult); Recipe locateRecipe = finder.FindExactRecipe(); bool recipeFound = locateRecipe != null; if (recipeFound) { RecipeEditor editor = new RecipeEditor(locateRecipe); editor.DeleteRecipe(); } }
public static void SetAllFurnaceRecipeSystem() { RecipeFinder rf = new RecipeFinder(); rf.AddTile(TileID.Furnaces); List <Recipe> list = rf.SearchRecipes(); for (int i = 0; i < list.Count; i++) { Recipe r = list[i]; Recipe recipe = r; if (recipe.requiredItem.Length == 1) { TUA.instance.AddFurnaceRecipe(recipe.requiredItem[0].type, recipe.createItem.type, 20); _removedRecipes.Add(r); RecipeEditor re = new RecipeEditor(r); re.DeleteRecipe(); } } }
public override void AddRecipes() { ModRecipe newLeather = new ModRecipe(this); newLeather.AddRecipeGroup("ExtraGunGear:EvilChunk", 3); newLeather.AddTile(TileID.WorkBenches); newLeather.SetResult(ItemID.Leather); newLeather.AddRecipe(); RecipeFinder finder = new RecipeFinder(); finder.AddIngredient(ItemID.RottenChunk, 5); finder.AddTile(TileID.WorkBenches); finder.SetResult(ItemID.Leather); Recipe recipe2 = finder.FindExactRecipe(); if (recipe2 != null) { RecipeEditor editor = new RecipeEditor(recipe2); editor.DeleteRecipe(); } }
public override void PostAddRecipes() { Mod tremor = ModLoader.GetMod("Tremor"); if (tremor != null && Config.DommhammerjackhammerSettings == 2) { RecipeFinder finder = new RecipeFinder(); // make a new RecipeFinder finder.AddIngredient(ItemID.Pwnhammer); // add a new recipe group, in this case the vanilla one for iron or lead bars. finder.AddIngredient(tremor.ItemType("DarkBulb"), 15); finder.AddIngredient(ItemID.Bone, 100); finder.AddTile(TileID.MythrilAnvil); // add a required tile, any anvil finder.SetResult(tremor.ItemType("Squasher")); // set the result to be 10 chains Recipe exactRecipe = finder.FindExactRecipe(); // try to find the exact recipe matching our criteria bool isRecipeFound = exactRecipe != null; // if our recipe is not null, it means we found the exact recipe if (isRecipeFound) // since our recipe is found, we can continue { RecipeEditor editor = new RecipeEditor(exactRecipe); // for our recipe, make a new RecipeEditor editor.DeleteRecipe(); // delete the recipe } } }
public static void TestRecipeEditor(Mod mod) { RecipeFinder finder = new RecipeFinder(); finder.AddIngredient(ItemID.Chain); foreach (Recipe recipe in finder.SearchRecipes()) { RecipeEditor editor = new RecipeEditor(recipe); editor.DeleteIngredient(ItemID.Chain); } finder = new RecipeFinder(); finder.AddRecipeGroup("IronBar"); finder.AddTile(TileID.Anvils); finder.SetResult(ItemID.Chain, 10); Recipe recipe2 = finder.FindExactRecipe(); if (recipe2 != null) { RecipeEditor editor = new RecipeEditor(recipe2); editor.DeleteRecipe(); } }
public override void AddRecipes() { RecipeFinder HBR = new RecipeFinder(); HBR = new RecipeFinder(); HBR.AddIngredient(ItemID.Hellstone, 3); HBR.AddIngredient(ItemID.Obsidian); HBR.AddTile(TileID.Hellforge); HBR.SetResult(ItemID.HellstoneBar); Recipe HBRR = HBR.FindExactRecipe(); if (HBR != null) { RecipeEditor HBE = new RecipeEditor(HBRR); HBE.DeleteRecipe(); } ModRecipe HSB = new ModRecipe(this); HSB.AddIngredient(ItemID.Hellstone, 5); HSB.AddTile(TileID.Hellforge); HSB.SetResult(ItemID.HellstoneBar); HSB.AddRecipe(); }
public override void AddRecipes() { //-------------------------------------Existing Recipes-------------------------------------\\ RecipeFinder finder = new RecipeFinder(); finder.SetResult(151); //Necro Helmet foreach (Recipe r in finder.SearchRecipes()) { RecipeEditor editor = new RecipeEditor(r); editor.DeleteTile(18); //Workbench editor.AddTile(300); //Bone Welder } finder = new RecipeFinder(); finder.SetResult(152); //Necro Breastplate foreach (Recipe r in finder.SearchRecipes()) { RecipeEditor editor = new RecipeEditor(r); editor.DeleteTile(18); //Workbench editor.AddTile(300); //Bone Welder } finder = new RecipeFinder(); finder.SetResult(153); //Necro Greaves foreach (Recipe r in finder.SearchRecipes()) { RecipeEditor editor = new RecipeEditor(r); editor.DeleteTile(18); //Workbench editor.AddTile(300); //Bone Welder } finder = new RecipeFinder(); finder.AddIngredient(795); //Blood Butcherer finder.AddIngredient(155); //Muramasa finder.AddIngredient(190); //Blade of Grass finder.AddIngredient(121); //Fiery Greatsword finder.AddTile(26); //Altar finder.SetResult(273); //Night's Edge Recipe exactRecipe = finder.FindExactRecipe(); bool isRecipeFound = exactRecipe != null; if (isRecipeFound) { RecipeEditor editor = new RecipeEditor(exactRecipe); editor.DeleteRecipe(); } //-------------------------------------New Recipes-------------------------------------\\ /* * recipe = new ModRecipe(this); * recipe.AddIngredient(000); * recipe.AddTile(114); //Tinkerer's Workshop * recipe.SetResult(000); * recipe.AddRecipe(); */ ModRecipe recipe = new ModRecipe(this); recipe.AddIngredient(null, "TrueNightsEdgeB"); recipe.AddIngredient(674); //True Excalibur recipe.AddTile(134); //Hardmode Anvil recipe.SetResult(757); //Terra Blade recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(null, "Obfuscator"); recipe.AddIngredient(null, "CursedNaginata"); recipe.AddIngredient(null, "BoOfGrass"); recipe.AddIngredient(null, "HellHalberd"); recipe.AddTile(26); //Altar recipe.SetResult(274); //Dark Lance recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(706, 3); //Platinum Bar recipe.AddIngredient(381, 12); //Cobalt Bar recipe.AddIngredient(327); //Golden Key recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(156); //Cobalt Shield recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(147, 10); //Spike recipe.AddIngredient(259, 6); //Leather recipe.AddIngredient(225, 2); //Silk recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(953); //Climbing Claws recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(147, 10); //Spike recipe.AddIngredient(259, 6); //Leather recipe.AddIngredient(225, 2); //Silk recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(975); //Shoe Spikes recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(765, 90); //Rain Cloud recipe.AddIngredient(575, 5); //Soul of Flight recipe.AddIngredient(19, 15); //Gold Bar recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(158); //Lucky Horseshoe recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(3756, 90); //Snow Cloud recipe.AddIngredient(575, 5); //Soul of Flight recipe.AddIngredient(3306); //White String recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(159); //Shiny Red Balloon recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(751, 90); //Cloud Block recipe.AddIngredient(575, 5); //Soul of Flight recipe.AddIngredient(31); //Bottle recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(53); //Cloud in a Bottle recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(169, 90); //Sand Block recipe.AddIngredient(575, 5); //Soul of Flight recipe.AddIngredient(31); //Bottle recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(857); //Sandstorm in a Bottle recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(593, 90); //Snow Block recipe.AddIngredient(575, 5); //Soul of Flight recipe.AddIngredient(31); //Bottle recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(987); //Blizzard in a Bottle recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(2435, 90); //Coralstone Block recipe.AddIngredient(575, 5); //Soul of Flight recipe.AddIngredient(31); //Bottle recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(3201); //Tsunami in a Bottle recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(318); //Fireblossom recipe.AddIngredient(172, 100); //Ash recipe.AddIngredient(173, 100); //Obsidian recipe.AddIngredient(207, 3); //Lava Bucket recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(1323); //Obsidian Rose recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(275); //Coral recipe.AddTile(18); //Workbench recipe.SetResult(2435); //Coralstone Block recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(2435); //Coralstone Block recipe.AddTile(18); //Workbench recipe.SetResult(275); //Coral recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddRecipeGroup("AdvancedTinkering:AnimalSkin"); recipe.AddTile(18); //Workbench recipe.SetResult(259, 12); //Leather recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(225, 20); //Silk recipe.AddIngredient(259, 20); //Leather recipe.AddIngredient(254, 3); //Black Thread recipe.AddTile(86); //Loom recipe.SetResult(410); //Miner's Shirt recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(225, 15); //Silk recipe.AddIngredient(259, 25); //Leather recipe.AddIngredient(254, 3); //Black Thread recipe.AddTile(86); //Loom recipe.SetResult(411); //Miner's Pants recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(null, "RetinazerMask"); recipe.AddIngredient(null, "SpazmatismMask"); recipe.AddTile(18); //Workbench recipe.SetResult(2106); //The Twins Mask recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(3111, 30); //Pink Gel recipe.AddIngredient(23, 100); //Gel recipe.AddIngredient(9, 7); //Purity Wood recipe.AddTile(220); //Solidifier recipe.SetResult(1309); //Slime Staff recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(545, 999); //Cursed Arrow recipe.AddIngredient(1334, 999); //Ichor Arrow recipe.AddIngredient(47, 999); //Unholy Arrow recipe.AddIngredient(516, 999); //Holy Arrow recipe.AddIngredient(265, 999); //Hellfire Arrow recipe.AddIngredient(3003, 999); //Bone Arrow recipe.AddIngredient(259, 25); //Leather recipe.AddTile(114); //Tinkerer's Workshop recipe.SetResult(1321); //Magic Quiver recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(210); //Vine recipe.SetResult(2996, 6); //Vine Rope recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddRecipeGroup("Wood", 3); recipe.AddTile(17); //Furnace recipe.SetResult(1922); //Coal recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(2339); //Tin Can recipe.AddTile(17); //Furnace recipe.SetResult(703); //Tin Bar recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(766); //Bone Block recipe.AddTile(300); //Bone Welder recipe.SetResult(154); //Bone recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(154, 5); //Bone recipe.AddTile(300); //Bone Welder recipe.SetResult(3003, 5); //Bone Arrow recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(154); //Bone recipe.AddIngredient(8, 3); //Torch recipe.AddTile(300); //Bone Welder recipe.SetResult(3004, 3); //Bone Torch recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(19); //Gold Bar recipe.SetResult(1348, 2); //Gold Dust recipe.AddTile(247); //Autohammer recipe.SetResult(327); //Golden Key recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(1101, 8); //Lihzahrd Brick recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(303); //Lihzahrd Furnace recipe.SetResult(1142); //Lihzahrd Chest recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(9, 8); //Purity Wood recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(304); //Living Loom recipe.SetResult(831); //Living Wood Chest recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(824, 8); //Sunplate Block recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(305); //Sky Mill recipe.SetResult(838); //Skyware Chest recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(3272); //Hardened Sand Block recipe.AddTile(17); //Furnace recipe.SetResult(607, 2); //Sandstone Brick recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(3271); //Sandstone Block recipe.AddTile(17); //Furnace recipe.SetResult(607, 3); //Sandstone Brick recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(586, 22); //Candy Cane Block recipe.AddTile(17); //Furnace recipe.SetResult(1909); //Candy Cane Sword recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(586, 24); //Candy Cane Block recipe.AddTile(17); //Furnace recipe.SetResult(1917); //Candy Cane Pickaxe recipe.AddRecipe(); recipe = new ModRecipe(this); recipe.AddIngredient(586, 20); //Candy Cane Block recipe.AddTile(17); //Furnace recipe.SetResult(1915); //Candy Cane Hook recipe.AddRecipe(); }
public override void AddRecipes() { RecipeFinder finder = new RecipeFinder(); finder.AddIngredient(ItemID.Pumpkin, 20); finder.AddTile(TileID.WorkBenches); finder.SetResult(ItemID.PumpkinHelmet); Recipe recipe1 = finder.FindExactRecipe(); if (recipe1 != null) { RecipeEditor editor = new RecipeEditor(recipe1); editor.DeleteRecipe(); } finder = new RecipeFinder(); finder.AddIngredient(ItemID.Pumpkin, 30); finder.AddTile(TileID.WorkBenches); finder.SetResult(ItemID.PumpkinBreastplate); Recipe recipe2 = finder.FindExactRecipe(); if (recipe2 != null) { RecipeEditor editor = new RecipeEditor(recipe2); editor.DeleteRecipe(); } finder = new RecipeFinder(); finder.AddIngredient(ItemID.Pumpkin, 25); finder.AddTile(TileID.WorkBenches); finder.SetResult(ItemID.PumpkinLeggings); Recipe recipe3 = finder.FindExactRecipe(); if (recipe3 != null) { RecipeEditor editor = new RecipeEditor(recipe3); editor.DeleteRecipe(); } ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Pumpkin, 20); recipe.AddRecipeGroup("EvilBar", 5); recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.PumpkinHelmet); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Pumpkin, 30); recipe.AddRecipeGroup("EvilBar", 12); recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.PumpkinBreastplate); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Pumpkin, 25); recipe.AddRecipeGroup("EvilBar", 8); recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.PumpkinLeggings); recipe.AddRecipe(); }
public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddRecipeGroup("Wood", 5); recipe.AddRecipeGroup("TenebraeMod:GoldBar", 3); recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.GoldChest); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddRecipeGroup("TenebraeMod:DemoniteBrick", 8); recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.ShadowChest); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddRecipeGroup("Wood", 5); recipe.AddIngredient(ItemID.JungleSpores, 2); recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.IvyChest); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Coral, 8); recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.WaterChest); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Chest); recipe.AddIngredient(ItemID.Cobweb, 8); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.WebCoveredChest); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Chest, 5); recipe.AddIngredient(ItemID.SnowBlock, 25); recipe.AddIngredient(ItemID.IceBlock, 25); recipe.AddIngredient(ItemID.TempleKey); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.FrozenChest, 5); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Chest, 5); recipe.AddIngredient(ItemID.MudBlock, 25); recipe.AddIngredient(ItemID.JungleGrassSeeds, 25); recipe.AddIngredient(ItemID.TempleKey); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.JungleChest, 5); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Chest, 5); recipe.AddIngredient(ItemID.PearlstoneBlock, 50); recipe.AddIngredient(ItemID.TempleKey); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.HallowedChest, 5); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Chest, 5); recipe.AddIngredient(ItemID.EbonstoneBlock, 50); recipe.AddIngredient(ItemID.TempleKey); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.CorruptionChest, 5); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Chest, 5); recipe.AddIngredient(ItemID.CrimstoneBlock, 50); recipe.AddIngredient(ItemID.TempleKey); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.CrimsonChest, 5); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Frog, 5); recipe.AddTile(TileID.Sawmill); recipe.SetResult(ItemID.FrogLeg); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Cloud, 50); recipe.AddIngredient(ItemID.Bottle); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.CloudinaBottle); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Cloud, 25); recipe.AddIngredient(ItemID.SnowBlock, 25); recipe.AddIngredient(ItemID.Bottle); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.BlizzardinaBottle); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Cloud, 25); recipe.AddIngredient(ItemID.SandBlock, 25); recipe.AddIngredient(ItemID.Bottle); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.SandstorminaBottle); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Cloud, 20); recipe.AddIngredient(ItemID.WhiteString, 2); recipe.AddIngredient(ItemID.Feather, 10); recipe.AddTile(TileID.SkyMill); recipe.SetResult(ItemID.ShinyRedBalloon); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.OldShoe); recipe.AddIngredient(ItemID.Silk, 5); recipe.AddIngredient(ItemID.Feather, 10); recipe.AddTile(TileID.Loom); recipe.SetResult(ItemID.HermesBoots); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.OldShoe); recipe.AddIngredient(ItemID.Coral, 5); recipe.AddIngredient(ItemID.WaterWalkingPotion, 5); recipe.AddTile(TileID.Loom); recipe.SetResult(ItemID.WaterWalkingBoots); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.OldShoe); recipe.AddIngredient(ItemID.IceBlock, 25); recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(TileID.Loom); recipe.SetResult(ItemID.IceSkates); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Silk, 3); recipe.AddRecipeGroup("IronBar", 2); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.Aglet); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "TatteredBand"); recipe.AddIngredient(ItemID.JungleSpores, 10); recipe.AddIngredient(ItemID.Cloud, 5); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.AnkletoftheWind); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Leather, 5); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.OldShoe); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "TatteredBand"); recipe.AddIngredient(ItemID.RegenerationPotion, 3); recipe.AddIngredient(ItemID.LifeCrystal, 1); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.BandofRegeneration); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "TatteredBand"); recipe.AddIngredient(ItemID.ManaRegenerationPotion, 3); recipe.AddIngredient(ItemID.ManaCrystal, 1); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.BandofStarpower); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Vine, 10); recipe.AddIngredient(ItemID.Leather, 5); recipe.AddTile(TileID.Loom); recipe.SetResult(ItemID.FeralClaws); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.FeralClaws); recipe.AddIngredient(ItemID.Spike, 10); recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.ClimbingClaws); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.OldShoe); recipe.AddIngredient(ItemID.Spike, 10); recipe.AddTile(TileID.Anvils); recipe.SetResult(ItemID.ShoeSpikes); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.OldShoe); recipe.AddIngredient(ItemID.DayBloomPlanterBox, 25); recipe.AddIngredient(ItemID.JungleGrassSeeds, 10); recipe.AddTile(TileID.Loom); recipe.SetResult(ItemID.FlowerBoots); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddRecipeGroup("TenebraeMod:GoldBar", 3); recipe.AddIngredient(ItemID.Cloud, 50); recipe.AddIngredient(ItemID.Feather, 5); recipe.AddTile(TileID.SkyMill); recipe.SetResult(ItemID.LuckyHorseshoe); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "Paper", 3); recipe.AddIngredient(ItemID.Leather); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.Book, 3); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SpellTome); recipe.AddIngredient(ItemID.WaterCandle, 3); recipe.AddIngredient(ItemID.Bone, 20); recipe.AddTile(TileID.Bookcases); recipe.SetResult(ItemID.WaterBolt); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SpellTome); recipe.AddIngredient(ItemID.LivingDemonFireBlock, 20); recipe.AddIngredient(ItemID.SoulofNight, 15); recipe.AddTile(TileID.Bookcases); recipe.SetResult(ItemID.DemonScythe); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.SpellTome); recipe.AddIngredient(ItemID.CelestialMagnet); recipe.AddIngredient(ItemID.Ectoplasm, 15); recipe.AddTile(TileID.Bookcases); recipe.SetResult(ItemID.MagnetSphere); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "WornCloth", 15); recipe.AddIngredient(ItemID.SoulofNight, 6); recipe.AddIngredient(ItemID.DarkShard, 2); recipe.AddTile(TileID.MythrilAnvil); recipe.SetResult(ItemID.Blindfold); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "WornCloth", 10); recipe.AddIngredient(ItemID.SandBlock, 50); recipe.AddIngredient(ItemID.Sandstone, 25); recipe.AddTile(TileID.Loom); recipe.SetResult(ItemID.FlyingCarpet); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "TatteredBand", 1); recipe.AddIngredient(ItemID.LavaBucket, 3); recipe.AddIngredient(ItemID.AshBlock, 25); recipe.AddTile(TileID.Hellforge); recipe.SetResult(ItemID.LavaCharm); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.ArmorBracing); recipe.AddIngredient(ItemID.MedicatedBandage); recipe.AddIngredient(ItemID.ThePlan); recipe.AddIngredient(ItemID.CountercurseMantra); recipe.AddIngredient(ItemID.Blindfold); recipe.AddIngredient(null, "ReflectiveGlove"); recipe.AddTile(TileID.TinkerersWorkbench); recipe.SetResult(ItemID.AnkhCharm); recipe.AddRecipe(); recipe = new ModRecipe(mod); recipe.AddIngredient(null, "MoldyHerosTome"); recipe.AddTile(TileID.DemonAltar); recipe.SetResult(ItemID.BrokenHeroSword); recipe.AddRecipe(); finder = new RecipeFinder(); finder.AddIngredient(ItemID.Blindfold); finder.AddIngredient(ItemID.ArmorBracing); finder.AddIngredient(ItemID.MedicatedBandage); finder.AddIngredient(ItemID.ThePlan); finder.AddIngredient(ItemID.CountercurseMantra); finder.AddTile(TileID.TinkerersWorkbench); finder.SetResult(ItemID.AnkhCharm); Recipe recipe2 = finder.FindExactRecipe(); if (recipe2 != null) { RecipeEditor editor = new RecipeEditor(recipe2); editor.DeleteRecipe(); } }
//public override bool PreKill(double damage, int hitDirection, bool pvp, ref bool playSound, ref bool genGore, // ref PlayerDeathReason damageSource) //{ // position = Main.LocalPlayer.position; // return true; //} public override void ProcessTriggers(TriggersSet triggersSet) { if (Error666Wings) { if (MoTools.DevSpeedHotKey.Current) { //Error666Wings.HorizontalWingSpeeds(player, ref speed, ref acceleration).speed = 50f; //Error666Wings.HorizontalWingSpeeds(player, ref speed, ref acceleration).acceleration *= 30.0f; player.runAcceleration *= 30.0f; player.accRunSpeed = 50f; } } if (MoTools.SecretHotKey.Current) { /*if (!SecretRecipe) * { * ModRecipe recipe = new ModRecipe(mod); * recipe.AddIngredient(ItemID.DirtBlock); * recipe.SetResult(ItemType<Error666Wings>()); * recipe.AddRecipe(); * * SecretRecipe = true; * }*/ /*else * { * RecipeFinder finder = new RecipeFinder(); // make a new RecipeFinder * * finder = new RecipeFinder(); // make a new RecipeFinder * finder.AddIngredient(ItemID.DirtBlock); // add a required tile, any anvil * finder.SetResult(ItemType<Error666Wings>()); // set the result to be 10 chains * Recipe exactRecipe = finder.FindExactRecipe(); // try to find the exact recipe matching our criteria * * bool isRecipeFound = exactRecipe != null; // if our recipe is not null, it means we found the exact recipe * if (isRecipeFound) // since our recipe is found, we can continue * { * RecipeEditor editor = new RecipeEditor(exactRecipe); // for our recipe, make a new RecipeEditor * editor.DeleteRecipe(); // delete the recipe * } * * SecretRecipe = false; * }*/ } else { RecipeFinder finder = new RecipeFinder(); // make a new RecipeFinder finder = new RecipeFinder(); // make a new RecipeFinder finder.AddIngredient(ItemID.DirtBlock); // add a required tile, any anvil finder.SetResult(ItemType <Error666Wings>()); // set the result to be 10 chains Recipe exactRecipe = finder.FindExactRecipe(); // try to find the exact recipe matching our criteria bool isRecipeFound = exactRecipe != null; // if our recipe is not null, it means we found the exact recipe if (isRecipeFound) // since our recipe is found, we can continue { RecipeEditor editor = new RecipeEditor(exactRecipe); // for our recipe, make a new RecipeEditor editor.DeleteRecipe(); // delete the recipe } SecretRecipe = false; } }