CatStation/Content.Client/Atmos/Piping/Trinary/EntitySystems/GasMixerSystem.cs
psykana ad60a5a5a5
Predict gas filter and mixer BUIs (#43712)
* move

* NetworkedComponent

* anchor

* split

* move

* mixer

* fix

* builds

* I forgor

* moar

* filename typo

* fix admin log

* ftl

* metadata

* IOC readonly 2

* yet another IOC readonly

* new features

* test I fix you

* review 1

* review 2

* docs
2026-07-19 23:50:39 +00:00

27 lines
818 B
C#

using Content.Shared.Atmos.Piping.Trinary.Components;
using Content.Shared.Atmos.Piping.Trinary.EntitySystems;
using Robust.Client.GameObjects;
namespace Content.Client.Atmos.Piping.Trinary.EntitySystems;
public sealed partial class GasMixerSystem : SharedGasMixerSystem
{
[Dependency] private UserInterfaceSystem _ui = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<GasMixerComponent, AfterAutoHandleStateEvent>(OnMixerState);
}
protected override void UpdateUi(Entity<GasMixerComponent> ent)
{
if (_ui.TryGetOpenUi(ent.Owner, GasMixerUiKey.Key, out var bui))
bui.Update();
}
private void OnMixerState(Entity<GasMixerComponent> ent, ref AfterAutoHandleStateEvent args)
{
UpdateUi(ent);
}
}