diff --git a/Content.Server/GameObjects/EntitySystems/ResearchSystem.cs b/Content.Server/GameObjects/EntitySystems/ResearchSystem.cs index f09c7317d1..d29945d6f6 100644 --- a/Content.Server/GameObjects/EntitySystems/ResearchSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/ResearchSystem.cs @@ -1,23 +1,19 @@ using System.Collections.Generic; using Content.Server.GameObjects.Components.Research; +using JetBrains.Annotations; using Robust.Shared.GameObjects; namespace Content.Server.GameObjects.EntitySystems { + [UsedImplicitly] public class ResearchSystem : EntitySystem { - public const float ResearchConsoleUIUpdateTime = 30f; + private const float ResearchConsoleUIUpdateTime = 30f; private float _timer = ResearchConsoleUIUpdateTime; private readonly List _servers = new(); - private readonly IEntityQuery ConsoleQuery; public IReadOnlyList Servers => _servers; - public ResearchSystem() - { - ConsoleQuery = new TypeEntityQuery(typeof(ResearchConsoleComponent)); - } - public bool RegisterServer(ResearchServerComponent server) { if (_servers.Contains(server)) return false; @@ -75,9 +71,9 @@ namespace Content.Server.GameObjects.EntitySystems if (_timer >= ResearchConsoleUIUpdateTime) { - foreach (var console in EntityManager.GetEntities(ConsoleQuery)) + foreach (var console in ComponentManager.EntityQuery()) { - console.GetComponent().UpdateUserInterface(); + console.UpdateUserInterface(); } _timer = 0f;