using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Xml.Linq; using System.Xml.XPath; using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; using com.tiberiumfusion.ttplugins.HarmonyPlugins; using Gaelyte.HelperPlugins; using Terraria.ID; namespace Gaelyte.Plugins { /// /// This is the main class of your plugin. /// Don't forget to use the TTPlugins reference wiki: https://github.com/TiberiumFusion/TTPlugins/wiki /// public class LavaCharm : HPlugin { #region Plugin Self-Management /// /// This is called ONCE by the HPlugin applicator immediately after creating an instance of this HPlugin. Setup your plugin here. /// 1. Set the various fields of the Identity property to identify your plugin. /// 2. Set HasPersistentData to true or false, depending on your plugin's needs. /// public override void Initialize() { // Establish this plugin's internal Identity within the TTPlugins environment. Every plugin should have a unique internal Identity. Identity.PluginName = "ExtraRandomRecipes"; Identity.PluginDescription = "Adds some new recipes to create hard to obtain items"; Identity.PluginAuthor = "Nancok"; Identity.PluginVersion = new Version("1.2.0.0"); HasPersistentSavedata = false; // Set to true if your plugin uses the persistent savedata system. NewRecipe lavaCharmRecipe = new NewRecipe(ItemID.LavaCharm); lavaCharmRecipe.AddIngredient(ItemID.HellstoneBar, 20); lavaCharmRecipe.AddIngredient(ItemID.MagmaStone); lavaCharmRecipe.AddCraftingStation(TileID.Anvils); lavaCharmRecipe.needLava = true; NewRecipe windAnkletRecipe = new NewRecipe(ItemID.AnkletoftheWind); windAnkletRecipe.AddIngredient(ItemID.Vine, 2); windAnkletRecipe.AddIngredient(ItemID.RichMahogany, 50); windAnkletRecipe.AddIngredient(ItemID.LeafWand); windAnkletRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe lifeCrystalCrimsonRecipe = new NewRecipe(ItemID.LifeCrystal); lifeCrystalCrimsonRecipe.AddIngredient(ItemID.CrimtaneBar, 10); lifeCrystalCrimsonRecipe.AddIngredient(ItemID.TissueSample, 3); lifeCrystalCrimsonRecipe.AddCraftingStation(TileID.Anvils); NewRecipe lifeCrystalCorruptionRecipe = new NewRecipe(ItemID.LifeCrystal); lifeCrystalCorruptionRecipe.AddIngredient(ItemID.DemoniteBar, 10); lifeCrystalCorruptionRecipe.AddIngredient(ItemID.ShadowScale, 3); lifeCrystalCorruptionRecipe.AddCraftingStation(TileID.Anvils); NewRecipe fishermansGuideRecipe = new NewRecipe(ItemID.FishermansGuide); fishermansGuideRecipe.AddIngredient(ItemID.AtlanticCod); fishermansGuideRecipe.AddIngredient(ItemID.Salmon); fishermansGuideRecipe.AddIngredient(ItemID.Tuna); fishermansGuideRecipe.AddIngredient(ItemID.RedSnapper); fishermansGuideRecipe.AddIngredient(ItemID.NeonTetra); fishermansGuideRecipe.AddIngredient(ItemID.Trout); fishermansGuideRecipe.AddIngredient(ItemID.RockLobster); fishermansGuideRecipe.AddIngredient(ItemID.Flounder); fishermansGuideRecipe.AddIngredient(ItemID.Bass); fishermansGuideRecipe.AddIngredient(ItemID.Shrimp); fishermansGuideRecipe.AddCraftingStation(TileID.TinkerersWorkbench); fishermansGuideRecipe.needWater = true; NewRecipe sextantRecipe = new NewRecipe(ItemID.Sextant); sextantRecipe.AddIngredient(ItemID.Amber, 3); sextantRecipe.AddIngredient(ItemID.Glass, 2); sextantRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe weatherRadRecipe = new NewRecipe(ItemID.WeatherRadio); weatherRadRecipe.AddIngredient(ItemID.Cloud, 10); weatherRadRecipe.AddIngredient(ItemID.TinCan); weatherRadRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe PanicNecklaceRecipe = new NewRecipe(ItemID.PanicNecklace); PanicNecklaceRecipe.AddIngredient(ItemID.BandofStarpower); PanicNecklaceRecipe.AddCraftingStation(TileID.TinkerersWorkbench); PanicNecklaceRecipe.AddReverse(); NewRecipe DiamondRecipe = new NewRecipe(ItemID.Diamond); DiamondRecipe.AddIngredient(ItemID.Ruby); DiamondRecipe.AddCraftingStation(TileID.CrystalBall); DiamondRecipe.AddReverse(); NewRecipe CopperBarRecipe = new NewRecipe(ItemID.CopperBar); CopperBarRecipe.AddIngredient(ItemID.TinBar); CopperBarRecipe.AddCraftingStation(TileID.CrystalBall); CopperBarRecipe.AddReverse(); NewRecipe IronBarRecipe = new NewRecipe(ItemID.IronBar); IronBarRecipe.AddIngredient(ItemID.LeadBar); IronBarRecipe.AddCraftingStation(TileID.CrystalBall); IronBarRecipe.AddReverse(); NewRecipe SilverBarRecipe = new NewRecipe(ItemID.SilverBar); SilverBarRecipe.AddIngredient(ItemID.TungstenBar); SilverBarRecipe.AddCraftingStation(TileID.CrystalBall); SilverBarRecipe.AddReverse(); NewRecipe GoldBarRecipe = new NewRecipe(ItemID.GoldBar); GoldBarRecipe.AddIngredient(ItemID.PlatinumBar); GoldBarRecipe.AddCraftingStation(TileID.CrystalBall); GoldBarRecipe.AddReverse(); NewRecipe DartPistolRecipe = new NewRecipe(ItemID.DartPistol); DartPistolRecipe.AddIngredient(ItemID.DartRifle); DartPistolRecipe.AddCraftingStation(TileID.CrystalBall); DartPistolRecipe.AddReverse(); NewRecipe ChainGuillotinesRecipe = new NewRecipe(ItemID.ChainGuillotines); ChainGuillotinesRecipe.AddIngredient(ItemID.FetidBaghnakhs); ChainGuillotinesRecipe.AddCraftingStation(TileID.CrystalBall); ChainGuillotinesRecipe.AddReverse(); NewRecipe SoulDrainRecipe = new NewRecipe(ItemID.SoulDrain); SoulDrainRecipe.AddIngredient(ItemID.ClingerStaff); SoulDrainRecipe.AddCraftingStation(TileID.CrystalBall); SoulDrainRecipe.AddReverse(); NewRecipe FleshKnucklesRecipe = new NewRecipe(ItemID.FleshKnuckles); FleshKnucklesRecipe.AddIngredient(ItemID.PutridScent); FleshKnucklesRecipe.AddCraftingStation(TileID.CrystalBall); FleshKnucklesRecipe.AddReverse(); NewRecipe BrainOfConfusionRecipe = new NewRecipe(ItemID.BrainOfConfusion); BrainOfConfusionRecipe.AddIngredient(ItemID.WormScarf); BrainOfConfusionRecipe.AddCraftingStation(TileID.TinkerersWorkbench); BrainOfConfusionRecipe.AddReverse(); NewRecipe PaintSprayerRecipe = new NewRecipe(ItemID.PaintSprayer); PaintSprayerRecipe.AddIngredient(ItemID.Toolbelt); PaintSprayerRecipe.AddIngredient(ItemID.Paintbrush); PaintSprayerRecipe.AddIngredient(ItemID.PaintRoller); PaintSprayerRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe ExtendoGripRecipe = new NewRecipe(ItemID.ExtendoGrip); ExtendoGripRecipe.AddIngredient(ItemID.Toolbelt); ExtendoGripRecipe.AddIngredient(ItemID.GrapplingHook); ExtendoGripRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe PortableCementMixerRecipe = new NewRecipe(ItemID.PortableCementMixer); PortableCementMixerRecipe.AddIngredient(ItemID.Toolbelt); PortableCementMixerRecipe.AddIngredient(ItemID.WaterBucket); PortableCementMixerRecipe.AddIngredient(ItemID.HardenedSandWall, 400); PortableCementMixerRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe BrickLayerRecipe = new NewRecipe(ItemID.BrickLayer); BrickLayerRecipe.AddIngredient(ItemID.Toolbelt); BrickLayerRecipe.AddIngredient(ItemID.RedBrick, 200); BrickLayerRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe Recipe = new NewRecipe(ItemID.Glass); Recipe.AddIngredient(ItemID.Amber); Recipe.AddCraftingStation(TileID.GlassKiln); NewRecipe GreenCounterweightRecipe = new NewRecipe(ItemID.GreenCounterweight); GreenCounterweightRecipe.AddIngredient(ItemID.AshBlock, 40); GreenCounterweightRecipe.AddIngredient(ItemID.GreenDye); GreenCounterweightRecipe.AddCraftingStation(TileID.GlassKiln); NewRecipe BlueCounterweightRecipe = new NewRecipe(ItemID.BlueCounterweight); BlueCounterweightRecipe.AddIngredient(ItemID.AshBlock, 40); BlueCounterweightRecipe.AddIngredient(ItemID.BlueDye); BlueCounterweightRecipe.AddCraftingStation(TileID.GlassKiln); NewRecipe PurpleCounterweightRecipe = new NewRecipe(ItemID.PurpleCounterweight); PurpleCounterweightRecipe.AddIngredient(ItemID.AshBlock, 40); PurpleCounterweightRecipe.AddIngredient(ItemID.PurpleDye); PurpleCounterweightRecipe.AddCraftingStation(TileID.GlassKiln); NewRecipe RedCounterweightRecipe = new NewRecipe(ItemID.RedCounterweight); RedCounterweightRecipe.AddIngredient(ItemID.AshBlock, 40); RedCounterweightRecipe.AddIngredient(ItemID.RedDye); RedCounterweightRecipe.AddCraftingStation(TileID.GlassKiln); NewRecipe ShinyRedBalloonRecipe = new NewRecipe(ItemID.ShinyRedBalloon); ShinyRedBalloonRecipe.AddIngredient(ItemID.Cloud, 50); ShinyRedBalloonRecipe.AddIngredient(ItemID.FeatherfallPotion, 5); ShinyRedBalloonRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe CloudinaBottleRecipe = new NewRecipe(ItemID.CloudinaBottle); CloudinaBottleRecipe.AddIngredient(ItemID.Cloud, 60); CloudinaBottleRecipe.AddIngredient(ItemID.Bottle); CloudinaBottleRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe TinkerersWorkbenchRecipe = new NewRecipe(ItemID.TinkerersWorkshop); TinkerersWorkbenchRecipe.AddAnyIron(15); TinkerersWorkbenchRecipe.AddAnyWood(30); TinkerersWorkbenchRecipe.AddIngredient(ItemID.Silk); TinkerersWorkbenchRecipe.AddIngredient(ItemID.GoldCoin, 10); TinkerersWorkbenchRecipe.AddCraftingStation(TileID.WorkBenches); NewRecipe HandWarmerRecipe = new NewRecipe(ItemID.HandWarmer); HandWarmerRecipe.AddIngredient(ItemID.Silk, 25); HandWarmerRecipe.AddIngredient(ItemID.LivingFireBlock, 5); HandWarmerRecipe.AddCraftingStation(TileID.Loom); NewRecipe SorcererEmblemSumRecipe = new NewRecipe(ItemID.SorcererEmblem); SorcererEmblemSumRecipe.AddIngredient(ItemID.SummonerEmblem); SorcererEmblemSumRecipe.AddCraftingStation(TileID.TinkerersWorkbench); SorcererEmblemSumRecipe.AddReverse(); NewRecipe SorcererEmblemWarRecipe = new NewRecipe(ItemID.SorcererEmblem); SorcererEmblemWarRecipe.AddIngredient(ItemID.WarriorEmblem); SorcererEmblemWarRecipe.AddCraftingStation(TileID.TinkerersWorkbench); SorcererEmblemWarRecipe.AddReverse(); NewRecipe SorcererEmblemRanRecipe = new NewRecipe(ItemID.SorcererEmblem); SorcererEmblemRanRecipe.AddIngredient(ItemID.RangerEmblem); SorcererEmblemRanRecipe.AddCraftingStation(TileID.TinkerersWorkbench); SorcererEmblemRanRecipe.AddReverse(); NewRecipe WarriorEmblemSumRecipe = new NewRecipe(ItemID.WarriorEmblem); WarriorEmblemSumRecipe.AddIngredient(ItemID.SummonerEmblem); WarriorEmblemSumRecipe.AddCraftingStation(TileID.TinkerersWorkbench); WarriorEmblemSumRecipe.AddReverse(); NewRecipe WarriorEmblemRanRecipe = new NewRecipe(ItemID.WarriorEmblem); WarriorEmblemRanRecipe.AddIngredient(ItemID.RangerEmblem); WarriorEmblemRanRecipe.AddCraftingStation(TileID.TinkerersWorkbench); WarriorEmblemRanRecipe.AddReverse(); NewRecipe WarriorEmblemMagRecipe = new NewRecipe(ItemID.WarriorEmblem); WarriorEmblemMagRecipe.AddIngredient(ItemID.SorcererEmblem); WarriorEmblemMagRecipe.AddCraftingStation(TileID.TinkerersWorkbench); WarriorEmblemMagRecipe.AddReverse(); NewRecipe SummonerEmblemRanRecipe = new NewRecipe(ItemID.SummonerEmblem); SummonerEmblemRanRecipe.AddIngredient(ItemID.RangerEmblem); SummonerEmblemRanRecipe.AddCraftingStation(TileID.TinkerersWorkbench); SummonerEmblemRanRecipe.AddReverse(); NewRecipe SummonerEmblemWarRecipe = new NewRecipe(ItemID.SummonerEmblem); SummonerEmblemWarRecipe.AddIngredient(ItemID.WarriorEmblem); SummonerEmblemWarRecipe.AddCraftingStation(TileID.TinkerersWorkbench); SummonerEmblemWarRecipe.AddReverse(); NewRecipe SummonerEmblemMagRecipe = new NewRecipe(ItemID.SummonerEmblem); SummonerEmblemMagRecipe.AddIngredient(ItemID.SorcererEmblem); SummonerEmblemMagRecipe.AddCraftingStation(TileID.TinkerersWorkbench); SummonerEmblemMagRecipe.AddReverse(); NewRecipe RangerEmblemWarRecipe = new NewRecipe(ItemID.RangerEmblem); RangerEmblemWarRecipe.AddIngredient(ItemID.WarriorEmblem); RangerEmblemWarRecipe.AddCraftingStation(TileID.TinkerersWorkbench); RangerEmblemWarRecipe.AddReverse(); NewRecipe RangerEmblemSumRecipe = new NewRecipe(ItemID.RangerEmblem); RangerEmblemSumRecipe.AddIngredient(ItemID.SummonerEmblem); RangerEmblemSumRecipe.AddCraftingStation(TileID.TinkerersWorkbench); RangerEmblemSumRecipe.AddReverse(); NewRecipe RangerEmblemMagRecipe = new NewRecipe(ItemID.RangerEmblem); RangerEmblemMagRecipe.AddIngredient(ItemID.SorcererEmblem); RangerEmblemMagRecipe.AddCraftingStation(TileID.TinkerersWorkbench); RangerEmblemMagRecipe.AddReverse(); NewRecipe NecromanticScrollRecipe = new NewRecipe(ItemID.NecromanticScroll); NecromanticScrollRecipe.AddIngredient(ItemID.Book); NecromanticScrollRecipe.AddIngredient(ItemID.SoulofNight, 30); NecromanticScrollRecipe.AddIngredient(ItemID.TempleKey); NecromanticScrollRecipe.AddCraftingStation(TileID.Tombstones); NewRecipe BlindfoldRecipe = new NewRecipe(ItemID.Blindfold); BlindfoldRecipe.AddIngredient(ItemID.AncientCloth, 25); BlindfoldRecipe.AddCraftingStation(TileID.Loom); NewRecipe BandofRegenerationRecipe = new NewRecipe(ItemID.BandofRegeneration); BandofRegenerationRecipe.AddIngredient(ItemID.LifeCrystal); BandofRegenerationRecipe.AddIngredient(ItemID.FallenStar, 2); BandofRegenerationRecipe.AddCraftingStation(TileID.Anvils); NewRecipe AgletRecipe = new NewRecipe(ItemID.Aglet); AgletRecipe.AddAnyIron(10); AgletRecipe.AddIngredient(ItemID.Chain); AgletRecipe.AddCraftingStation(TileID.Anvils); NewRecipe WaterWalkingBootsRecipe = new NewRecipe(ItemID.WaterWalkingBoots); WaterWalkingBootsRecipe.AddIngredient(ItemID.WaterWalkingPotion, 5); WaterWalkingBootsRecipe.AddIngredient(ItemID.HermesBoots); WaterWalkingBootsRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe FlyingCarpetRecipe = new NewRecipe(ItemID.FlyingCarpet); FlyingCarpetRecipe.AddIngredient(ItemID.Silk, 30); FlyingCarpetRecipe.AddIngredient(ItemID.Feather, 40); FlyingCarpetRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe IceSkatesRecipe = new NewRecipe(ItemID.IceSkates); IceSkatesRecipe.AddIngredient(ItemID.WaterWalkingBoots); IceSkatesRecipe.AddIngredient(ItemID.IceBlock, 20); IceSkatesRecipe.AddAnyIron(4); IceSkatesRecipe.AddCraftingStation(TileID.TinkerersWorkbench); NewRecipe LivingFireBlockRecipe = new NewRecipe(ItemID.LivingFireBlock, 5); LivingFireBlockRecipe.AddIngredient(ItemID.LavaBucket); LivingFireBlockRecipe.AddIngredient(ItemID.AshBlock, 10); LivingFireBlockRecipe.AddCraftingStation(TileID.Hellforge); NewRecipe HermesBootsRecipe = new NewRecipe(ItemID.HermesBoots); HermesBootsRecipe.AddIngredient(ItemID.WoodGreaves); HermesBootsRecipe.AddIngredient(ItemID.Acorn, 20); HermesBootsRecipe.AddIngredient(ItemID.Sunflower, 5); HermesBootsRecipe.AddCraftingStation(TileID.Anvils); NewRecipe EnchSwordIronRecipe = new NewRecipe(ItemID.EnchantedSword); EnchSwordIronRecipe.AddIngredient(ItemID.IronBroadsword); EnchSwordIronRecipe.AddIngredient(ItemID.FallenStar, 25); EnchSwordIronRecipe.AddCraftingStation(TileID.Anvils); NewRecipe EnchSwordLeadRecipe = new NewRecipe(ItemID.EnchantedSword); EnchSwordLeadRecipe.AddIngredient(ItemID.LeadBroadsword); EnchSwordLeadRecipe.AddIngredient(ItemID.FallenStar, 25); EnchSwordLeadRecipe.AddCraftingStation(TileID.Anvils); NewRecipe TerraGrimRecipe = new NewRecipe(ItemID.Terragrim); TerraGrimRecipe.AddIngredient(ItemID.EnchantedSword); TerraGrimRecipe.AddCraftingStation(TileID.TinkerersWorkbench); TerraGrimRecipe.AddReverse(); NewRecipe MushroomConvertCorruption = new NewRecipe(ItemID.VileMushroom); MushroomConvertCorruption.AddIngredient(ItemID.Mushroom); MushroomConvertCorruption.AddCraftingStation(TileID.DemonAltar); NewRecipe MushroomConvertCrimson = new NewRecipe(ItemID.ViciousMushroom); MushroomConvertCrimson.AddIngredient(ItemID.Mushroom); MushroomConvertCrimson.AddCraftingStation(TileID.DemonAltar); } /// /// This is called ONCE by the HPlugin applicator some time after Initialize() and after the plugin's on-disk savedata has been loaded (if applicable). /// At this point, the Configuration property has been populated and is ready to use. /// Perform more one-time setup logic here, such as loading user preferences from the Configuration's Savedata property. /// /// True if the configuration was successfully loaded from the disk (or if there was no prior configuration and a new one was generated). False if the configuration failed to load and a blank configuration was substituted in. public override void ConfigurationLoaded(bool successfulConfigLoadFromDisk) { } /// /// This is called ONCE by the HPlugin applicator (some time after ConfigurationLoaded()) immediately before the plugin's PatchOperations are executed. /// If your plugin has not defined its PatchOperations by this point, it must do so now, or nothing will be patched. /// public override void PrePatch() { } #endregion } }