signal router (#20802)

* add signal router sprite

* DisposalSignalRouter logic

* add disposal signal router

* add disposal signal router

* how did it work without this

* death

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-11-14 23:30:43 +00:00
committed by GitHub
parent 78c495512c
commit efc9d93c2f
10 changed files with 300 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
using Content.Server.Disposal.Tube.Systems;
using Content.Shared.DeviceLinking;
using Robust.Shared.Prototypes;
namespace Content.Server.Disposal.Tube.Components;
/// <summary>
/// Requires <see cref="DisposalJunctionComponent"/> to function.
/// </summary>
[RegisterComponent, Access(typeof(DisposalSignalRouterSystem))]
public sealed partial class DisposalSignalRouterComponent : Component
{
/// <summary>
/// Whether to route items to the side or not.
/// </summary>
[DataField]
public bool Routing;
/// <summary>
/// Port that sets the router to send items to the side.
/// </summary>
[DataField]
public ProtoId<SinkPortPrototype> OnPort = "On";
/// <summary>
/// Port that sets the router to send items ahead.
/// </summary>
[DataField]
public ProtoId<SinkPortPrototype> OffPort = "Off";
/// <summary>
/// Port that toggles the router between sending items to the side and ahead.
/// </summary>
[DataField]
public ProtoId<SinkPortPrototype> TogglePort = "Toggle";
}