diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs index 5c4cae5125..2550aed3fc 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Ammunition/AmmoComponent.cs @@ -26,7 +26,6 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Ammunition public class AmmoComponent : Component, IExamine { [Dependency] private readonly IGameTiming _gameTiming = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; public override string Name => "Ammo"; public BallisticCaliber Caliber => _caliber; diff --git a/Content.Server/GameObjects/EntitySystems/BatteryDischargerSystem.cs b/Content.Server/GameObjects/EntitySystems/BatteryDischargerSystem.cs index 22fc2b7215..a00c76e668 100644 --- a/Content.Server/GameObjects/EntitySystems/BatteryDischargerSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/BatteryDischargerSystem.cs @@ -9,17 +9,15 @@ namespace Content.Server.GameObjects.EntitySystems [UsedImplicitly] internal sealed class BatteryDischargerSystem : EntitySystem { - [Dependency] private readonly IPauseManager _pauseManager = default!; - public override void Update(float frameTime) { foreach (var comp in ComponentManager.EntityQuery()) { - if (_pauseManager.IsEntityPaused(comp.Owner)) + if (comp.Owner.Paused) { continue; } - + comp.Update(frameTime); } } diff --git a/Content.Server/GameObjects/EntitySystems/BatteryStorageSystem.cs b/Content.Server/GameObjects/EntitySystems/BatteryStorageSystem.cs index 6f5ac89a8b..16796b4169 100644 --- a/Content.Server/GameObjects/EntitySystems/BatteryStorageSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/BatteryStorageSystem.cs @@ -9,17 +9,15 @@ namespace Content.Server.GameObjects.EntitySystems [UsedImplicitly] internal sealed class BatteryStorageSystem : EntitySystem { - [Dependency] private readonly IPauseManager _pauseManager = default!; - public override void Update(float frameTime) { foreach (var comp in ComponentManager.EntityQuery()) { - if (_pauseManager.IsEntityPaused(comp.Owner)) + if (comp.Owner.Paused) { continue; } - + comp.Update(frameTime); } } diff --git a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs index 1ffa88fd5b..5a78bbef97 100644 --- a/Content.Server/GameObjects/EntitySystems/MoverSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/MoverSystem.cs @@ -31,7 +31,6 @@ namespace Content.Server.GameObjects.EntitySystems [UsedImplicitly] internal class MoverSystem : SharedMoverSystem { - [Dependency] private readonly IPauseManager _pauseManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly ITileDefinitionManager _tileDefinitionManager = default!; [Dependency] private readonly IMapManager _mapManager = default!; diff --git a/Content.Server/GameObjects/EntitySystems/PowerApcSystem.cs b/Content.Server/GameObjects/EntitySystems/PowerApcSystem.cs index 2e9253ad04..68fe9cdfca 100644 --- a/Content.Server/GameObjects/EntitySystems/PowerApcSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/PowerApcSystem.cs @@ -11,14 +11,12 @@ namespace Content.Server.GameObjects.EntitySystems [UsedImplicitly] internal sealed class PowerApcSystem : EntitySystem { - [Dependency] private readonly IPauseManager _pauseManager = default!; - public override void Update(float frameTime) { - var uniqueApcNets = new HashSet(); //could be improved by maintaining set instead of getting collection every frame + var uniqueApcNets = new HashSet(); //could be improved by maintaining set instead of getting collection every frame foreach (var apc in ComponentManager.EntityQuery()) { - if (_pauseManager.IsEntityPaused(apc.Owner)) + if (apc.Owner.Paused) { continue; } @@ -26,7 +24,7 @@ namespace Content.Server.GameObjects.EntitySystems uniqueApcNets.Add(apc.Net); apc.Update(); } - + foreach (var apcNet in uniqueApcNets) { apcNet.Update(frameTime);