Blast door/shutter, timer and or gate device linking fixes (#16347)

This commit is contained in:
Julian Giebel
2023-05-12 00:16:02 +02:00
committed by GitHub
parent 59176df425
commit 5e0a96dfc7
16 changed files with 255 additions and 123 deletions

View File

@@ -1,15 +0,0 @@
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.MachineLinking.Components
{
[RegisterComponent]
public sealed class ActiveSignalTimerComponent : Component
{
/// <summary>
/// The time the timer triggers.
/// </summary>
[DataField("triggerTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan TriggerTime;
}
}

View File

@@ -1,28 +0,0 @@
using Content.Server.MachineLinking.Events;
using Content.Shared.MachineLinking;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.MachineLinking.Components;
[RegisterComponent]
public sealed class OrGateComponent : Component
{
// Initial state
[ViewVariables]
public SignalState StateA1 = SignalState.Low;
[ViewVariables]
public SignalState StateB1 = SignalState.Low;
[ViewVariables]
public SignalState LastO1 = SignalState.Low;
[ViewVariables]
public SignalState StateA2 = SignalState.Low;
[ViewVariables]
public SignalState StateB2 = SignalState.Low;
[ViewVariables]
public SignalState LastO2 = SignalState.Low;
}

View File

@@ -1,42 +0,0 @@
using Content.Shared.MachineLinking;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.MachineLinking.Components;
[RegisterComponent]
public sealed class SignalTimerComponent : Component
{
[DataField("delay"), ViewVariables(VVAccess.ReadWrite)]
public double Delay = 5;
/// <summary>
/// This shows the Label: text box in the UI.
/// </summary>
[DataField("canEditLabel"), ViewVariables(VVAccess.ReadWrite)]
public bool CanEditLabel = true;
/// <summary>
/// The label, used for TextScreen visuals currently.
/// </summary>
[DataField("label"), ViewVariables(VVAccess.ReadWrite)]
public string Label = "";
/// <summary>
/// The port that gets signaled when the timer triggers.
/// </summary>
[DataField("triggerPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>)), ViewVariables(VVAccess.ReadWrite)]
public string TriggerPort = "Timer";
/// <summary>
/// The port that gets signaled when the timer starts.
/// </summary>
[DataField("startPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>)), ViewVariables(VVAccess.ReadWrite)]
public string StartPort = "Start";
/// <summary>
/// If not null, this timer will play this sound when done.
/// </summary>
[DataField("doneSound"), ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier? DoneSound;
}

View File

@@ -1,3 +1,4 @@
using Content.Server.DeviceLinking.Components;
using Content.Server.MachineLinking.Events;
using Content.Server.MachineLinking.System;