Atmospheric alerts computer (#25938)
* 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
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user