using Content.Client.Atmos.UI; using Content.Shared.Atmos.Piping.Binary.Components; using Content.Shared.Atmos.Piping.Unary.Components; using Content.Shared.Atmos.Piping.Unary.Systems; using Content.Shared.NodeContainer; namespace Content.Client.Atmos.Piping.Unary.Systems; public sealed class GasCanisterSystem : SharedGasCanisterSystem { public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnGasState); } private void OnGasState(Entity ent, ref AfterAutoHandleStateEvent args) { if (UI.TryGetOpenUi(ent.Owner, GasCanisterUiKey.Key, out var bui)) { bui.Update(); } } protected override void DirtyUI(EntityUid uid, GasCanisterComponent? component = null, NodeContainerComponent? nodes = null) { if (UI.TryGetOpenUi(uid, GasCanisterUiKey.Key, out var bui)) { bui.Update(); } } }