air alarm panic wire snipping forces panic mode (#36439)
* air alarm panic wire snipping forces panic mode * document * ForcedMode is datafield * switch to bool flag * lock button when panic wire cut * prevent manually individually changing scrubbers from siphon when panic wire is cut * failure alert when wire snipped * is Control * remove double horizontalExpand * Update Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs * Update Content.Server/Atmos/Monitor/Systems/AirAlarmSystem.cs --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -466,11 +466,17 @@ public sealed class AirAlarmSystem : EntitySystem
|
||||
/// <param name="uiOnly">Whether this change is for the UI only, or if it changes the air alarm's operating mode. Defaults to true.</param>
|
||||
public void SetMode(EntityUid uid, string origin, AirAlarmMode mode, bool uiOnly = true, AirAlarmComponent? controller = null)
|
||||
{
|
||||
if (!Resolve(uid, ref controller) || controller.CurrentMode == mode)
|
||||
if (!Resolve(uid, ref controller))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (controller.PanicWireCut)
|
||||
{
|
||||
mode = AirAlarmMode.Panic;
|
||||
}
|
||||
|
||||
|
||||
controller.CurrentMode = mode;
|
||||
|
||||
// setting it to UI only means we don't have
|
||||
@@ -652,6 +658,7 @@ public sealed class AirAlarmSystem : EntitySystem
|
||||
}
|
||||
foreach (var (addr, data) in alarm.ScrubberData)
|
||||
{
|
||||
data.AirAlarmPanicWireCut = alarm.PanicWireCut;
|
||||
dataToSend.Add((addr, data));
|
||||
}
|
||||
foreach (var (addr, data) in alarm.SensorData)
|
||||
@@ -669,7 +676,7 @@ public sealed class AirAlarmSystem : EntitySystem
|
||||
_ui.SetUiState(
|
||||
uid,
|
||||
SharedAirAlarmInterfaceKey.Key,
|
||||
new AirAlarmUIState(devNet.Address, deviceCount, pressure, temperature, dataToSend, alarm.CurrentMode, highestAlarm.Value, alarm.AutoMode));
|
||||
new AirAlarmUIState(devNet.Address, deviceCount, pressure, temperature, dataToSend, alarm.CurrentMode, highestAlarm.Value, alarm.AutoMode, alarm.PanicWireCut));
|
||||
}
|
||||
|
||||
private const float Delay = 8f;
|
||||
|
||||
Reference in New Issue
Block a user