Add health analyzer and medical scanner ECS (#6907)
Co-authored-by: fishfish458 <fishfish458> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
27
Content.Server/Medical/Components/HealthAnalyzerComponent.cs
Normal file
27
Content.Server/Medical/Components/HealthAnalyzerComponent.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Threading;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.MedicalScanner;
|
||||
using Robust.Server.GameObjects;
|
||||
|
||||
namespace Content.Server.Medical.Components
|
||||
{
|
||||
/// <summary>
|
||||
/// After scanning, retrieves the target Uid to use with its related UI.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedHealthAnalyzerComponent))]
|
||||
public sealed class HealthAnalyzerComponent : SharedHealthAnalyzerComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// How long it takes to scan someone.
|
||||
/// </summary>
|
||||
[DataField("scanDelay")]
|
||||
[ViewVariables]
|
||||
public float ScanDelay = 0.8f;
|
||||
/// <summary>
|
||||
/// Token for interrupting scanning do after.
|
||||
/// </summary>
|
||||
public CancellationTokenSource? CancelToken;
|
||||
public BoundUserInterface? UserInterface => Owner.GetUIOrNull(HealthAnalyzerUiKey.Key);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user