Mark ReflectionHelper as Obsolete

This commit is contained in:
Flowaria committed 2025-12-06 11:38:12 +09:00
1 parent 164d6243d4
commit d8bd7656c6
2 files changed
+4

No files matched your search

+2
View File
@@ -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<Particle>(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<Texture2D>(texturePath, instance.TextureRequestMode);
});
#pragma warning restore CS0618 // Type or member is obsolete
}
public override void Load()
+2
View File
@@ -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<Type> GetEveryModsTypes()