This repository has been archived on 2024-12-27. You can view files and clone it, but cannot push or open issues or pull requests.
continuity/Content/Systems/EndgameOverrideSystem.cs

34 lines
1.3 KiB
C#

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Continuity.Content.Items;
namespace Continuity.Content.Systems
{
public class EndgameRecipeOverrides : ModSystem
{
public override void AddRecipes() {
for (int i = 0; i < Recipe.numRecipes; i++) {
Recipe recipe = Main.recipe[i];
if (recipe.TryGetResult(ItemID.Zenith, out Item _)) {
recipe.RemoveIngredient(ItemID.CopperShortsword);
recipe.RemoveIngredient(ItemID.BeeKeeper);
recipe.RemoveIngredient(ItemID.EnchantedSword);
}
else if (recipe.TryGetResult(ItemID.EnchantedSword, out Item _)) {
recipe.AddIngredient(ItemID.CopperShortsword, 1);
}
else if (recipe.TryGetResult(ItemID.TerraBlade, out Item _)) {
recipe.AddIngredient(ItemID.EnchantedSword, 1);
}
// Calamity Endgame
else if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod) && (calamityMod.TryFind<ModItem>("DragonPow", out ModItem dragonPow))) {
if (recipe.TryGetResult(dragonPow.Type, out Item _)) {
recipe.RemoveIngredient(ItemID.DaoofPow);
}
}
}
}
}
}