Files
tbd-station-14/Content.Shared/Trigger/Components/Effects/AlertLevelChangeOnTriggerComponent.cs
2025-08-03 21:20:37 +02:00

35 lines
1.0 KiB
C#

using Robust.Shared.GameStates;
namespace Content.Shared.Trigger.Components.Effects;
/// <summary>
/// Changes the alert level of the station when triggered.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class AlertLevelChangeOnTriggerComponent : BaseXOnTriggerComponent
{
///<summary>
/// The alert level to change to when triggered.
///</summary>
[DataField, AutoNetworkedField]
public string Level = "blue";
/// <summary>
/// Whether to play the sound when the alert level changes.
/// </summary>
[DataField, AutoNetworkedField]
public bool PlaySound = true;
/// <summary>
/// Whether to say the announcement when the alert level changes.
/// </summary>
[DataField, AutoNetworkedField]
public bool Announce = true;
/// <summary>
/// Force the alert change. This applies if the alert level is not selectable or not.
/// </summary>
[DataField, AutoNetworkedField]
public bool Force = false;
}