diff --git a/Particles/GeneralParticleHandler.cs b/Particles/GeneralParticleHandler.cs index 672f3c995f..88bf2c043c 100644 --- a/Particles/GeneralParticleHandler.cs +++ b/Particles/GeneralParticleHandler.cs @@ -67,6 +67,7 @@ namespace CalamityMod.Particles public override void PostSetupContent() { Type baseParticleType = typeof(Particle); +#pragma warning disable CS0618 // Type or member is obsolete ReflectionHelper.IterateEveryModsTypes(action: type => { int ID = particleIDsByTypes.Count; //Get the ID of the particle @@ -83,6 +84,7 @@ namespace CalamityMod.Particles texturePath = instance.Texture; particleTexturesByIDs[ID] = ModContent.Request(texturePath, instance.TextureRequestMode); }); +#pragma warning restore CS0618 // Type or member is obsolete } public override void Load() diff --git a/Utilities/ReflectionHelper.cs b/Utilities/ReflectionHelper.cs index 44c83da0e2..adc3ed494c 100644 --- a/Utilities/ReflectionHelper.cs +++ b/Utilities/ReflectionHelper.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; +using CalamityMod.Particles; using Terraria.ModLoader; using Terraria.ModLoader.Core; namespace CalamityMod { + [Obsolete($"This is kept for {nameof(GeneralParticleHandler)}. Consider use ILoadable or ModType If possible.")] public static class ReflectionHelper { public static IEnumerable GetEveryModsTypes()