Files
tbd-station-14/Content.Server/GameObjects/EntitySystems/NodeGroupSystem.cs
Vera Aguilera Puerto 59a26102c5 Remove INodeGroupManager, moves logic into NodeGroupSystem.
It was an absolutely redundant IoC service.
2021-06-01 11:34:19 +02:00

31 lines
770 B
C#

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