copy-settings-to-all-similar for scrubbers and vents in air alarms (#18363)

This commit is contained in:
Ilya246
2023-08-09 22:20:19 +04:00
committed by GitHub
parent aee88e1721
commit d3244b6049
9 changed files with 71 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ namespace Content.Client.Atmos.Monitor.UI;
public sealed partial class AirAlarmWindow : FancyWindow
{
public event Action<string, IAtmosDeviceData>? AtmosDeviceDataChanged;
public event Action<IAtmosDeviceData>? AtmosDeviceDataCopied;
public event Action<string, AtmosMonitorThresholdType, AtmosAlarmThreshold, Gas?>? AtmosAlarmThresholdChanged;
public event Action<AirAlarmMode>? AirAlarmModeChanged;
public event Action<bool>? AutoModeChanged;
@@ -137,6 +138,7 @@ public sealed partial class AirAlarmWindow : FancyWindow
{
var control= new PumpControl(pump, addr);
control.PumpDataChanged += AtmosDeviceDataChanged!.Invoke;
control.PumpDataCopied += AtmosDeviceDataCopied!.Invoke;
_pumps.Add(addr, control);
CVentContainer.AddChild(control);
}
@@ -151,6 +153,7 @@ public sealed partial class AirAlarmWindow : FancyWindow
{
var control = new ScrubberControl(scrubber, addr);
control.ScrubberDataChanged += AtmosDeviceDataChanged!.Invoke;
control.ScrubberDataCopied += AtmosDeviceDataCopied!.Invoke;
_scrubbers.Add(addr, control);
CScrubberContainer.AddChild(control);
}