private void OnPlayerDetached(EntityUid uid, AlertsComponent component, PlayerDetachedEvent args) { if (_playerManager.LocalPlayer?.ControlledEntity != uid) { return; } ClearAlerts?.Invoke(this, EventArgs.Empty); }
protected override void HandleComponentShutdown(EntityUid uid, AlertsComponent component, ComponentShutdown args) { base.HandleComponentShutdown(uid, component, args); if (_playerManager.LocalPlayer?.ControlledEntity != uid) { return; } ClearAlerts?.Invoke(this, EventArgs.Empty); }
private void PlayerDetached() { ClearAlerts?.Invoke(this, EventArgs.Empty); }