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:
@@ -1,12 +0,0 @@
|
||||
namespace Content.Server.MachineLinking.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for automatic linkage with buttons and other transmitters.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class AutoLinkReceiverComponent : Component
|
||||
{
|
||||
[DataField("channel", required: true, readOnly: true)]
|
||||
public string AutoLinkChannel = default!;
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace Content.Server.MachineLinking.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for automatic linkage with various receivers, like shutters.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class AutoLinkTransmitterComponent : Component
|
||||
{
|
||||
[DataField("channel", required: true, readOnly: true)]
|
||||
public string AutoLinkChannel = default!;
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
using Content.Shared.MachineLinking;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.MachineLinking.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class DoorSignalControlComponent : Component
|
||||
{
|
||||
[DataField("openPort", customTypeSerializer: typeof(PrototypeIdSerializer<ReceiverPortPrototype>))]
|
||||
public string OpenPort = "Open";
|
||||
|
||||
[DataField("closePort", customTypeSerializer: typeof(PrototypeIdSerializer<ReceiverPortPrototype>))]
|
||||
public string ClosePort = "Close";
|
||||
|
||||
[DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer<ReceiverPortPrototype>))]
|
||||
public string TogglePort = "Toggle";
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using Content.Shared.MachineLinking;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.MachineLinking.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple switch that will fire ports when toggled on or off. A button is jsut a switch that signals on the
|
||||
/// same port regardless of its state.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SignalSwitchComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The port that gets signaled when the switch turns on.
|
||||
/// </summary>
|
||||
[DataField("onPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>))]
|
||||
public string OnPort = "On";
|
||||
|
||||
/// <summary>
|
||||
/// The port that gets signaled when the switch turns off.
|
||||
/// </summary>
|
||||
[DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>))]
|
||||
public string OffPort = "Off";
|
||||
|
||||
[DataField("state")]
|
||||
public bool State;
|
||||
|
||||
[DataField("clickSound")]
|
||||
public SoundSpecifier ClickSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/lightswitch.ogg");
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,13 @@ using Content.Server.MachineLinking.System;
|
||||
namespace Content.Server.MachineLinking.Components
|
||||
{
|
||||
[DataDefinition]
|
||||
public struct PortIdentifier
|
||||
public readonly struct PortIdentifier
|
||||
{
|
||||
[DataField("uid")]
|
||||
public EntityUid Uid;
|
||||
public readonly EntityUid Uid;
|
||||
|
||||
[DataField("port")]
|
||||
public string Port;
|
||||
public readonly string Port;
|
||||
|
||||
public PortIdentifier(EntityUid uid, string port)
|
||||
{
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
using Content.Shared.MachineLinking;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.MachineLinking.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends out a signal to machine linked objects.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SignallerComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The port that gets signaled when the switch turns on.
|
||||
/// </summary>
|
||||
[DataField("port", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>))]
|
||||
public string Port = "Pressed";
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using Content.Shared.MachineLinking;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.MachineLinking.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed class TwoWayLeverComponent : Component
|
||||
{
|
||||
[DataField("state")]
|
||||
public TwoWayLeverState State;
|
||||
|
||||
[DataField("nextSignalLeft")]
|
||||
public bool NextSignalLeft;
|
||||
|
||||
[DataField("leftPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>))]
|
||||
public string LeftPort = "Left";
|
||||
|
||||
[DataField("rightPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>))]
|
||||
public string RightPort = "Right";
|
||||
|
||||
[DataField("middlePort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>))]
|
||||
public string MiddlePort = "Middle";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user