using System.Threading;
using Content.Shared.Damage;
using Content.Shared.Damage.Prototypes;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Medical.Components
{
///
/// Applies a damage change to the target when used in an interaction.
///
[RegisterComponent]
public sealed class HealingComponent : Component
{
[DataField("damage", required: true)]
[ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier Damage = default!;
///
/// This should generally be negative,
/// since you're, like, trying to heal damage.
///
[DataField("bloodlossModifier")]
[ViewVariables(VVAccess.ReadWrite)]
public float BloodlossModifier = 0.0f;
///
/// The supported damage types are specified using a s. For a
/// HealingComponent this filters what damage container type this component should work on. If null,
/// all damage container types are supported.
///
[DataField("damageContainer", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string? DamageContainerID;
///
/// How long it takes to apply the damage.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("delay")]
public float Delay = 3f;
///
/// Delay multiplier when healing yourself.
///
[DataField("selfHealPenaltyMultiplier")]
public float SelfHealPenaltyMultiplier = 3f;
public CancellationTokenSource? CancelToken = null;
///
/// Sound played on healing begin
///
[DataField("healingBeginSound")]
public SoundSpecifier? HealingBeginSound = null;
///
/// Sound played on healing end
///
[DataField("healingEndSound")]
public SoundSpecifier? HealingEndSound = null;
}
}