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:
chromiumboy
2024-09-04 20:13:17 -05:00
committed by GitHub
parent 04bb4b53a5
commit 63ba0f61ea
16 changed files with 1711 additions and 6 deletions

View File

@@ -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);
}
}