feat: cross-mod support for Plantera rework

This commit is contained in:
Muhammad Nauman Raza 2024-11-09 00:32:47 +00:00
parent 3f05870f05
commit 97ab540e9e
Signed by: devraza
GPG key ID: 91EAD6081011574B
3 changed files with 18 additions and 0 deletions

View file

@ -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<ModItem>("BlossomFlux", out ModItem BlossomFlux)) {
itemLoot.RemoveWhere(rule => rule is CommonDrop drop
&& drop.itemId == BlossomFlux.Type);
}
}
}
}
}

View file

@ -83,6 +83,15 @@ namespace Continuity.Content
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 2);
recipe.AddIngredient(ItemID.Vine, 5);
recipe.Register();
// Blossom Flux (Calamity)
if (ModLoader.TryGetMod("CalamityMod", out Mod calamityMod) && calamityMod.TryFind<ModItem>("BlossomFlux", out ModItem BlossomFlux)) {
recipe = Recipe.Create(BlossomFlux.Type);
recipe.AddIngredient(ItemID.ChlorophyteBar, 8);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 8);
recipe.AddIngredient(ItemID.Vine, 4);
recipe.Register();
}
}
}
}

View file

@ -1,4 +1,5 @@
displayName = Continuity
author = The Continuity Team
sortAfter = CalamityMod
weakReferences = CalamityMod
version = 0.1