Predict two-way levers (#25043)

* Predict two-way levers

Annoys me the rare occasions I touch cargo. Doesn't predict the signal but at least the lever responds immediately.

* space

* a
This commit is contained in:
metalgearsloth
2024-02-11 14:19:45 +11:00
committed by GitHub
parent 8e59b4f505
commit 05a2ddff1c
35 changed files with 114 additions and 68 deletions

View File

@@ -0,0 +1,26 @@
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.DeviceLinking.Components;
/// <summary>
/// Simple ternary state for device linking.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class TwoWayLeverComponent : Component
{
[DataField, AutoNetworkedField]
public TwoWayLeverState State;
[DataField, AutoNetworkedField]
public bool NextSignalLeft;
[DataField]
public ProtoId<SourcePortPrototype> LeftPort = "Left";
[DataField]
public ProtoId<SourcePortPrototype> RightPort = "Right";
[DataField]
public ProtoId<SourcePortPrototype> MiddlePort = "Middle";
}