fish-station/Content.Server/Medical/CrewMonitoring/CrewMonitoringConsoleComponent.cs
Copilot 1d5b41f2a9
Add morgue alert sound to crew monitoring consoles for corpses outside morgues (#2975)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: VigersRay <60344369+VigersRay@users.noreply.github.com>
2025-08-25 11:59:54 +03:00

45 lines
1.6 KiB
C#

using Content.Shared.Medical.SuitSensor;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Medical.CrewMonitoring;
[RegisterComponent]
[Access(typeof(CrewMonitoringConsoleSystem))]
public sealed partial class CrewMonitoringConsoleComponent : Component
{
/// <summary>
/// List of all currently connected sensors to this console.
/// </summary>
public Dictionary<string, SuitSensorStatus> ConnectedSensors = new();
/// <summary>
/// After what time sensor consider to be lost.
/// </summary>
[DataField("sensorTimeout"), ViewVariables(VVAccess.ReadWrite)]
public float SensorTimeout = 10f;
/// <summary>
/// Whether the console should beep when corpses with sensors are detected outside morgues.
/// </summary>
[DataField("doCorpseAlert"), ViewVariables(VVAccess.ReadWrite)]
public bool DoCorpseAlert = true;
/// <summary>
/// Next time to check for corpses and potentially play alert sound.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan NextCorpseAlertTime = TimeSpan.Zero;
/// <summary>
/// The amount of time between each corpse alert beep.
/// </summary>
[DataField("corpseAlertTime"), ViewVariables(VVAccess.ReadWrite)]
public float CorpseAlertTime = 15f;
/// <summary>
/// Sound to play when corpses with sensors are detected outside morgues.
/// </summary>
[DataField("corpseAlertSound")]
public SoundSpecifier CorpseAlertSound = new SoundPathSpecifier("/Audio/Weapons/Guns/EmptyAlarm/smg_empty_alarm.ogg");
}