fish-station/Content.Server/AbstractAnalyzer/AbstractAnalyzerComponent.cs
Vigers Ray 7ff54dabdb мда
2025-04-12 04:55:26 +03:00

68 lines
1.8 KiB
C#

using Robust.Shared.Audio;
namespace Content.Server.AbstractAnalyzer;
/// <summary>
/// After scanning, retrieves the target Uid to use with its related UI.
/// </summary>
/// <remarks>
/// Requires <c>ItemToggleComponent</c>.
/// </remarks>
public abstract partial class AbstractAnalyzerComponent : Component
{
/// <summary>
/// When should the next update be sent for the patient
/// </summary>
/// <remarks>
/// Override this in your implementation with:
///
/// ```cs
/// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
/// [AutoPausedField]
/// public override TimeSpan NextUpdate { get; set; } = TimeSpan.Zero;
/// ```
/// </remarks>
public abstract TimeSpan NextUpdate { get; set; }
/// <summary>
/// The delay between patient health updates
/// </summary>
[DataField]
public TimeSpan UpdateInterval = TimeSpan.FromSeconds(1);
/// <summary>
/// How long it takes to scan someone.
/// </summary>
[DataField]
public TimeSpan ScanDelay = TimeSpan.FromSeconds(0.8);
/// <summary>
/// Which entity has been scanned, for continuous updates
/// </summary>
[DataField]
public EntityUid? ScannedEntity;
/// <summary>
/// The maximum range in tiles at which the analyzer can receive continuous updates
/// </summary>
[DataField]
public float? MaxScanRange = 2.5f;
/// <summary>
/// Sound played on scanning begin
/// </summary>
[DataField]
public SoundSpecifier? ScanningBeginSound;
/// <summary>
/// Sound played on scanning end
/// </summary>
[DataField]
public SoundSpecifier ScanningEndSound = new SoundPathSpecifier("/Audio/Items/Medical/healthscanner.ogg");
/// <summary>
/// Whether to show up the popup
/// </summary>
[DataField]
public bool Silent;
}