diff --git a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs index cbd6abe9f5..126c4f963c 100644 --- a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs @@ -56,7 +56,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem SubscribeLocalEvent(OnConsoleShutdown); SubscribeLocalEvent(OnConsolePowerChange); SubscribeLocalEvent(OnConsoleAnchorChange); - SubscribeLocalEvent(OnConsoleUIOpenAttempt); + SubscribeLocalEvent(OnConsoleUIOpenAttempt); Subs.BuiEvents(ShuttleConsoleUiKey.Key, subs => { subs.Event(OnBeaconFTLMessage); @@ -150,10 +150,9 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem } private void OnConsoleUIOpenAttempt(EntityUid uid, ShuttleConsoleComponent component, - ActivatableUIOpenAttemptEvent args) + AfterActivatableUIOpenEvent args) { - if (!TryPilot(args.User, uid)) - args.Cancel(); + TryPilot(args.User, uid); } private void OnConsoleAnchorChange(EntityUid uid, ShuttleConsoleComponent component, diff --git a/Content.Shared/UserInterface/ActivatableUIEvents.cs b/Content.Shared/UserInterface/ActivatableUIEvents.cs index 338673a3ca..ef2a7b1b9f 100644 --- a/Content.Shared/UserInterface/ActivatableUIEvents.cs +++ b/Content.Shared/UserInterface/ActivatableUIEvents.cs @@ -1,6 +1,9 @@ -using Robust.Shared.Player; - namespace Content.Shared.UserInterface; + +/// +/// This is raised BEFORE opening a UI! Do not listen and then open / do something use +/// for that. +/// public sealed class ActivatableUIOpenAttemptEvent : CancellableEntityEventArgs { public EntityUid User { get; }