* Atmospheric alerts computer * Moved components, restricted access to them * Minor tweaks * The screen will now turn off when the computer is not powered * Bug fix * Adjusted label * Updated to latest master version
25 lines
726 B
C#
25 lines
726 B
C#
using Content.Shared.Atmos.Components;
|
|
|
|
namespace Content.Shared.Atmos.Consoles;
|
|
|
|
public abstract partial class SharedAtmosAlertsComputerSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<AtmosAlertsComputerComponent, AtmosAlertsComputerDeviceSilencedMessage>(OnDeviceSilencedMessage);
|
|
}
|
|
|
|
private void OnDeviceSilencedMessage(EntityUid uid, AtmosAlertsComputerComponent component, AtmosAlertsComputerDeviceSilencedMessage args)
|
|
{
|
|
if (args.SilenceDevice)
|
|
component.SilencedDevices.Add(args.AtmosDevice);
|
|
|
|
else
|
|
component.SilencedDevices.Remove(args.AtmosDevice);
|
|
|
|
Dirty(uid, component);
|
|
}
|
|
}
|