diff --git a/Content.Client/MachineLinking/UI/SignalPortSelectorBoundUserInterface.cs b/Content.Client/MachineLinking/UI/SignalPortSelectorBoundUserInterface.cs
deleted file mode 100644
index 9e56a30afe..0000000000
--- a/Content.Client/MachineLinking/UI/SignalPortSelectorBoundUserInterface.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using Content.Shared.MachineLinking;
-using JetBrains.Annotations;
-using Robust.Client.GameObjects;
-
-namespace Content.Client.MachineLinking.UI
-{
- public sealed class SignalPortSelectorBoundUserInterface : BoundUserInterface
- {
- [ViewVariables]
- private SignalPortSelectorMenu? _menu;
-
- [ViewVariables]
- private string? _selectedTransmitterPort;
-
- [ViewVariables]
- private string? _selectedReceiverPort;
-
- public SignalPortSelectorBoundUserInterface([NotNull] EntityUid owner, [NotNull] Enum uiKey) : base(owner, uiKey)
- {
- }
-
- protected override void Open()
- {
- base.Open();
-
- _menu = new SignalPortSelectorMenu(this);
- _menu.OnClose += Close;
- _menu.OpenCentered();
- }
-
- protected override void UpdateState(BoundUserInterfaceState state)
- {
- base.UpdateState(state);
- switch (state)
- {
- case SignalPortsState data:
- _menu?.UpdateState(data);
- _selectedTransmitterPort = null;
- _selectedReceiverPort = null;
- break;
- }
- }
-
- public void OnTransmitterPortSelected(string port)
- {
- _selectedTransmitterPort = port;
- if (_selectedReceiverPort != null)
- {
- SendMessage(new SignalPortSelected(_selectedTransmitterPort, _selectedReceiverPort));
- _selectedTransmitterPort = null;
- _selectedReceiverPort = null;
- }
- }
-
- public void OnReceiverPortSelected(string port)
- {
- _selectedReceiverPort = port;
- if (_selectedTransmitterPort != null)
- {
- SendMessage(new SignalPortSelected(_selectedTransmitterPort, _selectedReceiverPort));
- _selectedTransmitterPort = null;
- _selectedReceiverPort = null;
- }
- }
-
- public void OnClearPressed()
- {
- _selectedTransmitterPort = null;
- _selectedReceiverPort = null;
- SendMessage(new LinkerClearSelected());
- }
-
- public void OnLinkDefaultPressed()
- {
- _selectedTransmitterPort = null;
- _selectedReceiverPort = null;
- SendMessage(new LinkerLinkDefaultSelected());
- }
-
- protected override void Dispose(bool disposing)
- {
- base.Dispose(disposing);
- if (!disposing)
- return;
-
- _menu?.Dispose();
- }
- }
-}
diff --git a/Content.Client/MachineLinking/UI/SignalPortSelectorMenu.xaml b/Content.Client/MachineLinking/UI/SignalPortSelectorMenu.xaml
deleted file mode 100644
index d01a01cadf..0000000000
--- a/Content.Client/MachineLinking/UI/SignalPortSelectorMenu.xaml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Content.Client/MachineLinking/UI/SignalPortSelectorMenu.xaml.cs b/Content.Client/MachineLinking/UI/SignalPortSelectorMenu.xaml.cs
deleted file mode 100644
index a2a0f2f5f9..0000000000
--- a/Content.Client/MachineLinking/UI/SignalPortSelectorMenu.xaml.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using System.Numerics;
-using Content.Shared.MachineLinking;
-using Robust.Client.AutoGenerated;
-using Robust.Client.UserInterface;
-using Robust.Client.UserInterface.Controls;
-using Robust.Client.UserInterface.CustomControls;
-using Robust.Client.UserInterface.XAML;
-using Robust.Client.Graphics;
-using Robust.Shared.Prototypes;
-
-namespace Content.Client.MachineLinking.UI
-{
- [GenerateTypedNameReferences]
- public sealed partial class SignalPortSelectorMenu : DefaultWindow
- {
- private SignalPortSelectorBoundUserInterface _bui;
- private LinksRender _links;
-
- private ButtonGroup _buttonGroup = new();
- private IPrototypeManager _protoMan;
-
- public SignalPortSelectorMenu(SignalPortSelectorBoundUserInterface boundUserInterface)
- {
- RobustXamlLoader.Load(this);
- _bui = boundUserInterface;
- _links = new(ButtonContainerLeft, ButtonContainerRight);
- ContainerMiddle.AddChild(_links);
- ButtonClear.OnPressed += _ => _bui.OnClearPressed();
- ButtonLinkDefault.OnPressed += _ => _bui.OnLinkDefaultPressed();
- _protoMan = IoCManager.Resolve();
- }
-
- public void UpdateState(SignalPortsState state)
- {
- HeaderLeft.SetMessage(state.TransmitterName);
- ButtonContainerLeft.DisposeAllChildren();
- foreach (var port in state.TransmitterPorts)
- {
- var proto = _protoMan.Index(port);
- var portButton = new Button()
- {
- Text = Loc.GetString(proto.Name),
- ToolTip = Loc.GetString(proto.Description),
- ToggleMode = true,
- Group = _buttonGroup
- };
- portButton.OnPressed += _ => _bui.OnTransmitterPortSelected(port);
- ButtonContainerLeft.AddChild(portButton);
- }
-
- HeaderRight.SetMessage(state.ReceiverName);
- ButtonContainerRight.DisposeAllChildren();
- foreach (var port in state.ReceiverPorts)
- {
- var proto = _protoMan.Index(port);
- var portButton = new Button()
- {
- Text = Loc.GetString(proto.Name),
- ToolTip = Loc.GetString(proto.Description),
- ToggleMode = true,
- Group = _buttonGroup
- };
- portButton.OnPressed += _ => _bui.OnReceiverPortSelected(port);
- ButtonContainerRight.AddChild(portButton);
- }
-
- _links.Links = state.Links;
- }
-
- private sealed class LinksRender : Control
- {
- public List<(int, int)> Links = new();
- public BoxContainer LeftButton;
- public BoxContainer RightButton;
-
- public LinksRender(BoxContainer leftButton, BoxContainer rightButton)
- {
- LeftButton = leftButton;
- RightButton = rightButton;
- }
-
- protected override void Draw(DrawingHandleScreen handle)
- {
- var leftOffset = LeftButton.PixelPosition.Y;
- var rightOffset = RightButton.PixelPosition.Y;
- foreach (var (left, right) in Links)
- {
- var leftChild = LeftButton.GetChild(left);
- var rightChild = RightButton.GetChild(right);
- var y1 = leftChild.PixelPosition.Y + leftChild.PixelHeight / 2 + leftOffset;
- var y2 = rightChild.PixelPosition.Y + rightChild.PixelHeight / 2 + rightOffset;
- handle.DrawLine(new Vector2(0, y1), new Vector2(PixelWidth, y2), Color.Cyan);
- }
- }
- }
- }
-}
diff --git a/Content.Server/Atmos/Piping/Binary/Components/SignalControlledValveComponent.cs b/Content.Server/Atmos/Piping/Binary/Components/SignalControlledValveComponent.cs
index b5a59399f1..4284a01dfa 100644
--- a/Content.Server/Atmos/Piping/Binary/Components/SignalControlledValveComponent.cs
+++ b/Content.Server/Atmos/Piping/Binary/Components/SignalControlledValveComponent.cs
@@ -1,5 +1,5 @@
using Content.Server.Atmos.Piping.Binary.EntitySystems;
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Atmos.Piping.Binary.Components;
@@ -7,12 +7,12 @@ namespace Content.Server.Atmos.Piping.Binary.Components;
[RegisterComponent, Access(typeof(SignalControlledValveSystem))]
public sealed class SignalControlledValveComponent : Component
{
- [DataField("openPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("openPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OpenPort = "Open";
- [DataField("closePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("closePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string ClosePort = "Close";
- [DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string TogglePort = "Toggle";
}
diff --git a/Content.Server/Atmos/Piping/Binary/EntitySystems/SignalControlledValveSystem.cs b/Content.Server/Atmos/Piping/Binary/EntitySystems/SignalControlledValveSystem.cs
index 2a3acda458..a114843750 100644
--- a/Content.Server/Atmos/Piping/Binary/EntitySystems/SignalControlledValveSystem.cs
+++ b/Content.Server/Atmos/Piping/Binary/EntitySystems/SignalControlledValveSystem.cs
@@ -1,7 +1,6 @@
using Content.Server.Atmos.Piping.Binary.Components;
using Content.Server.DeviceLinking.Events;
using Content.Server.DeviceLinking.Systems;
-using Content.Server.MachineLinking.System;
namespace Content.Server.Atmos.Piping.Binary.EntitySystems;
diff --git a/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs b/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs
index 88c4476301..311c24c620 100644
--- a/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs
+++ b/Content.Server/Atmos/Piping/Unary/Components/GasVentPumpComponent.cs
@@ -1,6 +1,6 @@
using Content.Shared.Atmos;
using Content.Shared.Atmos.Piping.Unary.Components;
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Atmos.Piping.Unary.Components
@@ -124,10 +124,10 @@ namespace Content.Server.Atmos.Piping.Unary.Components
[DataField("canLink")]
public readonly bool CanLink = false;
- [DataField("pressurizePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("pressurizePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string PressurizePort = "Pressurize";
- [DataField("depressurizePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("depressurizePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string DepressurizePort = "Depressurize";
[ViewVariables(VVAccess.ReadWrite)]
diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs
index eb57aa6ad3..4448bc6bc0 100644
--- a/Content.Server/Cloning/CloningSystem.cs
+++ b/Content.Server/Cloning/CloningSystem.cs
@@ -33,11 +33,7 @@ using Robust.Shared.Random;
using Robust.Shared.Configuration;
using Robust.Shared.Containers;
using Robust.Shared.Physics.Components;
-using Content.Shared.Doors.Components;
using Content.Shared.Emag.Systems;
-using Robust.Shared.Audio;
-using System.Runtime.InteropServices;
-using Content.Server.MachineLinking.Events;
using Content.Server.Popups;
using Content.Server.Traits.Assorted;
diff --git a/Content.Server/DeviceLinking/Components/DoorSignalControlComponent.cs b/Content.Server/DeviceLinking/Components/DoorSignalControlComponent.cs
index b19fdb5f4d..205ebb33e4 100644
--- a/Content.Server/DeviceLinking/Components/DoorSignalControlComponent.cs
+++ b/Content.Server/DeviceLinking/Components/DoorSignalControlComponent.cs
@@ -1,4 +1,4 @@
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.DeviceLinking.Components
@@ -6,19 +6,19 @@ namespace Content.Server.DeviceLinking.Components
[RegisterComponent]
public sealed class DoorSignalControlComponent : Component
{
- [DataField("openPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("openPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OpenPort = "Open";
- [DataField("closePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("closePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string ClosePort = "Close";
- [DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string TogglePort = "Toggle";
- [DataField("boltPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("boltPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string InBolt = "DoorBolt";
- [DataField("onOpenPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("onOpenPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OutOpen = "DoorStatus";
}
}
diff --git a/Content.Server/DeviceLinking/Components/EdgeDetectorComponent.cs b/Content.Server/DeviceLinking/Components/EdgeDetectorComponent.cs
index 8e372302fc..64926a3d55 100644
--- a/Content.Server/DeviceLinking/Components/EdgeDetectorComponent.cs
+++ b/Content.Server/DeviceLinking/Components/EdgeDetectorComponent.cs
@@ -1,6 +1,5 @@
using Content.Server.DeviceLinking.Systems;
using Content.Shared.DeviceLinking;
-using Content.Shared.MachineLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.DeviceLinking.Components;
@@ -15,19 +14,19 @@ public sealed class EdgeDetectorComponent : Component
///
/// Name of the input port.
///
- [DataField("inputPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("inputPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string InputPort = "Input";
///
/// Name of the rising edge output port.
///
- [DataField("outputHighPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("outputHighPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OutputHighPort = "OutputHigh";
///
/// Name of the falling edge output port.
///
- [DataField("outputLowPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("outputLowPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OutputLowPort = "OutputLow";
// Initial state
diff --git a/Content.Server/DeviceLinking/Components/LogicGateComponent.cs b/Content.Server/DeviceLinking/Components/LogicGateComponent.cs
index 21c9b27009..b034335828 100644
--- a/Content.Server/DeviceLinking/Components/LogicGateComponent.cs
+++ b/Content.Server/DeviceLinking/Components/LogicGateComponent.cs
@@ -1,6 +1,5 @@
using Content.Server.DeviceLinking.Systems;
using Content.Shared.DeviceLinking;
-using Content.Shared.MachineLinking;
using Content.Shared.Tools;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -36,19 +35,19 @@ public sealed class LogicGateComponent : Component
///
/// Name of the first input port.
///
- [DataField("inputPortA", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("inputPortA", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string InputPortA = "InputA";
///
/// Name of the second input port.
///
- [DataField("inputPortB", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("inputPortB", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string InputPortB = "InputB";
///
/// Name of the output port.
///
- [DataField("outputPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("outputPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OutputPort = "Output";
// Initial state
diff --git a/Content.Server/DeviceLinking/Components/SignalSwitchComponent.cs b/Content.Server/DeviceLinking/Components/SignalSwitchComponent.cs
index 5dc1d69aeb..418b0b02e5 100644
--- a/Content.Server/DeviceLinking/Components/SignalSwitchComponent.cs
+++ b/Content.Server/DeviceLinking/Components/SignalSwitchComponent.cs
@@ -1,5 +1,5 @@
using Content.Server.DeviceLinking.Systems;
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -15,20 +15,20 @@ public sealed class SignalSwitchComponent : Component
///
/// The port that gets signaled when the switch turns on.
///
- [DataField("onPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("onPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OnPort = "On";
///
/// The port that gets signaled when the switch turns off.
///
- [DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OffPort = "Off";
///
/// The port that gets signaled with the switch's current status.
/// This is only used if OnPort is different from OffPort, not in the case of a toggle switch.
///
- [DataField("statusPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("statusPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string StatusPort = "Status";
[DataField("state")]
diff --git a/Content.Server/DeviceLinking/Components/SignalTimerComponent.cs b/Content.Server/DeviceLinking/Components/SignalTimerComponent.cs
index 592060a4cb..7711d506c7 100644
--- a/Content.Server/DeviceLinking/Components/SignalTimerComponent.cs
+++ b/Content.Server/DeviceLinking/Components/SignalTimerComponent.cs
@@ -1,4 +1,4 @@
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -25,13 +25,13 @@ public sealed class SignalTimerComponent : Component
///
/// The port that gets signaled when the timer triggers.
///
- [DataField("triggerPort", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
+ [DataField("triggerPort", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string TriggerPort = "Timer";
///
/// The port that gets signaled when the timer starts.
///
- [DataField("startPort", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
+ [DataField("startPort", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string StartPort = "Start";
///
diff --git a/Content.Server/DeviceLinking/Components/SignallerComponent.cs b/Content.Server/DeviceLinking/Components/SignallerComponent.cs
index 8cc13b083f..d031272d75 100644
--- a/Content.Server/DeviceLinking/Components/SignallerComponent.cs
+++ b/Content.Server/DeviceLinking/Components/SignallerComponent.cs
@@ -1,4 +1,4 @@
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.DeviceLinking.Components
@@ -12,7 +12,7 @@ namespace Content.Server.DeviceLinking.Components
///
/// The port that gets signaled when the switch turns on.
///
- [DataField("port", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("port", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string Port = "Pressed";
}
}
diff --git a/Content.Server/DeviceLinking/Components/TwoWayLeverComponent.cs b/Content.Server/DeviceLinking/Components/TwoWayLeverComponent.cs
index 5ab02b679a..dc16a0b650 100644
--- a/Content.Server/DeviceLinking/Components/TwoWayLeverComponent.cs
+++ b/Content.Server/DeviceLinking/Components/TwoWayLeverComponent.cs
@@ -1,5 +1,4 @@
using Content.Shared.DeviceLinking;
-using Content.Shared.MachineLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.DeviceLinking.Components
@@ -13,13 +12,13 @@ namespace Content.Server.DeviceLinking.Components
[DataField("nextSignalLeft")]
public bool NextSignalLeft;
- [DataField("leftPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("leftPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string LeftPort = "Left";
- [DataField("rightPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("rightPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string RightPort = "Right";
- [DataField("middlePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("middlePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string MiddlePort = "Middle";
}
}
diff --git a/Content.Server/DeviceLinking/Systems/AutoLinkSystem.cs b/Content.Server/DeviceLinking/Systems/AutoLinkSystem.cs
index 3c9ccb57b1..d6169479f8 100644
--- a/Content.Server/DeviceLinking/Systems/AutoLinkSystem.cs
+++ b/Content.Server/DeviceLinking/Systems/AutoLinkSystem.cs
@@ -1,5 +1,4 @@
using Content.Server.DeviceLinking.Components;
-using Content.Server.MachineLinking.System;
namespace Content.Server.DeviceLinking.Systems;
diff --git a/Content.Server/DeviceLinking/Systems/DeviceLinkSystem.cs b/Content.Server/DeviceLinking/Systems/DeviceLinkSystem.cs
index f43b4b1234..edf937a30c 100644
--- a/Content.Server/DeviceLinking/Systems/DeviceLinkSystem.cs
+++ b/Content.Server/DeviceLinking/Systems/DeviceLinkSystem.cs
@@ -2,9 +2,7 @@
using Content.Server.DeviceNetwork;
using Content.Server.DeviceNetwork.Components;
using Content.Server.DeviceNetwork.Systems;
-using Content.Server.MachineLinking.Components;
using Content.Shared.DeviceLinking;
-using Robust.Shared.Utility;
namespace Content.Server.DeviceLinking.Systems;
@@ -15,7 +13,6 @@ public sealed class DeviceLinkSystem : SharedDeviceLinkSystem
public override void Initialize()
{
base.Initialize();
- SubscribeLocalEvent(OnTransmitterStartup);
SubscribeLocalEvent(OnPacketReceived);
}
@@ -36,33 +33,7 @@ public sealed class DeviceLinkSystem : SharedDeviceLinkSystem
}
}
- ///
- /// Moves existing links from machine linking to device linking to ensure linked things still work even when the map wasn't updated yet
- ///
- public void OnTransmitterStartup(EntityUid sourceUid, SignalTransmitterComponent transmitterComponent, ComponentStartup args)
- {
- var sourceComponent = EnsureComp(sourceUid);
-
- Dictionary> outputs = new();
- foreach (var (transmitterPort, receiverPorts) in transmitterComponent.Outputs)
- {
- foreach (var receiverPort in receiverPorts)
- {
- // Throw error if component is missing.
- EnsureComp(receiverPort.Uid);
- outputs.GetOrNew(receiverPort.Uid).Add((transmitterPort, receiverPort.Port));
- }
- }
-
- foreach (var (sinkUid, links) in outputs)
- {
- SaveLinks(null, sourceUid, sinkUid, links, sourceComponent);
- }
-
- RemCompDeferred(sourceUid);
- }
-
- #region Sending & Receiving
+ #region Sending & Receiving
///
/// Sends a network payload directed at the sink entity.
/// Just raises a without data if the source or the sink doesn't have a
diff --git a/Content.Server/DeviceLinking/Systems/EdgeDetectorSystem.cs b/Content.Server/DeviceLinking/Systems/EdgeDetectorSystem.cs
index 32b0af1709..10c8a1700b 100644
--- a/Content.Server/DeviceLinking/Systems/EdgeDetectorSystem.cs
+++ b/Content.Server/DeviceLinking/Systems/EdgeDetectorSystem.cs
@@ -1,6 +1,5 @@
using Content.Server.DeviceLinking.Components;
using Content.Server.DeviceNetwork;
-using Content.Server.MachineLinking.Events;
using SignalReceivedEvent = Content.Server.DeviceLinking.Events.SignalReceivedEvent;
namespace Content.Server.DeviceLinking.Systems;
diff --git a/Content.Server/DeviceLinking/Systems/LogicGateSystem.cs b/Content.Server/DeviceLinking/Systems/LogicGateSystem.cs
index b32f5694a2..d8c87a90ee 100644
--- a/Content.Server/DeviceLinking/Systems/LogicGateSystem.cs
+++ b/Content.Server/DeviceLinking/Systems/LogicGateSystem.cs
@@ -1,13 +1,10 @@
using Content.Server.DeviceLinking.Components;
using Content.Server.DeviceNetwork;
-using Content.Server.MachineLinking.Events;
using Content.Shared.DeviceLinking;
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Tools;
using Content.Shared.Popups;
-using Robust.Shared.Audio;
-using Robust.Shared.Utility;
using SignalReceivedEvent = Content.Server.DeviceLinking.Events.SignalReceivedEvent;
namespace Content.Server.DeviceLinking.Systems;
diff --git a/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs b/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs
index 8e70aad706..7da8532f2e 100644
--- a/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs
+++ b/Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs
@@ -1,10 +1,7 @@
using Content.Server.DeviceLinking.Components;
using Content.Server.DeviceNetwork;
-using Content.Server.MachineLinking.System;
-using Content.Shared.Audio;
using Content.Shared.Interaction;
using Robust.Shared.Audio;
-using Robust.Shared.Player;
namespace Content.Server.DeviceLinking.Systems;
diff --git a/Content.Server/Doors/Systems/AirlockSystem.cs b/Content.Server/Doors/Systems/AirlockSystem.cs
index 939ee10c6e..21e4b71236 100644
--- a/Content.Server/Doors/Systems/AirlockSystem.cs
+++ b/Content.Server/Doors/Systems/AirlockSystem.cs
@@ -9,7 +9,6 @@ using Content.Shared.Doors.Systems;
using Content.Shared.Interaction;
using Robust.Server.GameObjects;
using Content.Shared.Wires;
-using Content.Server.MachineLinking.System;
namespace Content.Server.Doors.Systems
{
@@ -17,7 +16,6 @@ namespace Content.Server.Doors.Systems
{
[Dependency] private readonly WiresSystem _wiresSystem = default!;
[Dependency] private readonly PowerReceiverSystem _power = default!;
- [Dependency] private readonly SignalLinkerSystem _signalSystem = default!;
[Dependency] private readonly DoorBoltSystem _bolts = default!;
public override void Initialize()
diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs
index 84eb07e44d..c16b2b6fec 100644
--- a/Content.Server/Doors/Systems/DoorSystem.cs
+++ b/Content.Server/Doors/Systems/DoorSystem.cs
@@ -2,10 +2,7 @@ using Content.Server.Access;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Construction;
-using Content.Server.MachineLinking.System;
using Content.Server.Tools.Systems;
-using Content.Shared.Access.Components;
-using Content.Shared.Access.Systems;
using Content.Shared.Database;
using Content.Shared.Doors;
using Content.Shared.Doors.Components;
@@ -15,8 +12,6 @@ using Content.Shared.Interaction;
using Content.Shared.Tools.Components;
using Content.Shared.Verbs;
using Robust.Shared.Audio;
-using Robust.Shared.Containers;
-using System.Linq;
using Content.Server.Administration.Logs;
using Content.Server.Power.EntitySystems;
using Content.Shared.Tools;
diff --git a/Content.Server/Explosion/Components/TriggerOnSignalComponent.cs b/Content.Server/Explosion/Components/TriggerOnSignalComponent.cs
index 2017e4fee8..ed53c2c3f1 100644
--- a/Content.Server/Explosion/Components/TriggerOnSignalComponent.cs
+++ b/Content.Server/Explosion/Components/TriggerOnSignalComponent.cs
@@ -1,4 +1,4 @@
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Explosion.Components
@@ -9,7 +9,7 @@ namespace Content.Server.Explosion.Components
[RegisterComponent]
public sealed class TriggerOnSignalComponent : Component
{
- [DataField("port", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("port", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string Port = "Trigger";
}
}
diff --git a/Content.Server/Light/Components/PoweredLightComponent.cs b/Content.Server/Light/Components/PoweredLightComponent.cs
index be44d20f54..0076e00b6a 100644
--- a/Content.Server/Light/Components/PoweredLightComponent.cs
+++ b/Content.Server/Light/Components/PoweredLightComponent.cs
@@ -1,8 +1,7 @@
-using System.Threading;
using Content.Server.Light.EntitySystems;
using Content.Shared.Damage;
+using Content.Shared.DeviceLinking;
using Content.Shared.Light.Component;
-using Content.Shared.MachineLinking;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
@@ -55,13 +54,13 @@ namespace Content.Server.Light.Components
[ViewVariables]
public TimeSpan? LastGhostBlink;
- [DataField("onPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("onPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OnPort = "On";
- [DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OffPort = "Off";
- [DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string TogglePort = "Toggle";
///
diff --git a/Content.Server/MachineLinking/Components/SignalLinkerComponent.cs b/Content.Server/MachineLinking/Components/SignalLinkerComponent.cs
deleted file mode 100644
index a3ed0a4a13..0000000000
--- a/Content.Server/MachineLinking/Components/SignalLinkerComponent.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using Content.Shared.Tools;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
-using Robust.Shared.Utility;
-
-namespace Content.Server.MachineLinking.Components
-{
- [RegisterComponent]
- public sealed class SignalLinkerComponent : Component
- {
- [ViewVariables]
- public EntityUid? SavedTransmitter;
-
- [ViewVariables]
- public EntityUid? SavedReceiver;
-
- ///
- /// Optional tool quality required for linker to work.
- /// If linker entity doesn't have this quality it will ignore any interaction.
- ///
- [DataField("requiredQuality", customTypeSerializer: typeof(PrototypeIdSerializer))]
- [ViewVariables(VVAccess.ReadWrite)]
- public string? RequiredQuality;
-
- // Utility functions below to deal with linking entities with both Transmit and Receive components.
- public bool LinkTX()
- {
- return SavedTransmitter == null;
- }
-
- public bool LinkRX()
- {
- return SavedTransmitter != null && SavedReceiver == null;
- }
- }
-}
diff --git a/Content.Server/MachineLinking/Components/SignalReceiverComponent.cs b/Content.Server/MachineLinking/Components/SignalReceiverComponent.cs
deleted file mode 100644
index 0c9b8d0e92..0000000000
--- a/Content.Server/MachineLinking/Components/SignalReceiverComponent.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Content.Server.MachineLinking.System;
-
-namespace Content.Server.MachineLinking.Components
-{
- [RegisterComponent]
- [Access(typeof(SignalLinkerSystem))]
- public sealed class SignalReceiverComponent : Component
- {
- [DataField("inputs")]
- public Dictionary> Inputs = new();
- }
-}
diff --git a/Content.Server/MachineLinking/Components/SignalTransmitterComponent.cs b/Content.Server/MachineLinking/Components/SignalTransmitterComponent.cs
deleted file mode 100644
index 15675fbe4b..0000000000
--- a/Content.Server/MachineLinking/Components/SignalTransmitterComponent.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using Content.Server.DeviceLinking.Components;
-using Content.Server.MachineLinking.Events;
-using Content.Server.MachineLinking.System;
-
-namespace Content.Server.MachineLinking.Components
-{
- [DataDefinition]
- public readonly struct PortIdentifier
- {
- [DataField("uid")]
- public readonly EntityUid Uid;
-
- [DataField("port")]
- public readonly string Port;
-
- public PortIdentifier(EntityUid uid, string port)
- {
- Uid = uid;
- Port = port;
- }
- }
-
- [RegisterComponent]
- [Access(typeof(SignalLinkerSystem))]
- public sealed class SignalTransmitterComponent : Component
- {
- ///
- /// How far the device can transmit a signal wirelessly.
- /// Devices farther than this range can still transmit if they are
- /// on the same powernet.
- ///
- [DataField("transmissionRange")]
- [ViewVariables(VVAccess.ReadWrite)]
- public float TransmissionRange = 30f;
-
- /*
- * Remember last output state to avoid re-raising a SignalChangedEvent if the signal
- * level hasn't actually changed.
- */
- [ViewVariables(VVAccess.ReadWrite)]
- public SignalState LastState = SignalState.Low;
-
- [DataField("outputs")]
- [Access(typeof(SignalLinkerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
- public Dictionary> Outputs = new();
- }
-}
diff --git a/Content.Server/MachineLinking/Events/SignalReceivedEvent.cs b/Content.Server/MachineLinking/Events/SignalReceivedEvent.cs
deleted file mode 100644
index 20e3614df0..0000000000
--- a/Content.Server/MachineLinking/Events/SignalReceivedEvent.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Content.Server.DeviceLinking.Components;
-
-namespace Content.Server.MachineLinking.Events
-{
- public sealed class SignalReceivedEvent : EntityEventArgs
- {
- public readonly string Port;
- public readonly SignalState State;
- public readonly EntityUid? Trigger;
-
- public SignalReceivedEvent(string port, EntityUid? trigger, SignalState state)
- {
- Port = port;
- Trigger = trigger;
- State = state;
- }
- }
-}
diff --git a/Content.Server/MachineLinking/Exceptions/InvalidPortValueException.cs b/Content.Server/MachineLinking/Exceptions/InvalidPortValueException.cs
deleted file mode 100644
index 4e153e1b52..0000000000
--- a/Content.Server/MachineLinking/Exceptions/InvalidPortValueException.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Content.Server.MachineLinking.Exceptions
-{
- public sealed class InvalidPortValueException : Exception
- {
-
- }
-}
diff --git a/Content.Server/MachineLinking/Exceptions/LinkAlreadyRegisteredException.cs b/Content.Server/MachineLinking/Exceptions/LinkAlreadyRegisteredException.cs
deleted file mode 100644
index e03c5bb638..0000000000
--- a/Content.Server/MachineLinking/Exceptions/LinkAlreadyRegisteredException.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Content.Server.MachineLinking.Exceptions
-{
- public sealed class LinkAlreadyRegisteredException : Exception
- {
-
- }
-}
diff --git a/Content.Server/MachineLinking/Exceptions/NoSignalValueProvidedException.cs b/Content.Server/MachineLinking/Exceptions/NoSignalValueProvidedException.cs
deleted file mode 100644
index 4e509872c4..0000000000
--- a/Content.Server/MachineLinking/Exceptions/NoSignalValueProvidedException.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Content.Server.MachineLinking.Exceptions
-{
- public sealed class NoSignalValueProvidedException : Exception
- {
-
- }
-}
diff --git a/Content.Server/MachineLinking/Exceptions/PortNotFoundException.cs b/Content.Server/MachineLinking/Exceptions/PortNotFoundException.cs
deleted file mode 100644
index 475854d6cd..0000000000
--- a/Content.Server/MachineLinking/Exceptions/PortNotFoundException.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Content.Server.MachineLinking.Exceptions
-{
- public sealed class PortNotFoundException : Exception
- {
-
- }
-}
diff --git a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs b/Content.Server/MachineLinking/System/SignalLinkerSystem.cs
deleted file mode 100644
index ae51392143..0000000000
--- a/Content.Server/MachineLinking/System/SignalLinkerSystem.cs
+++ /dev/null
@@ -1,515 +0,0 @@
-using System.Linq;
-using System.Diagnostics.CodeAnalysis;
-using Content.Server.DeviceLinking.Components;
-using Content.Server.MachineLinking.Components;
-using Content.Server.Power.Components;
-using Content.Server.Tools;
-using Content.Shared.DeviceLinking.Events;
-using Content.Shared.Interaction;
-using Content.Shared.MachineLinking;
-using Content.Shared.Popups;
-using Robust.Server.GameObjects;
-using Content.Shared.Verbs;
-using Robust.Shared.Prototypes;
-using SignalReceivedEvent = Content.Server.DeviceLinking.Events.SignalReceivedEvent;
-
-namespace Content.Server.MachineLinking.System
-{
- public sealed class SignalLinkerSystem : EntitySystem
- {
- [Dependency] private readonly UserInterfaceSystem _userInterfaceSystem = default!;
- [Dependency] private readonly SharedPopupSystem _popupSystem = default!;
- [Dependency] private readonly IPrototypeManager _protoMan = default!;
- [Dependency] private readonly ToolSystem _tools = default!;
-
- public override void Initialize()
- {
- base.Initialize();
-
- SubscribeLocalEvent(OnTransmitterRemoved);
- SubscribeLocalEvent(OnTransmitterInteractUsing);
- SubscribeLocalEvent>(OnGetTransmitterVerbs);
-
- SubscribeLocalEvent(OnReceiverStartup);
- SubscribeLocalEvent(OnReceiverRemoved);
- SubscribeLocalEvent(OnReceiverInteractUsing);
- SubscribeLocalEvent>(OnGetReceiverVerbs);
-
- SubscribeLocalEvent(OnSignalPortSelected);
- SubscribeLocalEvent(OnLinkerClearSelected);
- SubscribeLocalEvent(OnLinkerLinkDefaultSelected);
- SubscribeLocalEvent(OnLinkerUIClosed);
- }
-
- ///
- /// Convenience function to add several ports to an entity.
- ///
- public void EnsureReceiverPorts(EntityUid uid, params string[] ports)
- {
- var comp = EnsureComp(uid);
- foreach (var port in ports)
- {
- comp.Inputs.TryAdd(port, new List());
- }
- }
-
- public void EnsureTransmitterPorts(EntityUid uid, params string[] ports)
- {
- var comp = EnsureComp(uid);
- foreach (var port in ports)
- {
- comp.Outputs.TryAdd(port, new List());
- }
- }
-
- ///
- /// Add an alt-click verb to allow users to link the default ports, without needing to open the UI.
- ///
- private void OnGetReceiverVerbs(EntityUid uid, SignalReceiverComponent component, GetVerbsEvent args)
- {
- if (!args.CanAccess || !args.CanInteract)
- return;
-
- if (!TryComp(args.Using, out SignalLinkerComponent? linker) ||
- !IsLinkerInteractable(args.Using.Value, linker))
- {
- return;
- }
-
- var verb = new AlternativeVerb()
- {
- Text = Loc.GetString("signal-linking-verb-text-link-default"),
- IconEntity = args.Using
- };
- args.Verbs.Add(verb);
-
- if (linker.SavedTransmitter != null)
- {
- verb.Act = () =>
- {
- var msg = TryLinkDefaults(uid, linker.SavedTransmitter.Value, args.User, component)
- ? Loc.GetString("signal-linking-verb-success", ("machine", linker.SavedTransmitter.Value))
- : Loc.GetString("signal-linking-verb-fail", ("machine", linker.SavedTransmitter.Value));
- _popupSystem.PopupEntity(msg, uid, args.User);
- };
- return;
- }
-
- verb.Disabled = true;
- verb.Message = Loc.GetString("signal-linking-verb-disabled-no-transmitter");
- }
-
- private void OnGetTransmitterVerbs(EntityUid uid, SignalTransmitterComponent component, GetVerbsEvent args)
- {
- if (!args.CanAccess || !args.CanInteract)
- return;
-
- if (!TryComp(args.Using, out SignalLinkerComponent? linker)
- || !IsLinkerInteractable(args.Using.Value, linker))
- return;
-
- AlternativeVerb verb = new()
- {
- Text = Loc.GetString("signal-linking-verb-text-link-default"),
- IconEntity = args.Using
- };
- args.Verbs.Add(verb);
-
- if (linker.SavedReceiver != null)
- {
- verb.Act = () =>
- {
- var msg = TryLinkDefaults(linker.SavedReceiver.Value, uid, args.User, null, component)
- ? Loc.GetString("signal-linking-verb-success", ("machine", linker.SavedReceiver.Value))
- : Loc.GetString("signal-linking-verb-fail", ("machine", linker.SavedReceiver.Value));
- _popupSystem.PopupEntity(msg, uid, args.User);
- };
- return;
- }
-
- verb.Disabled = true;
- verb.Message = Loc.GetString("signal-linking-verb-disabled-no-receiver");
- }
-
- public void InvokePort(EntityUid uid, string port, SignalTransmitterComponent? component = null)
- {
- InvokePort(uid, port, SignalState.Momentary, component);
- }
-
- public void InvokePort(EntityUid uid, string port, SignalState state, SignalTransmitterComponent? component = null)
- {
- if (!Resolve(uid, ref component))
- return;
-
- if (state != SignalState.Momentary && state == component.LastState)
- {
- // no change in output signal
- return;
- }
-
- if (!component.Outputs.TryGetValue(port, out var receivers))
- return;
-
- component.LastState = state;
- foreach (var receiver in receivers)
- {
- var eventArgs = new SignalReceivedEvent(receiver.Port, uid);
- RaiseLocalEvent(receiver.Uid, ref eventArgs);
- }
- }
-
- private void OnReceiverStartup(EntityUid uid, SignalReceiverComponent receiver, ComponentStartup args)
- {
- RemCompDeferred(uid);
- }
-
- private void OnTransmitterRemoved(EntityUid uid, SignalTransmitterComponent transmitter, ComponentRemove args)
- {
- Dictionary uidCache = new();
- foreach (var tport in transmitter.Outputs)
- foreach (var rport in tport.Value)
- {
- if (!uidCache.TryGetValue(rport.Uid, out var receiver))
- uidCache.Add(rport.Uid, receiver = CompOrNull(rport.Uid));
- if (receiver != null && receiver.Inputs.TryGetValue(rport.Port, out var rpv))
- rpv.Remove(new(uid, tport.Key));
- }
- }
-
- private void OnReceiverRemoved(EntityUid uid, SignalReceiverComponent component, ComponentRemove args)
- {
- Dictionary uidCache = new();
- foreach (var rport in component.Inputs)
- foreach (var tport in rport.Value)
- {
- if (!uidCache.TryGetValue(tport.Uid, out var transmitter))
- uidCache.Add(tport.Uid, transmitter = CompOrNull(tport.Uid));
- if (transmitter != null && transmitter.Outputs.TryGetValue(tport.Port, out var receivers))
- receivers.Remove(new(uid, rport.Key));
- }
- }
-
- private void OnTransmitterInteractUsing(EntityUid uid, SignalTransmitterComponent transmitter, InteractUsingEvent args)
- {
- if (args.Handled)
- return;
-
- if (!TryComp(args.Used, out SignalLinkerComponent? linker) || !IsLinkerInteractable(args.Used, linker) ||
- !TryComp(args.User, out ActorComponent? actor))
- return;
-
- if (!linker.LinkTX())
- return;
-
- linker.SavedTransmitter = uid;
-
- if (!TryComp(linker.SavedReceiver, out SignalReceiverComponent? receiver))
- {
- _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-saved", ("machine", uid)),
- args.User, PopupType.Medium);
- args.Handled = true;
- return;
- }
-
- if (TryGetOrOpenUI(args.Used, out var bui, actor))
- {
- TryUpdateUI(args.Used, uid, linker.SavedReceiver!.Value, bui, transmitter, receiver);
- args.Handled = true;
- }
- }
-
- private void OnReceiverInteractUsing(EntityUid uid, SignalReceiverComponent receiver, InteractUsingEvent args)
- {
- if (args.Handled)
- return;
-
- if (!TryComp(args.Used, out SignalLinkerComponent? linker) || !IsLinkerInteractable(args.Used, linker) ||
- !TryComp(args.User, out ActorComponent? actor))
- return;
-
- if (!linker.LinkRX())
- return;
-
- linker.SavedReceiver = uid;
-
- if (!TryComp(linker.SavedTransmitter, out SignalTransmitterComponent? transmitter))
- {
- _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-saved", ("machine", uid)),
- args.User, PopupType.Medium);
- args.Handled = true;
- return;
- }
-
- if (TryGetOrOpenUI(args.Used, out var bui, actor))
- {
- TryUpdateUI(args.Used, linker.SavedTransmitter!.Value, uid, bui, transmitter, receiver);
- args.Handled = true;
- }
- }
-
- private bool TryGetOrOpenUI(EntityUid linkerUid, [NotNullWhen(true)] out BoundUserInterface? bui, ActorComponent actor)
- {
- if (_userInterfaceSystem.TryGetUi(linkerUid, SignalLinkerUiKey.Key, out bui))
- {
- _userInterfaceSystem.OpenUi(bui, actor.PlayerSession);
- return true;
- }
- return false;
- }
-
- private bool TryUpdateUI(EntityUid linkerUid, EntityUid transmitterUid, EntityUid receiverUid, BoundUserInterface? bui = null, SignalTransmitterComponent? transmitter = null, SignalReceiverComponent? receiver = null)
- {
- if (!Resolve(transmitterUid, ref transmitter) || !Resolve(receiverUid, ref receiver))
- return false;
-
- if (bui == null && !_userInterfaceSystem.TryGetUi(linkerUid, SignalLinkerUiKey.Key, out bui))
- return false;
-
- var outKeys = transmitter.Outputs.Keys.ToList();
- var inKeys = receiver.Inputs.Keys.ToList();
- List<(int, int)> links = new();
- for (var i = 0; i < outKeys.Count; i++)
- {
- foreach (var re in transmitter.Outputs[outKeys[i]])
- {
- if (re.Uid == receiverUid)
- links.Add((i, inKeys.IndexOf(re.Port)));
- }
- }
-
- UserInterfaceSystem.SetUiState(bui, new SignalPortsState(
- $"{Name(transmitterUid)} ({transmitterUid})",
- outKeys,
- $"{Name(receiverUid)} ({receiverUid})",
- inKeys,
- links
- ));
- return true;
-
- }
-
- private bool TryLink(EntityUid transmitterUid, EntityUid receiverUid, SignalPortSelected args, EntityUid? user, bool quiet = false, bool checkRange = true, SignalTransmitterComponent? transmitter = null, SignalReceiverComponent? receiver = null)
- {
- if (!Resolve(transmitterUid, ref transmitter) || !Resolve(receiverUid, ref receiver))
- return false;
-
- if (!transmitter.Outputs.TryGetValue(args.TransmitterPort, out var linkedReceivers)
- || !receiver.Inputs.TryGetValue(args.ReceiverPort, out var linkedTransmitters))
- return false;
-
- quiet |= !user.HasValue;
-
- // Does the link already exist? Under the assumption that nothing has broken, lets only check the
- // transmitter ports.
- foreach (var identifier in linkedTransmitters)
- {
- if (identifier.Uid == transmitterUid && identifier.Port == args.TransmitterPort)
- return true;
- }
-
- if (checkRange && !IsInRange(transmitterUid, receiverUid, transmitter, receiver))
- {
- if (!quiet)
- _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-out-of-range"), user!.Value);
- return false;
- }
-
- // allow other systems to refuse the connection
- var linkAttempt = new LinkAttemptEvent(user, transmitterUid, args.TransmitterPort, receiverUid, args.ReceiverPort);
- RaiseLocalEvent(transmitterUid, linkAttempt, true);
- if (linkAttempt.Cancelled)
- {
- if (!quiet)
- _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-connection-refused", ("machine", transmitterUid)), user!.Value);
- return false;
- }
- RaiseLocalEvent(receiverUid, linkAttempt, true);
- if (linkAttempt.Cancelled)
- {
- if (!quiet)
- _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-connection-refused", ("machine", receiverUid)), user!.Value);
- return false;
- }
-
- linkedReceivers.Add(new(receiverUid, args.ReceiverPort));
- linkedTransmitters.Add(new(transmitterUid, args.TransmitterPort));
- if (!quiet)
- {
- _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-linked-port",
- ("machine1", transmitterUid), ("port1", PortName(args.TransmitterPort)),
- ("machine2", receiverUid), ("port2", PortName(args.ReceiverPort))),
- user!.Value, PopupType.Medium);
- }
-
- var newLink = new NewLinkEvent(user, transmitterUid, args.TransmitterPort, receiverUid, args.ReceiverPort);
- RaiseLocalEvent(receiverUid, newLink);
- RaiseLocalEvent(transmitterUid, newLink);
-
- return true;
- }
-
- private void OnSignalPortSelected(EntityUid uid, SignalLinkerComponent linker, SignalPortSelected args)
- {
- if (!TryComp(linker.SavedTransmitter, out SignalTransmitterComponent? transmitter) ||
- !TryComp(linker.SavedReceiver, out SignalReceiverComponent? receiver) ||
- !transmitter.Outputs.TryGetValue(args.TransmitterPort, out var receivers) ||
- !receiver.Inputs.TryGetValue(args.ReceiverPort, out var transmitters))
- return;
-
- if (args.Session.AttachedEntity is not { Valid: true } attached)
- return;
-
- var receiverUid = linker.SavedReceiver.Value;
- var transmitterUid = linker.SavedTransmitter.Value;
-
- if (receivers.Contains(new(receiverUid, args.ReceiverPort)) ||
- transmitters.Contains(new(transmitterUid, args.TransmitterPort)))
- {
- // link already exists, remove it
- if (receivers.Remove(new(receiverUid, args.ReceiverPort)) &&
- transmitters.Remove(new(transmitterUid, args.TransmitterPort)))
- {
- RaiseLocalEvent(receiverUid, new PortDisconnectedEvent(args.ReceiverPort), true);
- RaiseLocalEvent(transmitterUid, new PortDisconnectedEvent(args.TransmitterPort), true);
-
- _popupSystem.PopupCursor(Loc.GetString("signal-linker-component-unlinked-port",
- ("machine1", transmitterUid), ("port1", PortName(args.TransmitterPort)),
- ("machine2", receiverUid), ("port2", PortName(args.ReceiverPort))),
- attached, PopupType.Medium);
- }
- else
- { // something weird happened
- // TODO log error
- }
- }
- else
- {
- TryLink(transmitterUid, receiverUid, args, attached, transmitter: transmitter, receiver: receiver);
- }
-
- TryUpdateUI(uid, transmitterUid, receiverUid, transmitter: transmitter, receiver: receiver);
- }
-
- ///
- /// Convenience function to retrieve the name of a port prototype.
- ///
- ///
- ///
- public string PortName(string port) where TPort : MachinePortPrototype, IPrototype
- {
- if (!_protoMan.TryIndex(port, out var proto))
- return port;
-
- return Loc.GetString(proto.Name);
- }
-
- private void OnLinkerClearSelected(EntityUid uid, SignalLinkerComponent linker, LinkerClearSelected args)
- {
- if (!TryComp(linker.SavedTransmitter, out SignalTransmitterComponent? transmitter) ||
- !TryComp(linker.SavedReceiver, out SignalReceiverComponent? receiver))
- return;
-
- var transmitterUid = linker.SavedTransmitter.Value;
- var receiverUid = linker.SavedReceiver.Value;
-
- foreach (var (port, receivers) in transmitter.Outputs)
- {
- if (receivers.RemoveAll(id => id.Uid == receiverUid) > 0)
- RaiseLocalEvent(transmitterUid, new PortDisconnectedEvent(port), true);
- }
-
- foreach (var (port, transmitters) in receiver.Inputs)
- {
- if (transmitters.RemoveAll(id => id.Uid == transmitterUid) > 0)
- RaiseLocalEvent(receiverUid, new PortDisconnectedEvent(port), true);
- }
-
- TryUpdateUI(uid, transmitterUid, receiverUid, transmitter: transmitter, receiver: receiver);
- }
-
- private void OnLinkerLinkDefaultSelected(EntityUid uid, SignalLinkerComponent linker, LinkerLinkDefaultSelected args)
- {
- if (!TryComp(linker.SavedTransmitter, out SignalTransmitterComponent? transmitter) ||
- !TryComp(linker.SavedReceiver, out SignalReceiverComponent? receiver))
- return;
-
- if (args.Session.AttachedEntity is not { Valid: true } user)
- return;
-
- var transmitterUid = linker.SavedTransmitter!.Value;
- var receiverUid = linker.SavedReceiver!.Value;
-
- TryLinkDefaults(receiverUid, transmitterUid, user, receiver, transmitter);
- TryUpdateUI(uid, transmitterUid, receiverUid, transmitter: transmitter, receiver: receiver);
- }
-
- ///
- /// Attempt to link all default ports connections. Returns true if all links succeeded. Otherwise returns
- /// false.
- ///
- public bool TryLinkDefaults(EntityUid receiverUid, EntityUid transmitterUid, EntityUid? user,
- SignalReceiverComponent? receiver = null, SignalTransmitterComponent? transmitter = null)
- {
- if (!Resolve(receiverUid, ref receiver, false) || !Resolve(transmitterUid, ref transmitter, false))
- return false;
-
- if (!IsInRange(transmitterUid, receiverUid, transmitter, receiver))
- return false;
-
- var allLinksSucceeded = true;
-
- // First, disconnect existing links.
- foreach (var (port, receivers) in transmitter.Outputs)
- {
- if (receivers.RemoveAll(id => id.Uid == receiverUid) > 0)
- RaiseLocalEvent(transmitterUid, new PortDisconnectedEvent(port), true);
- }
-
- foreach (var (port, transmitters) in receiver.Inputs)
- {
- if (transmitters.RemoveAll(id => id.Uid == transmitterUid) > 0)
- RaiseLocalEvent(receiverUid, new PortDisconnectedEvent(port), true);
- }
-
- // Then make any valid default connections.
- foreach (var outPort in transmitter.Outputs.Keys)
- {
- var prototype = _protoMan.Index(outPort);
- if (prototype.DefaultLinks == null)
- continue;
-
- foreach (var inPort in prototype.DefaultLinks)
- {
- if (receiver.Inputs.ContainsKey(inPort))
- allLinksSucceeded &= TryLink(transmitterUid, receiverUid, new(outPort, inPort), user, quiet: true, checkRange: false, transmitter: transmitter, receiver: receiver);
- }
- }
-
- return allLinksSucceeded;
- }
-
- private void OnLinkerUIClosed(EntityUid uid, SignalLinkerComponent component, BoundUIClosedEvent args)
- {
- component.SavedTransmitter = null;
- component.SavedReceiver = null;
- }
-
- private bool IsInRange(EntityUid transmitterUid, EntityUid receiverUid, SignalTransmitterComponent transmitterComponent, SignalReceiverComponent _)
- {
- if (TryComp(transmitterUid, out ApcPowerReceiverComponent? transmitterPower) &&
- TryComp(receiverUid, out ApcPowerReceiverComponent? receiverPower) &&
- transmitterPower.Provider?.Net == receiverPower.Provider?.Net)
- return true;
-
- // TODO: As elsewhere don't use mappos inrange.
- return Comp(transmitterUid).MapPosition.InRange(
- Comp(receiverUid).MapPosition, transmitterComponent.TransmissionRange);
- }
-
- private bool IsLinkerInteractable(EntityUid uid, SignalLinkerComponent linkerComponent)
- {
- var quality = linkerComponent.RequiredQuality;
- return quality == null || _tools.HasQuality(uid, quality);
- }
- }
-}
diff --git a/Content.Server/Physics/Controllers/ConveyorController.cs b/Content.Server/Physics/Controllers/ConveyorController.cs
index 6b4583c767..65c47eb357 100644
--- a/Content.Server/Physics/Controllers/ConveyorController.cs
+++ b/Content.Server/Physics/Controllers/ConveyorController.cs
@@ -1,7 +1,5 @@
-
using Content.Server.DeviceLinking.Events;
using Content.Server.DeviceLinking.Systems;
-using Content.Server.MachineLinking.System;
using Content.Server.Materials;
using Content.Server.Power.Components;
using Content.Shared.Conveyor;
diff --git a/Content.Server/Xenoarchaeology/Equipment/Components/AnalysisConsoleComponent.cs b/Content.Server/Xenoarchaeology/Equipment/Components/AnalysisConsoleComponent.cs
index d65fed28a8..b03a4df25d 100644
--- a/Content.Server/Xenoarchaeology/Equipment/Components/AnalysisConsoleComponent.cs
+++ b/Content.Server/Xenoarchaeology/Equipment/Components/AnalysisConsoleComponent.cs
@@ -1,8 +1,7 @@
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
-using Robust.Shared.Utility;
namespace Content.Server.Xenoarchaeology.Equipment.Components;
@@ -22,7 +21,7 @@ public sealed class AnalysisConsoleComponent : Component
///
/// The machine linking port for the analyzer
///
- [DataField("linkingPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("linkingPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public readonly string LinkingPort = "ArtifactAnalyzerSender";
///
diff --git a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs
index b68e621704..47cf5f2766 100644
--- a/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs
+++ b/Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs
@@ -1,6 +1,5 @@
using System.Linq;
using Content.Server.Construction;
-using Content.Server.MachineLinking.Components;
using Content.Server.Paper;
using Content.Server.Power.Components;
using Content.Server.Research.Systems;
@@ -9,6 +8,7 @@ using Content.Server.Xenoarchaeology.Equipment.Components;
using Content.Server.Xenoarchaeology.XenoArtifacts;
using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
using Content.Shared.Audio;
+using Content.Shared.DeviceLinking;
using Content.Shared.DeviceLinking.Events;
using Content.Shared.Popups;
using Content.Shared.Research.Components;
@@ -153,14 +153,14 @@ public sealed class ArtifactAnalyzerSystem : EntitySystem
private void OnMapInit(EntityUid uid, ArtifactAnalyzerComponent component, MapInitEvent args)
{
- if (!TryComp(uid, out var receiver))
+ if (!TryComp(uid, out var sink))
return;
- foreach (var port in receiver.Inputs.Values.SelectMany(ports => ports))
+ foreach (var source in sink.LinkedSources)
{
- if (!TryComp(port.Uid, out var analysis))
+ if (!TryComp(source, out var analysis))
continue;
- component.Console = port.Uid;
+ component.Console = source;
analysis.AnalyzerEntity = uid;
return;
}
diff --git a/Content.Shared/Cargo/Components/SharedCargoTelepadComponent.cs b/Content.Shared/Cargo/Components/SharedCargoTelepadComponent.cs
index 935b53e1e8..50e38b95b6 100644
--- a/Content.Shared/Cargo/Components/SharedCargoTelepadComponent.cs
+++ b/Content.Shared/Cargo/Components/SharedCargoTelepadComponent.cs
@@ -1,5 +1,5 @@
using Content.Shared.Construction.Prototypes;
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
@@ -55,6 +55,6 @@ public sealed class CargoTelepadComponent : Component
[DataField("printerOutput", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string PrinterOutput = "PaperCargoInvoice";
- [DataField("receiverPort", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
+ [DataField("receiverPort", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string ReceiverPort = "OrderReceiver";
}
diff --git a/Content.Shared/Conveyor/ConveyorComponent.cs b/Content.Shared/Conveyor/ConveyorComponent.cs
index efa0215a69..d6cedcbab2 100644
--- a/Content.Shared/Conveyor/ConveyorComponent.cs
+++ b/Content.Shared/Conveyor/ConveyorComponent.cs
@@ -1,4 +1,4 @@
-using Content.Shared.MachineLinking;
+using Content.Shared.DeviceLinking;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -31,13 +31,13 @@ public sealed class ConveyorComponent : Component
[ViewVariables]
public bool Powered;
- [DataField("forwardPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("forwardPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string ForwardPort = "Forward";
- [DataField("reversePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("reversePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string ReversePort = "Reverse";
- [DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string OffPort = "Off";
[ViewVariables]
diff --git a/Content.Shared/DeviceLinking/SharedDeviceLinkSystem.cs b/Content.Shared/DeviceLinking/SharedDeviceLinkSystem.cs
index 1af1be7104..2f071fd364 100644
--- a/Content.Shared/DeviceLinking/SharedDeviceLinkSystem.cs
+++ b/Content.Shared/DeviceLinking/SharedDeviceLinkSystem.cs
@@ -153,6 +153,7 @@ public abstract class SharedDeviceLinkSystem : EntitySystem
foreach (var port in ports)
{
+ DebugTools.Assert(_prototypeManager.HasIndex(port));
comp.Ports?.Add(port);
}
}
@@ -167,6 +168,7 @@ public abstract class SharedDeviceLinkSystem : EntitySystem
foreach (var port in ports)
{
+ DebugTools.Assert(_prototypeManager.HasIndex(port));
comp.Ports?.Add(port);
}
}
@@ -321,6 +323,9 @@ public abstract class SharedDeviceLinkSystem : EntitySystem
RemoveSinkFromSource(sourceUid, sinkUid, sourceComponent);
foreach (var (source, sink) in links)
{
+ DebugTools.Assert(_prototypeManager.HasIndex(source));
+ DebugTools.Assert(_prototypeManager.HasIndex(sink));
+
if (!sourceComponent.Ports.Contains(source) || !sinkComponent.Ports.Contains(sink))
continue;
diff --git a/Content.Shared/Doors/Components/AirlockComponent.cs b/Content.Shared/Doors/Components/AirlockComponent.cs
index 2578dc7301..3e73a7ef9d 100644
--- a/Content.Shared/Doors/Components/AirlockComponent.cs
+++ b/Content.Shared/Doors/Components/AirlockComponent.cs
@@ -1,6 +1,5 @@
+using Content.Shared.DeviceLinking;
using Content.Shared.Doors.Systems;
-using Content.Shared.MachineLinking;
-using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -65,7 +64,7 @@ public sealed class AirlockComponent : Component
///
/// The receiver port for turning off automatic closing.
///
- [DataField("autoClosePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
+ [DataField("autoClosePort", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string AutoClosePort = "AutoClose";
#region Graphics
diff --git a/Content.Shared/Doors/Components/DoorBoltComponent.cs b/Content.Shared/Doors/Components/DoorBoltComponent.cs
index 13d2be47ff..8ce744e36c 100644
--- a/Content.Shared/Doors/Components/DoorBoltComponent.cs
+++ b/Content.Shared/Doors/Components/DoorBoltComponent.cs
@@ -1,9 +1,6 @@
using Content.Shared.Doors.Systems;
-using Content.Shared.MachineLinking;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
-using Robust.Shared.Serialization;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Doors.Components;
diff --git a/Content.Shared/MachineLinking/MachinePortPrototype.cs b/Content.Shared/MachineLinking/MachinePortPrototype.cs
deleted file mode 100644
index 7607159222..0000000000
--- a/Content.Shared/MachineLinking/MachinePortPrototype.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using Robust.Shared.Prototypes;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
-
-namespace Content.Shared.MachineLinking;
-
-///
-/// A prototype for a machine port, for use with machine linking.
-///
-public abstract class MachinePortPrototype
-{
- ///
- /// Localization string for the port name. Displayed in the linking UI.
- ///
- [DataField("name", required:true)]
- public string Name = default!;
-
- ///
- /// Localization string for a description of the ports functionality. Should either indicate when a transmitter
- /// port is fired, or what function a receiver port serves. Displayed as a tooltip in the linking UI.
- ///
- [DataField("description", required: true)]
- public string Description = default!;
-}
-
-[Prototype("receiverPort")]
-public sealed class ReceiverPortPrototype : MachinePortPrototype, IPrototype
-{
- [IdDataField]
- public string ID { get; } = default!;
-}
-
-[Prototype("transmitterPort")]
-public sealed class TransmitterPortPrototype : MachinePortPrototype, IPrototype
-{
- [IdDataField]
- public string ID { get; } = default!;
-
- ///
- /// This is a set of receiver ports that this transmitter port will attempt to link to when using the
- /// default-link functionality.
- ///
- [DataField("defaultLinks", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))]
- public HashSet? DefaultLinks;
-}
diff --git a/Content.Shared/MachineLinking/UIMessages.cs b/Content.Shared/MachineLinking/UIMessages.cs
deleted file mode 100644
index 8a090d6f50..0000000000
--- a/Content.Shared/MachineLinking/UIMessages.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using Robust.Shared.Serialization;
-
-namespace Content.Shared.MachineLinking
-{
- [Serializable, NetSerializable]
- public sealed class SignalPortsState : BoundUserInterfaceState
- {
- public readonly string TransmitterName;
- ///
- /// A List of all ports on the selected transmitter
- ///
- public readonly List TransmitterPorts;
-
- public readonly string ReceiverName;
- ///
- /// A List of all ports on the selected receiver
- ///
- public readonly List ReceiverPorts;
-
- public readonly List<(int, int)> Links;
-
- public SignalPortsState(string transmitterName, List transmitterPorts, string receiverName, List receiverPorts, List<(int, int)> links)
- {
- TransmitterName = transmitterName;
- TransmitterPorts = transmitterPorts;
- ReceiverName = receiverName;
- ReceiverPorts = receiverPorts;
- Links = links;
- }
- }
-
- [Serializable, NetSerializable]
- public sealed class SignalPortSelected : BoundUserInterfaceMessage
- {
- public readonly string TransmitterPort;
- public readonly string ReceiverPort;
-
- public SignalPortSelected(string transmitterPort, string receiverPort)
- {
- TransmitterPort = transmitterPort;
- ReceiverPort = receiverPort;
- }
- }
-
- [Serializable, NetSerializable]
- public sealed class LinkerClearSelected : BoundUserInterfaceMessage { }
-
- [Serializable, NetSerializable]
- public sealed class LinkerLinkDefaultSelected : BoundUserInterfaceMessage { }
-}
diff --git a/Resources/Prototypes/MachineLinking/receiver_ports.yml b/Resources/Prototypes/MachineLinking/receiver_ports.yml
deleted file mode 100644
index 86e61604cb..0000000000
--- a/Resources/Prototypes/MachineLinking/receiver_ports.yml
+++ /dev/null
@@ -1,94 +0,0 @@
-- type: receiverPort
- id: Toggle
- name: signal-port-name-toggle
- description: signal-port-description-toggle
-
-- type: receiverPort
- id: On
- name: signal-port-name-on-receiver
- description: signal-port-description-on-receiver
-
-- type: receiverPort
- id: Off
- name: signal-port-name-off-receiver
- description: signal-port-description-off-receiver
-
-- type: receiverPort
- id: Forward
- name: signal-port-name-forward
- description: signal-port-description-forward
-
-- type: receiverPort
- id: Reverse
- name: signal-port-name-reverse
- description: signal-port-description-reverse
-
-- type: receiverPort
- id: Open
- name: signal-port-name-open
- description: signal-port-description-open
-
-- type: receiverPort
- id: Close
- name: signal-port-name-close
- description: signal-port-description-close
-
-- type: receiverPort
- id: Trigger
- name: signal-port-name-trigger
- description: signal-port-description-trigger
-
-- type: receiverPort
- id: OrderReceiver
- name: signal-port-name-order-receiver
- description: signal-port-description-order-receiver
-
-- type: receiverPort
- id: Pressurize
- name: signal-port-name-pressurize
- description: signal-port-description-pressurize
-
-- type: receiverPort
- id: Depressurize
- name: signal-port-name-depressurize
- description: signal-port-description-depressurize
-
-- type: receiverPort
- id: CloningPodReceiver
- name: signal-port-name-pod-receiver
- description: signal-port-description-pod-receiver
-
-- type: receiverPort
- id: MedicalScannerReceiver
- name: signal-port-name-med-scanner-receiver
- description: signal-port-description-med-scanner-receiver
-
-- type: receiverPort
- id: AutoClose
- name: signal-port-name-hold-open
- description: signal-port-description-hold-open
-
-- type: receiverPort
- id: ArtifactAnalyzerReceiver
- name: signal-port-name-artifact-analyzer-receiver
- description: signal-port-description-artifact-analyzer-receiver
-
-- type: receiverPort
- id: DoorBolt
- name: signal-port-name-doorbolt
- description: signal-port-description-doorbolt
-
-- type: receiverPort
- id: InputA
- name: signal-port-name-logic-input-a
- description: signal-port-description-logic-input-a
-
-- type: receiverPort
- id: InputB
- name: signal-port-name-logic-input-b
- description: signal-port-description-logic-input-b
-
-- type: receiverPort
- id: Input
- name: signal-port-name-logic-input
- description: signal-port-description-logic-input
diff --git a/Resources/Prototypes/MachineLinking/transmitter_ports.yml b/Resources/Prototypes/MachineLinking/transmitter_ports.yml
deleted file mode 100644
index c97b324652..0000000000
--- a/Resources/Prototypes/MachineLinking/transmitter_ports.yml
+++ /dev/null
@@ -1,98 +0,0 @@
-- type: transmitterPort
- id: Pressed
- name: signal-port-name-pressed
- description: signal-port-description-pressed
- defaultLinks: [ Toggle, Trigger ]
-
-- type: transmitterPort
- id: On
- name: signal-port-name-on-transmitter
- description: signal-port-description-on-transmitter
- defaultLinks: [ On, Open, Forward, Trigger ]
-
-- type: transmitterPort
- id: Off
- name: signal-port-name-off-transmitter
- description: signal-port-description-off-transmitter
- defaultLinks: [ Off, Close ]
-
-- type: transmitterPort
- id: Status
- name: signal-port-name-status-transmitter
- description: signal-port-description-status-transmitter
-
-- type: transmitterPort
- id: Left
- name: signal-port-name-left
- description: signal-port-description-left
- defaultLinks: [ On, Open, Forward, Trigger ]
-
-- type: transmitterPort
- id: Right
- name: signal-port-name-right
- description: signal-port-description-right
- defaultLinks: [ On, Open, Reverse, Trigger ]
-
-- type: transmitterPort
- id: Middle
- name: signal-port-name-middle
- description: signal-port-description-middle
- defaultLinks: [ Off, Close ]
-
-- type: transmitterPort
- id: DoorStatus
- name: signal-port-name-doorstatus
- description: signal-port-description-doorstatus
- defaultLinks: [ DoorBolt ]
-
-- type: transmitterPort
- id: OrderSender
- name: signal-port-name-order-sender
- description: signal-port-description-order-sender
- defaultLinks: [ OrderReceiver ]
-
-- type: transmitterPort
- id: CloningPodSender
- name: signal-port-name-pod-receiver
- description: signal-port-description-pod-sender
-
-- type: transmitterPort
- id: MedicalScannerSender
- name: signal-port-name-med-scanner-sender
- description: signal-port-description-med-scanner-sender
-
-- type: transmitterPort
- id: Timer
- name: signal-port-name-timer-trigger
- description: signal-port-description-timer-trigger
- defaultLinks: [ AutoClose, On, Open, Forward, Trigger ]
-
-- type: transmitterPort
- id: Start
- name: signal-port-name-timer-start
- description: signal-port-description-timer-start
- defaultLinks: [ Close, Off ]
-
-- type: transmitterPort
- id: ArtifactAnalyzerSender
- name: signal-port-name-artifact-analyzer-sender
- description: signal-port-description-artifact-analyzer-sender
- defaultLinks: [ ArtifactAnalyzerReceiver ]
-
-- type: transmitterPort
- id: Output
- name: signal-port-name-logic-output
- description: signal-port-description-logic-output
- defaultLinks: [ Input ]
-
-- type: transmitterPort
- id: OutputHigh
- name: signal-port-name-logic-output-high
- description: signal-port-description-logic-output-high
- defaultLinks: [ On, Open, Forward, Trigger ]
-
-- type: transmitterPort
- id: OutputLow
- name: signal-port-name-logic-output-low
- description: signal-port-description-logic-output-low
- defaultLinks: [ Off, Close ]