mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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
27 lines
818 B
C#
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);
|
|
}
|
|
}
|