alarmables should now attempt to update appearance on init
This commit is contained in:
@@ -41,10 +41,20 @@ public sealed class AtmosAlarmableSystem : EntitySystem
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<AtmosAlarmableComponent, ComponentInit>(OnInit);
|
||||
SubscribeLocalEvent<AtmosAlarmableComponent, DeviceNetworkPacketEvent>(OnPacketRecv);
|
||||
SubscribeLocalEvent<AtmosAlarmableComponent, PowerChangedEvent>(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)
|
||||
|
||||
Reference in New Issue
Block a user