Files
tbd-station-14/Content.Shared/DeviceNetwork/NetworkConfiguratorUserInterfaceState.cs
Julian Giebel 6ebd784cb6 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>
2023-05-07 16:07:24 +10:00

48 lines
1.6 KiB
C#

using Content.Shared.DeviceLinking;
using Robust.Shared.Serialization;
namespace Content.Shared.DeviceNetwork;
[Serializable, NetSerializable]
public sealed class NetworkConfiguratorUserInterfaceState : BoundUserInterfaceState
{
public readonly HashSet<(string address, string name)> DeviceList;
public NetworkConfiguratorUserInterfaceState(HashSet<(string, string)> deviceList)
{
DeviceList = deviceList;
}
}
[Serializable, NetSerializable]
public sealed class DeviceListUserInterfaceState : BoundUserInterfaceState
{
public readonly HashSet<(string address, string name)> DeviceList;
public DeviceListUserInterfaceState(HashSet<(string address, string name)> deviceList)
{
DeviceList = deviceList;
}
}
[Serializable, NetSerializable]
public sealed class DeviceLinkUserInterfaceState : BoundUserInterfaceState
{
public readonly List<SourcePortPrototype> Sources;
public readonly List<SinkPortPrototype> Sinks;
public readonly HashSet<(string source, string sink)> Links;
public readonly List<(string source, string sink)>? Defaults;
public readonly string SourceAddress;
public readonly string SinkAddress;
public DeviceLinkUserInterfaceState(List<SourcePortPrototype> sources, List<SinkPortPrototype> sinks, HashSet<(string source, string sink)> links, string sourceAddress, string sinkAddress, List<(string source, string sink)>? defaults = default)
{
Links = links;
SourceAddress = sourceAddress;
SinkAddress = sinkAddress;
Defaults = defaults;
Sources = sources;
Sinks = sinks;
}
}