Fix the last of the compiler warnings.

This commit is contained in:
Pieter-Jan Briers
2020-10-22 10:26:24 +02:00
parent e98abd923c
commit f61aeb19e5
5 changed files with 7 additions and 15 deletions

View File

@@ -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<IApcNet>(); //could be improved by maintaining set instead of getting collection every frame
var uniqueApcNets = new HashSet<IApcNet>(); //could be improved by maintaining set instead of getting collection every frame
foreach (var apc in ComponentManager.EntityQuery<ApcComponent>())
{
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);