diff --git a/Content.Server/Mech/Systems/MechSystem.cs b/Content.Server/Mech/Systems/MechSystem.cs index 7a82d51dab..105a3f4144 100644 --- a/Content.Server/Mech/Systems/MechSystem.cs +++ b/Content.Server/Mech/Systems/MechSystem.cs @@ -184,7 +184,8 @@ public sealed partial class MechSystem : SharedMechSystem { if (args.User == uid || args.User == operatorUid) { - TryEject(uid, component); + if(TryEject(uid, component)) + _ui.CloseUi(uid, MechUiKey.Key); return; } @@ -226,6 +227,7 @@ public sealed partial class MechSystem : SharedMechSystem if (!TryEject(uid, component)) return; + _ui.CloseUi(uid, MechUiKey.Key); args.Handled = true; }