Files
space-station-14/Content.Server/Disposal/Tube/DisposalSignallerSystem.cs
T
Pieter-Jan Briers 5168b5f3d4 IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

26 lines
863 B
C#

using Content.Server.DeviceLinking.Systems;
namespace Content.Server.Disposal.Tube;
public sealed partial class DisposalSignallerSystem : EntitySystem
{
[Dependency] private DeviceLinkSystem _link = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DisposalSignallerComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<DisposalSignallerComponent, GetDisposalsNextDirectionEvent>(OnGetNextDirection, after: new[] { typeof(DisposalTubeSystem) });
}
private void OnInit(EntityUid uid, DisposalSignallerComponent comp, ComponentInit args)
{
_link.EnsureSourcePorts(uid, comp.Port);
}
private void OnGetNextDirection(EntityUid uid, DisposalSignallerComponent comp, ref GetDisposalsNextDirectionEvent args)
{
_link.InvokePort(uid, comp.Port);
}
}