using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Shared.EntityConditions;
using Content.Shared.EntityConditions.Conditions.Body;
namespace Content.Server.EntityConditions.Conditions;
///
/// Returns true if this entity is both able to breathe and is currently breathing.
///
///
public sealed partial class IsBreathingEntityConditionSystem : EntityConditionSystem
{
[Dependency] private readonly RespiratorSystem _respirator = default!;
protected override void Condition(Entity entity, ref EntityConditionEvent args)
{
args.Result = _respirator.IsBreathing(entity.AsNullable());
}
}