diff --git a/Content.Shared/Prototypes/EntityPrototypeHelpers.cs b/Content.Shared/Prototypes/EntityPrototypeHelpers.cs index 25ed9121b2..484dd4ad1d 100644 --- a/Content.Shared/Prototypes/EntityPrototypeHelpers.cs +++ b/Content.Shared/Prototypes/EntityPrototypeHelpers.cs @@ -4,13 +4,16 @@ using Robust.Shared.Prototypes; namespace Content.Shared.Prototypes { [UsedImplicitly] + [Obsolete("More efficient methods exist in EntityPrototype.HasComp and EntitySystem's proxy methods")] public static class EntityPrototypeHelpers { + [Obsolete("More efficient methods exist in EntityPrototype.HasComp and EntitySystem's proxy methods")] public static bool HasComponent(this EntityPrototype prototype, IComponentFactory? componentFactory = null) where T : IComponent { return prototype.HasComponent(typeof(T), componentFactory); } + [Obsolete("More efficient methods exist in EntityPrototype.HasComp and EntitySystem's proxy methods")] public static bool HasComponent(this EntityPrototype prototype, Type component, IComponentFactory? componentFactory = null) { componentFactory ??= IoCManager.Resolve(); @@ -20,11 +23,13 @@ namespace Content.Shared.Prototypes return prototype.Components.ContainsKey(registration.Name); } + [Obsolete("More efficient methods exist in EntityPrototype.HasComp and EntitySystem's proxy methods")] public static bool HasComponent(string prototype, IPrototypeManager? prototypeManager = null, IComponentFactory? componentFactory = null) where T : IComponent { return HasComponent(prototype, typeof(T), prototypeManager, componentFactory); } + [Obsolete("More efficient methods exist in EntityPrototype.HasComp and EntitySystem's proxy methods")] public static bool HasComponent(string prototype, Type component, IPrototypeManager? prototypeManager = null, IComponentFactory? componentFactory = null) { prototypeManager ??= IoCManager.Resolve();