From bd35620846ac08d3bb5947423ae642e98f0e53c5 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Fri, 24 Jul 2026 08:35:00 +0100 Subject: [PATCH] Mark EntityPrototypeHelpers as obsolete (#42626) Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com> --- Content.Shared/Prototypes/EntityPrototypeHelpers.cs | 5 +++++ 1 file changed, 5 insertions(+) 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();