private void OnEmagged(EntityUid uid, FireAlarmComponent component, GotEmaggedEvent args) { if (TryComp <AtmosMonitorComponent>(uid, out var atmosMonitor)) { if (atmosMonitor?.MonitorFire == true) { atmosMonitor.MonitorFire = false; _monitorSystem.Alert(uid, AtmosMonitorAlarmType.Emagged); args.Handled = true; } } }
private void OnInteractHand(EntityUid uid, FireAlarmComponent component, InteractHandEvent args) { if (!_interactionSystem.InRangeUnobstructed(args.User, args.Target)) { return; } if (EntityManager.TryGetComponent(args.User, out ActorComponent? actor) && EntityManager.TryGetComponent(uid, out AtmosMonitorComponent? monitor) && this.IsPowered(uid, EntityManager)) { if (monitor.HighestAlarmInNetwork == AtmosMonitorAlarmType.Normal) { _monitorSystem.Alert(uid, AtmosMonitorAlarmType.Danger); } else { _monitorSystem.ResetAll(uid); } } }