Add logging for hacking (#12861)
This commit is contained in:
@@ -11,6 +11,11 @@ namespace Content.Server.Atmos.Monitor;
|
||||
public sealed class AirAlarmPanicWire : BaseWireAction
|
||||
{
|
||||
private string _text = "PANC";
|
||||
protected override string Text
|
||||
{
|
||||
get => _text;
|
||||
set => _text = value;
|
||||
}
|
||||
private Color _color = Color.Red;
|
||||
|
||||
private AirAlarmSystem _airAlarmSystem = default!;
|
||||
@@ -42,6 +47,7 @@ public sealed class AirAlarmPanicWire : BaseWireAction
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire)
|
||||
{
|
||||
base.Cut(user, wire);
|
||||
if (EntityManager.TryGetComponent<DeviceNetworkComponent>(wire.Owner, out var devNet))
|
||||
{
|
||||
_airAlarmSystem.SetMode(wire.Owner, devNet.Address, AirAlarmMode.Panic, false);
|
||||
@@ -52,6 +58,7 @@ public sealed class AirAlarmPanicWire : BaseWireAction
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire)
|
||||
{
|
||||
base.Mend(user, wire);
|
||||
if (EntityManager.TryGetComponent<DeviceNetworkComponent>(wire.Owner, out var devNet)
|
||||
&& EntityManager.TryGetComponent<AirAlarmComponent>(wire.Owner, out var alarm)
|
||||
&& alarm.CurrentMode == AirAlarmMode.Panic)
|
||||
@@ -65,6 +72,7 @@ public sealed class AirAlarmPanicWire : BaseWireAction
|
||||
|
||||
public override bool Pulse(EntityUid user, Wire wire)
|
||||
{
|
||||
base.Pulse(user, wire);
|
||||
if (EntityManager.TryGetComponent<DeviceNetworkComponent>(wire.Owner, out var devNet))
|
||||
{
|
||||
_airAlarmSystem.SetMode(wire.Owner, devNet.Address, AirAlarmMode.Panic, false);
|
||||
|
||||
@@ -15,6 +15,11 @@ public sealed class AtmosMonitorDeviceNetWire : BaseWireAction
|
||||
private bool _alarmOnPulse = false;
|
||||
|
||||
private string _text = "NETW";
|
||||
protected override string Text
|
||||
{
|
||||
get => _text;
|
||||
set => _text = value;
|
||||
}
|
||||
private Color _color = Color.Orange;
|
||||
|
||||
private AtmosAlarmableSystem _atmosAlarmableSystem = default!;
|
||||
@@ -52,6 +57,7 @@ public sealed class AtmosMonitorDeviceNetWire : BaseWireAction
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire)
|
||||
{
|
||||
base.Cut(user, wire);
|
||||
if (EntityManager.TryGetComponent<AtmosAlarmableComponent>(wire.Owner, out var monitor))
|
||||
{
|
||||
monitor.IgnoreAlarms = true;
|
||||
@@ -62,6 +68,7 @@ public sealed class AtmosMonitorDeviceNetWire : BaseWireAction
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire)
|
||||
{
|
||||
base.Mend(user, wire);
|
||||
if (EntityManager.TryGetComponent<AtmosAlarmableComponent>(wire.Owner, out var monitor))
|
||||
{
|
||||
monitor.IgnoreAlarms = false;
|
||||
@@ -72,6 +79,7 @@ public sealed class AtmosMonitorDeviceNetWire : BaseWireAction
|
||||
|
||||
public override bool Pulse(EntityUid user, Wire wire)
|
||||
{
|
||||
base.Pulse(user, wire);
|
||||
if (_alarmOnPulse)
|
||||
{
|
||||
_atmosAlarmableSystem.ForceAlert(wire.Owner, AtmosAlarmType.Danger);
|
||||
|
||||
Reference in New Issue
Block a user