mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-09-15 14:52:26 +02:00
* 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>
43 lines
1.3 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|