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:
Julian Giebel
2023-05-07 08:07:24 +02:00
committed by GitHub
parent 2fe7055de6
commit 6ebd784cb6
100 changed files with 2096 additions and 342 deletions

View File

@@ -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;