mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-06-09 15:06:34 +02:00
5168b5f3d4
* IoC source gen compatibility Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter. * Missed a spot
30 lines
857 B
C#
30 lines
857 B
C#
using Content.Shared.Atmos.Piping.Binary.Components;
|
|
using Content.Shared.Atmos.Piping.Binary.Systems;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.Atmos.Piping.Binary.Systems;
|
|
|
|
public sealed partial class GasVolumePumpSystem : SharedGasVolumePumpSystem
|
|
{
|
|
[Dependency] private UserInterfaceSystem _ui = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<GasVolumePumpComponent, AfterAutoHandleStateEvent>(OnPumpState);
|
|
}
|
|
|
|
protected override void UpdateUi(Entity<GasVolumePumpComponent> entity)
|
|
{
|
|
if (_ui.TryGetOpenUi(entity.Owner, GasVolumePumpUiKey.Key, out var bui))
|
|
{
|
|
bui.Update();
|
|
}
|
|
}
|
|
|
|
private void OnPumpState(Entity<GasVolumePumpComponent> ent, ref AfterAutoHandleStateEvent args)
|
|
{
|
|
UpdateUi(ent);
|
|
}
|
|
}
|