Files
tbd-station-14/Content.Client/Atmos/EntitySystems/GasPressurePumpSystem.cs
Milon 92a3fd99ca Fix gas pressure pump prediction (#35865)
* ACTUALLY predict gas pumps

* generic fake

* aaaaaaaaaaaaa
2025-03-28 10:42:16 +11:00

28 lines
801 B
C#

using Content.Shared.Atmos.Components;
using Content.Shared.Atmos.EntitySystems;
using Content.Shared.Atmos.Piping.Binary.Components;
namespace Content.Client.Atmos.EntitySystems;
public sealed class GasPressurePumpSystem : SharedGasPressurePumpSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<GasPressurePumpComponent, AfterAutoHandleStateEvent>(OnPumpUpdate);
}
private void OnPumpUpdate(Entity<GasPressurePumpComponent> ent, ref AfterAutoHandleStateEvent args)
{
UpdateUi(ent);
}
protected override void UpdateUi(Entity<GasPressurePumpComponent> ent)
{
if (UserInterfaceSystem.TryGetOpenUi(ent.Owner, GasPressurePumpUiKey.Key, out var bui))
{
bui.Update();
}
}
}