Files
Delta-v/Content.Server/Medical/InsideCryoPodSystem.cs
T
733d479425 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-06-29 12:44:04 +02:00

49 lines
1.6 KiB
C#

using Content.Server.Body.Systems;
using Content.Server.Medical.Components;
using Content.Shared.Atmos;
using Content.Shared.Medical.Cryogenics;
namespace Content.Server.Medical
{
public sealed partial class CryoPodSystem
{
public override void InitializeInsideCryoPod()
{
base.InitializeInsideCryoPod();
// Atmos overrides
SubscribeLocalEvent<InsideCryoPodComponent, InhaleLocationEvent>(OnInhaleLocation);
SubscribeLocalEvent<InsideCryoPodComponent, ExhaleLocationEvent>(OnExhaleLocation);
SubscribeLocalEvent<InsideCryoPodComponent, AtmosExposedGetAirEvent>(OnGetAir);
}
#region Atmos handlers
private void OnGetAir(EntityUid uid, InsideCryoPodComponent component, ref AtmosExposedGetAirEvent args)
{
if (TryComp<CryoPodAirComponent>(Transform(uid).ParentUid, out var cryoPodAir))
{
args.Gas = cryoPodAir.Air;
args.Handled = true;
}
}
private void OnInhaleLocation(EntityUid uid, InsideCryoPodComponent component, InhaleLocationEvent args)
{
if (TryComp<CryoPodAirComponent>(Transform(uid).ParentUid, out var cryoPodAir))
{
args.Gas = cryoPodAir.Air;
}
}
private void OnExhaleLocation(EntityUid uid, InsideCryoPodComponent component, ExhaleLocationEvent args)
{
if (TryComp<CryoPodAirComponent>(Transform(uid).ParentUid, out var cryoPodAir))
{
args.Gas = cryoPodAir.Air;
}
}
#endregion
}
}