Files
tbd-station-14/Content.Server/Atmos/Components/BarotraumaComponent.cs
2022-04-15 15:41:47 -07:00

32 lines
1.0 KiB
C#

using Content.Shared.Damage;
using Content.Shared.FixedPoint;
namespace Content.Server.Atmos.Components
{
/// <summary>
/// Barotrauma: injury because of changes in air pressure.
/// </summary>
[RegisterComponent]
public sealed class BarotraumaComponent : Component
{
[DataField("damage", required: true)]
[ViewVariables(VVAccess.ReadWrite)]
public DamageSpecifier Damage = default!;
[DataField("maxDamage")]
[ViewVariables(VVAccess.ReadWrite)]
public FixedPoint2 MaxDamage = 200;
/// <summary>
/// Used to keep track of when damage starts/stops. Useful for logs.
/// </summary>
public bool TakingDamage = false;
/// <summary>
/// These are the inventory slots that are checked for pressure protection. If a slot is missing protection, no protection is applied.
/// </summary>
[DataField("protectionSlots")]
public List<string> ProtectionSlots = new() { "head", "outerClothing" };
}
}