From fa8c16358f33c098b6d565a945fef955653fe0b1 Mon Sep 17 00:00:00 2001 From: vulppine Date: Tue, 30 Aug 2022 21:41:29 -0700 Subject: [PATCH] alarmables should now attempt to update appearance on init --- .../Atmos/Monitor/Systems/AtmosAlarmableSystem.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs b/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs index 5075fcb0e4..02e80ed859 100644 --- a/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs @@ -41,10 +41,20 @@ public sealed class AtmosAlarmableSystem : EntitySystem public override void Initialize() { + SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnPacketRecv); SubscribeLocalEvent(OnPowerChange); } + private void OnInit(EntityUid uid, AtmosAlarmableComponent component, ComponentInit args) + { + TryUpdateAlert( + uid, + TryGetHighestAlert(uid, out var alarm) ? alarm.Value : AtmosAlarmType.Normal, + component, + false); + } + private void OnPowerChange(EntityUid uid, AtmosAlarmableComponent component, PowerChangedEvent args) { if (!args.Powered)