Files
ss14-wega/Content.Client/Atmos/Piping/Binary/Systems/GasVolumePumpSystem.cs
T
Pieter-Jan Briers 5168b5f3d4 IoC source gen compatibility (#43863)
* 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
2026-05-09 03:29:58 +00:00

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);
}
}