CatStation/Content.Shared/DeviceLinking/Components/SignalSwitchComponent.cs
AftrLite 4645e40b60
The Respritening - Batch 1 (#44857)
* initial commit
LICENSES / COPYRIGHT ARE NOT FINALIZED.

* test push per ArtisticRoomba

* more progress

* nearly done

* push

* more progress

* second big wave
LICENSING REMAINS INCOMPLETE

* more progress + attributions

* astrotile consistency

* walls attribution pass!

* marble walls, concrete tweaks, attribution fixes

* linter fixes, provisional borders for marble walls

* test fixes

* why is PlatingDamaged load-bearing???

* fixed attribution that flew under the radar, updates to Damaged Plating & Damaged Steel tiles.

* requested changes

* airlock visualizer tweak

---------

Co-authored-by: Princess Cheeseballs <66055347+Princess-Cheeseballs@users.noreply.github.com>
Co-authored-by: Whatstone <whatston3@gmail.com>
2026-08-12 17:46:16 +00:00

48 lines
1.4 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.DeviceLinking.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, NetworkedComponent]
public sealed partial class SignalSwitchComponent : Component
{
/// <summary>
/// The port that gets signaled when the switch turns on.
/// </summary>
[DataField]
public ProtoId<SourcePortPrototype> OnPort = "On";
/// <summary>
/// The port that gets signaled when the switch turns off.
/// </summary>
[DataField]
public ProtoId<SourcePortPrototype> OffPort = "Off";
/// <summary>
/// The port that gets signaled with the switch's current status.
/// This is only used if OnPort is different from OffPort, not in the case of a toggle switch.
/// </summary>
[DataField]
public ProtoId<SourcePortPrototype> StatusPort = "Status";
[DataField]
public bool State;
[DataField]
public SoundSpecifier ClickSound = new SoundPathSpecifier("/Audio/Machines/lightswitch.ogg");
}
/// <summary>
/// Enum for the appearance system.
/// </summary>
[Serializable, NetSerializable]
public enum SwitchVisuals
{
Visuals,
}