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>
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// How far the device can transmit a signal wirelessly.
|
|
/// Devices farther than this range can still transmit if they are
|
|
/// on the same powernet.
|
|
/// </summary>
|
|
[DataField("transmissionRange")]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float TransmissionRange = 30f;
|
|
|
|
[DataField("outputs")]
|
|
[Access(typeof(SignalLinkerSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
|
|
public Dictionary<string, List<PortIdentifier>> Outputs = new();
|
|
}
|
|
}
|