move SignalState to shared (#37303)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -49,7 +49,7 @@ public sealed partial class LogicGateComponent : Component
|
|||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public ProtoId<SourcePortPrototype> OutputPort = "Output";
|
public ProtoId<SourcePortPrototype> OutputPort = "Output";
|
||||||
|
|
||||||
// Initial state
|
// Initial state, used to not spam invoke ports
|
||||||
[DataField]
|
[DataField]
|
||||||
public SignalState StateA = SignalState.Low;
|
public SignalState StateA = SignalState.Low;
|
||||||
|
|
||||||
@@ -59,13 +59,3 @@ public sealed partial class LogicGateComponent : Component
|
|||||||
[DataField]
|
[DataField]
|
||||||
public bool LastOutput;
|
public bool LastOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Last state of a signal port, used to not spam invoking ports.
|
|
||||||
/// </summary>
|
|
||||||
public enum SignalState : byte
|
|
||||||
{
|
|
||||||
Momentary, // Instantaneous pulse high, compatibility behavior
|
|
||||||
Low,
|
|
||||||
High
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Content.Server.DeviceLinking.Components;
|
using Content.Server.DeviceLinking.Components;
|
||||||
using Content.Server.DeviceNetwork;
|
using Content.Server.DeviceNetwork;
|
||||||
using Content.Server.Doors.Systems;
|
using Content.Server.Doors.Systems;
|
||||||
|
using Content.Shared.DeviceLinking;
|
||||||
using Content.Shared.DeviceLinking.Events;
|
using Content.Shared.DeviceLinking.Events;
|
||||||
using Content.Shared.DeviceNetwork;
|
using Content.Shared.DeviceNetwork;
|
||||||
using Content.Shared.Doors.Components;
|
using Content.Shared.Doors.Components;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Content.Server.DeviceLinking.Components;
|
using Content.Server.DeviceLinking.Components;
|
||||||
|
using Content.Shared.DeviceLinking;
|
||||||
using Content.Shared.DeviceLinking.Events;
|
using Content.Shared.DeviceLinking.Events;
|
||||||
using Content.Shared.DeviceNetwork;
|
using Content.Shared.DeviceNetwork;
|
||||||
|
|
||||||
|
|||||||
@@ -40,3 +40,15 @@ public enum LogicGateLayers : byte
|
|||||||
InputB,
|
InputB,
|
||||||
Output
|
Output
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The possible states of a logic-capable signal.
|
||||||
|
/// Stored in network payload data of device network messages.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public enum SignalState : byte
|
||||||
|
{
|
||||||
|
Momentary, // Instantaneous pulse high, compatibility behavior
|
||||||
|
Low,
|
||||||
|
High
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user