mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Mech Control Panel now closes on Pilot Eject. (#45036)
* Fix for mech control panel not closing on pilot exit. * Added line spaces back to maintain formatting. * Check for TryEject to see if we should actually close the UI. * Added second _ui.CloseUI() to OnMechExit event, will properly close UI for pilot if they are forcefully ejected from the cockpit.
This commit is contained in:
parent
49f8774d9d
commit
5280f0cebe
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue