From 97ab540e9e58416c92cac7ce4786083ec7e34f14 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sat, 9 Nov 2024 00:32:47 +0000 Subject: [PATCH] feat: cross-mod support for Plantera rework --- Content/BossOverrides.cs | 8 ++++++++ Content/Recipes.cs | 9 +++++++++ build.txt | 1 + 3 files changed, 18 insertions(+) diff --git a/Content/BossOverrides.cs b/Content/BossOverrides.cs index fd3f6c5..d6272e9 100644 --- a/Content/BossOverrides.cs +++ b/Content/BossOverrides.cs @@ -42,6 +42,14 @@ namespace Continuity.Content foreach (var rule in itemLoot.Get()) { itemLoot.RemoveWhere(rule => rule is OneFromRulesRule); + if (ModLoader.HasMod("CalamityMod")) + { + itemLoot.RemoveWhere(rule => rule is CalamityMod.DropHelper.AllOptionsAtOnceWithPityDropRule); + if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod) && calamityMod.TryFind("BlossomFlux", out ModItem BlossomFlux)) { + itemLoot.RemoveWhere(rule => rule is CommonDrop drop + && drop.itemId == BlossomFlux.Type); + } + } } } } diff --git a/Content/Recipes.cs b/Content/Recipes.cs index 5d03479..b57522c 100644 --- a/Content/Recipes.cs +++ b/Content/Recipes.cs @@ -83,6 +83,15 @@ namespace Continuity.Content recipe.AddIngredient(ModContent.ItemType(), 2); recipe.AddIngredient(ItemID.Vine, 5); recipe.Register(); + + // Blossom Flux (Calamity) + if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod) && calamityMod.TryFind("BlossomFlux", out ModItem BlossomFlux)) { + recipe = Recipe.Create(BlossomFlux.Type); + recipe.AddIngredient(ItemID.ChlorophyteBar, 8); + recipe.AddIngredient(ModContent.ItemType(), 8); + recipe.AddIngredient(ItemID.Vine, 4); + recipe.Register(); + } } } } diff --git a/build.txt b/build.txt index d8cb9f7..8bcaf44 100644 --- a/build.txt +++ b/build.txt @@ -1,4 +1,5 @@ displayName = Continuity author = The Continuity Team sortAfter = CalamityMod +weakReferences = CalamityMod version = 0.1