Stop caching connected tubes and discover them on each step (#1554)

This commit is contained in:
DrSmugleaf
2020-08-01 03:45:40 +02:00
committed by GitHub
parent bf30a68a5e
commit 9277ed5248
7 changed files with 50 additions and 151 deletions

View File

@@ -1,33 +0,0 @@
using Content.Server.GameObjects.Components.Disposal;
using JetBrains.Annotations;
using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.GameObjects.EntitySystems
{
[UsedImplicitly]
public class DisposalTubeSystem : EntitySystem
{
private void MoveEvent(MoveEvent moveEvent)
{
if (moveEvent.Sender.TryGetComponent(out IDisposalTubeComponent tube))
{
tube.MoveEvent(moveEvent);
}
}
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MoveEvent>(MoveEvent);
}
public override void Shutdown()
{
base.Shutdown();
UnsubscribeLocalEvent<MoveEvent>();
}
}
}