Пример #1
0
        private void OnAtmosAlarm(EntityUid uid, FirelockComponent component, AtmosMonitorAlarmEvent args)
        {
            if (!TryComp <DoorComponent>(uid, out var doorComponent))
            {
                return;
            }

            if (args.HighestNetworkType == AtmosMonitorAlarmType.Normal)
            {
                if (doorComponent.State == DoorState.Closed)
                {
                    _doorSystem.TryOpen(uid);
                }
            }
            else if (args.HighestNetworkType == AtmosMonitorAlarmType.Danger)
            {
                component.EmergencyPressureStop();
            }
        }
Пример #2
0
        private void OnAtmosAlarm(EntityUid uid, FirelockComponent component, AtmosMonitorAlarmEvent args)
        {
            if (component.DoorComponent == null)
            {
                return;
            }

            if (args.HighestNetworkType == AtmosMonitorAlarmType.Normal)
            {
                if (component.DoorComponent.State == SharedDoorComponent.DoorState.Closed)
                {
                    component.DoorComponent.Open();
                }
            }
            else if (args.HighestNetworkType == AtmosMonitorAlarmType.Danger)
            {
                component.EmergencyPressureStop();
            }
        }