Files
ss14-wl/Content.Server/Disposal/Unit/BeingDisposedSystem.cs
a1d7406bf2 Move a metric fuckton of AtmosphereSystem to Shared. (#42989)
* AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

* fix the tests I broke

* Remove methods that the client shouldn't be calling. Hamburger.

* light cleanup for now

* review

* whoop

* docs updates and misc changes

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
2026-03-14 08:53:49 +00:00

43 lines
1.3 KiB
C#

using Content.Server.Atmos.EntitySystems;
using Content.Server.Body.Systems;
using Content.Shared.Atmos;
namespace Content.Server.Disposal.Unit;
public sealed class BeingDisposedSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<BeingDisposedComponent, InhaleLocationEvent>(OnInhaleLocation);
SubscribeLocalEvent<BeingDisposedComponent, ExhaleLocationEvent>(OnExhaleLocation);
SubscribeLocalEvent<BeingDisposedComponent, AtmosExposedGetAirEvent>(OnGetAir);
}
private void OnGetAir(EntityUid uid, BeingDisposedComponent component, ref AtmosExposedGetAirEvent args)
{
if (TryComp<DisposalHolderComponent>(component.Holder, out var holder))
{
args.Gas = holder.Air;
args.Handled = true;
}
}
private void OnInhaleLocation(EntityUid uid, BeingDisposedComponent component, InhaleLocationEvent args)
{
if (TryComp<DisposalHolderComponent>(component.Holder, out var holder))
{
args.Gas = holder.Air;
}
}
private void OnExhaleLocation(EntityUid uid, BeingDisposedComponent component, ExhaleLocationEvent args)
{
if (TryComp<DisposalHolderComponent>(component.Holder, out var holder))
{
args.Gas = holder.Air;
}
}
}