diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index 49c79cc472..aa46204ec2 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -544,20 +544,23 @@ namespace CalamityMod.Items #endregion #region Pickup Item Changes + public override bool CanPickup(Item item, Player player) + { + // Prevent Mana Stars from being picked up while wielding Ion Blaster or Apoctosis Array + if (item.type == ItemID.Star || item.type == ItemID.SoulCake || item.type == ItemID.SugarPlum) + { + if (player.ActiveItem().type == ModContent.ItemType() || player.ActiveItem().type == ModContent.ItemType()) + return false; + } + return base.CanPickup(item, player); + } + public override bool OnPickup(Item item, Player player) { if (item.type == ItemID.Heart || item.type == ItemID.CandyApple || item.type == ItemID.CandyCane) // On heart pickup { - bool boostedHeart = player.Calamity().photosynthesis; - if (boostedHeart) - { + if (player.Calamity().photosynthesis) player.HealPlayer(PhotosynthesisPotion.IncreasedHeartHeal); - } - } - if (item.type == ItemID.Star || item.type == ItemID.SoulCake || item.type == ItemID.SugarPlum) // On star pickup - { - if (player.ActiveItem().type == ModContent.ItemType() || player.ActiveItem().type == ModContent.ItemType()) - return false; } return true; }