mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* Predicted gas pumps I wanted to try out atmos and first thing I found. * a * Remove details range (cherry picked from commit 9365e3a99bad75f7426fcc07fa6f406ba23e9620)
24 lines
756 B
C#
24 lines
756 B
C#
using Content.Client.Atmos.UI;
|
|
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)
|
|
{
|
|
if (UserInterfaceSystem.TryGetOpenUi<GasPressurePumpBoundUserInterface>(ent.Owner, GasPressurePumpUiKey.Key, out var bui))
|
|
{
|
|
bui.Update();
|
|
}
|
|
}
|
|
}
|