using Content.Shared.Atmos.EntitySystems; using Content.Shared.Atmos.Piping.Binary.Components; namespace Content.Client.Atmos.EntitySystems; /// /// Represents the client system responsible for managing and updating the gas pressure regulator interface. /// Inherits from the shared system . /// public sealed partial class GasPressureRegulatorSystem : SharedGasPressureRegulatorSystem { public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnValveUpdate); } private void OnValveUpdate(Entity ent, ref AfterAutoHandleStateEvent args) { UpdateUi(ent); } protected override void UpdateUi(Entity ent) { if (UserInterfaceSystem.TryGetOpenUi(ent.Owner, GasPressureRegulatorUiKey.Key, out var bui)) { bui.Update(); } } }