using Content.Server.Body.Systems;
using Content.Shared.Atmos;
using Content.Shared.Disposal.Unit;
namespace Content.Server.Disposal.Unit;
///
public sealed partial class BeingDisposedSystem : SharedBeingDisposedSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent(OnInhaleLocation);
SubscribeLocalEvent(OnExhaleLocation);
SubscribeLocalEvent(OnGetAir);
}
private void OnGetAir(Entity ent, ref AtmosExposedGetAirEvent args)
{
if (TryComp(ent.Comp.Holder, out var holder))
{
args.Gas = holder.Air;
args.Handled = true;
}
}
private void OnInhaleLocation(Entity ent, ref InhaleLocationEvent args)
{
if (TryComp(ent.Comp.Holder, out var holder))
{
args.Gas = holder.Air;
}
}
private void OnExhaleLocation(Entity ent, ref ExhaleLocationEvent args)
{
if (TryComp(ent.Comp.Holder, out var holder))
{
args.Gas = holder.Air;
}
}
}