Remove INodeGroupManager, moves logic into NodeGroupSystem.

It was an absolutely redundant IoC service.
This commit is contained in:
Vera Aguilera Puerto
2021-06-01 11:34:01 +02:00
parent 95a4c17952
commit 59a26102c5
4 changed files with 19 additions and 45 deletions

View File

@@ -1,19 +1,30 @@
using Content.Server.GameObjects.Components.NodeContainer.NodeGroups;
using System.Collections.Generic;
using Content.Server.GameObjects.Components.NodeContainer.NodeGroups;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
public class NodeGroupSystem : EntitySystem
{
[Dependency] private readonly INodeGroupManager _groupManager = default!;
private readonly HashSet<INodeGroup> _dirtyNodeGroups = new();
public void AddDirtyNodeGroup(INodeGroup nodeGroup)
{
_dirtyNodeGroups.Add(nodeGroup);
}
public override void Update(float frameTime)
{
base.Update(frameTime);
_groupManager.Update(frameTime);
foreach (var group in _dirtyNodeGroups)
{
group.RemakeGroup();
}
_dirtyNodeGroups.Clear();
}
}
}