using System.Threading; using Content.Server.UserInterface; using Content.Shared.Disease; using Content.Shared.MedicalScanner; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Medical.Components { /// /// After scanning, retrieves the target Uid to use with its related UI. /// [RegisterComponent] [ComponentReference(typeof(SharedHealthAnalyzerComponent))] public sealed class HealthAnalyzerComponent : SharedHealthAnalyzerComponent { /// /// How long it takes to scan someone. /// [DataField("scanDelay")] public float ScanDelay = 0.8f; /// /// Token for interrupting scanning do after. /// public CancellationTokenSource? CancelToken; public BoundUserInterface? UserInterface => Owner.GetUIOrNull(HealthAnalyzerUiKey.Key); /// /// Sound played on scanning begin /// [DataField("scanningBeginSound")] public SoundSpecifier? ScanningBeginSound = null; /// /// Sound played on scanning end /// [DataField("scanningEndSound")] public SoundSpecifier? ScanningEndSound = null; /// /// The disease this will give people. /// [DataField("disease", customTypeSerializer: typeof(PrototypeIdSerializer))] [ViewVariables(VVAccess.ReadWrite)] public string? Disease; } }