Remove superseded machine linking code (#18244)

This commit is contained in:
Leon Friedrich
2023-07-24 14:07:35 +12:00
committed by GitHub
parent a4063a5e33
commit f2bfdd8e17
44 changed files with 58 additions and 1259 deletions

View File

@@ -1,44 +0,0 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
namespace Content.Shared.MachineLinking;
/// <summary>
/// A prototype for a machine port, for use with machine linking.
/// </summary>
public abstract class MachinePortPrototype
{
/// <summary>
/// Localization string for the port name. Displayed in the linking UI.
/// </summary>
[DataField("name", required:true)]
public string Name = default!;
/// <summary>
/// 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.
/// </summary>
[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!;
/// <summary>
/// This is a set of receiver ports that this transmitter port will attempt to link to when using the
/// default-link functionality.
/// </summary>
[DataField("defaultLinks", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<ReceiverPortPrototype>))]
public HashSet<string>? DefaultLinks;
}

View File

@@ -1,50 +0,0 @@
using Robust.Shared.Serialization;
namespace Content.Shared.MachineLinking
{
[Serializable, NetSerializable]
public sealed class SignalPortsState : BoundUserInterfaceState
{
public readonly string TransmitterName;
/// <summary>
/// A List of all ports on the selected transmitter
/// </summary>
public readonly List<string> TransmitterPorts;
public readonly string ReceiverName;
/// <summary>
/// A List of all ports on the selected receiver
/// </summary>
public readonly List<string> ReceiverPorts;
public readonly List<(int, int)> Links;
public SignalPortsState(string transmitterName, List<string> transmitterPorts, string receiverName, List<string> 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 { }
}