Files
crystall-punk-14/Content.Server/Medical/Components/HealingComponent.cs
Leon Friedrich 19277a2276 More DoAfter Changes (#14609)
* DoAfters

* Compact Clone()

* Fix mice and cuffables

* Try generalize attempt events

* moves climbabledoafter event to shared, fixes issue with climbable target

* Fix merge (cuffing)

* Make all events netserializable

* handful of doafter events moved

* moves the rest of the events to their respective shared folders

* Changes all mentions of server doafter to shared

* stop stripping cancellation

* fix merge errors

* draw paused doafters

* handle unpausing

* missing netserializable ref

* removes break on stun reference

* removes cuffing state reference

* Fix tools

* Fix door prying.

* Fix construction

* Fix dumping

* Fix wielding assert

* fix rev

* Fix test

* more test fixes

---------

Co-authored-by: keronshb <keronshb@live.com>
2023-04-02 21:13:48 -04:00

61 lines
2.1 KiB
C#

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