CatStation/Content.Server/Shuttles/Systems/DockingSignalControlSystem.cs
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

28 lines
945 B
C#

using Content.Server.DeviceLinking.Systems;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
namespace Content.Server.Shuttles.Systems;
public sealed partial class DockingSignalControlSystem : EntitySystem
{
[Dependency] private DeviceLinkSystem _deviceLinkSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DockingSignalControlComponent, DockEvent>(OnDocked);
SubscribeLocalEvent<DockingSignalControlComponent, UndockEvent>(OnUndocked);
}
private void OnDocked(Entity<DockingSignalControlComponent> ent, ref DockEvent args)
{
_deviceLinkSystem.SendSignal(ent, ent.Comp.DockStatusSignalPort, signal: true);
}
private void OnUndocked(Entity<DockingSignalControlComponent> ent, ref UndockEvent args)
{
_deviceLinkSystem.SendSignal(ent, ent.Comp.DockStatusSignalPort, signal: false);
}
}