Device Linking and better linking ui (#13645)
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Co-authored-by: Visne <39844191+Visne@users.noreply.github.com> Co-authored-by: ElectroJr <leonsfriedrich@gmail.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
using Content.Server.Atmos.Piping.Binary.Components;
|
||||
using Content.Server.MachineLinking.Events;
|
||||
using Content.Server.DeviceLinking.Events;
|
||||
using Content.Server.DeviceLinking.Systems;
|
||||
using Content.Server.MachineLinking.System;
|
||||
|
||||
namespace Content.Server.Atmos.Piping.Binary.EntitySystems;
|
||||
|
||||
public sealed class SignalControlledValveSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SignalLinkerSystem _signal = default!;
|
||||
[Dependency] private readonly DeviceLinkSystem _signal = default!;
|
||||
[Dependency] private readonly GasValveSystem _valve = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -19,10 +20,10 @@ public sealed class SignalControlledValveSystem : EntitySystem
|
||||
|
||||
private void OnInit(EntityUid uid, SignalControlledValveComponent comp, ComponentInit args)
|
||||
{
|
||||
_signal.EnsureReceiverPorts(uid, comp.OpenPort, comp.ClosePort, comp.TogglePort);
|
||||
_signal.EnsureSinkPorts(uid, comp.OpenPort, comp.ClosePort, comp.TogglePort);
|
||||
}
|
||||
|
||||
private void OnSignalReceived(EntityUid uid, SignalControlledValveComponent comp, SignalReceivedEvent args)
|
||||
private void OnSignalReceived(EntityUid uid, SignalControlledValveComponent comp, ref SignalReceivedEvent args)
|
||||
{
|
||||
if (!TryComp<GasValveComponent>(uid, out var valve))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user