diff --git a/ModSupport/ModCalls.cs b/ModSupport/ModCalls.cs index 179271808e..fe262dc8db 100644 --- a/ModSupport/ModCalls.cs +++ b/ModSupport/ModCalls.cs @@ -4,6 +4,8 @@ using CalamityMod.Items; using CalamityMod.Projectiles; using CalamityMod.World; using System; +using System.Collections.Generic; +using System.Linq; using Terraria; namespace CalamityMod @@ -1749,6 +1751,15 @@ namespace CalamityMod } return eventActive; + case "ExcludeMinionsFromResurrection": + // This assumes all arguments after the calling command name are projectile types. + IEnumerable secondaryArguments = args.Skip(1); + if (secondaryArguments.Any(argument => !(argument is int))) + return new ArgumentException("ERROR: All arguments after the calling command to \"ExcludeMinionsFromResurrection\" must be ints."); + + CalamityLists.MinionsToNotResurrectList.AddRange(secondaryArguments.Select(argument => Convert.ToInt32(argument))); + break; + default: return new ArgumentException("ERROR: Invalid method name."); }