2023-01-12 01:38:39 -05:00
|
|
|
using Robust.Shared.Audio;
|
2024-02-06 13:20:09 +00:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
2022-03-07 21:45:52 -06:00
|
|
|
|
2024-02-06 13:20:09 +00:00
|
|
|
namespace Content.Server.Medical.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// After scanning, retrieves the target Uid to use with its related UI.
|
|
|
|
|
/// </summary>
|
2024-07-11 05:55:56 +00:00
|
|
|
/// <remarks>
|
|
|
|
|
/// Requires <c>ItemToggleComponent</c>.
|
|
|
|
|
/// </remarks>
|
2024-02-26 04:36:19 +01:00
|
|
|
[RegisterComponent, AutoGenerateComponentPause]
|
2024-02-21 17:47:23 +03:00
|
|
|
[Access(typeof(HealthAnalyzerSystem), typeof(CryoPodSystem))]
|
2024-02-06 13:20:09 +00:00
|
|
|
public sealed partial class HealthAnalyzerComponent : Component
|
2022-03-07 21:45:52 -06:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2024-02-06 13:20:09 +00:00
|
|
|
/// When should the next update be sent for the patient
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
|
2024-02-26 04:36:19 +01:00
|
|
|
[AutoPausedField]
|
2024-02-06 13:20:09 +00:00
|
|
|
public TimeSpan NextUpdate = TimeSpan.Zero;
|
|
|
|
|
|
|
|
|
|
/// <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
|
2022-03-07 21:45:52 -06:00
|
|
|
/// </summary>
|
2024-02-06 13:20:09 +00:00
|
|
|
[DataField]
|
2024-10-02 07:17:57 +01:00
|
|
|
public SoundSpecifier ScanningEndSound = new SoundPathSpecifier("/Audio/Items/Medical/healthscanner.ogg");
|
2024-08-19 05:02:18 +02:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether to show up the popup
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public bool Silent;
|
2022-03-07 21:45:52 -06:00
|
|
|
}
|